// JavaScript Document

function goToQuickLink()
 {
	
	var d = document.getElementById("quickLinks");
	PageIndex2=d.selectedIndex 
	//alert(PageIndex2);
	if (d.options[PageIndex2].value != "none") 
		{ 
			location.href = d.options[PageIndex2].value 
			//location.target = "_new";
			//myfile = frmSearch.quickLinks.options[PageIndex2].value;
			 //window.open(d.options[PageIndex2].value ,'newwin'); 
		} 
 }
 
 function validateRegForm()
 {
	// return true;
//�Please Enter your Name
//�Please Enter your Email Address
//�Please browse for you CV
var errString,yearofex,education; //<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
				errString="";
				education=0;
				
	if (document.getElementById("f_name").value=="")
		errString +="Name\n";		
	if (document.getElementById("f_email").value=="")
		errString +="Email\n";
	else if(!validemail(document.getElementById("f_email").value))
		errString +="Check Email Format\n";
	
	if (document.getElementById("FILE1").value=="")
		errString +="CV\n";		
	
	if (errString.length>0) {
					errString +="\nField(s) listed above are require."
					alert(errString);								
					return false;
				}
	
	 else 
	return true;
 }
 
 
function validemail(sText)
 {
		var str=sText;
		var at="@";
		var dot=".";
		var lat=str.indexOf(at);
		var lstr=str.length;
		var ldot=str.indexOf(dot);
		
		if ((str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)||(str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr))
		{
		   alert("Invalid E-mail ID");
		   document.getElementById('f_email').value="";
		   document.getElementById('f_email').focus();
		   return false;
		}	
		
		return true;
} 
