function validate()
{
if(document.form1.txtEmail.value == "")
{
	alert("Please enter email id");
	document.form1.txtEmail.focus(); 
	return false;
}
if(! isEmail(document.form1.txtEmail.value))
	{
		alert("Please enter a valid email Id, eg. a_sundar@xyz.com");
		document.form1.txtEmail.focus();
		return false;
	}
if(document.form1.txtPassword1.value == "")
{
	alert("Please enter password");
	document.form1.txtPassword1.focus();
	return false;
}
if(document.form1.txtPassword1.value.length < 4)
{
	alert("Please check the password, it should contain atleast 4 characters");
	document.form1.txtPassword1.focus();
	return false;
}
if(document.form1.txtPassword1.value != document.form1.txtPassword2.value)
{
	alert("Confirm password doesn’t match the password given");
	document.form1.txtPassword2.focus();
	return false;
}

	if(document.form1.txtFirstName.value == "")
	{
		alert("Please enter your first name");
		document.form1.txtFirstName.focus();
		return false;
	}

	if(document.form1.txtLastName.value == "")
	{
		alert("Please enter your last name");
		document.form1.txtLastName.focus();
		return false;
	}
	if(document.form1.cboCity.selectedIndex == 0 && document.form1.txtOtherCity.value == "")
	{
		alert("Please select your city");
		document.form1.cboCity.focus();
		return false;
	}
	if(document.form1.cboCity.value=="others" &&  document.form1.txtOtherCity.value=="")
	{
		alert("Please enter other city");
		document.form1.txtOtherCity.focus();
		return false;
	}

	if(document.form1.txtPhone.value == ""  &&  document.form1.txtMobileNo.value=="")
	{
		alert("Please enter either phone number or mobile number");
		document.form1.txtPhone.focus();
		return false;
	}
	if(document.form1.txtPhone.value != ""   )
	{
		if (document.form1.txtISD.value == "")
			{
			alert("Please enter ISD code of your phone number");
			document.form1.txtISD.focus();
			return false;
			}
		 if (document.form1.txtSTD.value == "")
			{
			alert("Please enter STD code of your phone number");
			document.form1.txtSTD.focus();
			return false;
			}
	}
	

	if(document.form1.cboUgCourse.selectedIndex == 0)
	{
		alert("Please select your Graduation");
		document.form1.cboUgCourse.focus();
		return false;
	}
	if(document.form1.cboUgSpec.selectedIndex == 0)
	{
		alert("Please select your specialisation");
		document.form1.cboUgSpec.focus();
		return false;
	}
	if(document.form1.cboUgInstitute.selectedIndex == 0 && document.form1.txtUgInstitute.value == "")
	{
		alert("Please select your graduation institute");
		document.form1.cboUgInstitute.focus();
		return false;
	}
	if(document.form1.cboUgInstitute.value=="others" && document.form1.txtUgInstitute.value=="")
	{
		alert("Please enter other institute");
		document.form1.txtUgInstitute.focus();
		return false;
	}
	/* made change by adding a combo box for ug institute
if(document.form1.txtUgInstitute.value == "")
	{
		alert("Please enter your UG institute");
		document.form1.txtUgInstitute.focus();
		return false;
	}*/
	if(document.form1.cboUgYear.selectedIndex == 0)
	{
		alert("Please select year of UG completion year");
		document.form1.cboUgYear.focus();
		return false;
	}
	/* ug percentage need not be mandatory
if(document.form1.txtUgPercentage.value == "")
	{
		alert("Please enter your UG percentage")
		document.form1.txtUgPercentage.focus();
		return false;
	}*/

	str = document.form1.txtUgPercentage.value;
if(str != "")
{
	dotcount = 0;
	for(i=0;i<str.length;i++)
	{
		x = str.substr(i,1);
		if(x == '.')
		{
			dotcount++;
		}
		if( !( (x >= '0' && x <= '9') || x == '.') )
		{
			alert("Please enter only numbers in UG percentage");
			document.form1.txtUgPercentage.focus();
			return false;
		}
	}
	if(isNaN(str))
	{
		alert("Please check your UG percentage");
		document.form1.txtUgPercentage.focus();	
		return false;
	}
	if (str > 100)  
	{
		alert("Percentage cannot be greater than 100");
		document.form1.txtUgPercentage.focus();	
		return false;
	} 
	if (str < 40)  
	{
		alert("Percentage cannot be less than 40");
		document.form1.txtUgPercentage.focus();	
		return false;
	} 
	if (dotcount > 1)
	{
		alert("Please give  a valid percentage");
		document.form1.txtUgPercentage.focus();
		return false;
	}
}

	if ( document.form1.cboPgCourse.selectedIndex != 0)
    {

		if(document.form1.cboPgSpec.selectedIndex == 0)
		{	
			alert("Please select your PG specialisation");
			document.form1.cboPgSpec.focus();
			return false;
		}
		if(document.form1.cboPgInstitute.selectedIndex == 0 && document.form1.txtPgInstitute.value == "")
		{
			alert("Please select your PG  Institute ");
			document.form1.cboPgInstitute.focus();
			return false;
		}
		if(document.form1.cboPgInstitute.value=="others" && document.form1.txtPgInstitute.value=="")
		{
			alert("Please enter other PG institute");
			document.form1.txtPgInstitute.focus();
			return false;
		}
		/*if(document.form1.txtPgInstitute.value=="")
		{      	
			alert ("Please Enter your PG institute");
			document.form1.txtPgInstitute.focus();
			return false;
		}*/
		if(document.form1.cboPgYear.selectedIndex == 0)
		{
			alert("Please select year of PG completion");
			document.form1.cboPgYear.focus();
			return false;
		}
		if(document.form1.txtPgPercentage.value == "")
		{
			alert("Please enter your PG percentage")
			document.form1.txtPgPercentage.focus();
			return false;
		}	
		str = document.form1.txtPgPercentage.value;
		dotcount = 0;
		for(i=0;i<str.length;i++)
		{
			x = str.substr(i,1)
			if(x == '.')
			{
				dotcount++;
			}

			if( !( (x >= '0' && x <= '9') || x == '.') )
			{
				alert("Please enter only numbers in PG percentage");
				document.form1.txtPgPercentage.focus();
				return false;
			}
		}

		if( (str > 100) || (dotcount > 1) )
		{
			alert("Please check your PG percentage");
			document.form1.txtPgPercentage.focus();	
			return false;
		}
	}
/*
	if( document.form1.cboIndustryType.selectedIndex == 0)
	{
		alert("Please select your current industry");
		document.form1.cboIndustryType.focus();
		return false;
	}
	if( document.form1.cboFunctionalArea.selectedIndex == 0)
	{
		alert("Please select your functional area");
		document.form1.cboFunctionalArea.focus();
		return false;
	}
*/
	if( document.form1.cboTotalExp_yy.selectedIndex == 0)
	{
		alert("Please select your experience in years");
		document.form1.cboTotalExp_yy.focus();
		return false;
	}
	if( document.form1.cboTotalExp_mm.selectedIndex == 0)
	{
		alert("Please select your experience in months");
		document.form1.cboTotalExp_mm.focus();
		return false;
	}
	lt = document.form1.cboLocationPreference;
	sel = 0;
	for(i=0;i<lt.length;i++)
	{
		if(lt[i].selected) sel++;
	}
	if(sel == 0)
	{
		alert("Please select one or more your preferred locations");
		lt.focus();
		return false;
	}
	if(sel > 3)
	{
		alert("Preferred locations should not exceed 3");
		lt.focus();
		return false;
	}
	if( trim(document.form1.txtTitle.value)=="")
	{
		alert("Please enter your resume headline");
		document.form1.txtTitle.value = "";
		document.form1.txtTitle.focus();
		return false;
	}

	if( trim(document.form1.txtKeywords.value)=="")
	{
		alert("Please enter your Key Skills");
		document.form1.txtKeywords.value = "";
		document.form1.txtKeywords.focus();
		return false;
	}

	
	

	
	canresume = trim(document.form1.txtResume.value);
	if (canresume=="")
	{
		alert("Please copy and paste your resume");
		return false;
	}
	else
	{
	
		if(canresume.length < 100)
		{
			alert("Your resume should contain atleast 100 characters");
			document.form1.txtResume.focus();
			return false;
		}
		document.form1.canSave.value = 1;
		return true;
	}

}

function trim(va)
{
	str = "";
	for(i=0;i<va.length;i++)
	{
		if(va.charAt(i) != " ")
			str = str + va.charAt(i);
	}
	return str;
}
function PopSelectUG() {


   var cList = document.form1.cboUgCourse;

   // Clear out the list of teams

   ClearOptions(document.form1.cboUgSpec);

   if (cList[cList.selectedIndex].value == "") {

      AddToOptionList(document.form1.cboUgSpec, "", "Select", true );


      AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );


   }


  if (cList[cList.selectedIndex].value == "B.A") {

  AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

  AddToOptionList(document.form1.cboUgSpec, "Anthropology", "Anthropology", false );

  AddToOptionList(document.form1.cboUgSpec, "Arts & Humanities", "Arts & Humanities", false );

  AddToOptionList(document.form1.cboUgSpec, "Communication", "Communication", false );

  AddToOptionList(document.form1.cboUgSpec, "Economics", "Economics", false );

  AddToOptionList(document.form1.cboUgSpec, "English", "English", false );

  AddToOptionList(document.form1.cboUgSpec, "Film", "Film", false );

  AddToOptionList(document.form1.cboUgSpec, "Hindi", "Hindi", false );

  AddToOptionList(document.form1.cboUgSpec, "History", "History", false );

  AddToOptionList(document.form1.cboUgSpec, "Journalism", "Journalism", false );

  AddToOptionList(document.form1.cboUgSpec, "Maths", "Maths", false );

  AddToOptionList(document.form1.cboUgSpec, "Political Science", "Political Science", false );

  AddToOptionList(document.form1.cboUgSpec, "PR/ Advertising", "PR/ Advertising", false );

  AddToOptionList(document.form1.cboUgSpec, "Psychology", "Psychology", false );

  AddToOptionList(document.form1.cboUgSpec, "Sanskrit", "Sanskrit", false );

  AddToOptionList(document.form1.cboUgSpec, "Sociology", "Sociology", false );

  AddToOptionList(document.form1.cboUgSpec, "Statistics", "Statistics", false );

  AddToOptionList(document.form1.cboUgSpec, "Vocational Course", "Vocational Course", false );

  AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

  }


  if (cList[cList.selectedIndex].value == "B.Arch") {

  AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

  AddToOptionList(document.form1.cboUgSpec, "Architecture", "Architecture", false );

  AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "BCA") {

   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboUgSpec, "Computers", "Computers", false );

   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }

   if (cList[cList.selectedIndex].value == "B.B.A") {

   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboUgSpec, "Management", "Management", false );

   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "B.Com") {

   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboUgSpec, "Commerce", "Commerce", false );

   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

    }

   if (cList[cList.selectedIndex].value == "B.Ed") {

      AddToOptionList(document.form1.cboUgSpec, "Education", "Education", false );

      AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );
     }

    if (cList[cList.selectedIndex].value == "BDS") {

    AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

    AddToOptionList(document.form1.cboUgSpec, "Dentistry", "Dentistry", false );

    AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

      }

      if (cList[cList.selectedIndex].value == "BHM") {

      AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

      AddToOptionList(document.form1.cboUgSpec, "Hotel Management", "Hotel Management", false );

      AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

      }
  
     if (cList[cList.selectedIndex].value == "B.Pharma") {

     AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

     AddToOptionList(document.form1.cboUgSpec, "Pharmacy", "Pharmacy", false );

     AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );
 
     }
  
   if (cList[cList.selectedIndex].value == "B.Sc") {

    AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

    AddToOptionList(document.form1.cboUgSpec, "Agriculture", "Agriculture", false );

    AddToOptionList(document.form1.cboUgSpec, "Bio-Chemistry", "Bio-Chemistry", false );

    AddToOptionList(document.form1.cboUgSpec, "Computers", "Computers", false );

    AddToOptionList(document.form1.cboUgSpec, "Dairy Technology", "Dairy Technology", false );

    AddToOptionList(document.form1.cboUgSpec, "Food Technology", "Food Technology", false );

    AddToOptionList(document.form1.cboUgSpec, "Physics", "Physics", false );

    AddToOptionList(document.form1.cboUgSpec, "Maths", "Maths", false );

    AddToOptionList(document.form1.cboUgSpec, "Chemistry", "Chemistry", false );

    AddToOptionList(document.form1.cboUgSpec, "Biology", "Biology", false );

    AddToOptionList(document.form1.cboUgSpec, "Statistics", "Statistics", false );

    AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }

   if (cList[cList.selectedIndex].value == "B.Tech"  || cList[cList.selectedIndex].value == "BE") {

   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboUgSpec, "Aviation", "Aviation", false );

   AddToOptionList(document.form1.cboUgSpec, "Chemical", "Chemical", false );

   AddToOptionList(document.form1.cboUgSpec, "Civil", "Civil", false );

   AddToOptionList(document.form1.cboUgSpec, "Computers", "Computers", false );

   AddToOptionList(document.form1.cboUgSpec, "Ceramics", "Ceramics", false );

   AddToOptionList(document.form1.cboUgSpec, "Electrical", "Electrical", false );

   AddToOptionList(document.form1.cboUgSpec, "Electronics/Telecommunication", "Electronics/Telecommunication", false );

   AddToOptionList(document.form1.cboUgSpec, "Environmental", "Environmental", false );

   AddToOptionList(document.form1.cboUgSpec, "Instrumentation", "Instrumentation", false );

   AddToOptionList(document.form1.cboUgSpec, "Mechanical", "Mechanical", false );

   AddToOptionList(document.form1.cboUgSpec, "Mining", "Mining", false );

   AddToOptionList(document.form1.cboUgSpec, "Petroleum", "Petroleum", false );

   AddToOptionList(document.form1.cboUgSpec, "Paint/Oil", "Paint/Oil", false );

   AddToOptionList(document.form1.cboUgSpec, "Plastics", "Plastics", false );

   AddToOptionList(document.form1.cboUgSpec, "Production/Industrial", "Production/Industrial", false );

   AddToOptionList(document.form1.cboUgSpec, "Bio-Chemistry/Bio-Technology", "Bio-Chemistry/Bio-Technology", false );

   AddToOptionList(document.form1.cboUgSpec, "Metallurgy", "Metallurgy", false );

   AddToOptionList(document.form1.cboUgSpec, "Textile", "Textile", false );

   AddToOptionList(document.form1.cboUgSpec, "Agriculture", "Agriculture", false );

   AddToOptionList(document.form1.cboUgSpec, "Other Engineering", "Other Engineering", false );
 
   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "Diploma") {

   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboUgSpec, "Architecture", "Architecture", false );

   AddToOptionList(document.form1.cboUgSpec, "Chemical", "Chemical", false );

   AddToOptionList(document.form1.cboUgSpec, "Civil", "Civil", false );

   AddToOptionList(document.form1.cboUgSpec, "Computers", "Computers", false );

   AddToOptionList(document.form1.cboUgSpec, "Electrical", "Electrical", false );

   AddToOptionList(document.form1.cboUgSpec, "Electronics/Telecommunication", "Electronics/Telecommunication", false );

   AddToOptionList(document.form1.cboUgSpec, "Engineering", "Engineering", false );

   AddToOptionList(document.form1.cboUgSpec, "Mechanical", "Mechanical", false );

   AddToOptionList(document.form1.cboUgSpec, "Fashion Designing/Other Designing", "Fashion Designing/Other Designing", false );

   AddToOptionList(document.form1.cboUgSpec, "Graphic/ Web Designing", "Graphic/ Web Designing", false );

   AddToOptionList(document.form1.cboUgSpec, "Hotel Management", "Hotel Management", false );

   AddToOptionList(document.form1.cboUgSpec, "Management", "Management", false );

   AddToOptionList(document.form1.cboUgSpec, "Tourism", "Tourism", false );

   AddToOptionList(document.form1.cboUgSpec, "Visual Arts", "Visual Arts", false );

   AddToOptionList(document.form1.cboUgSpec, "Vocational Course", "Vocational Course", false );

   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "LLB") {

   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboUgSpec, "Law", "Law", false );

   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "MBBS") {

   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboUgSpec, "Medicine", "Medicine", false );

   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }

   if (cList[cList.selectedIndex].value == "Others") {
   
   AddToOptionList(document.form1.cboUgSpec, "", "Select", true );
   
   AddToOptionList(document.form1.cboUgSpec, "Others", "Others", false );

   }

}

function PopSelectPG() {

   var cList = document.form1.cboPgCourse;

   ClearOptions(document.form1.cboPgSpec);
   if (cList[cList.selectedIndex].value == "") {

      AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

      AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }

  if (cList[cList.selectedIndex].value == "CA") {

  AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

  AddToOptionList(document.form1.cboPgSpec, "CA", "CA", false );

  AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

  }
   if (cList[cList.selectedIndex].value == "CS") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "CS", "CS", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );
   }
  if (cList[cList.selectedIndex].value == "ICWA") {

    AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

    AddToOptionList(document.form1.cboPgSpec, "ICWA", "ICWA", false );

    AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );
      }
   if (cList[cList.selectedIndex].value == "M.A") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Arts & Humanities", "Arts & Humanities", false );

   AddToOptionList(document.form1.cboPgSpec, "Anthropology", "Anthropology", false );

   AddToOptionList(document.form1.cboPgSpec, "Communication", "Communication", false );

   AddToOptionList(document.form1.cboPgSpec, "Economics", "Economics", false );

   AddToOptionList(document.form1.cboPgSpec, "English", "English", false );

   AddToOptionList(document.form1.cboPgSpec, "Film", "Film", false );

   AddToOptionList(document.form1.cboPgSpec, "Hindi", "Hindi", false );

   AddToOptionList(document.form1.cboPgSpec, "History", "History", false );

   AddToOptionList(document.form1.cboPgSpec, "Journalism", "Journalism", false );

   AddToOptionList(document.form1.cboPgSpec, "Maths", "Maths", false );

   AddToOptionList(document.form1.cboPgSpec, "Political Science", "Political Science", false );

   AddToOptionList(document.form1.cboPgSpec, "Psychology", "Psychology", false );

   AddToOptionList(document.form1.cboPgSpec, "PR/ Advertising", "PR/ Advertising", false );

   AddToOptionList(document.form1.cboPgSpec, "Sociology", "Sociology", false );

   AddToOptionList(document.form1.cboPgSpec, "Statistics", "Statistics", false );

   AddToOptionList(document.form1.cboPgSpec, "Sanskrit", "Sanskrit", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );
   }
   if (cList[cList.selectedIndex].value == "M.Arch") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Architecture", "Architecture", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }

   if (cList[cList.selectedIndex].value == "M.Com") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Commerce", "Commerce", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }

if (cList[cList.selectedIndex].value == "M.Ed") {

   AddToOptionList(document.form1.cboPgSpec, "Education", "Education", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "M.Tech" || cList[cList.selectedIndex].value == "ME") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Agriculture", "Agriculture", false );

   AddToOptionList(document.form1.cboPgSpec, "Aviation", "Aviation", false );

   AddToOptionList(document.form1.cboPgSpec, "Bio-Chemistry/Bio-Technology", "Bio-Chemistry/Bio-Technology", false );

   AddToOptionList(document.form1.cboPgSpec, "Ceramics", "Ceramics", false );

   AddToOptionList(document.form1.cboPgSpec, "Chemical", "Chemical", false );

   AddToOptionList(document.form1.cboPgSpec, "Civil", "Civil", false );

   AddToOptionList(document.form1.cboPgSpec, "Computers", "Computers", false );

   AddToOptionList(document.form1.cboPgSpec, "Electrical", "Electrical", false );

   AddToOptionList(document.form1.cboPgSpec, "Electronics/Telecommunication", "Electronics/Telecommunication", false );

   AddToOptionList(document.form1.cboPgSpec, "Environmental", "Environmental", false );

   AddToOptionList(document.form1.cboPgSpec, "Instrumentation", "Instrumentation", false );

   AddToOptionList(document.form1.cboPgSpec, "Mechanical", "Mechanical", false );

   AddToOptionList(document.form1.cboPgSpec, "Metallurgy", "Metallurgy", false );

   AddToOptionList(document.form1.cboPgSpec, "Mining", "Mining", false );

   AddToOptionList(document.form1.cboPgSpec, "Petroleum", "Petroleum", false );

   AddToOptionList(document.form1.cboPgSpec, "Plastics", "Plastics", false );

   AddToOptionList(document.form1.cboPgSpec, "Production/Industrial", "Production/Industrial", false );

   AddToOptionList(document.form1.cboPgSpec, "Textile", "Textile", false );

   AddToOptionList(document.form1.cboPgSpec, "Other Engineering", "Other Engineering", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );
   }

   if (cList[cList.selectedIndex].value == "M.Pharma") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Pharmacy", "Pharmacy", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }

  if (cList[cList.selectedIndex].value == "M.Sc") {

  AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

  AddToOptionList(document.form1.cboPgSpec, "Agriculture", "Agriculture", false );

  AddToOptionList(document.form1.cboPgSpec, "Biology", "Biology", false );

  AddToOptionList(document.form1.cboPgSpec, "Bio-Chemistry", "Bio-Chemistry", false );

  AddToOptionList(document.form1.cboPgSpec, "Chemistry", "Chemistry", false );

  AddToOptionList(document.form1.cboPgSpec, "Computers", "Computers", false );

  AddToOptionList(document.form1.cboPgSpec, "Dairy Technology", "Dairy Technology", false );

  AddToOptionList(document.form1.cboPgSpec, "Food Technology", "Food Technology", false );

  AddToOptionList(document.form1.cboPgSpec, "Maths", "Maths", false );

  AddToOptionList(document.form1.cboPgSpec, "Physics", "Physics", false );
 
  AddToOptionList(document.form1.cboPgSpec, "Statistics", "Statistics", false );

  AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

 }

   if (cList[cList.selectedIndex].value == "MBA") {

  AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

  AddToOptionList(document.form1.cboPgSpec, "Advertising/Mass Communication", "Advertising/Mass Communication", false );

  AddToOptionList(document.form1.cboPgSpec, "Finance", "Finance", false );

  AddToOptionList(document.form1.cboPgSpec, "HR/Industrial Relations", "HR/Industrial Relations", false );
 
 AddToOptionList(document.form1.cboPgSpec, "Marketing", "Marketing", false );

  AddToOptionList(document.form1.cboPgSpec, "Information Technology", "Information Technology", false );

  AddToOptionList(document.form1.cboPgSpec, "International Business", "International Business", false );

 AddToOptionList(document.form1.cboPgSpec, "Systems", "Systems", false );

 AddToOptionList(document.form1.cboPgSpec, "Other Management", "Other Management", false );

 AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }

   if (cList[cList.selectedIndex].value == "MCA" || cList[cList.selectedIndex].value == "PGDCA") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Computers", "Computers", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "MS") {


   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Cardiology", "Cardiology", false );

   AddToOptionList(document.form1.cboPgSpec, "Dermatology", "Dermatology", false );

   AddToOptionList(document.form1.cboPgSpec, "General Practitioner", "General Practitioner", false );

   AddToOptionList(document.form1.cboPgSpec, "Gyneocology", "Gyneocology", false );

   AddToOptionList(document.form1.cboPgSpec, "Hepatology", "Hepatology", false );

   AddToOptionList(document.form1.cboPgSpec, "Nephrology", "Nephrology", false );

   AddToOptionList(document.form1.cboPgSpec, "Neurology", "Neurology", false );

   AddToOptionList(document.form1.cboPgSpec, "Oncology", "Oncology", false );

   AddToOptionList(document.form1.cboPgSpec, "Opthalmology", "Opthalmology", false );

   AddToOptionList(document.form1.cboPgSpec, "Orthopaedic", "Orthopaedic", false );

   AddToOptionList(document.form1.cboPgSpec, "Pediatrics", "Pediatrics", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );


   }
   if (cList[cList.selectedIndex].value == "LLM") {
   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Law", "Law", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }
   if (cList[cList.selectedIndex].value == "Integrated PG") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Journalism / Mass Communication", "Journalism / Mass Communication", false );

   AddToOptionList(document.form1.cboPgSpec, "Management", "Management", false );

   AddToOptionList(document.form1.cboPgSpec, "PR/ Advertising", "PR/ Advertising", false );

   AddToOptionList(document.form1.cboPgSpec, "Tourism", "Tourism", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );
   }

  if (cList[cList.selectedIndex].value == "PG Diploma") {

AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

AddToOptionList(document.form1.cboPgSpec, "Chemical", "Chemical", false );

AddToOptionList(document.form1.cboPgSpec, "Civil", "Civil", false );

AddToOptionList(document.form1.cboPgSpec, "Electrical", "Electrical", false );

AddToOptionList(document.form1.cboPgSpec, "Electronics", "Electronics", false );

AddToOptionList(document.form1.cboPgSpec, "Mechanical", "Mechanical", false );

AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

}
   if (cList[cList.selectedIndex].value == "Ph.D") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Advertising/Mass Communication", "Advertising/Mass Communication", false );

   AddToOptionList(document.form1.cboPgSpec, "Agriculture", "Agriculture", false );

   AddToOptionList(document.form1.cboPgSpec, "Architecture", "Architecture", false );

   AddToOptionList(document.form1.cboPgSpec, "Aviation", "Aviation", false );

   AddToOptionList(document.form1.cboPgSpec, "Biotechnology", "Biotechnology", false );

   AddToOptionList(document.form1.cboPgSpec, "Chemical", "Chemical", false );

   AddToOptionList(document.form1.cboPgSpec, "Chemistry", "Chemistry", false );

   AddToOptionList(document.form1.cboPgSpec, "Civil", "Civil", false );

   AddToOptionList(document.form1.cboPgSpec, "Commerce", "Commerce", false );

   AddToOptionList(document.form1.cboPgSpec, "Computers", "Computers", false );

   AddToOptionList(document.form1.cboPgSpec, "Dairy Technology", "Dairy Technology", false );

   AddToOptionList(document.form1.cboPgSpec, "Economics", "Economics", false );

   AddToOptionList(document.form1.cboPgSpec, "Electrical", "Electrical", false );

   AddToOptionList(document.form1.cboPgSpec, "Electronics/Telecommunication", "Electronics/Telecommunication", false );

   AddToOptionList(document.form1.cboPgSpec, "Fashion Designing/Other Designing", "Fashion Designing/Other Designing", false );

   AddToOptionList(document.form1.cboPgSpec, "Finance", "Finance", false );

   AddToOptionList(document.form1.cboPgSpec, "Food Technology", "Food Technology", false );

   AddToOptionList(document.form1.cboPgSpec, "Hotel Management", "Hotel Management", false );

   AddToOptionList(document.form1.cboPgSpec, "HR/Industrial Relations", "HR/Industrial Relations", false );

   AddToOptionList(document.form1.cboPgSpec, "Instrumentation", "Instrumentation", false );

   AddToOptionList(document.form1.cboPgSpec, "Journalism", "Journalism", false );

   AddToOptionList(document.form1.cboPgSpec, "Law", "Law", false );

   AddToOptionList(document.form1.cboPgSpec, "Literature", "Literature", false );

   AddToOptionList(document.form1.cboPgSpec, "Marketing", "Marketing", false );

   AddToOptionList(document.form1.cboPgSpec, "Mechanical", "Mechanical", false );

   AddToOptionList(document.form1.cboPgSpec, "Medicine", "Medicine", false );

   AddToOptionList(document.form1.cboPgSpec, "Mining", "Mining", false );

   AddToOptionList(document.form1.cboPgSpec, "Pharmacy", "Pharmacy", false );

   AddToOptionList(document.form1.cboPgSpec, "Physics", "Physics", false );

   AddToOptionList(document.form1.cboPgSpec, "Production/Industrial", "Production/Industrial", false );

   AddToOptionList(document.form1.cboPgSpec, "Psychology", "Psychology", false );

   AddToOptionList(document.form1.cboPgSpec, "Statistics", "Statistics", false );

   AddToOptionList(document.form1.cboPgSpec, "Systems", "Systems", false );

   AddToOptionList(document.form1.cboPgSpec, "Vocational Courses", "Vocational Courses", false );

   AddToOptionList(document.form1.cboPgSpec, "Other Arts", "Other Arts", false );

   AddToOptionList(document.form1.cboPgSpec, "Other Doctorate", "Other Doctorate", false );

   AddToOptionList(document.form1.cboPgSpec, "Other Engineering", "Other Engineering", false );

   AddToOptionList(document.form1.cboPgSpec, "Other Management", "Other Management", false );

   AddToOptionList(document.form1.cboPgSpec, "Other Science", "Other Science", false );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }

   if (cList[cList.selectedIndex].value == "Others") {

   AddToOptionList(document.form1.cboPgSpec, "", "Select", true );

   AddToOptionList(document.form1.cboPgSpec, "Others", "Others", false );

   }
}

function ClearOptions(OptionList) {
   for (x = OptionList.length; x >= 0; x = x - 1) {
      OptionList[x] = null;

   }

}

function ClearOptionsSF(form)
 {

var destList  = form.elements[21];
var len = destList.length;
for(var i = (len-1); i >= 0; i--) {
if (destList.options[i] != null) 
	{
	destList.options[i] = null;
    }
 }

}

function AddToOptionList(OptionList, OptionValue, OptionText,defSel) {

   OptionList[OptionList.length] = new Option(OptionText, OptionValue,"",defSel);

}

function numbersonly(e, decimal) 
{

var key;
var keychar;

if (window.event) {
   key = window.event.keyCode;
}
else if (e) {
   key = e.which;
}
else {
   return true;
}
keychar = String.fromCharCode(key);

if ((key==null) || (key==0) || (key==8) ||  (key==9) || (key==13) || (key==27) ) {
   return true;
}
else if ((("0123456789").indexOf(keychar) > -1)) {
   return true;
}
else if (decimal && (keychar == ".")) { 
  return true;
}
else
     return false;
}




