function CheckForm(){
    if(document.form1.email.value==""){
       alert('请输入你的E-mail！');
       document.form1.email.focus();
       return false;
    }
    if(document.form1.email.value.indexOf("@")==-1){
       alert('请输入你的正确E-mail，必须包括“@”!');
       document.form1.email.focus();
       return false;
    }
    tempmsg=document.form1.email.value.substring(0,document.form1.email.value.indexOf("@"));
    if(tempmsg.length<3){
       alert('请输入你的完整的E-mail!\"@\"前面的字符长度不能小于3位！');
       document.form1.email.focus();
       return false;
    }
 //   if(!((document.form1.email.value.indexOf(".com")!=-1)||(document.form1.email.value.indexOf(".net")!=-1)||(document.form1.email.value.indexOf(".com.net")!=-1)||(document.form1.email.value.indexOf(".edu")!=-1))){
 //      alert('请输入你邮箱的后缀名！后缀名为小写！');
  //     document.form1.email.focus();
  //     return false;
//    }
    tempmsg=document.form1.email.value.substring((document.form1.email.value.indexOf("@")+1),document.form1.email.value.indexOf("."));
    if(tempmsg.length<2){
       alert('请输入你邮箱的完整形式！\"@\"和\".\"之间的字符长度不小于2');
       document.form1.email.focus();
       return false;
    }
    if (document.form1.content.value.length < 12) {
        alert('请填写有意义的留言内容。');
        document.form1.MailContent.focus();
        return false;
    }
    return true;
}
	var xmlHttp;
function createHttpRequest()
{
	if(window.ActiveXObject)
	{
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}else if(window.XMLHttpRequest)
	{
		xmlHttp=new XMLHttpRequest();
	}
}
function startHttpRequest(n)
{
	
	createHttpRequest();
	xmlHttp.onreadystatechange=handleStateChange;
	var url="showproduct.asp?n=" + n;
	xmlHttp.open("post",url,true);
	xmlHttp.setRequestHeader("content-type","application/x-www-form-urlencoded");
	xmlHttp.send(null);
}
function handleStateChange()
{

	if(xmlHttp.readystate==4)
	{
		if (xmlHttp.status==200)
		{	
			document.getElementById("abo").innerHTML=xmlHttp.responseText;
		}
	}
}

function getProductKind(n){
	if (n == 0)
	{
		document.getElementById('abo').innerHTML = '';
		return false;
	}else
	{
		document.getElementById('abo').innerHTML = '<select name="Serial" id="Serial" onclick="startHttpRequest(' + n + ')"><option selected value="">请选择</option></select>';
		return false;
	}
}
