﻿      var flage=false;
      function DivShow(state,PopUpId)   
      {
        var   ShowDiv   =   document.getElementById(PopUpId); 
		var   IfrShim   =   document.getElementById("shimmer4"+PopUpId);
		if(!IfrShim){
			ShowDiv.style.display   =   "block";
			createShim(PopUpId); 
			ShowDiv.style.display   =   "none";
			IfrShim   =   document.getElementById("shimmer4"+PopUpId) 
		} 
		if(state || flage)   
        {   
       		ShowDiv.style.display   =   "block"; 
	      	IfrShim.style.display   =   "block";
        }   
        else   
        {   
          ShowDiv.style.display   =   "none"; 
	      IfrShim.style.display   =   "none";   
        } 
      } 
	function createShim(PopUpId) { 
	  var ShowDiv   =   document.getElementById(PopUpId);   
	  var DivParent = ShowDiv.parentNode;
          var shimmer = document.createElement('iframe');   
          shimmer.id='shimmer4'+PopUpId;   
          shimmer.style.position='absolute';   
          shimmer.style.top=ShowDiv.offsetTop;   
          shimmer.style.left=ShowDiv.offsetLeft; 
          shimmer.style.width=ShowDiv.offsetWidth;   
          shimmer.style.height=ShowDiv.offsetHeight; 
		  shimmer.style.filter="alpha(opacity=0)";
		  shimmer.style.opacity="0";
	  shimmer.style.display='none';  
          shimmer.style.zIndex=ShowDiv.style.zIndex - 1;  
          shimmer.setAttribute('frameborder','0');   
          shimmer.setAttribute('src','javascript:void(0);');   
          DivParent.appendChild(shimmer);   
	}// JavaScript Document

function setTab0dSyn(i,classnamebef,idbef,idall,tabtabbef)
{
	var waitInterval;
	
	var MouseDelayTime=150;//鼠标感应延迟300毫秒
	_gObj(idbef+i).onmouseout=function(aEvent)
	{					
	      
		  clearTimeout(waitInterval);
    }
	clearTimeout(waitInterval);
	var str="setTab0dSyn1("+i+",'"+classnamebef+"','"+idbef+"',"+idall+",'"+tabtabbef+"')";
	waitInterval=setTimeout(str,MouseDelayTime);
}
function setTab0dSyn1(i,classnamebef,idbef,idall,tabtabbef)
{
changDivClass(idbef,idall,i,classnamebef)
selectTab0dSyn(tabtabbef,idall,i);
}
function selectTab0dSyn(div_id,allnum,now){
for(var i= 1; i<= allnum;i++)
{
	if(i==now)
	{
		_gObj(div_id+i).style.display="block";
	}else
	{
		_gObj(div_id+i).style.display="none";
	}
}
}
function _gObj(id)
{
return document.getElementById(id);
}
function changDivClass(div_id,all,now,classnamebef)
{
for(var i= 1; i<= all;i++)
{
if(i==now)
{
_gObj(div_id+i).className = classnamebef+"_0"+i;
}
else{
		_gObj(div_id+i).className = classnamebef+"_"+i;
	}
}
}

function selectTabsearch(J,allcount,idnamebef,stabid)
{
	var xjwaitInterval;
	var MouseDelayTime1=150;//鼠标感应延迟300毫秒
	var idstr=stabid;
	_gObj(idstr).onmouseout=function(aEvent)
	{
		  clearTimeout(xjwaitInterval);
    }
	clearTimeout(xjwaitInterval);
	
	var str="selectTabsearch1("+J+","+allcount+",'"+idnamebef+"')";
	xjwaitInterval=setTimeout(str,MouseDelayTime1);
}

function selectTabsearch1(J,allcount,idnamebef)
{
		selectTabsearch2(J,allcount,idnamebef)
}
function selectTabsearch2(J,allcount,idnamebef)
{
	for(var i=1;i<=allcount;i++)
	{
		if(J==i)
		{
			_gObj(idnamebef+i).style.display="block";
		}
		else
		{
			_gObj(idnamebef+i).style.display="none";
		}
	}
}
function switchTab1(tabid,tab){
	var x1 = document.getElementById(tab+'1');	
	x1.className = "";
	var x2 = document.getElementById(tab+'2');
	x2.className = "";
    document.getElementById(tabid).className = "on";
	for (var i=0;i<2;i++)
	{	  
	  var dvs=document.getElementById('Header'+tab+(i+1));
	  if ((tab+(i+1))==(tabid))
	    dvs.style.display='';
	  else
  	  dvs.style.display='none';
     }
}
function switchTab2(tabId, divId, blockPath)
{
    if ($(divId).innerHTML.strip().length == 0)
    {
        var myAjax = new Ajax.Updater(
            divId, blockPath,
            {
                method: 'get',
                parameters: '',
                onCreate: function()
                {
		    $(divId).innerHTML = $("focusPicLoading").innerHTML;
                },
	        onError: function() {}
            }
        );
    }
}
function SwitchTab2Sync(tabId, divId, blockPath, obj)
{
	switchTab2(tabId, divId, blockPath);
}
function switchTab3(tabid,tab)
{
	for(var i=1;i<7;i++)
	{
	    var x = document.getElementById(tab+i);
	    x.className = "";
	}
    document.getElementById(tabid).className = "on";
	for (var i=0;i<6;i++)
	{	  
	  var dvs=document.getElementById('Header'+tab+(i+1));
	  var dvss=document.getElementById('Ender'+tab+(i+1));
	  if ((tab+(i+1))==(tabid))
	    {dvs.style.display='';
	    dvss.style.display='';}
	  else
  	  {dvs.style.display='none';
  	  dvss.style.display='none';}
     }
}
	if(typeof deconcept=="undefined"){
		var deconcept=new Object();}
	if(typeof deconcept.util=="undefined"){
		deconcept.util=new Object();}
		if(typeof deconcept.SWFObjectUtil=="undefined"){
			deconcept.SWFObjectUtil=new Object();}
			deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){
				if(!document.getElementById){return;}
				this.DETECT_KEY=_a?_a:"detectflash";
				this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
				this.params=new Object();
				this.variables=new Object();
				this.attributes=new Array();
				if(_1){
					this.setAttribute("swf",_1);
				}
				if(id){
					this.setAttribute("id",id);}
				if(w){
					this.setAttribute("width",w);
					}
				if(h){
						this.setAttribute("height",h);
						}
				if(_5){
					this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},
				getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;

function InitLoginStatus()
{
    var url = "/ajaxPage/Header.ashx";
    var pars = "rand="+ Math.random();
    var myAjax = new Ajax.Request(
        url, {
            method: 'get',
            parameters: pars,
            onComplete: ShowLoginName,
	    onError: function()
	    {
			$("divUnLogin").style.display = "block";
        	$("divLogined").style.display = "none";
        	$("divUserName").innerText = "";
	    }
        }
    );
}
function ShowLoginName(response)
{
    if (response.responseText.indexOf("<html>") >= 0)
    {
		$("divUnLogin").style.display = "block";
        $("divLogined").style.display = "none";
        $("divUserName").innerText = "";
    }
    else if (response.responseText.length > 0)
    {
        $("divUnLogin").style.display = "none";
        $("divLogined").style.display = "block";
        $("divUserName").update(response.responseText);
    }
    else
    {
        $("divUnLogin").style.display = "block";
        $("divLogined").style.display = "none";
        $("divUserName").innerText = "";
    }   
}
function InitNavigation()
{
    var arr={'lihome':'index.2009.shtml','libuycar':'ucar.cn/buycar','lisellcar':'ucar.cn/sellcar','lieval':'ucar.cn/pinggu','liperm':'ucar.cn/huanxin','lirequire':'ucar.cn/qiugou','liNews':'news.ucar.cn','liask':'ucar.cn/ask'};
    var link = window.location.href.toLowerCase();
    if(link.endsWith('ucar.cn/') & link.indexOf('news') < 0 & link.indexOf('review') < 0){
        return;
    }
    for(var i in arr)
    {
        if(link.indexOf(arr[i]) > 0){
        $(i).className='head_tu1';
        }
        else{
         if($(i)){$(i).className='';}
        }
    }
}
/*
* 功能：IP定位功能
* 创建：王加锋
* 日期：2009-08-03
*/
var _ucar ={};
_ucar.IpNavigation={
	AreaJson:null,
	BlockPathList:
	[
		{'name':'chengxin','path':'inc/index/website/a{地区id}/chengxincar.shtml','remark':'首页(包括合作网站)/滑动块/诚信'},
		{'name':'audi','path':'inc/index/website/a{地区id}/audicar.shtml','remark':'首页(包括合作网站)/滑动块/奥迪'},
		{'name':'nissan','path':'inc/index/website/a{地区id}/nissancar.shtml','remark':'首页(包括合作网站)/滑动块/日产'},
		{'name':'dcad','path':'inc/index/website/a{地区id}/dcadcar.shtml','remark':'首页(包括合作网站)/滑动块/龙信'},
		{'name':'dyk','path':'inc/index/website/a{地区id}/dykcar.shtml','remark':'首页(包括合作网站)/滑动块/东风悦达起亚'},
		{'name':'csvw','path':'inc/index/website/a{地区id}/csvwcar.shtml','remark':'首页(包括合作网站)/滑动块/通用'},
		{'name':'vendor','path':'inc/index/website/a{地区id}/vendorcar.shtml','remark':'首页(包括合作网站)/滑动块/推荐车源'},
		{'name':'vendorremai','path':'inc/index/a{地区id}/vendorremai.shtml','remark':'热卖二手车'},
		{'name':'sixpersonal','path':'inc/index/a{地区id}/sixpersonalcar.shtml','remark':'个人二手车推荐6个'},
		{'name':'twopersonal','path':'inc/index/a{地区id}/twopersonalcar.shtml','remark':'个人二手车推荐2个'},
		{'name':'require','path':'inc/index/a{地区id}/require.shtml','remark':'求购信息'},
		{'name':'ask','path':'inc/index/a{地区id}/ask.shtml','remark':'答疑'},
		{'name':'bitautovendor','path':'inc/index/bitauto/a{地区id}/vendorcar.shtml','remark':'易车首页/滑动块/推荐车源'},
		{'name':'tuijianvendor','path':'/inc/block/website/ads_ucarindex_tuijianjxs{地区id}.shtml','remark':'首页(包括合作网站)/推荐二手车经销商'}
	],
	cityList:
	[
		{"areaId":"1","areaName":"安徽"},{"areaId":"2","areaName":"北京"},{"areaId":"31","areaName":"重庆"},
		{"areaId":"3","areaName":"福建"},{"areaId":"5","areaName":"广东"},{"areaId":"6","areaName":"广西"},
		{"areaId":"4","areaName":"甘肃"},{"areaId":"7","areaName":"贵州"},{"areaId":"11","areaName":"黑龙江"},
		{"areaId":"12","areaName":"湖北"},{"areaId":"13","areaName":"湖南"},{"areaId":"9","areaName":"河北"},
		{"areaId":"10","areaName":"河南"},{"areaId":"8","areaName":"海南"},{"areaId":"14","areaName":"吉林"},
		{"areaId":"15","areaName":"江苏"},{"areaId":"16","areaName":"江西"},{"areaId":"17","areaName":"辽宁"},
		{"areaId":"18","areaName":"内蒙古"},{"areaId":"19","areaName":"宁夏"},{"areaId":"20","areaName":"青海"},
		{"areaId":"24","areaName":"上海"},{"areaId":"21","areaName":"山东"},{"areaId":"22","areaName":"山西"},
		{"areaId":"25","areaName":"四川"},{"areaId":"23","areaName":"陕西"},{"areaId":"26","areaName":"天津"},
		{"areaId":"28","areaName":"新疆"},{"areaId":"27","areaName":"西藏"},{"areaId":"29","areaName":"云南"},
		{"areaId":"30","areaName":"浙江"},{"areaId":"0","areaName":"全国"},{"areaId":"501","areaName":"广州"},
		{"areaId":"502","areaName":"深圳"},{"areaId":"3001","areaName":"杭州"},{"areaId":"2501","areaName":"成都"}
	],
	$:function(sid){return document.getElementById(sid);},
	controlId:null,
	inniteCookie:function()
	{
		if(this.AreaJson==null){
			this.AreaJson=eval('['+this.getCookie('BitAuto.Ucar.WebSite.BLL.AreaJson')+']');
			this.AreaJson=this.AreaJson[0];
		}
	},
	getPath:function(pathName){
		this.inniteCookie();
		for(var i= 0;i<this.BlockPathList.length;i++){
			if(this.BlockPathList[i].name == pathName){
				var AreaId=0;
				if(this.AreaJson!=null){
					AreaId=this.AreaJson.AreaId;
				}
				return this.BlockPathList[i].path.replace('{地区id}',AreaId);
			}
		}
	},
	loadFile:function(id,blockName){
		controlId=id;
		var url = this.getPath(blockName);
	    var pars = "rand="+ Math.random();
	    var myAjax = new Ajax.Request(
		url, 
		{
			method: 'get', 
			parameters: pars, 
			asynchronous:false,
			onComplete: this.ShowRequestText
		});
	},
	loadFileNew:function(id,id2,blockName,adid){
		var url = this.getPath(blockName);
		var pars = "rand="+ Math.random();
		this.inniteCookie();
		var AreaId=0;
		if(this.AreaJson!=null){
			AreaId=this.AreaJson.AreaId;
		}
		if(AreaId==2||AreaId==1){
		    controlId=id2;
		    if($("Search7")!= null){
				$("Search7").className="on";
			}
		    if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz home_beijing";
			}
		    if($("anketarad")!=null){
				$("anketarad").style.display='none';
			}
		}
		else{
		    controlId=id;
		    if($("Search5")!= null){
				$("Search5").className="on";
				$("Search5").style.display='block';
			}
		    if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz";
			}
		    if($("anketarad")!=null){
				$("anketarad").style.display='block';
			}
		}
		var myAjax = new Ajax.Request(
		    url, 
		    {
			    method: 'get', 
			    parameters: pars, 
			    asynchronous:false,
			    onComplete: this.ShowRequestText
		    });
		if($("tradeDiv")!=null){
				$("tradeDiv").style.display='none';
			}    
		if(AreaId==1){  //安徽地区
			if($("Alldiv")!=null){
				$("Alldiv").style.display='none';
			}
			if($("HeaderSearch5")!=null){
				$("HeaderSearch5").className="home_bzc bg_a6";
			}
			if($("BeijingAD1")!=null){
				$("BeijingAD1").style.display='block';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='block';
			}
			if($("Search5")!=null){
				$("Search5").style.display='none';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='block';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='block';
			}
			if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			if($("AnhuiAD")!=null){
				$("AnhuiAD").style.display='block';
			}
			if($("Search8")!=null){
				$("Search8").style.display='none';
			}
			if($("BJhuanyuhengtong")!=null){
				$("BJhuanyuhengtong").style.display='none';
			}
			if($("BJjiaotong")!=null){
				$("BJjiaotong").style.display='none';
			}
			if($("Search9")!=null){
				$("Search9").style.display='block';
			}
			if($("Search10")!=null){
				$("Search10").style.display='block';
			}
			url = "";
		}
		else if(AreaId==24){　//上海地区
			if($("HeaderSearch5")!=null){
				$("HeaderSearch5").className="home_bzc bg_a5";
			}
			if($("BeijingAD1")!=null){
				$("BeijingAD1").style.display='none';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='none';
			}
			if($("Search5")!=null){
				$("Search5").style.display='block';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='none';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='none';
			}
			if($("tradeList")!=null){
				$("tradeList").style.display='block';
			}
			if($("tradeDiv")!=null){
				$("tradeDiv").style.display='none';
			}
			if($("trade4")!=null){
				$("trade4").style.display='none';
			}
			if($("trade1")!=null){
				$("trade1").style.display='block';
			}
			if($("trade2")!=null){
				$("trade2").style.display='block';
			}
			if($("trade3")!=null){
				$("trade3").style.display='block';
			}
			if($("trade4")!=null){
				$("trade4").style.display='block';
			}
			controlId=adid;
			$(controlId).className='bannerb3';
			url = "inc/block/ucar/ads_ucarindex_tarad5.shtml";
		}
		else if(AreaId==2){　　//北京地区
		    	if($("Alldiv")!=null){
				$("Alldiv").style.display='none';
			}
			if($("HeaderSearch5")!=null){
				$("HeaderSearch5").className="home_bzc bg_a6";
			}
			if($("BeijingAD1")!=null){
				$("BeijingAD1").style.display='block';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='block';
			}
			if($("Search5")!=null){
				$("Search5").style.display='none';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='block';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='block';
			}
			if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			if($("AnhuiAD")!=null){
				$("AnhuiAD").style.display='none';
			}
			if($("Search8")!=null){
				$("Search8").style.display='block';
			}
			if($("BJhuanyuhengtong")!=null){
				$("BJhuanyuhengtong").style.display='block';
			}
			if($("BJjiaotong")!=null){
				$("BJjiaotong").style.display='block';
			}
			if($("Search9")!=null){
				$("Search9").style.display='none';
			}
			if($("Search10")!=null){
				$("Search10").style.display='none';
			}
			url = "";
		}
		else{
			if($("Alldiv")!=null){
				$("Alldiv").style.display='block';
			}
			if($("HeaderSearch5")!=null){
				$("HeaderSearch5").className="home_bzc bg_a5";
			}
			if($("BeijingAD1")!=null){
				$("BeijingAD1").style.display='none';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='none';
			}
			if($("Search5")!=null){
				$("Search5").style.display='block';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='none';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='none';
			}
			if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			controlId=adid;
			$(controlId).className='bannerb';
			url = "inc/block/ucar/ads_ucarindex_tarad2.shtml";
		}
		
		if(url != ""){
		    myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: pars, 
				asynchronous:false,
				onComplete: this.ShowRequestText
			});
		}
	},
	loadQQFile:function(id,id2,blockName,adid){
		var url = this.getPath(blockName);
		var pars = "rand="+ Math.random();
		this.inniteCookie();
		var AreaId=0;
		if(this.AreaJson!=null){
			AreaId=this.AreaJson.AreaId;
		}
		if(AreaId==2||AreaId==1){
		    controlId=id2;
		    if($("Search7")!= null){
				$("Search7").className="on";
			}
		    if($("Search1")!= null){
				$("Search1").className="";
				$("Search1").style.display='none';
			}
		    if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz home_beijing";
			}
		    if($("anketarad")!=null){
				$("anketarad").style.display='none';
			}
		    if($("HeaderSearch2")!=null){
				$("HeaderSearch2").className="home_bzc bg_a1";
			}
			if($("HeaderSearch3")!=null){
				$("HeaderSearch3").className="home_bzc bg_a2";
			}
			if($("BeijingAD1")!=null){
				$("BeijingAD1").style.display='block';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='block';
			}
			if($("BeijingAD3")!=null){
				$("BeijingAD3").style.display='block';
			}
			if($("BeijingAD4")!=null){
				$("BeijingAD4").style.display='block';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='block';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='block';
			}
		}
		else{
		    controlId=id;
		    if($("Search1")!= null){
				$("Search1").className="on";
				$("Search1").style.display='block';
			}
		    if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz";
			}
		    if($("anketarad")!=null){
				$("anketarad").style.display='block';
			}
		    if($("HeaderSearch1")!=null){
				$("HeaderSearch1").className="home_bzc bg_a1";
			}
			if($("HeaderSearch2")!=null){
				$("HeaderSearch2").className="home_bzc bg_a2";
			}
			if($("HeaderSearch3")!=null){
				$("HeaderSearch3").className="home_bzc bg_a3";
			}
			if($("BeijingAD1")!=null){
				$("BeijingAD1").style.display='none';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='none';
			}
			if($("BeijingAD3")!=null){
				$("BeijingAD3").style.display='none';
			}
			if($("BeijingAD4")!=null){
				$("BeijingAD4").style.display='none';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='none';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='none';
			}
		}
		var myAjax = new Ajax.Request(
		    url, 
		    {
			    method: 'get', 
			    parameters: pars, 
			    asynchronous:false,
			    onComplete: this.ShowRequestText
		    });
		if($("tradeDiv")!=null){
				$("tradeDiv").style.display='none';
			}
		if(AreaId==1){  //安徽地区
		    	if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz home_beijing";
			}
			if($("Search6")!=null){
				$("Search6").style.display='none';
			}
			if($("Alldiv")!=null){
				$("Alldiv").style.display='none';
			}
			if($("shul")!=null){
				$("shul").style.overflow='hidden';
			}
			if($("AnhuiAD")!=null){
				$("AnhuiAD").style.display='block';
			}
			if($("Search8")!=null){
				$("Search8").style.display='none';
			}
		}	  
		else if(AreaId==24){　//上海地区
			
			if($("tradeList")!=null){
				$("tradeList").style.display='block';
			}
			if($("trade1")!=null){
				$("trade1").style.display='block';
			}
			if($("trade2")!=null){
				$("trade2").style.display='block';
			}
			if($("trade4")!=null){
				$("trade4").style.display='none';
			}
			if($("Alldiv")!=null){
				$("Alldiv").style.display='block';
			}
			if($("shul")!=null){
				$("shul").style.overflow='';
			}
			controlId=adid;
			$(controlId).className='bannerb3';
			url = "inc/block/ucar/ads_ucarindex_tarad4.shtml";
		}
		else if(AreaId==2){　　//北京地区
			if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz home_beijing";
			}
			if($("Search6")!=null){
				$("Search6").style.display='none';
			}
			if($("Alldiv")!=null){
				$("Alldiv").style.display='none';
			}
			if($("shul")!=null){
				$("shul").style.overflow='hidden';
			}
			if($("AnhuiAD")!=null){
				$("AnhuiAD").style.display='none';
			}
			if($("Search8")!=null){
				$("Search8").style.display='block';
			}
			url = "";
		}
		else{
			if($("Alldiv")!=null){
				$("Alldiv").style.display='block';
			}
			if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			if($("Alldiv")!=null){
				$("Alldiv").style.display='block';
			}
			if($("shul")!=null){
				$("shul").style.overflow='';
			}
			controlId=adid;
			$(controlId).className='bannerb';
			url = "inc/block/ucar/ads_ucarindex_tarad2.shtml";
		}
		
		if(url != ""){
		    myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: pars, 
				asynchronous:false,
				onComplete: this.ShowRequestText
			});
		}
	},
	loadBitautoFile:function(id,id2,blockName,adid){
		var url = this.getPath(blockName);
		var pars = "rand="+ Math.random();
		this.inniteCookie();
		var AreaId=0;
		if(this.AreaJson!=null){
			AreaId=this.AreaJson.AreaId;
		}
//alert(AreaId);
		if(AreaId==1){
		    controlId=id2;
		    if($("Search7")!= null){
				$("Search7").className="on";
			}
		    if($("Search4")!= null){
				$("Search4").className="";
				$("Search4").style.display='none';
			}
		    if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz home_beijing";
			}
		    if($("anketarad")!=null){
				$("anketarad").style.display='none';
			}
			if($("BeijingAD1")!=null){
				$("BeijingAD1").style.display='block';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='block';
			}
			if($("BeijingAD3")!=null){
				$("BeijingAD3").style.display='block';
			}
			if($("BeijingAD4")!=null){
				$("BeijingAD4").style.display='block';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='block';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='block';
			}
		}
		else{
		    controlId=id;
		    if($("Search4")!= null){
				$("Search4").className="on";
				$("Search4").style.display='block';
			}
		    if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz";
			}
		    if($("anketarad")!=null){
				$("anketarad").style.display='block';
			}
			if($("BeijingAD2")!=null){
				$("BeijingAD2").style.display='none';
			}
			if($("BeijingAD3")!=null){
				$("BeijingAD3").style.display='none';
			}
			if($("BeijingAD4")!=null){
				$("BeijingAD4").style.display='none';
			}
			if($("BeiJingUl")!=null){
				$("BeiJingUl").style.display='none';
			}
			if($("BeijingDiv")!=null){
				$("BeijingDiv").style.display='none';
			}
		}
		var myAjax = new Ajax.Request(
		    url, 
		    {
			    method: 'get', 
			    parameters: pars, 
			    asynchronous:false,
			    onComplete: this.ShowRequestText
		    });
		if($("tradeDiv")!=null){
				$("tradeDiv").style.display='none';
			}
		if(AreaId==1){  //安徽地区
		    //if($("tradeList")!=null){
		//		$("tradeList").style.display='block';
		//	}
		//	if($("trade1")!=null){
		//		$("trade1").style.display='none';
		//	}
		//	if($("trade4")!=null){
		//		$("trade4").style.display='block';
		//	}
		//	if($("shul")!=null){
		//		$("shul").style.overflow='';
		//	}
		//	controlId=adid;
		//	$(controlId).className='bannerb2';
		//	url = "inc/block/ucar/ads_ucarindex_tarad3.shtml";
			if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			if($("AreaDiv")!=null){
				$("AreaDiv").className="home_bz home_beijing";
			}
			if($("Search6")!=null){
				$("Search6").style.display='none';
			}
			if($("Alldiv")!=null){
				$("Alldiv").style.display='none';
			}
			if($("shul")!=null){
				$("shul").style.overflow='hidden';
			}
		}  
		else if(AreaId==24){　//上海地区
			if($("tradeList")!=null){
				$("tradeList").style.display='block';
			}
			if($("trade1")!=null){
				$("trade1").style.display='block';
			}
			if($("shul")!=null){
				$("shul").style.overflow='';
			}
			controlId=adid;
			$(controlId).className='bannerb2';
			url = "inc/block/ucar/ads_ucarindex_tarad3.shtml";
		}
		else{
			if($("tradeList")!=null){
				$("tradeList").style.display='none';
			}
			if($("shul")!=null){
				$("shul").style.overflow='';
			}
			controlId=adid;
			$(controlId).className='bannerb';
			url = "inc/block/ucar/ads_ucarindex_tarad2.shtml";
		}
		
		if(url != ""){
		    myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: pars, 
				asynchronous:false,
				onComplete: this.ShowRequestText
			});
		}
	},
	loadSohuShanghaiFile:function(id,adid){
		this.inniteCookie();
		controlId=adid;
	    	var AreaId=0;
		var url = "inc/block/ucar/ads_ucarindex_tarad3.shtml";
	    	var pars = "rand="+ Math.random();
		if(this.AreaJson!=null){
			AreaId=this.AreaJson.AreaId;
		}
		if(AreaId==24){
			$(id).style.display='block';
			if($("ShanghaiAD1")!=null){
				$("ShanghaiAD1").style.display='block';
			}
			$(controlId).className='bannerb2';
		}
		else{
			$(id).style.display='none';
			if($("ShanghaiAD1")!=null){
				$("ShanghaiAD1").style.display='none';
			}
			$(controlId).className='bannerb';
			url = "inc/block/ucar/ads_ucarindex_tarad2.shtml";
		}
		var myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: pars, 
				asynchronous:false,
				onComplete: this.ShowRequestText
			});	
	},
	loadYahooFile:function(id,blockName){
		controlId=id;
		var url = this.getPath(blockName);
	    var pars = "rand="+ Math.random();
	    this.inniteCookie();
		var AreaId=0;
		if(this.AreaJson!=null){
			AreaId=this.AreaJson.AreaId;
		}
	    var myAjax = new Ajax.Request(
		url, 
		{
			method: 'get', 
			parameters: pars, 
			asynchronous:false,
			onComplete: this.ShowRequestText
		});
		if(AreaId==2){
		    if($("Search2")!=null){
				$("Search2").style.display='none';
			}
			if($("BJhuanyuhengtong")!=null){
				$("BJhuanyuhengtong").style.display='block';
			}

		}
		else{
		    if($("Search2")!=null){
				$("Search2").style.display='block';
			}
			if($("BJhuanyuhengtong")!=null){
				$("BJhuanyuhengtong").style.display='none';
			}

		}
	},
	getCityNameById:function(cityid){
		if(this.AreaJson){
			for(var i= 0;i<this.cityList.length;i++){
				if(this.cityList[i].areaId == cityid)
					return this.cityList[i].areaName;
			}
		}
		return "全国";
	},
	InitControlValue:function(id){
		this.inniteCookie();
	 	if(this.AreaJson){
	 		window.setTimeout("_ucar.IpNavigation.setvalue('" + id + "')",3000);
	 		}
	 		else{
	 			this.$(id).value=0;
	 		}
	},
	InitControlUserAttCarNew:function(pvcctrl,cityctrl){
		this.inniteCookie();
	 	if(this.AreaJson){
	 		window.setTimeout("_ucar.IpNavigation.setUserAttCarNewValue('"+pvcctrl+"','"+cityctrl+"')",2500);
	 		}
	},	
	InitControlValueNoChange:function(pvcctrl,cityctrl)
	{
		this.inniteCookie();
	 	if(this.AreaJson)
	 	{   
	 	    if(this.AreaJson.AreaType==2)
	 	    {
	 	      if(this.AreaJson.AreaId>0)
	 	      {
	 	         City.SetProvinceId(this.AreaJson.AreaId);
	 	         City.InitAllSelector();
	 	         __provinceFirstText="全国";
	 	      }
	 	    }
	 	    else if(this.AreaJson.AreaType==1)
	 	    {
	 	       var AreaP=0;
	 	  
	 	       if(this.AreaJson.AreaId>=100 && this.AreaJson.AreaId<=999)
	 	       {
	 	          AreaP=this.AreaJson.AreaId.toString().substr(0,1);
	 	       }
	 	       else if(this.AreaJson.AreaId>=1000)
	 	       {
	 	          AreaP=this.AreaJson.AreaId.toString().substr(0,2);
	 	       }
	 	       
	 	        City.SetProvinceId(AreaP);
                City.SetCityId(this.AreaJson.AreaId);
                City.InitAllSelector();
	 	    }
	 	    else
	 	    {
	 	         __provinceFirstText="全国";
	 	        City.InitAllSelector();
	 	        $("selcity").disabled=true;
	 	    }
	 	   
	 	    
	 	 }
	 	 else
	 	 {
	        this.$(pvcctrl).value=0;
	        City.InitAllSelector();
	        $(cityctrl).disabled=true;
	     }
	},
	setvalue:function(id)
	{
		this.$(id).value = this.AreaJson.AreaId;
		this.$(id).onchange();
	},
	setUserAttCarNewValue:function(pvcctrl,cityctrl)
	{
	
	    if(this.AreaJson.AreaType==2)
	 	{
	 	    $(pvcctrl).value = this.AreaJson.AreaId;
		    $(pvcctrl).onchange();
	 	}
	 	else if(this.AreaJson.AreaType==1)
	 	{
            var AreaP1=0;
           
            if(this.AreaJson.AreaId>=100 && this.AreaJson.AreaId<=999)
            {
                 AreaP1=this.AreaJson.AreaId.toString().substr(0,1);
            }
            else if(this.AreaJson.AreaId>=1000)
            {
                 AreaP1=this.AreaJson.AreaId.toString().substr(0,2);
            }	
     	    $(pvcctrl).value = AreaP1;
		    $(pvcctrl).onchange();
		    window.setTimeout("$('"+cityctrl+"').value = "+this.AreaJson.AreaId,600);
		}
	},	
	InitControlText:function(id){
		this.inniteCookie();
		if(this.AreaJson){
			var AreaName = this.getCityNameById(this.AreaJson.AreaId);
			this.$(id).innerHTML=AreaName;
		}
		else{
 			this.$(id).innerHTML='全国';
 		}
	},
	getCookie:function(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(dc.substring(begin + prefix.length, end));
	},
	SetIpCookieAndRedict:function(cookieData)
	{
		var cookieName="BitAuto.Ucar.WebSite.BLL.AreaJson"; 
		var cookieIpCity ="Bitauto.Ucar.Ip.AreaId";
		var dataJson=eval('['+cookieData+']');
	    var expires = new Date ();
	    expires.setTime(expires.getTime() + 1 * (24 * 60 * 60 * 1000));
	    
	    if(dataJson[0].AreaType==2)
	    {
		   document.cookie = "Bitauto.Ucar.Ip.ProvinceId =" + escape(dataJson[0].AreaId)+ "; expires=" + expires.toGMTString()+";path=/";
	    }
	    else if(dataJson[0].AreaType==1)
	    {
	             var AreaP=0;
	   	     if(dataJson[0].AreaId>=100 && dataJson[0].AreaId<=999)
	 	     {
	 	        AreaP=dataJson[0].AreaId.toString().substr(0,1);
	 	     }
	 	     else if(dataJson[0].AreaId>=1000)
	 	     {
	 	        AreaP=dataJson[0].AreaId.toString().substr(0,2);
	 	     }
	 	     document.cookie = "Bitauto.Ucar.Ip.ProvinceId = " + escape(AreaP)+ "; expires=" + expires.toGMTString()+";path=/";
	    }
	    else
	    {
	       document.cookie = "Bitauto.Ucar.Ip.ProvinceId = 0; expires=" + expires.toGMTString()+";path=/";
	    }
	    document.cookie = cookieName + "=" + escape(cookieData) + "; expires=" + expires.toGMTString()+";path=/";
	    document.cookie = cookieIpCity + "=" + escape(dataJson[0].AreaId) + "; expires=" + expires.toGMTString()+";path=/";
	    window.location.href=window.location.href;
	},
	ShowRequestText:function(response,id){
			if (response.responseText.length > 0)
			{
				$(controlId).update(response.responseText);
			}
	},
	_setIpLocation:function(){
	    if(this.getCookie('BitAuto.Ucar.WebSite.BLL.AreaJson') == null){
	        var url = "/ajaxPage/writecookie.ashx";
	        var pars = "rand="+ Math.random();
	        var myAjax = new Ajax.Request(
		    url, 
		    {
			    method: 'get', 
			    parameters: pars, 
			    asynchronous:false,
			    onComplete: null
		    });
	    }
	}
};
_ucar.IpNavigation._setIpLocation();