var ie = (document.all) ? true : false;

function init_ajax()
{
	if (ie){
		try{
	    	objHttp = new ActiveXObject("Microsoft.XMLHTTP");
	    }catch(e){
	    	alert('AJAX object creating problem'); return false; 
	    }
    }else{
    	try{
	    	objHttp = new XMLHttpRequest();
	    }catch(e) {
	    	alert('AJAX object creating problem'); return false;
	    }
    }
    return objHttp;
	
}

function ajax_request(objHttp,query,post_data)
{
	objHttp.open("POST", query, true);
	objHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
	objHttp.send(post_data);
}

function track_click(banner,link)
{
	objHttp = init_ajax();
	ajax_request(objHttp,'/click/track.php?banner='+banner+'&link='+link);
}