function Juge(theForm)
{
	
  if (theForm.username.value == "")
  {
    alert("请输入姓名！");
    theForm.username.focus();
    return (false);
  }
  if (theForm.username.value.length>8)
  {
    alert("名字不得超过8个字！");
    theForm.username.focus();
    return (false);
  }
	if (theForm.email.value == "")
  {
    alert("请输入邮箱!");
    theForm.email.focus();
    return (false);
  }
  if (theForm.tel.value == "")
	{
		alert("请输入电话！");
		theForm.tel.focus();
		return (false);
	}
	
	if (theForm.content.value == "")
	{
		alert("请输入留言内容！");
		theForm.content.focus();
		return (false);
	}
	
		if (theForm.content.value.length>300)
	{
		alert("太多啦。我看不了，还是短点吧，300个字内！");
		theForm.content.focus();
		return (false);
	}


	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@.";
	var checkStr = theForm.email.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.email.value.length < 6)
	{
			allValid = false;
	}

	if (!allValid)
	{
		alert("您输入的 \"电子邮件地址\" 无效!");
		theForm.email.focus();
		return (false);
	}

	address=theForm.email.value;
    if(address.length>0)
	{
        i=address.indexOf("@");
        if(i==-1)
		{
			window.alert("对不起！您输入的电子邮件地址是错误的！")
			theForm.email.focus();
			return false
        }
       ii=address.indexOf(".")
        if(ii==-1)
		{
			window.alert("对不起！您输入的电子邮件地址是错误的！")
			theForm.email.focus();
			return false
        }

    }
	if (checktext(theForm.v_email.value))
	{
		alert("请您输入有效的\"email\"!");
		theForm.v_email.select();
		theForm.v_email.focus();
		return (false);
	}
	
}

function JugeOrder(theForm)
{
	if (theForm.Prodname.value == "")
  {
    alert("请输您要订购的产品名称！");
    theForm.Prodname.focus();
    return (false);
  }
  
  if (theForm.username.value == "")
  {
    alert("请输入姓名！");
    theForm.username.focus();
    return (false);
  }
  if (theForm.username.value.length>8)
  {
    alert("名字不得超过8个字！");
    theForm.username.focus();
    return (false);
  }
	
  if (theForm.tel.value == "")
	{
		alert("请输入电话！");
		theForm.tel.focus();
		return (false);
	}

if (theForm.address.value == "")
	{
		alert("请输入收货地址！");
		theForm.address.focus();
		return (false);
	}
if (theForm.postcode.value == "")
	{
		alert("请输入邮政编码！");
		theForm.postcode.focus();
		return (false);
	}

if (theForm.email.value != "")
  {
   

	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@.";
	var checkStr = theForm.email.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.email.value.length < 6)
	{
			allValid = false;
	}

	if (!allValid)
	{
		alert("您输入的 \"电子邮件地址\" 无效!");
		theForm.email.focus();
		return (false);
	}

	address=theForm.email.value;
    if(address.length>0)
	{
        i=address.indexOf("@");
        if(i==-1)
		{
			window.alert("对不起！您输入的电子邮件地址是错误的！")
			theForm.email.focus();
			return false
        }
       ii=address.indexOf(".")
        if(ii==-1)
		{
			window.alert("对不起！您输入的电子邮件地址是错误的！")
			theForm.email.focus();
			return false
        }

    }
	if (checktext(theForm.v_email.value))
	{
		alert("请您输入有效的\"email\"!");
		theForm.v_email.select();
		theForm.v_email.focus();
		return (false);
	}
	  }
}

function checktext(text)
{
 allValid = true;
	for (i = 0;  i < text.length;  i++)
	{
		if (text.charAt(i) != " ")
		{
			allValid = false;
			break;
		}
	}
return allValid;

}
 function closeflay()
			  {
			  	floater.style.display="none";
				
			  }
function display()
			{
				floater.style.display="";
			}


function JugeFrm(theForm)
{
	
  if (theForm.q_type.value == "")
  {
    alert("请选择询问类型！");
    theForm.q_type.focus();
    return (false);
  }

    if (theForm.q_name.value == "")
  {
    alert("请输入您的姓名！");
    theForm.q_name.focus();
    return (false);
  }
if (theForm.q_tel.value == "")
	{
		alert("请输入您的联系电话！");
		theForm.q_tel.focus();
		return (false);
	}



if (theForm.q_address.value == "")
	{
		alert("请输入您的联系地址！");
		theForm.q_address.focus();
		return (false);
	}

if (theForm.q_postcode.value == "")
	{
		alert("请输入您的邮政编码！");
		theForm.q_postcode.focus();
		return (false);
	}

if (theForm.q_email.value == "")
  {
    alert("请输入邮箱!");
    theForm.q_email.focus();
    return (false);
  }
  
if (theForm.q_dtel.value == "")
	{
		alert("请输入您白天的联系电话！");
		theForm.q_dtel.focus();
		return (false);
	}
if (theForm.q_ntel.value == "")
	{
		alert("请输入您晚上的联系电话！");
		theForm.q_ntel.focus();
		return (false);
	}



	var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_@.";
	var checkStr = theForm.q_email.value;
	var allValid = true;
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
			allValid = false;
			break;
		}
	}

	if (theForm.q_email.value.length < 6)
	{
			allValid = false;
	}

	if (!allValid)
	{
		alert("您输入的 \"电子邮件地址\" 无效!");
		theForm.q_email.focus();
		return (false);
	}

	address=theForm.q_email.value;
    if(address.length>0)
	{
        i=address.indexOf("@");
        if(i==-1)
		{
			window.alert("对不起！您输入的电子邮件地址是错误的！")
			theForm.q_email.focus();
			return false
        }
       ii=address.indexOf(".")
        if(ii==-1)
		{
			window.alert("对不起！您输入的电子邮件地址是错误的！")
			theForm.q_email.focus();
			return false
        }

    }
	if (checktext(theForm.q_email.value))
	{
		alert("请您输入有效的\"email\"!");
		theForm.q_email.select();
		theForm.q_email.focus();
		return (false);
	}
	
}