function gotoBrnad()
{
	var cityid = document.forms['search_form'].sCity.value;
	var inout = document.forms['search_form'].sInOut.value;
	var xilie = document.forms['search_form'].sXilie.value;
	var brandid = document.forms['search_form'].sBrand.value;
	var price = document.forms['search_form'].sPrice.value;
	if(cityid!='0' && brandid=='-1' && price=='-1')
	{
		alert("请选择品牌");
		return;
	}
	//document.scripts[0].src="/channel/selectcar/BrandVistRec.aspx?Brand_id="+brandid+"&Car_id=&BrowType=查询";
	window.open("http://search.bitauto.com/Bitauto_Search/search/SearchResult.aspx?CityId="+cityid
	+"&InOut="+inout+"&BrandId="+brandid+"&Price="+price);
	return;
}

function showLen(obj)
			{
				document.getElementById("ContentLen").value=fucCheckLength(obj.value);
			}
// 判断字数汉字2个字符
function fucCheckLength(strTemp)
{
 var i,sum;
 sum=0;
 for(i=0;i<strTemp.length;i++)
 {
  if ((strTemp.charCodeAt(i)>=0) && (strTemp.charCodeAt(i)<=255))
   sum=sum+1;
  else
   sum=sum+2;
 }
 return sum;
}

function CheckEmail(strEmail)
{
	var myReg = /^([a-zA-Z0-9_.-])+@([a-zA-Z0-9_.-])+[a-zA-Z0-9_-]{2,3}$/; 
	//var myReg = "\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*";
	if(myReg.test(strEmail))
	{
		return true;
	}
	else
	{
		return false;
	}
}
function checkEmpty(obj,msg){   //判断是否空
   if(obj.value==''){
   alert(msg);
   obj.focus();
   return false;
   }
   return true;
}

function checkclick(msg,url){if(confirm(msg))window.location.href=url;}