/*
 * File Name	:validation.js
 * Path			:stmaryshsa
 * Copyright (c) Aride Ocean Infoway.
 * Cochin,India.
 * All rights reserved.
 * Created on 14/11/2008 by Shyju K
 * @version Apache Tomcat Version 2.0
 * @author 	Aride Ocean Infoway
 */
function validation()
{
 if(document.frm1.name.value=="")
	{
	alert("Populate the mandatory field 'Name' !");
	document.frm1.name.focus();
	return false;
	}
 if(document.frm1.family_name.value=="")
	{
	alert("Populate the mandatory field 'Family Name' !");
	document.frm1.family_name.focus();
	return false;
	}
 if(document.frm1.dob.value=="")
	{
	alert("Populate the mandatory field 'Date of birth' !");
	document.frm1.dob.focus();
	return false;
	}
 if(document.frm1.language_known.value=="")
	{
	alert("Populate the mandatory field 'Language Known' !");
	document.frm1.language_known.focus();
	return false;
	}
 if(document.frm1.religion.value=="")
	{
	alert("Populate the mandatory field 'Religion' !");
	document.frm1.religion.focus();
	return false;
	}
 if(document.frm1.nationality.value=="")
	{
	alert("Populate the mandatory field 'Nationality' !");
	document.frm1.nationality.focus();
	return false;
	}
 if(document.frm1.email.value=="")
	{
	alert("Populate the mandatory field 'E-mail' !");
	document.frm1.email.focus();
	return false;
	}
 if(document.frm1.present_address.value=="")
	{
	alert("Populate the mandatory field 'Present Address' !");
	document.frm1.present_address.focus();
	return false;
	}
 if(document.frm1.present_pin.value=="")
	{
	alert("Populate the mandatory field 'Present Pin / Zip' !");
	document.frm1.present_pin.focus();
	return false;
	}
 if(document.frm1.present_tel.value=="")
	{
	alert("Populate the mandatory field 'Present telephone' !");
	document.frm1.present_tel.focus();
	return false;
	}

 if(document.frm1.permanent_address.value=="")
	{
	alert("Populate the mandatory field 'Permanent Address' !");
	document.frm1.permanent_address.focus();
	return false;
	}
 if(document.frm1.permanent_pin.value=="")
	{
	alert("Populate the mandatory field 'Permanent Pin / Zip' !");
	document.frm1.permanent_pin.focus();
	return false;
	}
 if(document.frm1.permanent_tel.value=="")
	{
	alert("Populate the mandatory field 'Permanent telephone' !");
	document.frm1.permanent_tel.focus();
	return false;
	}
if(document.frm1.permanent_tel.value=="")
	{
	alert("Populate the mandatory field 'Permanent telephone' !");
	document.frm1.permanent_tel.focus();
	return false;
	} if(document.frm1.permanent_tel.value=="")
	{
	alert("Populate the mandatory field 'Permanent telephone' !");
	document.frm1.permanent_tel.focus();
	return false;
	}
 if(document.frm1.passport_number.value=="")
	{
	alert("Populate the mandatory field 'Passport Number' !");
	document.frm1.passport_number.focus();
	return false;
	}
 if(document.frm1.passport_place.value=="")
	{
	alert("Populate the mandatory field 'Place of issue' !");
	document.frm1.passport_place.focus();
	return false;
	}
 if(document.frm1.passport_issue.value=="")
	{
	alert("Populate the mandatory field 'Issue Date' !");
	document.frm1.passport_issue.focus();
	return false;
	}
 if(document.frm1.passport_expiry.value=="")
	{
	alert("Populate the mandatory field 'Expiry Date' !");
	document.frm1.passport_expiry.focus();
	return false;
	}
 if(document.frm1.code.value=="")
	{
	alert("Populate the code shown above !");
	document.frm1.code.focus();
	return false;
	}

	return true;
}




//Enable submit button

function apply()
{
  document.frm1.submit.disabled=true;
  if(document.frm1.chk.checked==true)
  {
    document.frm1.submit.disabled=false;
  }
  if(document.frm1.chk.checked==false)
  {
    document.frm1.submit.enabled=false;
  }
}