﻿// JScript 文件
/**
 * POI自助建站广告
 */
 
var AdDataScript = null;
function addAD(){
	if(g_hashId!=null){
	    AdDataScript = null;
        AdDataScript = document.createElement("script");
        AdDataScript.type = "text/javascript";
        document.body.appendChild(AdDataScript);
        AdDataScript.src = "http://company.365ditu.com/AjaxServer/AD/GetAdData.aspx" +
                "?poiHashId=" + g_hashId + 
                "&datatime=" + new Date().toLocaleTimeString();
    }
	//writeAreaLmtDiv();
}


/*弹出窗 开始*/
  
//关闭,最小化,最大化
function showDiv(){
    if(document.getElementById('PcPoPmarket')==null)return;
		document.getElementById('PcPoPmarket').style.height = 257+'px';
//		document.getElementById('showvod').style.display = 'none';
//		document.getElementById('hidevod').style.display = 'block';
	
}

//function hideDiv(){
//    if(document.getElementById('PcPoPmarket')==null)return;
//	document.getElementById('PcPoPmarket').style.height = 29 + 'px';
//	document.getElementById('hidevod').style.display = 'none';
//	document.getElementById('showvod').style.display = 'block';
//	//if(!innerCall)setCookie("divStatus",2);
//}

function closeDiv(){
    if(document.getElementById('PcPoPmarket')==null)return;
	document.getElementById('PcPoPmarket').style.display = 'none';
	//if(!innerCall)setCookie("divStatus",1);
}

document.write("<span id=tmpAreaLmtDiv></span>");
//writeAreaLmtDiv(area_lmt_tag);

//function writeAreaLmtDiv() {
//	    var s="";
//	    try{
//			//以下是为了兼容 xhtml1.0 和 html4两种情况 / ie6 ie7 ff 的兼容用hack
//			if(document.compatMode && document.compatMode != 'BackCompat'){
//				s+=('<DIV  style="z-index:1000;right:0;bottom:0; width:350px;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:1000;right:0;bottom:0; width:350px;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:1000; POSITION: absolute; width:350px; height:30px; overflow:hidden;"><span style="CURSOR: pointer;float:left;clear:none; width:123px; height:14px; overflow:hidden; margin:10px 5px;"></span><span style="background-image:url(http://www.365ditu.com/images/shutdown.gif);CURSOR: pointer;float:right;clear:none; width:30px; height:22px;margin:2px 1px 0 0;" onclick=closeDiv()></span><span style="background-image:url(http://www.365ditu.com/images/min.gif);CURSOR: pointer;float:right; width:30px; height:22px; overflow:hidden;clear:none;display:none; margin:2px 1px 0 0; " onclick=showDiv() id="showvod"></span><span style="background-image:url(http://www.365ditu.com/images/min.gif);CURSOR: pointer;float:right;overflow:hidden; width:30px; height:22px; clear:none; display:bolck; margin:2px 1px 0 0;" onclick=hideDiv() id="hidevod"></span></div> ');
//			s+=("<iframe scrolling=no frameborder=0 width=350 height=257 src=http://tc.csddt.com/tuijian.htm>>-</iframe>");
//			s+=('</DIV>');
//			document.getElementById('tmpAreaLmtDiv').innerHTML = s;
//			//setTimeout('hideDiv(true);', 8000);
//		}catch(err){}
//	
//	showDiv(true);
//}

function writeAreaLmtDiv() {
	    var s="";
	    try{
			//以下是为了兼容 xhtml1.0 和 html4两种情况 / ie6 ie7 ff 的兼容用hack
			if(document.compatMode && document.compatMode != 'BackCompat'){
				s+=('<DIV  style="z-index:1000;right:0;bottom:0; width:350px;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:1000;right:0;bottom:0; width:350px;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:1000; POSITION: absolute; width:350px; height:30px; overflow:hidden;"><span style="CURSOR: pointer;float:left;clear:none; width:123px; height:14px; overflow:hidden; margin:10px 5px;"></span><span onclick="closeDiv()" style="CURSOR: pointer;float:right;">X</span></div> ');
			s+=("<a href='http://auto.21cn.com/topic_all/2010gz/' target='_blank'><img src='http://company.365ditu.com/img/AD/21-350-257.jpg' style='border:none;'/></a>");
			s+=('</DIV>');
			document.getElementById('tmpAreaLmtDiv').innerHTML = s;
			//setTimeout('hideDiv(true);', 8000);
		}catch(err){}
	
	showDiv(true);
}
