function start() { 
	if (window.ActiveXObject) {
		objXmlHTTP = new ActiveXObject("Microsoft.XMLHTTP") ;  
	}
	else if (window.XMLHttpRequest) {
		objXmlHTTP = new XMLHttpRequest();
	}
}
function check_naffiliate_code(code)
{
	var form=document.login;
	if(code!="")
	{
	//	alert(code);
		start(); 
		
		var url="check_naffiliate_code.php?code="+code;
		
		objXmlHTTP.open("GET", url, false);  
		objXmlHTTP.send('');
		var inData=objXmlHTTP.responseText;
		if(inData!="")
		{
			alert(inData);
			document.getElementById('naffiliate_code').value="";
			document.getElementById('error_naffiliate').innerHTML = inData;
		}else
		{
			document.getElementById('error_naffiliate').innerHTML = "";
		}
		
		
	}
}
