
function getCookies(vcity)
{
var result;
var digital;
var start;
var end;
var names = "userSelect=";
var city=document.thisform.city;

	result=document.cookie;
	start=result.indexOf("userSelect");
	start=start+names.length;//计算出了存贮值的开始位置
	end=result.indexOf(";",start);//计算出了存贮值的结束位置

if(end==-1)
	end=result.length;
	
	digital=result.substring(start,end);
	digital=digital.split("&");//以&号分解为数组
	digital[0]=unescape(digital[0]);
	digital[1]=unescape(digital[1]);

for(loop=0;loop<city.length;loop++)
	{
		if(city[loop].value==vcity)
			{
				city[loop].selected=true;
				city.value=vcity;
				break;
			}
	}
	//if(digital[1])
		//document.thisform.address.value=digital[1];
}

function setCookies()
{
	var city;
	var ad;
	var check;
	var text;
	var obj;
	var date;
	obj=new Date();
	obj.setTime(obj.getTime()+365*24*60*60*1000);
	date=obj.toGMTString();
	city=document.thisform.city;
	//check=document.thisform.checkbox;
	//if(check.checked)
		//{
			text="userSelect="+escape(city.value)+";path=/;domain=.dianlutu.com;expires="+date;
			//text="userSelect="+escape(city.value)+";expires="+date+";path='/';domain=.dianlutu.com";
			document.cookie=text;
		//}
}

function display(city)
{
	var theName;
	var today;
	var theCookieName;
	theCookieName=city;
	
	if(!theCookieName)
		return;
	else
		getCookies(city);
}

function setCookies2(ss)
{
	var city;
	var ad;
	var check;
	var text;
	var obj;
	var date;
	obj=new Date();
	obj.setTime(obj.getTime()+365*24*60*60*1000);
	date=obj.toGMTString();
	city=ss;
	//check=document.thisform.checkbox;
	//if(check.checked)
		//{
			text="userSelect="+escape(ss)+";path=/;domain=.dianlutu.com;expires="+date;
			//text="userSelect="+escape(city.value)+";expires="+date+";path='/';domain=.dianlutu.com";
			document.cookie=text;
		//}
}


function  seturl(i){
  var  f=document.thisform.key.value;
  if  (i==8)  {
     location.href="http://www.dianlutu.com/tswj.html?key="+f;
	 return false;
  }
  else if  (i==2)  {
     location.href="http://www.dianlutu.com/dnsm.html?key="+f;
	 return false;
  }
    else if  (i==3)  {
     location.href="http://www.dianlutu.com/xhlp.html?key="+f;
	 return false;
  }
  else if  (i==4)  {
     location.href="http://www.dianlutu.com/index.html?key="+f;
	 return false;
  }
  else if  (i==5)  {
     location.href="http://www.dianlutu.com/bgjd.html?key="+f;
	 return false;
  }
  else if  (i==6)  {
     location.href="http://www.dianlutu.com/jjjc.html?key="+f;
	 return false;
  }
  else if  (i==7)  {
     location.href="http://www.dianlutu.com/mryy.html?key="+f;
	 return false;
  }
  else   {
     location.href="http://www.dianlutu.com/fsjp.html?key="+f;
	 return false;
  }
}

function  seturl2(i){
  var  f=document.thisform.key.value;
  if  (i==8)  {
     location.href="http://www.dianlutu.com/tswj.html?key="+f;
	 return false;
  }
  else if  (i==2)  {
     location.href="http://www.dianlutu.com/dnsm.html?key="+f;
	 return false;
  }
    else if  (i==3)  {
     location.href="http://www.dianlutu.com/xhlp.html?key="+f;
	 return false;
  }
  else if  (i==4)  {
     location.href="http://www.dianlutu.com/index.html?key="+f;
	 return false;
  }
  else if  (i==5)  {
     location.href="http://www.dianlutu.com/bgjd.html?key="+f;
	 return false;
  }
  else if  (i==6)  {
     location.href="http://www.dianlutu.com/jjjc.html?key="+f;
	 return false;
  }
  else if  (i==7)  {
     location.href="http://www.dianlutu.com/mryy.html?key="+f;
	 return false;
  }
  else   {
     location.href="http://www.dianlutu.com/fsjp.html?key="+f;
	 return false;
  }
}
