function cncPop(){
	var divWidth=591;// div width
	var divHeight=324; //div height

	//div content
	var divContent='<img src="../images/divpop.gif" width="591" height="324" border="0" usemap="#mapPop" style="display:block;" />'+
		'<map name="#mapPop" id="mapPop">'+
		'	<area shape="rect" coords="520,7,565,22" href="javascript:hideDivPop()" alt="关闭" />'+
		'</map>';

	var divPop=document.createElement("div");
	with(divPop){
		innerHTML=divContent;
		id="divPop"
	}
	document.body.appendChild(divPop)
	

	//auto center
	document.getElementById("divPop").style.cssText=''+
		'width:'+divWidth+'px;height:'+divHeight+'px;'+
		'position:absolute;'+
		'left:150px;top:54%;'+
		'cursor:pointer;'+
		'margin-top:-'+(divHeight/2)+'px;'+
		//'margin-left:-'+(divWidth/2)+'px;'+
		'border:1px solid black;'+'z-index:1000;';

		setTimeout("hideDivPop()",4000); //增加的程序
		
}

function hideDivPop(){
	//document.getElementById("divPop").style.display="none"
	document.body.removeChild(document.getElementById("divPop"));

}
//if(getCookie("popFlag")==null){
//	cncPop();
//	setCookie("popFlag","yes");
//}

function setCookie(name,value){
	document.cookie=name+"="+value;
}
	
function _getCookieVal(offset){
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1) endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function getCookie(name){
	if(name == "path" || name == "expires" || name == "domain" || name == "version") name = "badCookieName";

	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen){
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg) return _getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) break; 
	}
	return null;
}

if(window.addEventListener) window.addEventListener("load",cncPop,false)
if(window.attachEvent) window.attachEvent("onload",cncPop)