var area_lmt_tag = [
	{'city':'北京','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'东莞','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'中山','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'汕头','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'汕尾','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'潮汕','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'潮州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'揭阳','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'惠州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'广州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'珠海','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'广东','url':'http://www.e312000.com/bbs_index.asp'},//上一个城市所属的省	
	{'city':'上海','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'深圳','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'香港','url':'http://www.e312000.com/bbs_index.asp'},	
	{'city':'南昌','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'江西','url':'http://www.e312000.com/bbs_index.asp'},//上一个城市所属的省	
	{'city':'大连','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'广西','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'哈尔滨','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'佛山','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'南京','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'苏州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'昆明','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'长春','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'武汉','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'沈阳','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'济南','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'重庆','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'湖南','url':'http://www.e312000.com/bbs_index.asp'},	
	{'city':'西安','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'四川','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'福建','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'甘肃','url':'http://www.e312000.com/bbs_index.asp'},	
	{'city':'海南','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'郑州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'洛阳','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'天津','url':'http://www.e312000.com/bbs_index.asp'},	
	{'city':'杭州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'宁波','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'温州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'浙江','url':'http://www.e312000.com/bbs_index.asp'},//上一个城市所属的省	
	{'city':'石家庄','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'保定','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'太原','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'合肥','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'贵阳','url':'http://www.e312000.com/bbs_index.asp'},	
	{'city':'武进','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'丹阳','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'金坛','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'溧阳','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'镇江','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'宜兴','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'江阴','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'常州','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'江苏','url':'http://www.e312000.com/bbs_index.asp'},//上一个城市所属的省	
	{'city':'青岛','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'山东','url':'http://www.e312000.com/bbs_index.asp'},
	{'city':'唐山','url':'http://www.e312000.com/bbs_index.asp'},
	/*{'city':'鞍山','url':'http://www.pcauto.com.cn/qcbj/open/as/'}*/
];
var lmt_thisArea = {'city':'北京','url':'http://www.e312000.com/bbs_index.asp'};/*初始化当前城市显示的窗口，没有车市的一律显示北京的；*/
var PClocation = unescape(getCookie('PClocation'));//存储ip判断的地区字段
function setCookie(name, value, expires, path, domain, secure){
	var expires = new Date();
	expires.setTime(expires.getTime() + 24*60*60*1000);
	var domain=".pcauto.com.cn"
	var s = name + "=" + escape(value) +
	((expires) ? "; expires=" + expires.toGMTString(): "") +
	((path) ? "; path=" + path : "") +
	((domain) ? "; domain=" + domain : "") +
	((secure) ? "; secure" : "");
	document.cookie=s;
}

function getCookie(name){
	return unescape(document.cookie.replace(new RegExp(".*(?:^|; )"+name+"=([^;]*).*|.*"),"$1"));
}

function IPCallBack(location){
	PClocation = location;
	setCookie('PClocation',escape(location));
}

function needJS(fn,src,callback) { callback=callback||function(){}; if(fn) return callback(false);//功能早已载入
    var scripts=window.__needJS__||(window.__needJS__=[]); var script=scripts[src]||(scripts[src]={loaded:false,callbacks:[]}); //取得全局加载队列中的目标项
    if(script.loaded) return callback(false); var cbs=script.callbacks; cbs.push(callback); //cbs: 回调函数列表
    if(cbs.length==1) { var js=document.createElement("script");
        js.onload=js.onreadystatechange=function(){ var st=js.readyState; if(st&&st!="loaded"&&st!="complete") return;
            script.loaded = true; for(var i=0; i<cbs.length; i++) cbs[i](true);
        }; js.src=src; document.getElementsByTagName("head")[0].appendChild(js);
}   } //needJS()

//关闭,最小化,最大化
function showDiv(innerCall){
	if(document.getElementById('PcPoPmarket')==null)return;
	if(Number(getCookie("divStatus"))==1 && !!innerCall){
		closeDiv();
	}else if (Number(getCookie("divStatus"))==2 && !!innerCall)
	{
		hideDiv();
	}else{
		document.getElementById('PcPoPmarket').style.height = 311+'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 = 29 + '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);
}

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:9;right:0;bottom:0;height:311px;width:290px;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;height:311px;width:290px;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:290px;height:30px;overflow:hidden;background:transparent;">');
		s+=('<span style="cursor:pointer;float:left;clear:none;width:123px;height:14px;overflow:hidden;margin:10px 5px;"></span>');
		s+=('<span title="关闭" style="background-image:url(http://www.e312000.com/img/lmtclose.gif);cursor:pointer;float:right;clear:none;width:24px;height:16px;margin:2px 0 0 0;" onclick="closeDiv()"></span>');
		s+=('<span title="展开" style="background-image:url(http://www.e312000.com/img/lmtbig.gif);cursor:pointer;float:right;width:22px;height:16px;overflow:hidden;clear:none;display:none;margin:2px 1px 0 0;" onclick="showDiv()" id="showvod"></span>');
		s+=('<span title="缩小" style="background-image:url(http://www.e312000.com/img/lmtsmall.gif);cursor:pointer;float:right;overflow:hidden;width:22px;height:16px;clear:none;display:bolck;margin:2px 1px 0 0;" onclick="hideDiv()" id="hidevod"></span>');
		s+=('</div>');
		s+=('<iframe scrolling="no" frameborder="0" width="290" height="311" src="'+lmt_thisArea.url+'">-</iframe>');
		s+=('</div>');
		document.getElementById('tmpAreaLmtDiv').innerHTML = s;
		setTimeout('hideDiv(true);', 8000);
	}catch(err){}
	showDiv(true);
}

function playLmtAreaWindow(locationArray,callback){
	for(i=0;i<locationArray.length;i++){
		if (PClocation.indexOf(locationArray[i].city) >= 0){
			lmt_thisArea = locationArray[i];
			writeAreaLmtDiv();
			break;
		}
	}
}

//执行
if(PClocation==null || PClocation.length==0){
	needJS(null,'http://whois.pconline.com.cn/jsFunction.jsp',function(){playLmtAreaWindow(area_lmt_tag,writeAreaLmtDiv)});
}else{
	playLmtAreaWindow(area_lmt_tag,writeAreaLmtDiv);
}

//报价库和图库挂浮标 2009.9.15  
if((/price\.pcauto\.com\.cn|piclib\.pcauto\.com\.cn/gi.test(window.location.href))&&!document.getElementById('closeBtn001')) document.write('<scr'+'ipt src="http://www1.pcauto.com.cn/test/090915/logo.js"></scr'+'ipt>'); 