var xmlHttp;
var xmlHttp2;

function checkform()
{
	xmlHttp=GetXmlHttpObject();
	if (xmlHttp==null)
	{
	  alert ("Sorry.  Your browser is too old or unusual for this page to work.  The rest of the site will work fine though.");
	  return;
	} 
	
	tipster=document.getElementById('tipster').value;
	pword=document.getElementById('pword').value;
	email=document.getElementById('email').value;
	rules=document.getElementById('rules').checked;
	
	var url = 'register_checks.php?'
	+ 'tipster=' + escape(tipster)
	+ '&pword=' + escape(pword)
	+ '&email=' + escape(email)
	+ '&rules=' + rules
	+ '&cacheblock=' + Math.random();
	
	//load data
	
	xmlHttp.open("GET",url,false);
	xmlHttp.send(null);
	
	var output = xmlHttp.responseText;
	if(output.length>1)
	{
		document.getElementById('results').innerHTML=output;
		return false;
	}
}



function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
		document.getElementById('results').innerHTML=xmlHttp.responseText;
	}
} 

function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
    {    
		// Firefox, Opera 8.0+, Safari    
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
    {    
		// Internet Explorer    
		try
		{      
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");      
		}
		catch (e)
		{      
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}    
	}  
	return xmlHttp;
}

function reminder(id)
{
	xmlHttp2=GetXmlHttpObject();
	if (xmlHttp2==null)
	{
	  alert ("Sorry.  Your browser is too old or unusual for this page to work.  The rest of the site will work fine though.");
	  return;
	} 
	
	var url = 'register_reminder.php?id=' + id
	+ '&cacheblock=' + Math.random();
	
	//load data
	
	xmlHttp2.open("GET",url,false);
	xmlHttp2.send(null);
	document.getElementById('results2').innerHTML='<b>Message Sent</b>';
	return false;
}
