﻿document.write("<form action='http:\/\/www.zenithcrusher.com\/products\/booksave_seo.asp' method='post' name='form' id='form' onSubmit='return CheckInput();'>		");
document.write("<span id='contactform'>Welcome to Shanghai Zenith Company <br \/>To contact us through our website, please use the form below.<\/span> <br \/>");
document.write("<u><b>Note:<\/b> below marked with '<span class='star'>*<\/span>' must be filled<\/u> <br \/> <br \/> ");
document.write("<table width='90%' border='0' align='center'> <tr>");
document.write("<td width='86' height='23' align='right'><div align='left'><strong>Name:<\/strong><\/div><\/td> ");
document.write("<td width='441' align='left'> ");
document.write("<input name='name' type='text' size='35' class='m_on'onFocus=\"this.className='m_off'\" onBlur=\"this.className='m_on'\" id='name' \/>");
document.write("<font color='#FF0000'>*<\/font> <\/td>");
document.write("<\/tr> <tr> ");
document.write("<td align='right'><div align='left'><strong>Company<font color='#000000'>:<\/font><\/strong><\/div><\/td> ");
document.write("<td align='left'><input name='Company' type='text' class='m_on' id='company' size='35'onFocus=\"this.className='m_off'\" onBlur=\"this.className='m_on'\" \/><\/td> ");
document.write("<\/tr> <tr> ");
document.write("<td align='right'><div align='left'><strong>Tel<font color='#000000'>:<\/font><\/strong><\/div><\/td> ");
document.write("<td align='left'><input name='Tel' type='text' class='m_on' id='tel' size='35'onFocus=\"this.className='m_off'\" onBlur=\"this.className='m_on'\" \/> ");
document.write("<font color='#FF0000'>*<\/font><\/td>");
document.write("<\/tr> <tr> ");
document.write("<td align='right'><div align='left'><strong>Email<font color='#000000'>:<\/font><\/strong><\/div><\/td> ");
document.write("<td align='left'><input name='Email' type='text' class='m_on' id='email' size='35' onFocus=\"this.className='m_off'\" onBlur=\"this.className='m_on'\" \/>");
document.write("<font color='#FF0000'>* <\/font><\/td>");
document.write("<\/tr> <tr> ");
document.write("<td align='right'><div align='left'><strong>Country<font color='#000000'>:<\/font><\/strong><\/div><\/td> ");
document.write("<td align='left'><!--<input name='State' type='text' class='m_on' id='State' size='35' onFocus=\"this.className='m_off'\" onBlur=\"this.className='m_on'\" \/> -->");
document.write("<input type='text' name='State' id='country' class='m_on' size='35'\/><font color='#FF0000'>* <\/font><\/td>");
document.write("<\/tr> <tr> ");
document.write("<td align='right' valign='top'><div align='left'><font color='#000000'><strong>Inquiry:<\/strong><br \/>");
document.write("<br \/> ");
document.write("<\/font> <\/div><\/td>");
document.write("<td align='left' valign='top'><p> ");
document.write("<textarea name='content' cols='40' rows='9' id='content' class='m_on' onFocus=\"this.className='m_off'\" onBlur=\"this.className='m_on'\" ><\/textarea> ");
document.write("<font color='#FF0000'>*<br> ");
document.write("Can not contain links<\/font> ");
document.write("<input name='url_str' type='hidden' id='url_str' value='chinajawcrusher.com-张月江'> ");
document.write("<\/p><\/td> ");
document.write("<\/tr>");
document.write("<tr>");
document.write("<td height='40' colspan='2' valign='middle'><div align='center'>");
document.write("<input name='submit' type='submit' class='m_on' id='submit3' value=' Submit ' \/> ");
document.write("&nbsp;&nbsp;&nbsp;");
document.write("<input type='reset' name='Submit2' value='Reset ' class='m_on' \/>");
document.write("<\/div><\/td> ");
document.write("<\/tr>");
document.write("");
document.write("<\/table> ");
document.write("<\/form>");


function is_number(str)
{
	exp=/[^0-9()-]/g;
	if(str.search(exp) != -1)
	{
		return false;
	}
	return true;
}
function is_email(str)
{ if((str.indexOf("@")==-1)||(str.indexOf(".")==-1))
{
	
	return false;
	}
	return true;
}

function CheckInput(){

	if(document.getElementById("name").value == ""){
		alert("please write your name");
		document.getElementById("name").focus();
		return false;
	}
if( document.getElementById("tel").value =="") {
alert("please write your Telephone number !")
		document.getElementById("tel").focus();
return false;
}
	if( document.getElementById("email").value =="") {
alert("please write your E-mail !")
		document.getElementById("email").focus();
return false;
}

	if(!is_email(document.getElementById("email").value))
	{ 	alert("Your EMail address is wrong");
		document.getElementById("email").focus();
		return false;
	}
 if(document.getElementById("country").value==""){
		alert("please write your country!");
		document.getElementById("country").focus();
		return false;
	}
	
	if(document.getElementById("content").value==""){
		alert("you not write message");
		document.getElementById("content").focus();
		return false;
	}
	

	/*if(form.title.value==''){
		alert("please write your country");
		form.title.focus();
		return false;
	}
	if(form.title.value.length>50){
		alert("content can not 50");
		form.title.focus();
		return false;
	}*/
	

	
	return true;
}
