// JavaScript Document

function checkForm(formName) {
	if(formName.rcptName.value=="")
	{
		alert ('Please Enter your Recipients Name!');
		formName.rcptName.focus() ;
		return false;
	}
	if(formName.yourName.value=="")
	{
		alert ('Please Enter your Name!');
		formName.yourName.focus() ;
		return false;
	}
	
		if(formName.message.value=="")
	{
		alert ('Please Enter your Comments!');
		formName.message.focus() ;
		return false;
	}
	
	
	//Email Validation
	if(formName.email.value=="")
	{
		alert ('Please Enter Recipients email id!');
		formName.email.focus() ;
		return false;
	}

	//Email Validation
	if (!formName.email.value.match(/^[\w\.-]+@(?:[A-Za-z0-9-]+\.)*[A-Za-z0-9-]{1,}\.[a-z]{2,5}$/))
	{
		alert ('Please Enter the valid email id!');
		formName.email.select();
		return false;
	}
	

	if(formName.yourmail.value=="")
	{
		alert ('Please Enter Your email id!');
		formName.yourmail.focus() ;
		return false;
	}

	//Email Validation
	if (!formName.yourmail.value.match(/^[\w\.-]+@(?:[A-Za-z0-9-]+\.)*[A-Za-z0-9-]{1,}\.[a-z]{2,5}$/))
	{
		alert ('Please Enter the valid email id!');
		formName.yourmail.select();
		return false;
	}
	
	return ;
	
}


function relocate()	{
 var pathname = location.pathname;
 var filename = pathname.substr(pathname.lastIndexOf("/")+1,pathname.length);
 location.href = filename;
}



