function emailCheck() {
var emailStr=document.getElementById("email").value;
var emailPat=/^(.+)@(.+)$/;
var matchArray=emailStr.match(emailPat);
if (matchArray==null) {
alert("Sorry,the email address is erro!")
postform.email.focus();
return false;
}
}
function formcheck()
{
if (document.getElementById("title").value=="")
{
alert("Sorry,the subject cannot be null");
postform.title.focus();
return false;
}
if (document.getElementById("content").value=="")
{
alert("The content cannot be null");
postform.content.focus();
return false;
}
if (document.getElementById("content").value>2000)
{
alert("The content are most may not surpass 2,000 characters");
postform.content.focus();
return false;
}
if (document.getElementById("realname").value=="")
{
alert("Please fill in the name");
postform.realname.focus();
return false;
}
return emailCheck()
return true;
}

