var track_domain;
var track_page;
var track_refurl;
var track_keyword;
var track_nexturl;
var track_newwindow;

function adview(position){

	

}
function adclick(position, adid){

	

}
function pageviewforflash(urlpath,newWindow){
	track_domaindest="peoplefinder.com";
	track_action="clicked_peoplefinder_banner";
	pageview(urlpath,newWindow);
	
}

function pageview(urlpath,newWindow) {
	//alert(urlpath);
	track_nexturl = urlpath;
	track_newwindow = newWindow;
	//xmlresponseurl = BASE_URL;
	xmlresponseurl = "/pageviews.php";
	xmlresponseurl += "?Domain="+track_domain;
	xmlresponseurl += "&Page="+track_page;
	xmlresponseurl += "&Refurl="+track_refurl;
	xmlresponseurl += "&Keyword="+track_keyword;
	xmlresponseurl += "&Action="+track_action;
	xmlresponseurl += "&Cookieid="+track_cookieid;
	xmlresponseurl += "&DomainDest="+track_domaindest;
	xmlresponseurl += "&IP="+track_ip;
	xmlresponseurl += "&rand="+Math.round(Math.random*10000);
	//alert(xmlresponseurl);
	domaindest="";
    //return new AJAXRequest("GET",xmlresponseurl , "", callpageviewresponse);
	new Ajax.Request(xmlresponseurl,{asynchronous:true, evalScripts:true, onSuccess:callpageviewresponse});
	return true;
}


function callpageviewresponse( myAJAX ) {
	//alert(myAJAX.responseText);
	//logger(myAJAX.responseXML);
	xml = myAJAX.responseXML;

	var div = "";
	resultcount = 0;

	if(track_nexturl!=undefined && track_nexturl!=''){
		if(track_newwindow==true){
			window.open(track_nexturl);
		}else{
			window.location=track_nexturl;
		}
		track_newwindow=false;
		track_nexturl='';
	}
}
function errResponse(myAJAX){

	alert("There was a problem retrieving the XML data:\n" + myAJAX.statusText);
}

