//Function for checking the General Contact Information IN Petabyte
function checkcontact(frm)
{
	var cond=true;
	if(frm.txtfname.value.length==0)
	{
		alert(" Enter Your Full Name ");
		if(cond==true){
		frm.txtfname.focus();
		}
		cond=false;
		return false;
	}
	if(frm.txtemail.value.length==0)
	{
		alert(" Enter Email Address. ");
		if(cond==true){
		frm.txtemail.focus();
		}
		cond=false;
		return false;
	}
	if(!checkMail(frm.txtemail.value)){
		alert("Email must contain an email address.\n");
		if(cond==true){
			frm.txtemail.value="";
			frm.txtemail.focus();
		}
		cond=false;
		return false;
	}
	
	if(frm.phone1.value.length==0 || isNaN(frm.phone1.value))
	{
		alert(" Enter Proper Phone. ");
		if(cond==true){
		frm.phone1.value= "";
		frm.phone1.focus();
		}
		cond=false;
		return false;
	}
	if(frm.phone2.value.length==0 || isNaN(frm.phone2.value))
	{
		alert(" Enter Proper Phone. ");
		if(cond==true){
		frm.phone2.value= "";
		frm.phone2.focus();
		}
		cond=false;
		return false;
	}
	if(frm.phone3.value.length==0 || isNaN(frm.phone3.value))
	{
		alert(" Enter Proper Phone. ");
		if(cond==true){
		frm.phone3.value= "";
		frm.phone3.focus();
		}
		cond=false;
		return false;
	}
	
	if(frm.message.value.length==0)
	{
		alert(" Enter Message. ");
		if(cond==true){
		frm.message.focus();
		}
		cond=false;
		return false;
	}
	if(cond=true)
	{
		frm.hidcon.value="contact";
		return true;	
	}
	
}

function checkMail(email){
var x = email;
var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(x)){
	return true;
	}
	else {
	  return false;
	}
}