
// JavaScript Document var url="getcustomer.asp?sid=" + Math.random() + "&q=" + str


	var xmlHttp
	
	
/*--------User Registration Checking--------------*/	

	
	function showListUserRegistration(user_name,user_email)
	{ 
	
		var url="./user_registration_check_ajax.php?uname=" + user_name + "&uemail=" + user_email;
		
		xmlHttp=GetXmlHttpObject(stateChangedUser)
		xmlHttp.open("GET", url , true)
		xmlHttp.send(null)
		
	} 
	
	
	
	function stateChangedUser() 
	{ 
	
		var confirm_status;
			
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 

			if(xmlHttp.responseText == 1)
			{
				alert('The Username And Email Address Submitted Are Already Registered !!');
			}
			else if(xmlHttp.responseText == 2)
			{
				alert('The Username Submitted Is Already Registered !!');
				return false;
			}
			else if(xmlHttp.responseText == 3)
			{
				alert('The Email Address Submitted Is Already Registered !!');
				return false;
			}
			else
			{
				document.frmRegister.submit();					
			}
							
		} 
	} 
	
	
/*----------Artist Registration Checking-------------*/	


	function showListArtistRegistration(user_name,user_email)
	{ 
	
		var url="../sellers/artist_registration_check_ajax.php?uname=" + user_name + "&uemail=" + user_email;
		
		xmlHttp=GetXmlHttpObject(stateChangedArtist)
		xmlHttp.open("GET", url , true)
		xmlHttp.send(null)
		
	} 
	
	
	
	function stateChangedArtist() 
	{ 
	
		var confirm_status;
			
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 

			if(xmlHttp.responseText == 1)
			{
				alert('The Username And Email Address Submitted Are Already Registered !!');
			}
			else if(xmlHttp.responseText == 2)
			{
				alert('The Username Submitted Is Already Registered !!');
				return false;
			}
			else if(xmlHttp.responseText == 3)
			{
				alert('The Email Address Submitted Is Already Registered !!');
				return false;
			}
			else
			{
				document.frmRegister.submit();					
			}
							
		} 
	} 
	
	
	
/*----------Affiliate Registration Checking-------------*/	


	function showListAffiliateRegistration(user_name,user_email)
	{ 
	
		var url="../affiliates/affiliate_registration_check_ajax.php?uname=" + user_name + "&uemail=" + user_email;
		
		xmlHttp=GetXmlHttpObject(stateChangedAffiliate)
		xmlHttp.open("GET", url , true)
		xmlHttp.send(null)
		
	} 
	
	
	
	function stateChangedAffiliate() 
	{ 
	
		var confirm_status;
			
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 

			if(xmlHttp.responseText == 1)
			{
				alert('The Username And Email Address Submitted Are Already Registered !!');
			}
			else if(xmlHttp.responseText == 2)
			{
				alert('The Username Submitted Is Already Registered !!');
				return false;
			}
			else if(xmlHttp.responseText == 3)
			{
				alert('The Email Address Submitted Is Already Registered !!');
				return false;
			}
			else
			{
				document.frmRegister.submit();					
			}
							
		} 
	} 
	
	
	
	function GetXmlHttpObject(handler)
	{ 
		var objXmlHttp=null
	
		if (navigator.userAgent.indexOf("Opera")>=0)
		{
			alert("This example doesn't work in Opera") 
			return 
		}
		if (navigator.userAgent.indexOf("MSIE")>=0)
		{ 
			var strName="Msxml2.XMLHTTP"
			if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
			{
				strName="Microsoft.XMLHTTP"
			} 
			try
			{ 
				objXmlHttp=new ActiveXObject(strName)
				objXmlHttp.onreadystatechange=handler 
				return objXmlHttp
			} 
			catch(e)
			{ 
				alert("Error. Scripting for ActiveX might be disabled") 
				return 
			} 
		} 
			if (navigator.userAgent.indexOf("Mozilla")>=0)
			{
				objXmlHttp=new XMLHttpRequest()
				objXmlHttp.onload=handler
				objXmlHttp.onerror=handler 
				return objXmlHttp
			}
	} 