var xmlHttp
var global; 
var url = "clickthrough.php?param=";
function increase_count(id,page)
{ 	  	 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return;
	}
	global=page;	 	
	xmlHttp.open("GET", url + escape(id), true);
	xmlHttp.onreadystatechange = handleHttpResponse; 
	xmlHttp.send(null); 
}
 
function handleHttpResponse() 
{ 
	if (xmlHttp.readyState == 4 || xmlHttp.readyState=="complete") 
	{	
		window.open(global);	
	}
 }
 
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;
}
