function setCookie(name, value, expires, path, domain, secure) {
	var expires = new Date();
	expires.setTime(expires.getTime() + 24*60*60*1000);
	var domain=".myrice.com"
	var s = name + "=" + escape(value) +
	((expires) ? "; expires=" + expires.toGMTString(): "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
	document.cookie=s;
}

/** */
function getCookie(name) {
/*	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	} else {
		begin += 2;
	}
	var end = document.cookie.indexOf(";", begin);
	if (end == -1) {
		end = dc.length;
	} /**/

	return unescape(document.cookie.replace(new RegExp(".*(?:^|; )"+name+"=([^;]*).*|.*"),"$1"));
}
//关闭,最小化,最大化
function showDiv(innerCall){
    if(document.getElementById('PcPoPmarket')==null)return;
	
	document.getElementById('PcPoPmarket').style.height = 300+'px';
	document.getElementById('showvod').style.display = 'none';
	document.getElementById('hidevod').style.display = 'block';
	
	/*
	if(Number(getCookie("divStatus"))==1 && !!innerCall){
		closeDiv();
	}else if (Number(getCookie("divStatus"))==2 && !!innerCall)
	{
		hideDiv();
	}else{
		document.getElementById('PcPoPmarket').style.height = 300+'px';
		document.getElementById('showvod').style.display = 'none';
		document.getElementById('hidevod').style.display = 'block';
	}
	*/

}

function hideDiv(innerCall){
    if(document.getElementById('PcPoPmarket')==null)return;
	document.getElementById('PcPoPmarket').style.height = 28 + 'px';
	document.getElementById('hidevod').style.display = 'none';
	document.getElementById('showvod').style.display = 'block';
	if(!innerCall)setCookie("divStatus",2);
}

function closeDiv(innerCall){
    if(document.getElementById('PcPoPmarket')==null)return;
	document.getElementById('PcPoPmarket').style.display = 'none';
	if(!innerCall)setCookie("divStatus",1);
}

function writeAreaLmtDiv() {

    var s="";
    try{
		//以下是为了兼容 xhtml1.0 和 html4两种情况 / ie6 ie7 ff 的兼容用hack
		if(document.compatMode && document.compatMode != 'BackCompat'){
			s+=('<DIV  style="z-index:9;right:0;bottom:0;width:300px;height:300px;overflow:hidden;POSITION:fixed;'+(/MSIE 7/.test(navigator.appVersion)?'':'_position:absolute; _margin-top:expression(document.documentElement.clientHeight-this.style.pixelHeight+document.documentElement.scrollTop);')+'" id="PcPoPmarket" >');
		}else {
			s+=('<DIV  style="z-index:9;right:0;bottom:0;width:300px;height:300px;overflow:hidden;POSITION:fixed;*position:absolute; *top:expression(eval(document.body.scrollTop)+eval(document.body.clientHeight)-this.style.pixelHeight);" id="PcPoPmarket" >');
		}
		s+=(' <div style="z-index:9; POSITION: absolute;width:300px;height:26px;overflow:hidden;"><span style="CURSOR: pointer;float:left;clear:none;width:100px;height:13px; overflow:hidden; margin:10px 6px;"></span><span style="background-image:url(http://www.93860.com/youxiajiao/oncity_close.png);CURSOR: pointer;float:right;clear:none; display:bolck; width:15px; height:15px; margin:6px 6px;" onclick=closeDiv()></span><span style="background-image:url(http://www.93860.com/youxiajiao/oncity_big.png);CURSOR: pointer;float:right; width:15px; height:13px; overflow:hidden;clear:none;display:none; margin:6px 1px 0 0; " onclick=showDiv() id="showvod"></span><span style="background-image:url(http://www.93860.com/youxiajiao/oncity_small.png);CURSOR: pointer;float:right;overflow:hidden; width:15px; height:13px; clear:none; display:bolck; margin:6px 0 0 0;" onclick=hideDiv() id="hidevod"></span></div>');
		s+=("<iframe scrolling=no frameborder=0 width=300 height=300 src=http://www.93860.com/youxiajiao/shizixiu100_cn.html>-</iframe>");
		s+=('</DIV>');
		document.getElementById('tmpAreaLmtDiv').innerHTML = s;
		setTimeout('hideDiv(true);', 20000000);
	}catch(err){}

showDiv(true);
}

document.write("<span id=tmpAreaLmtDiv></span>");
writeAreaLmtDiv();
