// ActionScript Communications Document
//站内搜索
function procheck(){
	if(document.formSear.keys.value==""){
		alert("请输入关键词！");
		document.formSear.keys.focus();
		return false
	}
}
//弹出窗口
function Win(file,w,h,r,s){
    window.open(file,'','resizable='+r+',width='+w+",height="+h+',scrollbars='+s+',left='+(screen.availWidth-w)/2+',top='+(screen.availHeight-h)/2);
}

//订货
function shopcheck(){
   if(shop.man.value==""){
      alert("请输入您的姓名！ ");
	  shop.man.focus();
	  return false;
	  }
	  if(shop.tel.value==""){
      alert("请正确填写您的联系电话，已方便我们联系您！ ");
	  shop.tel.focus();
	  return false;
	  }
   if(emailcheck(shop.email.value)){
		alert("请输入正确的E-mail！");
		shop.email.focus();
		return false;
	}
   if(shop.add.value==""){
      alert("请正确填写您的联系地址！ ");
	  shop.add.focus();
	  return false;
	  }
    if(shop.content.value==""){
      alert("留言内空不能为空！ ");
	  shop.content.focus();
	  return false;
	  }
}

//留言F
 function Fcheck(){
   if(formF.types.value==""){
      alert("请选择留言类型！");
	  formF.types.focus();
	  return false;
	  }
   if(formF.man.value==""){
      alert("请正确填写您的姓名！");
	  formF.man.focus();
	  return false;
	  }
	if(formF.tel.value==""){
      alert("请填写您的联系电话！");
	  formF.tel.focus();
	  return false;
	  }
    if(formF.email.value==""){
      alert("请填写您的E-mail！");
	  formF.email.focus();
	  return false;
	  }
    if(emailcheck(formF.email.value)){
		alert("请输入正确的E-mail！");
		formF.email.focus();
		return false;
   }
	if(formF.content.value==""){
      alert("您的留言内容不能为容！");
	  formF.content.focus();
	  return false;
	  }
	if(formF.validatecode.value==""){
      alert("验证码不能为空！");
	  formF.validatecode.focus();
	  return false;
	  }
}
//判断Email的正确性
function   emailcheck(string){     
  var   str_len   =   string.length;   
  if   (str_len<=5){   
        return   true   
          }       
  for(i=0;i<str_len;i++){   
          if   (string.charCodeAt(i)>127){   
  return   true     
  }   
  }   
  if   (string.indexOf("@")<2){   
          return   true   
          }       
    if   (string.indexOf(".")==1){   
          return   true   
          }       
  if   (string.indexOf(":")!=-1){   
          return   true   
  }   
 }
//PDF资料判断
function MM_popupMsg(msg) 
{ //v1.0
  alert(msg);
}
//产品标签
var prev;
function showCon(obj){
	//隐藏前一个
	if(prev!=null){
		document.getElementById("con"+prev).style.display="none";
		document.getElementById("m"+prev).className="pa";
	}
	
	//显示这一个
	document.getElementById("con"+obj).style.display="block";
	document.getElementById("m"+obj).className="paA";
	
	prev=obj;
}
//营销网络搜索
function searcheck(){
	if(document.sales.cid.value==""){
		alert("请选择省份！");
		document.sales.cid.focus();
		return false
	}
	if(document.sales.keys.value==""){
		alert("请输入城市进行查询！");
		document.sales.keys.focus();
		return false
	}
}
//客服留言
function sel(obj){
	if(obj=="2"){
		formF.types.options[0].selected = true;
		document.getElementById("1").style.display="none";
		document.getElementById("2").style.display="block";
	}
	if(obj=="1"){	
		formO.types.options[1].selected = true;
		document.getElementById("2").style.display="none";
		document.getElementById("1").style.display="block";
	}
}

//展示图片
function show_image(name)
{
	var imagename=name;
	if (imagename=="")
	{
		document.showpro.src="images/other/img.gif";
	}
	else
	{
		//imagepath = "../Upload/Sort/" + imagename;
		imagepath = imagename;
		//document.showpro.src=imagepath;
		document.showpro.src=""+imagepath;
	}
}

//专利图片
//查看大图资料
function showMax(img){
	   win=window.open('imgsShow.asp?pic='+img,'','width=100%,height=100%');
	}