/* 
 * Copyright Alpha
 * 2007-8-10
 */

function countZTPageView(ModID,ModURL){
	var par="";
	par+="&ModID="+ModID
		+"&ModUrl="+ModURL;
	var url="/Common.shtml?url=CountController"+par+"&math="+Math.random();
	if (window.XMLHttpRequest) {
	   reqZTPageView = new XMLHttpRequest();
	   reqZTPageView.open("GET", url, true);
	   reqZTPageView.onreadystatechange = ztPageViewCallback;
	   reqZTPageView.send(null);
	} else if (window.ActiveXObject) {
	   reqZTPageView = new ActiveXObject("Microsoft.XMLHTTP");
	   reqZTPageView.open("GET", url, true);
	   reqZTPageView.onreadystatechange = ztPageViewCallback;
	   reqZTPageView.send();
	}
}
function ztPageViewCallback(){
    if (reqZTPageView.readyState == 4) {
	}
}

var mURL = escape(document.location.href);
var mID = "0,0";
var ModIDStr = document.location.href.indexOf("ModID=(");
var beg = document.location.href.indexOf("(");
var end = document.location.href.indexOf(")");

if(ModIDStr>-1 & beg>-1 && end>-1 && end>beg){
	mID = (document.location.href.substring(beg+1,end));
}else{
	mID = document.getElementById("ctPageViewCount").title;
}
//alert(mID);
try{
	countZTPageView(mID,mURL);
}catch(e){
	document.write('<iframe frameborder="0" name="ztPGVCount" height="0" id="ztPGVCount" scrolling="no" src="/Common.shtml?url=CountController&ModID='+mID+'&ModUrl='+mURL+'" width="0"></iframe>');
}