
/*
function Request(name){
new RegExp("(^|&)"+name+"=([^&]*)").exec(location.search.substr(1));
return RegExp.$2
}
alert(Request("type"));
*/

var pageurl = escape(location.href);
var pagepath = escape(location.pathname+location.search);
var fromurl = escape(document.referrer) ;



function SetCookie(sName, sValue, timeKeep)
{
	var now=new Date();
	var expireTime= new Date(now.valueOf()+timeKeep*60000*60);
	document.cookie = sName + "=" + escape(sValue) + "; path=/; expires=" + expireTime.toGMTString() + ";";
	
}

function GetCookie(sName)
{
	var aCookie = document.cookie.split("; ");
	for (var i=0; i < aCookie.length; i++)
	{
		var aCrumb = aCookie[i].split("=");
		if (sName == aCrumb[0]) 
			return unescape(aCrumb[1]);
	}
	return null;
}


var exam_page_cookie_unique="gztv_page_cookie_"+pageurl;

var exam_page_unique_user;
if (GetCookie(exam_page_cookie_unique)==null)
{
	exam_page_unique_user="1";
	SetCookie(exam_page_cookie_unique,"1",24);

}
else
	exam_page_unique_user="0";
	
 var tmpDate = new Date();


//document.write("<iframe width=\"0\" height=\"0\" scrolling=\"no\" frameborder=\"0\" src=\"http://localhost:8090/gztv/pageLog?pageunique="+exam_page_unique_user+"&pageurl="+pageurl+"&pagepath="+pagepath+"&fromurl="+fromurl+"\" style=\"width:0;height:0;\"></iframe>");
document.write("<scr"+"ipt  language='javascript'  src='http://www.gztv.com.cn/web/pageLog?pageunique="+exam_page_unique_user+"&pageurl="+pageurl+"&pagepath="+pagepath+"&fromurl="+fromurl+"&timestamp="+tmpDate+"'></scr"+"ipt>"); 
