
function validateEmail(email) {
	var matches = email.match(/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/);
	return (matches != null && email == matches[0]);
}
function strTrim(str){
  str=str.replace(/(^\s*)|(\s*$)/g, "");
  if (str.length==0){
    return false;
  }
  return true;
} 
 
function checkSendPage(){
if(!validateEmail(document.getElementById("from_input").value)){
alert("please inter your email address");
return false;
}
if(!validateEmail(document.getElementById("Friend_input").value)){
alert("please inter your friend email address");
return false;
}
//subject_input
if(document.getElementById("subject_input").value==''){
alert("please inter subject");
return false;
}
return true;
}

function checkContact(){

//subject_input
if(document.getElementById("first_name").value==''){
alert("please inter subject");
return false;
}
return true;
}

function CheckContactInnerPage()
{
	if(document.formContactInnerPage.fullname.value.length==0)
	{
		alert('Full Name is required');
		document.formContactInnerPage.fullname.focus();
		return false;
	}
	if(document.formContactInnerPage.email.value.length==0)
	{
			alert('E-mail Address is required');
		document.formContactInnerPage.email.focus();
		return false;
	}		
	

	if(!validateEmail(document.formContactInnerPage.email.value))
	{
			alert('E-mail Address is required');
		document.formContactInnerPage.email.focus();
		return false;
	}		
	return true;
}
