function CountBanner(name,url,new_window)
{
	url = url;
	
	if(new_window==1) {
		window.open(HOST_LANG+"count_banner.php?name="+name+"&url="+url);
	} else {
		xmlHttp=GetXmlHttpObject()
		if (xmlHttp==null)
		{
			alert ("Browser does not support HTTP Request")
			return
		}
		
		var params = "name="+name+"&url="+url;
		
		xmlHttp.open("POST",HOST_LANG+"count_banner.php",true)
		//Send the proper header information along with the request
		xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlHttp.setRequestHeader("Content-length", params.length);
		xmlHttp.setRequestHeader("Connection", "close");
		
		xmlHttp.onreadystatechange=stateChangedBanner
		xmlHttp.send(params)
	}	
}

function stateChangedBanner() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 {
 	
 	var banner_url = xmlHttp.responseText;
 	window.location = banner_url;
 	
 }
}

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;
}