//function for checking a string is null or not

function isNull(aStr)
{
	var index;
	for (index=0; index < aStr.length; index++)
	if (aStr.charAt(index) != ' ')
	return false;
	return true;
}
//function for checking an email
var reEmail=/^[0-9a-zA-Z_\.-]+\@[0-9a-zA-Z_\.-]+\.[0-9a-zA-Z_\.-]+$/
function checkEmail(val){
	if(!reEmail.test(val))
	{

		return false;
	}
	return true;
}


// command for printing page
function printme()
{
	window.print();
}

//command for closing message box
function closebtn()
{
	oElement = document.getElementById("messagebox");
	oElement.style.visibility="hidden";
}
// function for checking validity of form
function chkFrm()
{ 

if(isNull(document.frm1.stseek.value))
  {
 alert("Please enter your seek.");
 document.frm1.stseek.focus();
 return false;
  }
 
  if(isNull(document.frm1.stemail.value))
  {
 alert("Please enter your email.");
 document.frm1.stemail.focus();
 return false;
  }
  if(!checkEmail(document.frm1.stemail.value))
  {
 alert("Please enter a valid email address.");
 document.frm1.stemail.focus();
 return false;
  }
return true;
}
