 function showHiFlash(){ 
	if(isLogin()){//login用户不展示广告
		return;
	}/*2009-10-22:不限制播放
    if( getHiCookie("dzhhi") ==2  ){
		
		 return;
	 } 
 	 //设置cookies 
	 
	  var exp = new Date(); 
	  exp.setTime(exp.getTime() + 1*60*60*1000); 
	  if(getHiCookie("dzhhi")  == null){
	 
		//2009-10-20document.cookie = "dzhhi" + "="+ escape (2)+ ";expires=" + exp.toGMTString(); 
		document.cookie = "dzhhi" + "="+ escape (1)+ ";expires=" + exp.toGMTString(); 
	  }else{
              //2009-10-20	document.cookie = "dzhhi" + "="+ escape (parseInt(getHiCookie("dzhhi"))+1)+ ";expires=" + exp.toGMTString(); 
			  	document.cookie = "dzhhi" + "="+ escape (1)+ ";expires=" + exp.toGMTString(); 
      }*/
	
	//遮罩层
	jQuery.fn.coverDiv=function(){  
	   var wnd = jQuery(window), doc = jQuery(document); 
	   if(wnd.height() > doc.height()){  //当高度少于一屏
		wHeight = wnd.height();  
	   }else{//当高度大于一屏
		wHeight = doc.height();   
	   }
	   //创建遮罩背景
	   //2009-10-20-->>jQuery("body").append("<div ID=coverwith></div><div ID='mophi'  style='display:block;position: absolute; text-align: left; z-index: 99999999; left: 0px; top: 267px; width: 465px;'></div>"); 
	   jQuery("body").append("<div ID=coverwith></div><div ID='mophi'  style='display:block;position: absolute; text-align: left; z-index: 99999999; right: 0px; top: 417px; width: 0px;'></div>"); 
	   var iframeHi="<iframe id='hilater' src='#' border='0' width='0' height='0'></iframe>";
	    //为了统计显示了多少次层
	   var showIframe= "<iframe src='http://nb.hi.mop.com/stat/stat.jsp?ss=dzhindex&s1=show&s2=app16' border='0' width='0' height='0'></iframe>";
	   
	   jQuery("#mophi").html(divhiFlash()+iframeHi+showIframe);  
	     
	 }   
	 //层展示
	jQuery('body').coverDiv(); 
	scrollImgFlash();
}
 function divhiFlash(){//显示层flash destoryeggdzh1.swf
	var str = "";
	//var flashSrc ="http://dzh.mop.com/static/sexgirl4.swf"; http://dzh.mop.com/static/dzhhiegg.swf
	 
	//2009-10-20:var flashSrc ="http://dzh.mop.com/static/dzhindexHi.swf";
	//if(isLogin()){
		//flashSrc ="http://dzh.mop.com/static/dzhhiegg.swf";
	//} 
	//var flashSrc ="http://dzh.mop.com/static/dzhad"+createRandom()+".swf"; 
	var flashSrc ="http://dzh.mop.com/static/dzhindexHi.swf";
	str +="<OBJECT classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'   HEIGHT='110' width='174' id='myMovieName'> \n";
	str +="<PARAM NAME=movie VALUE='" +flashSrc +"'>\n";
	str +="<PARAM NAME=quality VALUE=high><param name='WMode' value='Transparent'>\n";
	str +="<PARAM NAME=bgcolor VALUE=#FFFFFF>\n";
	str +="<EMBED src='" +flashSrc +"' wmode='transparent'  allowscriptaccess = 'always' quality='high'  HEIGHT='110' width='174' NAME='myMovieName' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'> \n";
    str +="</EMBED>\n";
	str +="</OBJECT>\n";  
	return  str ;
 }
 //生成随机数1-4之间
 /*function createRandom(){
	return parseInt(Math.random()*(4)+1); 
 }*/
 //关闭层：
 function closeDivHi(){
//jQuery("#hilater").attr("src","http://nb.hi.mop.com/stat.jsp?ss=dzhindex&s1=later&s2=app16");
	jQuery("#mophi").hide();
 }
 //获取cookie
 function getHiCookie(name)//取cookies函数
	{
			 var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)")); 
		 
			 if(arr != null){
				 
				 return unescape(arr[2]); 
			 }else{
				return null;
			 }

	}
	//跟随滚动代码
function scrollImgFlash(){  
	 
	 var ad=document.getElementById("mophi"); 
	if( document.getElementById("mophi") == null || document.getElementById("mophi") =='undefined'){
		 
		return ;
	} 
    var posX,posY;  
    if (window.innerHeight) {  
        posX = window.pageXOffset;  
        posY = window.pageYOffset;  
    }  
    else if (document.documentElement && document.documentElement.scrollTop) {  
        posX = document.documentElement.scrollLeft;  
        posY = document.documentElement.scrollTop;  
    }  
    else if (document.body) {  
        posX = document.body.scrollLeft;  
        posY = document.body.scrollTop;  
    }  
	ad.style.top=(posY+260)+"px";  
    ad.style.left=(posX+5)+"px";  
    setTimeout("scrollImgFlash()",100);  
}  

//取得用户信息
function isLogin(){
    var allcookie = document.cookie.split('; ');
    var islogon = false;
    for(var i=0;i<allcookie.length;i++){
        var cookiename = allcookie[i].split('=')[0];
        if(cookiename=='mop_logon'){
            islogon = true;
        }
    }
    return islogon;
}
