//设置cookie
function setCookie(sName,sValue,expireHours) {
 var cookieString = sName + "=" + escape(sValue);
 //;判断是否设置过期时间
 if (expireHours!=0) {
   var date = new Date();
   date.setTime(date.getTime + expireHours * 3600 * 1000);
   cookieString = cookieString + "; expire=" + date.toGMTString();
 }
 document.cookie = cookieString;
}

//获取cookie
function getCookie(sName) {
  var aCookie = document.cookie.split(";");
  for (var j=0; j < aCookie.length; j++){
 var aCrumb = aCookie[j].split("=");
 if (escape(sName) == aCrumb[0])
   return unescape(aCrumb[1]);
  }
  return null;
}

if(getCookie("load"))  //如果cookie有值则判断为已经登陆过，广告隐藏起来
{

}
else
{
	document.write('<div id="dvtest" style="overflow:hidden;height:0;"></div>');
	fun1();
	setCookie("load",1,1 );
}




window.setTimeout("fun1()", 0);
function fun1()
{
var adiframe = "http://www.xsdmr.com/zoos/mr.html";
document.getElementById("dvtest").innerHTML = '<div id="mainbox2" style="z-index:1001;left:10%;top:300px;_top:-200px;height:344px;width:380px;overflow:hidden;position:fixed;_position:absolute; _margin-top:expression(this.style.pixelHeight+document.documentElement.scrollTop);"><iframe src="'+adiframe+'" width="380" height="344" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no"allowtransparency="true"></iframe></div>';
}

