function mover(Pppdd1){
	if(def!=null){
		window["document"]["getElementById"]("par"+def)["className"]="";
		window["document"]["getElementById"]("son"+def)["style"]["display"]="none";
	}
	window["document"]["getElementById"]("son"+Pppdd1)["style"]["display"]="block";
	window["document"]["getElementById"]("par"+Pppdd1)["className"]="menuA";
}
function mout(BvEWqlIi2){
	window["document"]["getElementById"]("par"+BvEWqlIi2)["className"]="";
	window["document"]["getElementById"]("son"+BvEWqlIi2)["style"]["display"]="none";	
	if(def!=null){
		window["document"]["getElementById"]("par"+def)["className"]="menuA";
		window["document"]["getElementById"]("son"+def)["style"]["display"]="block";
	}
}


//检测是否合法的EMAIL
function isEmail(s)
{
        if (s.length > 100)
                return false;
         var regu = "^(([0-9a-zA-Z]+)|([0-9a-zA-Z]+[_.0-9a-zA-Z-]*[_.0-9a-zA-Z]+))@([a-zA-Z0-9-]+[.])+([a-zA-Z]{2}|net|NET|com|COM|gov|GOV|mil|MIL|org|ORG|edu|EDU|int|INT|INFO|info|tom|TOM)$";
         var re = new RegExp(regu);
         if (s.search(re) != -1)
              return true;
          else 
             return false;
}

//订购检验
function check_data(){
  if(document.form2.proname.value==""){
    alert("请填写订购产品的名称！")
	document.form2.proname.focus()
	return(false)
  }
  if(document.form2.ren.value==""){
    alert("请填写联系人姓名！")
	document.form2.ren.focus()
	return(false)
  }
  if(document.form2.tel.value==""){
    alert("请输入您的联系电话，以方便我们主动联系您！")
	document.form2.tel.focus()
	return(false)
  }
  if(document.form2.address.value==""){
    alert("请输入您的地址！")
	document.form2.address.focus()
	return(false)
  }
  
  if(!isEmail(document.form2.email.value)){
    alert("您的邮件地址为空或者格式错误！")
	document.form2.email.focus()
	return(false)
  }
  if(document.form2.content.value==""){
    alert("请输入订购产品的其他说明！")
	document.form2.content.focus()
	return(false)
  }
}

//留言检测
function check_guest(){
  if(document.gbook.gname.value==""){
    alert("请输入您的姓名！")
	document.gbook.gname.focus()
	return(false)
  }
  if(!isEmail(document.gbook.gemail.value)){
    alert("您的邮箱地址为空或者格式错误！")
	document.gbook.gemail.focus()
	return(false)
  }
  if(document.gbook.gmsg.value==""){
    alert("请输入您的留言内容！")
	document.gbook.gmsg.focus()
	return(false)
  }
  if(document.gbook.gcode.value==""){
    alert("请输入验证码！")
	document.gbook.gcode.focus()
	return(false)
  }
}
