	// AJAX ----------------------------------------

var xmlHttp_Affiliate;

function GetxmlHttpObject(){

var xmlHttp_Affiliate = null;

	try {
	  // Firefox, Opera 8.0+, Safari
	  xmlHttp_Affiliate = new xmlHttpRequest();
	  }
	catch (e) {
	  // Internet Explorer
	  try {
			xmlHttp_Affiliate = new ActiveXObject("Msxml2.xmlHttp");
		}
	  catch (e){
			xmlHttp_Affiliate = new ActiveXObject("Microsoft.xmlHttp");
		}
	  }
	  
	return xmlHttp_Affiliate;

};

//Load Random Scream
function doAffiliate(){
 

	xmlHttp_Affiliate = GetxmlHttpObject()
	
	if(xmlHttp_Affiliate == null){
		alert ("Your browser does not support AJAX!");
		return;
	  }

	xmlHttp_Affiliate.onreadystatechange = function(){
		
	var loader = document.getElementById("250x250");
	
 		if (xmlHttp_Affiliate.readyState == 4){ 
			
			//loader.style.display = 'none';
			var res = xmlHttp_Affiliate.responseText;
			
		//alert ("Your browser support AJAX!");
			//alert(res);
			//loader.style.display = 'block';
			loader.innerHTML = res ;
					
		}
		//else 
	//	{
//			 loader.innerHTML = '<center><img src="images/rating_loading.gif" alt="loading" width="137px" /></center>';	
//		}
	
	}
	var url = "affiliate_ajax.php?catID=2" ;
	 // if (window.xmlHttp_AffiliateRequest) {
        
	     //  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
	      // netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
	//} 
	//var params = "id="+id+"&rating="+rating;
	xmlHttp_Affiliate.open("POST",url,true);
	xmlHttp_Affiliate.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp_Affiliate.setRequestHeader('Content-Access-Control', 'allow *.music2enjoy.com *.m2eTV.com *.cybernetgateway.com');
//	xmlHttp_Affiliate.setRequestHeader("Content-length", params.length);
	xmlHttp_Affiliate.setRequestHeader("Connection", "close");
	xmlHttp_Affiliate.send();

} ;

 