     function   check(){
  	var qu=document.search.queryno.value;
  	if(!qu || qu=="请输入快递或货运单号" || qu=="请输入物流公司名称"){
  		alert("请填写您要找的货运单号或物流公司！");
        document.search.queryno.focus();
		return false;
  	}{
  		var   el=document.search.fashi;
        for(i=0;i<el.length;i++){
		 if(el[0].checked){
              document.search.action="action.php";
			document.search.target="_blank";
				   }
                if(el[1].checked){
              document.search.action="com_info.php";
			  			document.search.target="_blank";
        }
		
        }

  }
  }

     function   check22(){
  	var qu=document.search.queryno.value;
  	if(!qu || qu=="请输入快递或货运单号" || qu=="请输入物流公司名称"){
  		alert("请填写您要找的货运单号或物流公司！");
        document.search.queryno.focus();
		return false;
  	}{
  		var   el=document.search.fashi;
        for(i=0;i<el.length;i++){
		 if(el[0].checked){
              document.search.action="../action.php";
			document.search.target="_blank";
				   }
                if(el[1].checked){
              document.search.action="../com_info.php";
			  			document.search.target="_blank";
        }
		
        }

  }
  }


       function   check_url(){
  	var qu=document.search.queryno.value;
  	if(!qu){
  		alert("请填写您要找的货运单号或物流公司！");
        document.search.queryno.focus();
		return false;
  	}{
  		var   el=document.search.fashi;
        for(i=0;i<el.length;i++){
		 if(el[0].checked){
              document.search.action="../../action.php";
			document.search.target="_blank";
				   }
                if(el[1].checked){
              document.search.action="../../com_info.php";
			  			document.search.target="_blank";
        }
		
        }

  }
  }


   function   check22222(){

  	var qu=document.search.queryno.value;
  	if(!qu){
  		alert("请填写您要找的货运单号或物流公司！");
        document.search.queryno.focus();
		return false;
  	}{
  		var   el=document.search.fashi;
        for(i=0;i<el.length;i++){
		 if(el[0].checked){
              document.search.action="../action.php";
			   if(/[^\x00-\xff]/g.test(qu)){
    		 document.search.action="../com_info.php";
				} 
				   }
                if(el[1].checked){
              document.search.action="../com_info.php";
        }
        }

  }
  }





function add(){
		document.getElementById('add_comment').style.display="inline";
		document.getElementById('show_review').style.display="none";
		
	}
	
	function show1(){
		document.getElementById('image').style.display="inline";
		document.getElementById('image1').style.display="none";
	}
	
	function show2(){
		document.getElementById('image').style.display="none";
		document.getElementById('image1').style.display="inline";
	}


function address_check(){
var address_value = document.getElementById('ad_value').value;
if(address_value=="3"){
	if(che2()!=false){
	document.address.submit();
	}
  	}
	else{
	if(!che()){
	return false;
	}

	}
}

function che(){

if(document.address.s1.value=="-1") 
{ 
alert("出发地省份不能为空"); 
document.address.s1.focus();
return false; 
}
	
if(document.address.s5.value=="-1") 
{ 
alert("目的地省份不能为空"); 
document.address.s5.focus();
return false; 
}


var   t1=document.address.s_k_h;
var   t;
for(var   i=0;i<t1.length;i++)   
    {   
        if(t1[i].checked   ==   true)   t='1';   
    }   
  //if(t   ==   '1')   alert('选中了一个！')   
  if(t   !=   '1'){
	  alert('请选择所属类型！');  
	  return false;
  }
  
  return true;

}



function che2(){

if(document.address.com_name.value=="") 
{ 
alert("公司名不能为空"); 
document.address.com_name.focus();
return false; 
} 

if(document.address.s5.value=="-1") 
{ 
alert("公司所在地不能为空"); 
document.address.s5.focus();
return false; 
} 

}

function fEvent(sType,oInput){
			switch (sType){
				case "focus" :
					oInput.isfocus = true;
				case "mouseover" :
					oInput.style.borderColor = '#333333';
				break;
				case "blur" :
					oInput.isfocus = false;
				case "mouseout" :
					if(!oInput.isfocus){
						oInput.style.borderColor='#eeeeee';
										}
					break;
				}
		}
	
	function add(){
		document.getElementById('add_comment').style.display="inline";
		document.getElementById('show').style.display="none";
		
	}



	function sy_img(t_id){
	
	id_num = t_id.substring(7);
		for ($i=1; $i<5; $i++)
		{
			if ($i == id_num)
			{
			eval("document.getElementById('top_img'+$i).src=\"images/sy\"+$i+\".gif\"");
			}
			else
			{
			eval("document.getElementById('top_img'+$i).src=\"images/bd\"+$i+\".gif\"");
			}
		}
	}


	function top_sy_img(t_id){
	
	id_num = t_id.substring(7);
		for ($i=1; $i<5; $i++)
		{
			if ($i == id_num)
			{
			eval("document.getElementById('top_img'+$i).src=\"..\/images/sy\"+$i+\".gif\"");
			}
			else
			{
			eval("document.getElementById('top_img'+$i).src=\"..\/images/bd\"+$i+\".gif\"");
			}
		}
	}


	
	function top_sy_url_img(t_id){
	
	id_num = t_id.substring(7);
		for ($i=1; $i<5; $i++)
		{
			if ($i == id_num)
			{
			eval("document.getElementById('top_img'+$i).src=\"..\/..\/images/sy\"+$i+\".gif\"");
			}
			else
			{
			eval("document.getElementById('top_img'+$i).src=\"..\/..\/images/bd\"+$i+\".gif\"");
			}
		}
	}


