// JavaScript Document
function valid()
{
	var a=/^[a-zA-Z. ]+$/
	var b=/^[a-zA-z0-9]+$/
	var e=/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/
	var g=/^[a-zA-Z,. 0-9]+$/
 	if(!a.test(document.frm.st_NAME.value))
	{
	  alert("Enter the Student Name Properly");
	  document.frm.st_NAME.focus();
	  return false;
	}
	if(!b.test(document.frm.REGNO.value))
	{
		alert("Enter the Register Number Properly");
		document.frm.REGNO.focus();
		return false;
	}
 	if(!a.test(document.frm.FaNAME.value))
	{
		alert("Enter the Father Name Properly");
		document.frm.FaNAME.focus()
		return false;
	}
	if(!a.test(document.frm.NATIONAL.value))
	{
		alert("Enter the Nationality Properly");
		document.frm.NATIONAL.focus();
		return false;
	}
	if(!a.test(document.frm.COMMUNITY.value))
	{
		alert("Enter the Community Properly");
		document.frm.COMMUNITY.focus();
		return false;
	}
	if(document.frm.ugcourse.value==1)
	{
		alert("Select the UG Course Properly");
		document.frm.ugcourse.focus();
		return false;
	}
	if(document.frm.addre.value=="")
	{
		alert("Enter the Address Properly");
		document.frm.addre.focus();
		return false;
	}
	if(!e.test(document.frm.MAIL.value))
	{
		alert("Enter the E-Mail ID Properly");
		document.frm.MAIL.focus();
		return false;
	}	
	if(!g.test(document.frm.EXTRA.value))
	{
		alert("Enter the Extra Caricular Activities");
		document.frm.EXTRA.focus();
		return false;
	}	
}
function val()
{
	if(document.frm.ugcourse.value==1)
	{
		alert("Select the UG Course Properly");
		document.frm.ugcourse.focus();
		return false;
	}
}

