// JavaScript Document
<!--
function fnRemoveBrank(strSource)
{
 return strSource.replace(/^\s*/,'').replace(/\s*$/,'');
}
//检测Email是否存在
function checkEmail()
{
email=this.form1.SignUp_email.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (email=="")
{
msg="*Email不能为空";
var ch=document.getElementById("emails");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
var objv = fnRemoveBrank(email);
var pattern = /^([a-zA-Z0-9_-])+(\.([a-zA-Z0-9_-])+)*@([a-zA-Z0-9_-])+(\.([a-zA-Z0-9_-])+)+$/;
flag = pattern.test(objv);
if(!flag)
{
msg="*Email格式不正确";
var ch=document.getElementById("emails");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("emails");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}

function checkcompany()
{
SignUp_company=this.form1.SignUp_company.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (SignUp_company=="")
{
msg="*请输入报名单位";
var ch=document.getElementById("Scompany");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("Scompany");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}

function checkcontact()
{
SignUp_contact=this.form1.SignUp_contact.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (SignUp_contact=="")
{
msg="*请输入您的大名";
var ch=document.getElementById("Scontact");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("scontact");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}

function checktel()
{
SignUp_tel=this.form1.SignUp_tel.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (SignUp_tel=="")
{
msg="*请输入您的联系方式";
var ch=document.getElementById("Stel");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
var objv = fnRemoveBrank(SignUp_tel);
var pattern = /^[0-9-_,]+$/;
flag = pattern.test(objv);
if(!flag)
{
msg="*电话号码：要求为数字0-9和-和,的组合!请重新输入。";
var ch=document.getElementById("stel");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("stel");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}

function checkfax()
{
SignUp_fax=this.form1.SignUp_fax.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (SignUp_fax !="")
{
var objv = fnRemoveBrank(SignUp_fax);
var pattern = /^\s*[0-9]{6,6}\s*$/;
flag = pattern.test(objv);
if(!flag)
{
msg="*传真号码：要求为数字0-9和-的组合!请重新输入。";
var ch=document.getElementById("sfax");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("sfax");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}
}

function checkaddress()
{
SignUp_address=this.form1.SignUp_address.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (SignUp_address=="")
{
msg="*请输入您的联系地址";
var ch=document.getElementById("Saddress");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("saddress");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}

function checkpost()
{
SignUp_post=this.form1.SignUp_post.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (SignUp_post !="")
{
var objv = fnRemoveBrank(SignUp_post);
var pattern = /^\s*[0-9]{6,6}\s*$/;
flag = pattern.test(objv);
if(!flag)
{
msg="*邮编只能为数字且是6位";
var ch=document.getElementById("spost");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("spost");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}
}

function checknum()
{
SignUp_num=this.form1.SignUp_num.value;
var xmlhttp;
try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e)
{ 
try
{
xmlhttp=new XMLHttpRequest();
}
catch (e)
{
}
}
}
if (SignUp_num=="")
{
msg="*请输入报名人数";
var ch=document.getElementById("Snum");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
var objv = fnRemoveBrank(SignUp_num);
var pattern = /^[0-9]+$/;
flag = pattern.test(objv);
if(!flag)
{
msg="*报名人数：要求为数字!请重新输入。";
var ch=document.getElementById("snum");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
else
{
msg="<img src=\"..\/skin\/skin3\/ok.gif\" width=\"15\" height=\"15\" \/> 输入正确"
var ch=document.getElementById("snum");
ch.innerHTML="<font color='#aaaaaa'>"+msg+"</font>"; 
return false;
}
}