
/**
 * DHTML date validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */
// Declaring valid date character, minimum year and maximum year
var dtCh= "/";
var minYear=1900;
var maxYear=2100;

function isInteger(s){
	var i;
    for (i = 0; i < s.length; i++){   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

function stripCharsInBag(s, bag){
	var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++){   
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

function daysInFebruary (year){
	// February has 29 days in any year evenly divisible by four,
    // EXCEPT for centurial years which are not also divisible by 400.
    return (((year % 4 == 0) && ( (!(year % 100 == 0)) || (year % 400 == 0))) ? 29 : 28 );
}
function DaysArray(n) {
	for (var i = 1; i <= n; i++) {
		this[i] = 31
		if (i==4 || i==6 || i==9 || i==11) {this[i] = 30}
		if (i==2) {this[i] = 29}
   } 
   return this
}

function isDate(dtStr){
	var daysInMonth = DaysArray(12)
	var pos1=dtStr.indexOf(dtCh)
	var pos2=dtStr.indexOf(dtCh,pos1+1)
	var strDay=dtStr.substring(0,pos1)
	var strMonth=dtStr.substring(pos1+1,pos2)
	var strYear=dtStr.substring(pos2+1)
	strYr=strYear
	if (strDay.charAt(0)=="0" && strDay.length>1) strDay=strDay.substring(1)
	if (strMonth.charAt(0)=="0" && strMonth.length>1) strMonth=strMonth.substring(1)
	for (var i = 1; i <= 3; i++) {
		if (strYr.charAt(0)=="0" && strYr.length>1) strYr=strYr.substring(1)
	}
	month=parseInt(strMonth)
	day=parseInt(strDay)
	year=parseInt(strYr)
	if (pos1==-1 || pos2==-1){
		alert("The date format should be : dd/mm/yyyy")
		return false
	}
	if (strMonth.length<1 || month<1 || month>12){
		alert("Please enter a valid month")
		return false
	}
	if (strDay.length<1 || day<1 || day>31 || (month==2 && day>daysInFebruary(year)) || day > daysInMonth[month]){
		alert("Please enter a valid day")
		return false
	}
	if (strYear.length != 4 || year==0 || year<minYear || year>maxYear){
		alert("Please enter a valid 4 digit year between "+minYear+" and "+maxYear)
		return false
	}
	if (dtStr.indexOf(dtCh,pos2+1)!=-1 || isInteger(stripCharsInBag(dtStr, dtCh))==false){
		alert("Please enter a valid date")
		return false
	}
return true
}

/*function ValidateForm(){
	var dt=document.frmSample.txtDate
	if (isDate(dt.value)==false){
		dt.focus()
		return false
	}
    return true
 }*/

/* Date Format checking ends here */

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function frmSubmit()
{
	if(document.frmFeedback.txtUserName.value == ""){
	 alert("User Name Required");
	 document.frmFeedback.txtUserName.focus();
	 return false;
	}
	if(document.frmFeedback.txtPwd.value == ""){
		alert("Password Required");
		document.frmFeedback.txtPwd.focus();
		return false;
	}
	//document.frmFeedback.action ="../php/userlogin.php"
	document.frmFeedback.submit();
	return true;
}

function getpr() {	 
	 if (document.frmexp.subcomp.value !="0") {  
	 	 document.frmexp.action = "../php/teqip_exp_spfu.php";
		 document.frmexp.submit();
		 return true;
		}
}
function getpro() {	
       var i = document.frmexp.ddlCategory.options[document.frmexp.ddlCategory].value;  
	   if (i == "1") {		   
		   document.frmexp.action = "../php/teqip_exp_inst.php";
		   //document.frmexp.ddlCategory.options[document.frmexp.ddlCategory].value = "selected";
		   document.frmexp.submit();
		   return true;
	       }	   
}
function getpr1() {	 
	document.getElementById("invcost").style.display = "block";
	document.getElementById("inccost").style.display = "none";
}
function getpr2() {	 
	document.frmexp.inv_cost.value = '0';
	document.getElementById("invcost").style.display = "none";
	document.getElementById("inccost").style.display = "block";
}
function getprt1() {	 
	document.getElementById("invcost").style.display = "block";
	document.getElementById("inccost").style.display = "none";
}
function getprt2() {
	document.getElementById("invcost").style.display = "none";
	document.getElementById("inccost").style.display = "block";
}
function ac1exp() {	 
	document.getElementById("expac11").style.display = "block";	
	document.getElementById("expac12").style.display = "none";	
}
function ac2exp() {	 
	document.getElementById("expac12").style.display = "block";
	document.getElementById("expac11").style.display = "none";
}
function ac21exp() {	 
	document.getElementById("expac21").style.display = "block";	
	document.getElementById("expac22").style.display = "none";	
}
function ac22exp() {	 
	document.getElementById("expac22").style.display = "block";
	document.getElementById("expac21").style.display = "none";
}
function ac31exp() {	 
	document.getElementById("expac31").style.display = "block";	
	document.getElementById("expac32").style.display = "none";	
}
function ac32exp() {	 
	document.getElementById("expac32").style.display = "block";
	document.getElementById("expac31").style.display = "none";
}
function ac331exp() {	 
	document.getElementById("expac331").style.display = "block";	
	document.getElementById("expac332").style.display = "none";	
}
function ac332exp() {	 
	document.getElementById("expac332").style.display = "block";
	document.getElementById("expac331").style.display = "none";
}

function ev1() {	 
	document.getElementById("ev11").style.display = "block";	
	document.getElementById("ev12").style.display = "none";	
}
function ev2() {	 
	document.getElementById("ev12").style.display = "block";
	document.getElementById("ev11").style.display = "none";
}
function ev3() {	 
	document.getElementById("ev13").style.display = "block";	
	document.getElementById("ev14").style.display = "none";	
}
function ev4() {	 
	document.getElementById("ev14").style.display = "block";
	document.getElementById("ev13").style.display = "none";
}
function ev5() {	 
	document.getElementById("ev15").style.display = "block";	
	document.getElementById("ev16").style.display = "none";	
}
function ev6() {	 
	document.getElementById("ev16").style.display = "block";
	document.getElementById("ev15").style.display = "none";
}
function ev7() {	 
	document.getElementById("ev17").style.display = "block";	
	document.getElementById("ev18").style.display = "none";	
}
function ev8() {	 
	document.getElementById("ev18").style.display = "block";
	document.getElementById("ev17").style.display = "none";
}

function ev9() {	 
	document.getElementById("ev19").style.display = "block";	
	document.getElementById("ev110").style.display = "none";	
}
function ev10() {	 
	document.getElementById("ev110").style.display = "block";
	document.getElementById("ev19").style.display = "none";
}

function ev11() {	 
	document.getElementById("ev111").style.display = "block";	
	document.getElementById("ev112").style.display = "none";	
}
function ev12() {	 
	document.getElementById("ev112").style.display = "block";
	document.getElementById("ev111").style.display = "none";
}
/**********************************************************************************************************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only

if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display="block"
}
}

function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}

if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunction

if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate

/*****************************************************************************************************/

function cw1_fldsvalidator(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	 if (document.frmexp.txtGoods.value =="")
	{
		      alert("'Name of the Civil Work' Should be entered"); 
			  document.frmexp.txtGoods.focus();
			  return false;
	}	
	if (document.frmexp.txtProcMethod.value =='0')
	{
		      alert("'Method of Procurement' Should be selected"); 
			  document.frmexp.txtProcMethod.focus();
			  return false;
	}
	
	if (document.frmexp.txtContractValue.value =="")
	{
		      alert("'Value of Contract' Should be entered"); 
			  document.frmexp.txtContractValue.focus();
			  return false;
	}
	else if (document.frmexp.txtContractValue.value !="")
	{
			 if(isNaN(document.frmexp.txtContractValue.value))
			{				
				alert("Value of Contract' Should be only Numeric Data");
				document.frmexp.txtContractValue.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtContractValue.value) < 0)
			{
				alert("Value of Contract' Should not be Negative values.");
				document.frmexp.txtContractValue.focus();
				return false;
			}
	}
	if (document.frmexp.txtPreMonthExp.value =="")
	{
		      alert("'Expenditure upto previous month' Should be entered"); 
			  document.frmexp.txtPreMonthExp.focus();
			  return false;
	}
	else if (document.frmexp.txtPreMonthExp.value !="")
	{
			 if(isNaN(document.frmexp.txtPreMonthExp.value))
			{				
				alert("Expenditure upto previous month' Should be only Numeric Data");
				document.frmexp.txtPreMonthExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtPreMonthExp.value) < 0)
			{
				alert("Expenditure upto previous month' Should not be Negative values.");
				document.frmexp.txtPreMonthExp.focus();
				return false;
			}
	}
	if (document.frmexp.txtrepMonthExp.value =="")
	{
		      alert("'Expenditure during the reporting month' Should be entered"); 
			  document.frmexp.txtrepMonthExp.focus();
			  return false;
	}
	else if (document.frmexp.txtrepMonthExp.value !="")
	{
			 if(isNaN(document.frmexp.txtrepMonthExp.value))
			{				
				alert("Expenditure during the reporting month' Should be only Numeric Data");
				document.frmexp.txtContractValue.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtrepMonthExp.value) < 0)
			{
				alert("Expenditure during the reporting month' Should not be Negative values.");
				document.frmexp.txtrepMonthExp.focus();
				return false;
			}
	}
	if (document.frmexp.txtCummExp.value =="")
	{
		      alert("'Cumulative Expenditure' Should be entered"); 
			  document.frmexp.txtCummExp.focus();
			  return false;
	}
	else if (document.frmexp.txtCummExp.value !="")
	{
			 if(isNaN(document.frmexp.txtCummExp.value))
			{				
				alert("Cumulative Expenditure' Should be only Numeric Data");
				document.frmexp.txtCummExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtCummExp.value) < 0)
			{
				alert("Cumulative Expenditure' Should not be Negative values.");
				document.frmexp.txtCummExp.focus();
				return false;
			}
	}
	//document.frmexp.add.value="add";
	document.frmexp.submit();
 } 
 
 function cw2_fldsvalidator(){
		
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	 if (document.frmexp.txtGoods.value =="")
	{
		      alert("'Name of the Civil Work' Should be entered"); 
			  document.frmexp.txtGoods.focus();
			  return false;
	}	
	if (document.frmexp.txtProcMethod.value =='0')
	{
		      alert("'Method of Procurement' Should be selected"); 
			  document.frmexp.txtProcMethod.focus();
			  return false;
	}
	
	if (document.frmexp.txtContractValue.value =="")
	{
		      alert("'Value of Contract' Should be entered"); 
			  document.frmexp.txtContractValue.focus();
			  return false;
	}
	
	else if (document.frmexp.txtContractValue.value !="")
	{
			 if(isNaN(document.frmexp.txtContractValue.value))
			{				
				alert("Value of Contract' Should be only Numeric Data");
				document.frmexp.txtContractValue.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtContractValue.value) < 0)
			{
				alert("Value of Contract' Should not be Negative values.");
				document.frmexp.txtContractValue.focus();
				return false;
			}
	}
	if (document.frmexp.txtOrderNo.value =="")
	{
		      alert("'Work Order No' Should be entered"); 
			  document.frmexp.txtOrderNo.focus();
			  return false;
	}
	if (document.frmexp.txtOrderDate.value =="")
	{
		      alert("'Work Order Date' Should be entered"); 
			  document.frmexp.txtOrderDate.focus();
			  return false;
	}

	if (isDate(document.frmexp.txtOrderDate.value)==false){
		document.frmexp.txtOrderDate.focus()
		return false
	}
	
	var cw2temp = document.frmexp.txtOrderDate.value.split("/", 3);
	var cw2tempmonth = cw2temp[1];
	var cw2tempyear = cw2temp[2];
	
	if((document.frmexp.ddlMonth.value != cw2tempmonth) || (document.frmexp.ddlYear.value != cw2tempyear)) 
	{
		alert("Work Order Month&Year and Selected Month&Year should be the same");
		return false;
	}
	
	document.frmexp.submit();
 } 
 function cw3_fldsvalidator(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	 if (document.frmexp.txtGoods.value =="")
	{
		      alert("'Name of the Civil Work' Should be entered"); 
			  document.frmexp.txtGoods.focus();
			  return false;
	}	
	if (document.frmexp.txtFloatingDate.value =="")
	{
		      alert("'Floating Date' Should be selected"); 
			  document.frmexp.txtFloatingDate.focus();
			  return false;
	}
	if (isDate(document.frmexp.txtFloatingDate.value)==false){
		document.frmexp.txtFloatingDate.focus()
		return false
	}	
	if (document.frmexp.txtOpeningDate.value =="")
	{
		      alert("'Opening Date' Should be entered"); 
			  document.frmexp.txtOpeningDate.focus();
			  return false;
	}
	
	var cw3temp = document.frmexp.txtFloatingDate.value.split("/", 3);
	var cw3tempmonth = cw3temp[1];
	var cw3tempyear = cw3temp[2];
	
	if((document.frmexp.ddlMonth.value != cw3tempmonth) || (document.frmexp.ddlYear.value != cw3tempyear))
	{
		alert("Floating Date Month&Year & Selected Month&Year should be the same");
		return false;
	}
	
	if (isDate(document.frmexp.txtOpeningDate.value)==false){
		document.frmexp.txtOpeningDate.focus()
		return false
	}
	if (document.frmexp.txtEstCost.value =="")
	{
		      alert("' Estimated Cost' Should be entered"); 
			  document.frmexp.txtEstCost.focus();
			  return false;
	}
	else if (document.frmexp.txtEstCost.value !="")
	{
			 if(isNaN(document.frmexp.txtEstCost.value))
			{				
				alert("Estimated Cost' Should be only Numeric Data");
				document.frmexp.txtEstCost.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtEstCost.value) < 0)
			{
				alert("Estimated Cost' Should not be Negative values.");
				document.frmexp.txtEstCost.focus();
				return false;
			}
	}
	if (document.frmexp.OrderDate.value =="")
	{
		      alert("'date of placement of work order' Should be entered"); 
			  document.frmexp.OrderDate.focus();
			  return false;
	}
	if (isDate(document.frmexp.OrderDate.value)==false){
		document.frmexp.OrderDate.focus()
		return false
	}
	if(compareDates(document.frmexp.txtFloatingDate.value, document.frmexp.txtOpeningDate.value) == 1)
	{
			alert("Enter Valid Dates, Floating Date should be less than Opening Date");
			return false;
	}
	if(compareDates(document.frmexp.txtOpeningDate.value, document.frmexp.OrderDate.value) == 1)
	{
			alert("Enter Valid Dates, Opening Date should be less than Work Order Date");
			return false;
	}
	document.frmexp.submit();
 } 
 /****************************************************************************************************/
 
 function ac1_fldsvalidator(){
		
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}	
	 if (document.frmexp.txtTrainName.value =="")
	{
		      alert("'Name of the Training' Should be entered"); 
			  document.frmexp.txtTrainName.focus();
			  return false;
	}	
	if (document.frmexp.txtFacultyName.value =="")
	{
		      alert("'Name of the faculty' Should be Entered"); 
			  document.frmexp.txtFacultyName.focus();
			  return false;
	}
	if (document.frmexp.TrgPrs.value == '0')
	{
		      alert("'No of Training Persons' Should be selected"); 
			  document.frmexp.TrgPrs.focus();
			  return false;
	}
	if (document.frmexp.txtTrainingArea.value =="")
	{
		      alert("'Area of Training' Should be entered"); 
			  document.frmexp.txtTrainingArea.focus();
			  return false;
	}
	if (document.frmexp.txtStartDate.value =="")
	{
		      alert("'Start Date' Should be entered"); 
			  document.frmexp.txtStartDate.focus();
			  return false;
	}
	if (isDate(document.frmexp.txtStartDate.value)==false){
		document.frmexp.txtStartDate.focus()
		return false
	}	
	if (document.frmexp.txtEndDate.value =="")
	{
		      alert("'End Date' Should be entered"); 
			  document.frmexp.txtEndDate.focus();
			  return false;
	}
	if (isDate(document.frmexp.txtEndDate.value)==false){
		document.frmexp.txtEndDate.focus()
		return false
	}
	if (document.frmexp.txtTrainAgency.value =="")
	{
		      alert("'Training Agency' Should be entered"); 
			  document.frmexp.txtTrainAgency.focus();
			  return false;
	}
	myOption = -1;
      for (i=frmexp.rbtnWorkPat.length-1; i > -1; i--) {
           if (frmexp.rbtnWorkPat[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Actual Expenditure or Advance Given' Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtExp1.value =="") {              
				 alert("'Actual Expenditure' should be entered");
				 document.frmexp.txtExp1.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtExp2.value =="") {   
			     alert("'Advance Given' should be entered");
				 document.frmexp.txtExp2.focus();
                 return false;
			  }
			  if(document.frmexp.txtExp1.value !="") {
				  if(parseInt(document.frmexp.txtExp1.value) < 0)
			{
				alert("Actual Expenditure' Should not be Negative values.");
				document.frmexp.txtExp1.focus();
				return false;
			}
			  }
			  if(document.frmexp.txtExp2.value !="") {
				  if(parseInt(document.frmexp.txtExp2.value) < 0)
			{
				alert("Advance Given' Should not be Negative values.");
				document.frmexp.txtExp2.focus();
				return false;
			}
			  }
	
	
	if(compareDates(document.frmexp.txtStartDate.value, document.frmexp.txtEndDate.value) == 1)
	{
			alert("Enter Valid Dates, Start Date should be less than End Date");
			return false;
	}	
	
	document.frmexp.submit();
} 

function pg1_fldsvalidator(){
	
	
	if (document.frmexp.month.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.month.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}	
	 if (document.frmexp.txtGoods.value =="")
	{
		      alert("'Name of the Goods' Should be entered"); 
			  document.frmexp.txtGoods.focus();
			  return false;
	}	
	if (document.frmexp.txtTypeGoods.value =='0')
	{
		      alert("'Type of the Goods' Should be Selected"); 
			  document.frmexp.txtTypeGoods.focus();
			  return false;
	}	
	if (document.frmexp.txtProcMethod.value =='0')
	{
		      alert("'Method of Procurement' Should be entered"); 
			  document.frmexp.txtProcMethod.focus();
			  return false;
	}	
	if (document.frmexp.txtContractValue.value =="")
	{
		      alert("'Value of Contract' Should be entered"); 
			  document.frmexp.txtContractValue.focus();
			  return false;	
	}
			 else if (document.frmexp.txtContractValue.value !="")
	{
			 if(isNaN(document.frmexp.txtContractValue.value))
			{				
				alert("Value of Contract' Should be only Numeric Data");
				document.frmexp.txtContractValue.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtContractValue.value) < 0)
			{
				alert("Value of Contract' Should not be Negative values.");
				document.frmexp.txtContractValue.focus();
				return false;
			}
	}
			  	
	if (document.frmexp.txtPreMonthExp.value =="")
	{
		      alert("'Previous Month Expenditure ' Should be entered"); 
			  document.frmexp.txtPreMonthExp.focus();
			  return false;
	}
			 else if (document.frmexp.txtPreMonthExp.value !="")
	{
			 
			if(isNaN(document.frmexp.txtPreMonthExp.value))
			{				
				alert("Expenditure During the reporting month' Should be only Numeric Data");
				document.frmexp.txtPreMonthExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtPreMonthExp.value) < 0)
			{
				alert("Expenditure During the reporting month' Should not be Negative values.");
				document.frmexp.txtPreMonthExp.focus();
				return false;
			}
	}
	if (document.frmexp.txtrepMonthExp.value =="")
	{
		      alert("'Expenditure During the reporting month' Should be entered"); 
			  document.frmexp.txtrepMonthExp.focus();
			  return false;
	}
			 else if (document.frmexp.txtrepMonthExp.value !="")
	{
			 if(document.frmexp.txtrepMonthExp.value == '0')
			{				
				alert("Expenditure During the reporting month' Should not be Zero");
				document.frmexp.txtrepMonthExp.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtrepMonthExp.value))
			{				
				alert("Expenditure During the reporting month' Should be only Numeric Data");
				document.frmexp.txtrepMonthExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtrepMonthExp.value) < 0)
			{
				alert("Expenditure During the reporting month' Should not be Negative values.");
				document.frmexp.txtrepMonthExp.focus();
				return false;
			}
	}
	if (document.frmexp.txtCummExp.value =="")
	{
		      alert("'Cumulative Expenditure' Should be entered"); 
			  document.frmexp.txtCummExp.focus();
			  return false;
	}
	 else if (document.frmexp.txtCummExp.value !="")
	{
			 if(isNaN(document.frmexp.txtCummExp.value))
			{				
				alert("Cumulative Expenditure' Should be only Numeric Data");
				document.frmexp.txtCummExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtCummExp.value) < 0)
			{
				alert("Cumulative Expenditure' Should not be Negative values.");
				document.frmexp.txtCummExp.focus();
				return false;
			}
	}
	
	document.frmexp.submit();
} 

function pg2_fldsvalidator(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}	
	 if (document.frmexp.txtGoods.value =="")
	{
		      alert("'Name of the Goods' Should be entered"); 
			  document.frmexp.txtGoods.focus();
			  return false;
	}	
	if (document.frmexp.txtTypeGoods.value =='0')
	{
		      alert("'Type of Goods' Should be entered"); 
			  document.frmexp.txtTypeGoods.focus();
			  return false;
	}
	if (document.frmexp.txtProcMethod.value =='0')
	{
		      alert("'Method of Procurement' Should be entered"); 
			  document.frmexp.txtProcMethod.focus();
			  return false;
	}	
	if (document.frmexp.txtContractValue.value =="")
	{
		      alert("'Value of Contract' Should be entered"); 
			  document.frmexp.txtContractValue.focus();
			  return false;
	}	
		 else if (document.frmexp.txtContractValue.value !="")
	{
			 if(isNaN(document.frmexp.txtContractValue.value))
			{				
				alert("Value of Contract' Should be only Numeric Data");
				document.frmexp.txtContractValue.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtContractValue.value) < 0)
			{
				alert("Value of Contract' Should not be Negative values.");
				document.frmexp.txtContractValue.focus();
				return false;
			}
	}
	if (document.frmexp.txtOrderNo.value =="")
	{
		      alert("'Purchase Order No' Should be entered"); 
			  document.frmexp.txtOrderNo.focus();
			  return false;
	}	
	if (document.frmexp.txtOrderDate.value =="")
	{
		      alert("'Purchase Order Date' Should be entered"); 
			  document.frmexp.txtOrderDate.focus();
			  return false;
	}
	if (isDate(document.frmexp.txtOrderDate.value)==false){
		document.frmexp.txtOrderDate.focus()
		return false
	}	
	var temp = document.frmexp.txtOrderDate.value.split("/", 3);
	var tempmonth = temp[1];
	var tempyear = temp[2];
	
	if((document.frmexp.ddlMonth.value != tempmonth) || (document.frmexp.ddlYear.value != tempyear))
	{
		alert("Purchase Order Month&Year and Selected Month&Year should be the same");
		return false;
	}
	
	
	document.frmexp.submit();
} 

function pg3_fldsvalidator(){	
	
	if (document.frm.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frm.ddlMonth.focus();
			  return false;
		 }
	 if (document.frm.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frm.ddlYear.focus();
			  return false;
	}	
	 if (document.frm.txtGoods.value =="")
	{
		      alert("'Name of the Goods' Should be entered"); 
			  document.frm.txtGoods.focus();
			  return false;
	}	
	if (document.frm.txtTypeGoods.value =='0')
	{
		      alert("'Type of Goods' Should be selected"); 
			  document.frm.txtTypeGoods.focus();
			  return false;
	}
	if (document.frm.txtFloatingDate.value =="")
	{
		      alert("'Floating Date' Should be entered"); 
			  document.frm.txtFloatingDate.focus();
			  return false;
	}	
	if (isDate(document.frm.txtFloatingDate.value)==false){
		document.frm.txtFloatingDate.focus()
		return false
	}
	if (document.frm.txtOpeningDate.value =="")
	{
		      alert("'Opening Date' Should be entered"); 
			  document.frm.txtOpeningDate.focus();
			  return false;
	}	
	var pg3temp = document.frm.txtFloatingDate.value.split("/", 3);
	var pg3tempmonth = pg3temp[1];
	var pg3tempyear = pg3temp[2];
	
	if((document.frm.ddlMonth.value != pg3tempmonth) || (document.frm.ddlYear.value != pg3tempyear))
	{
		alert("Floating Date Month&Year and Selected Month&Year should be the same");
		return false;
	}
	
	if (isDate(document.frm.txtOpeningDate.value)==false){
		document.frm.txtOpeningDate.focus()
		return false
	}
	if (document.frm.txtEstCost.value =="")
	{
		      alert("' Estimated Cost' Should be entered"); 
			  document.frm.txtEstCost.focus();
			  return false;
	}	
		 else if (document.frm.txtEstCost.value !="")
	{
			 if(isNaN(document.frm.txtEstCost.value))
			{				
				alert("Estimated Cost' Should be only Numeric Data");
				document.frm.txtEstCost.focus();
				return false;
			}
			if(parseInt(document.frm.txtEstCost.value) < 0)
			{
				alert("Negative values are not allowed for this field.");
				document.frm.txtEstCost.focus();
				return false;
			}
	}
	if (document.frm.pwodate.value =="")
	{
		      alert("'Date of placement of work order' Should be entered"); 
			  document.frm.pwodate.focus();
			  return false;
	}	
	if (isDate(document.frm.pwodate.value)==false){
		document.frm.pwodate.focus()
		return false
	}
	
	if(compareDates(document.frm.txtFloatingDate.value, document.frm.txtOpeningDate.value) == 1)
	{
			alert("Enter Valid Dates, Floating Date should be less than Opening Date");
			return false;
	}
	if(compareDates(document.frm.txtOpeningDate.value, document.frm.pwodate.value) == 1)
	{
			alert("Enter Valid Dates, Opening Date should be less than Work Order Date");
			return false;
	}

	document.frm.submit();
} 
/*****************************************************************************************************/
function inst_validator(){		
	
		 if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}	
	 if (document.frmexp.ddlCategory.value =='0')
	{
		      alert("'Component' Should be Selected"); 
			  document.frmexp.ddlCategory.focus();
			  return false;
	}	
	if (document.frmexp.ddlCategory.value == '1')
	{     
	  myOption = -1;
      for (i=frmexp.subcomp.length-1; i > -1; i--) {
           if (frmexp.subcomp[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Subcomponent' Should be Selected");
              return false;
              }
			  
			 if (myOption == 0 && document.frmexp.inv_cost.value <='0') {              
				 alert("'Select the Item'");
                 return false;
			 } else if (myOption == 1 && document.frmexp.inc_op_cost.value <='0' ) {
				 alert("'Select the Item'");
                 return false;
			 }
			  
	}
	
	
	if (document.frmexp.txtTotProjAlloc.value =="")
	{
		      alert("'Total Project Allocations' Should be entered"); 
			  document.frmexp.txtTotProjAlloc.focus();
			  return false;
	}	
	else if (document.frmexp.txtTotProjAlloc.value !="")
	{
			 if(isNaN(document.frmexp.txtTotProjAlloc.value))
			{				
				alert("Total Project Allocations' Should be only Numeric Data");
				document.frmexp.txtTotProjAlloc.focus();
				return false;
			}
	}
	if (document.frmexp.txtCumPrevMonth.value =="")
	{
		      alert("'Cummulative Expenditure' Should be entered"); 
			  document.frmexp.txtCumPrevMonth.focus();
			  return false;
	}	
	else if (document.frmexp.txtCumPrevMonth.value !="")
	{
			 if(isNaN(document.frmexp.txtCumPrevMonth.value))
			{				
				alert("Cummulative Expenditure' Should be only Numeric Data");
				document.frmexp.txtCumPrevMonth.focus();
				return false;
			}
	}
	if (document.frmexp.txtExpRptMonth.value =="")
	{
		      alert("'Expenditure' Should be entered"); 
			  document.frmexp.txtExpRptMonth.focus();
			  return false;
	}
	else if (document.frmexp.txtExpRptMonth.value !="")
	{ 
			 if(isNaN(document.frmexp.txtExpRptMonth.value))
			{				
				alert("Expenditure' Should be only Numeric Data");
				document.frmexp.txtExpRptMonth.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtExpRptMonth.value) < 0)
			{
				alert("Expenditure' Should not be Negative values.");
				document.frmexp.txtExpRptMonth.focus();
				return false;
			}
			
	}
	if (document.frmexp.txtTotal.value =="")
	{
		      alert("'Total' Should be entered"); 
			  document.frmexp.txtTotal.focus();
			  return false;
	}
	else if (document.frmexp.txtTotal.value !="")
	{
			 if(isNaN(document.frmexp.txtTotal.value))
			{				
				alert("Total' Should be only Numeric Data");
				document.frmexp.txtTotal.focus();
				return false;
			}
	}
	if (document.frmexp.txtCommExp.value =="")
	{
		      alert("'Committed Expenditure' Should be entered"); 
			  document.frmexp.txtCommExp.focus();
			  return false;
	}
	else if (document.frmexp.txtCommExp.value !="")
	{
			 if(isNaN(document.frmexp.txtCommExp.value))
			{				
				alert("Committed Expenditure' Should be only Numeric Data");
				document.frmexp.txtCommExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtCommExp.value) < 0)
			{
				alert("Expenditure' Should not be Negative values.");
				document.frmexp.txtCommExp.focus();
				return false;
			}
	}
	document.frmexp.add.value="add";
	document.frmexp.submit();
} 

function spfu_validator(){	
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	
	myOption = -1;
      for (i=frmexp.subcomp.length-1; i > -1; i--) {
           if (frmexp.subcomp[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Subcomponent' Should be Selected");
              return false;
              }
			  
			 if (myOption == 0 && document.frmexp.inv_cost.value <='0') {              
				 alert("'Select the Item'");
                 return false;
			 } else if (myOption == 1 && document.frmexp.inc_op_cost.value <='0' ) {
				 alert("'Select the Item'");
                 return false;
			 }
	
	
	if (document.frmexp.txtTotProjAlloc.value =="")
	{
		      alert("'Total Project Allocations' Should be entered"); 
			  document.frmexp.txtTotProjAlloc.focus();
			  return false;
	}	
	else if (document.frmexp.txtTotProjAlloc.value !="")
	{
			 if(isNaN(document.frmexp.txtTotProjAlloc.value))
			{				
				alert("Total Project Allocations' Should be only Numeric Data");
				document.frmexp.txtTotProjAlloc.focus();
				return false;
			}
	}
	if (document.frmexp.txtCumPrevMonth.value =="")
	{
		      alert("'Cummulative Expenditure' Should be entered"); 
			  document.frmexp.txtCumPrevMonth.focus();
			  return false;
	}	
	else if (document.frmexp.txtCumPrevMonth.value !="")
	{
			 if(isNaN(document.frmexp.txtCumPrevMonth.value))
			{				
				alert("Cummulative Expenditure' Should be only Numeric Data");
				document.frmexp.txtCumPrevMonth.focus();
				return false;
			}
	}
	if (document.frmexp.txtExpRptMonth.value =="")
	{
		      alert("'Expenditure' Should be entered"); 
			  document.frmexp.txtExpRptMonth.focus();
			  return false;
	}
	else if (document.frmexp.txtExpRptMonth.value !="")
	{
			 if(isNaN(document.frmexp.txtExpRptMonth.value))
			{				
				alert("Expenditure' Should be only Numeric Data");
				document.frmexp.txtExpRptMonth.focus();
				return false;
			}
	}
	if (document.frmexp.txtTotal.value =="")
	{
		      alert("'Total' Should be entered"); 
			  document.frmexp.txtTotal.focus();
			  return false;
	}
	else if (document.frmexp.txtTotal.value !="")
	{
			 if(isNaN(document.frmexp.txtTotal.value))
			{				
				alert("Total' Should be only Numeric Data");
				document.frmexp.txtTotal.focus();
				return false;
			}
	}
	if (document.frmexp.txtCommExp.value =="")
	{
		      alert("'Committed Expenditure' Should be entered"); 
			  document.frmexp.txtCommExp.focus();
			  return false;
	}
	else if (document.frmexp.txtCommExp.value !="")
	{
			 if(isNaN(document.frmexp.txtCommExp.value))
			{				
				alert("Committed Expenditure' Should be only Numeric Data");
				document.frmexp.txtCommExp.focus();
				return false;
			}
	}
	if (document.frmexp.txtReimburseExp.value =="")
	{
		      alert("'Reimbursement claimed Expenditure' Should be entered"); 
			  document.frmexp.txtReimburseExp.focus();
			  return false;
	}
	else if (document.frmexp.txtReimburseExp.value !="")
	{
			 if(isNaN(document.frmexp.txtReimburseExp.value))
			{				
				alert("Reimbursement claimed Expenditure' Should be only Numeric Data");
				document.frmexp.txtReimburseExp.focus();
				return false;
			}
	}
	document.frmexp.add.value="add";
	document.frmexp.submit();
} 
/*****************************************************************************************************/

function pg1_clear(){
	
	
	document.frmexp.month.value ='0';		
	document.frmexp.ddlYear.value ='0';	
	document.frmexp.txtGoods.value = "";	
	document.frmexp.txtTypeGoods.value = '0';	
	document.frmexp.txtProcMethod.value ='0';		
	document.frmexp.txtContractValue.value =""	
	document.frmexp.txtPreMonthExp.value =""
	document.frmexp.txtrepMonthExp.value =""	
	document.frmexp.txtCummExp.value ="";
}
function pg2_clear(){
	
	document.frmexp.ddlMonth.value ='0';
	document.frmexp.ddlYear.value ='0';
	document.frmexp.txtGoods.value ="";
	document.frmexp.txtTypeGoods.value ='0';
	document.frmexp.txtProcMethod.value ='0';
	document.frmexp.txtContractValue.value ="";	
	document.frmexp.txtOrderNo.value ="";		
	document.frmexp.txtOrderDate.value ="";
	
} 

function pg3_clear(){	
	
	document.frm.ddlMonth.value ='0';		 
	document.frm.ddlYear.value ='0';	
	document.frm.txtGoods.value ="";
	document.frm.txtTypeGoods.value ='0';
	document.frm.txtFloatingDate.value ="";		
    document.frm.txtOpeningDate.value ="";		
	document.frm.txtEstCost.value ="";	
	document.frm.pwodate.value ="";	
	
} 
function cw1_clear(){
	
	document.frmexp.ddlMonth.value ='0';		 
	document.frmexp.ddlYear.value ='0';	
	document.frmexp.txtGoods.value ="";	
	document.frmexp.txtProcMethod.value ='0';	
	document.frmexp.txtContractValue.value ="";	
	document.frmexp.txtPreMonthExp.value ="";	
	document.frmexp.txtrepMonthExp.value ="";	
	document.frmexp.txtCummExp.value ="";	
 } 
 
 function cw2_clear(){
		
	document.frmexp.ddlMonth.value ='0';		 
	document.frmexp.ddlYear.value ='0';	
	document.frmexp.txtGoods.value ="";	
    document.frmexp.txtProcMethod.value ='0';	
	document.frmexp.txtContractValue.value ="";	
	document.frmexp.txtOrderNo.value ="";	
    document.frmexp.txtOrderDate.value ="";	
 } 
 function cw3_clear(){	
	document.frmexp.ddlMonth.value ='0';		 
	document.frmexp.ddlYear.value ='0';	
	document.frmexp.txtGoods.value ="";	
	document.frmexp.txtFloatingDate.value ="";	
	document.frmexp.txtOpeningDate.value ="";	
	document.frmexp.txtEstCost.value ="";	
	document.frmexp.OrderDate.value ="";
	
 } 
 /****************************************************************************************************/
 
 function ac1_clear(){
		
	document.frmexp.ddlMonth.value = '0';		
	document.frmexp.ddlYear.value ='0';	
	document.frmexp.txtTrainName.value ="";	
	document.frmexp.TrgPrs.value = '0';		
	document.frmexp.txtFacultyName.value ="";		
	document.frmexp.txtTrainingArea.value ="";	
	document.frmexp.txtStartDate.value ="";	
	document.frmexp.txtEndDate.value ="";	
	document.frmexp.txtTrainAgency.value ="";
	document.frmexp.txtExp1.value ="";	
	document.frmexp.txtExp2.value ="";	
	document.frmexp.txtRemarks.value ="";	
} 

function ac2_tonetclear(){
	
	document.frmexp.ddlMonth.value ='0';		 
	document.frmexp.ddlYear.value ='0';		
	document.frmexp.txtNtwkPartner.value ="";		
	document.frmexp.txtServProvActivity.value ='0';	
	document.frmexp.txtServProvBaneficiares.value ="";
	document.frmexp.txtServProvExpAct.value ="";	
	document.frmexp.txtServProvExpAdv.value ="";	
	document.frmexp.txtPrvRemarks.value ="";		
} 

function ac2_fromclear(){
	
	document.frmexp.ddlMonth.value ='0';		 
	document.frmexp.ddlYear.value ='0';		
	document.frmexp.txtNtwkPartner.value ="";		
	document.frmexp.txtServReceiAct.value ='0';	
	document.frmexp.txtServRecBanef.value ="";
	document.frmexp.txtServRecExpAct.value ="";	
	document.frmexp.txtServRecExpAdv.value ="";	
	document.frmexp.txtRecRemarks.value ="";		
} 
function ac2_jointclear(){
	
	document.frmexp.ddlMonth.value ='0';		 
	document.frmexp.ddlYear.value ='0';		
	document.frmexp.txtNtwkPartner.value ="";		
	document.frmexp.txtJoinAct.value ='0';	
	document.frmexp.txtJoinFacultyNo.value ="";
	document.frmexp.txtJoinExpAct.value ="";	
	document.frmexp.txtJoinExpAdv.value ="";	
	document.frmexp.txtJoinRemarks.value ="";		
}

function ac3_commclear(){	
	
	document.frmexp.ddlMonth.value ='0';		
	document.frmexp.ddlYear.value ='0';		
	document.frmexp.txtServOffAct.value ="";	
    document.frmexp.txtServOffMaleben.value ="";		
	document.frmexp.txtServOffFemBen.value ="";
	document.frmexp.txtServOffExpAct.value ="";	
	document.frmexp.txtServOffExpAdv.value ="";	
	document.frmexp.txtComRemarks.value ="";	
} 
function ac31_unorgclear(){	
	
	document.frmexp.ddlMonth.value ='0';	
	document.frmexp.ddlYear.value ='0';
	document.frmexp.txtServOffUnorAct.value = "";	
    document.frmexp.txtServOffUnorMaleBen.value ="";		
	document.frmexp.txtServOffUnorgFemBen.value ="";
	document.frmexp.txtUnorgExpAct.value ="";	
	document.frmexp.txtUnorgExpAdv.value ="";	
	document.frmexp.txtUnorgRemarks.value ="";	
} 

function ac3_orgclear(){	
	
	document.frmexp.ddlMonth.value ='0';		
	document.frmexp.ddlYear.value ='0';		
	document.frmexp.txtServOffOrgAct.value ="";	
    document.frmexp.txtServOffOrgMaleBan.value ="";		
	document.frmexp.txtServOffOrgFemBan.value ="";
	document.frmexp.txtOrgExpAct.value ="";	
	document.frmexp.txtOrgRemarks.value ="";	
} 


function inst_clear(){	
	
	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';
	
	document.frmexp.ddlCategory.value ='0';
	
	document.frmexp.inv_cost.value ='0';
	
	document.frmexp.inc_op_cost.value ='0';
	
	document.frmexp.txtTotProjAlloc.value ="";	
	
	document.frmexp.txtCumPrevMonth.value ="";
	
	document.frmexp.txtExpRptMonth.value ="";
	
	document.frmexp.txtTotal.value ="";
	
	document.frmexp.txtCommExp.value ="";
	
	document.frmexp.txtReimburseExp.value ="";
	
	
} 

function spfu_clear(){	
	
	document.frmexp.ddlMonth.value = '0';
	
	document.frmexp.ddlYear.value ='0';
	
    document.frmexp.txtTotProjAlloc.value ="";
	
	document.frmexp.txtCumPrevMonth.value ="";
	
	document.frmexp.txtExpRptMonth.value ="";
	
	document.frmexp.txtTotal.value ="";
	
	document.frmexp.txtCommExp.value ="";
	
	document.frmexp.txtReimburseExp.value ="";	
	
} 
/**********************************************************************************************************************************/
function chw_validator(){	
	
	if (document.frmFeedback.old_password.value=="")
		 {
		      alert("'Old Password' Should be Entered"); 
			  document.frmFeedback.old_password.focus();
			  return false;
		 }
	 if (document.frmFeedback.new_password.value=="")
	{
		      alert("'New Password' Should be Entered"); 
			  document.frmFeedback.new_password.focus();
			  return false;
	}	
	 if (document.frmFeedback.con_password.value=="")
	{
		      alert("'Confirm Password' Should be entered"); 
			  document.frmFeedback.con_password.focus();
			  return false;
	}	
	if (document.frmFeedback.new_password.value != document.frmFeedback.con_password.value)
		 {
		      alert("'New Password/Confirm Password' Not matching"); 
			  document.frmFeedback.con_password.focus();
			  return false;
		 }
	
} 


function feedback_validator(){	
	
	if (document.frmFeedback.ddlSubject.value== '0')
		 {
		      alert("'Subject' Should be Selected"); 
			  document.frmFeedback.ddlSubject.focus();
			  return false;
		 }
	 if (document.frmFeedback.txtFirstName.value=="")
	{
		      alert("'First Name' Should be Entered"); 
			  document.frmFeedback.txtFirstName.focus();
			  return false;
	}	
	 if (document.frmFeedback.txtLastName.value=="")
	{
		      alert("'Last Name' Should be entered"); 
			  document.frmFeedback.txtLastName.focus();
			  return false;
	}
	 if (document.frmFeedback.txtEmail.value=="")
	{
		      alert("'Email' Should be entered"); 
			  document.frmFeedback.txtEmail.focus();
			  return false;
	}	
	
	
	 else if (document.frmFeedback.txtEmail.value!="")
	{
		var Element=document.frmFeedback.txtEmail;
		Flag  = 1;
		count = 0;
	
		var alp = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_@.-";
		
		if(Element.value.length > 0)
		{
			for (var i=0; i<Element.value.length; i++)
			{
				temp = Element.value.substring(i, i+1);
	
				if (alp.indexOf(temp) == -1)
				{
					Flag = 0;
				}
			} // closing the for loop
		}
		else
		{
			Flag = 0;
		}
	
		for(var i=0; i <= Element.value.length; i++)
		{
			if(Element.value.charAt(0)=='@')
			{
				Flag = 0;
				break;
			}

			if(Element.value.charAt(Element.value.length-1)=='@')
			{
				Flag = 0;
				break;
			}

			if(Element.value.charAt(i)=='@') 
			{
				count = count + 1;

				if(count>1)
				{
					Flag = 0;
					break;
				}
			  
				if((Element.value.charAt(i-1)=='.') || (Element.value.charAt(i+1)=='.'))
				{
					Flag = 0;
					break;
				}
			}
			if(Element.value.indexOf('@')==-1)
			{
				Flag = 0;		    	
				break;
			}
			if(Element.value.charAt(0)=='.')
			{
				Flag = 0;
				break;
			}
			if(Element.value.indexOf('.')==-1)
			{
				Flag = 0;		    	
				break;
			}
		  } //closing the for loop
		
		if(Element.value.charAt(Element.value.length-1) == '.')
			Flag = 0;
			
		if(Flag != 1)
		{
			alert("Invalid Email Address..");
			Element.focus();
			return false;
		}	
		else
			return true;
	}		
	
	 if (document.frmFeedback.txtPhone.value=="")
	{
		      alert("'Phone No' Should be entered"); 
			  document.frmFeedback.txtPhone.focus();
			  return false;
	}
	else if (document.frmFeedback.txtPhone.value !="")
	{			 
			 
	var Phone=document.frmFeedback.txtPhone
	
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter your Phone Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Phone Number")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true	 
			 
	}
		 if (document.frmFeedback.txtMessage.value=="")
	{
		      alert("'Message' Should be entered"); 
			  document.frmFeedback.txtMessage.focus();
			  return false;
	}
	document.frmFeedback.submit();
	
} 

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function stripCharsInBag(s, bag)
{   var i;
    var returnString = "";
    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }
    return returnString;
}

var digits = "0123456789";
// non-digit characters which are allowed in phone numbers
var phoneNumberDelimiters = "()- ";
// characters which are allowed in international phone numbers
// (a leading + is OK)
var validWorldPhoneChars = phoneNumberDelimiters + "+";
// Minimum no of digits in an international phone no.
var minDigitsInIPhoneNumber = 8;

function isInteger(s)
{   var i;
    for (i = 0; i < s.length; i++)
    {   
        // Check that current character is number.
        var c = s.charAt(i);
        if (((c < "0") || (c > "9"))) return false;
    }
    // All characters are numbers.
    return true;
}

/**********************************************************************************************************************************/

function chw_clear(){	
	
	document.frmFeedback.old_password.value="";
	
	document.frmFeedback.new_password.value="";
		
	document.frmFeedback.con_password.value="";
}

function updt_validator(){	
	
	if (document.frmFeedback.txtAddress.value== "")
		 {
		      alert("'Address' Should be Entered"); 
			  document.frmFeedback.txtAddress.focus();
			  return false;
		 }
	 if (document.frmFeedback.txtCity.value=="")
	{
		      alert("'City' Should be Entered"); 
			  document.frmFeedback.txtCity.focus();
			  return false;
	}	
	 if (document.frmFeedback.txtContPerson.value=="")
	{
		      alert("'Contact Person' Should be entered"); 
			  document.frmFeedback.txtContPerson.focus();
			  return false;
	}
	 if (document.frmFeedback.txtPhone.value=="")
	{
		      alert("'Phone' Should be entered"); 
			  document.frmFeedback.txtPhone.focus();
			  return false;
	}
	if (document.frmFeedback.txtFax.value=="")
	{
		      alert("'Fax' Should be entered"); 
			  document.frmFeedback.txtFax.focus();
			  return false;
	}
	if (document.frmFeedback.txtEmail.value=="")
	{
		      alert("'Email' Should be entered"); 
			  document.frmFeedback.txtEmail.focus();
			  return false;
	}
	
	
	
	if (document.frmFeedback.txtPhone.value !="")
	{			 
			 
	var Phone=document.frmFeedback.txtPhone
	
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter your Phone Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Phone Number")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true	 
			 
	}		
		
	 if (document.frmFeedback.txtFax.value !="")
	{			 
			 
	var Phone=document.frmFeedback.txtFax
	
	if ((Phone.value==null)||(Phone.value=="")){
		alert("Please Enter your Fax Number")
		Phone.focus()
		return false
	}
	if (checkInternationalPhone(Phone.value)==false){
		alert("Please Enter a Valid Fax Number")
		Phone.value=""
		Phone.focus()
		return false
	}
	return true	 
			 
	}	
		
	document.frmFeedback.submit();
	
}
		
		
function atot(){	
	
	var Qty1 = +document.frmexp.txtCumPrevMonth.value
    var Qty2 = +document.frmexp.txtExpRptMonth.value
    document.frmexp.txtTotal.value = Qty1 + Qty2			  
			 
}

function btot(){		
	
	var Qty1 = +document.frmexp.txtCumPrevMonth.value
    var Qty2 = +document.frmexp.txtExpRptMonth.value
    document.frmexp.txtTotal.value = Qty1 + Qty2			  
			 
}
function pg1tot(){			
	
    var Qty2 = +document.frmexp.txtrepMonthExp.value	
	var Qty1 = +document.frmexp.txtPreMonthExp.value
    document.frmexp.txtCummExp.value = Qty1 + Qty2			  
			 
}
function pg1pme(){	
	
	document.frmexp.txtPreMonthExp.value = document.frmexp.PreMthExp.value;
}

function cw1tot(){		
	
	var Qty1 = +document.frmexp.txtPreMonthExp.value
    var Qty2 = +document.frmexp.txtrepMonthExp.value
    document.frmexp.txtCummExp.value = Qty1 + Qty2			  
			 
}
function WCA_fldsvalidator(){
	
	if (document.frmexp.AttddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.AttddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.AttddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.AttddlYear.focus();
			  return false;
	}	
	if (document.frmexp.txtworkconf_Attended.value =="")
	{
		    alert("'Name of the Workshop/Conference Attended' Should be entered"); 
			document.frmexp.txtworkconf_Attended.focus();
		    return false;
	 }	
	if (document.frmexp.txtworkconf_Venue.value =="")
	{
		    alert("'Venue' Should be entered"); 
			document.frmexp.txtworkconf_Venue.focus();
		    return false;
	 }
	 if (document.frmexp.txtworkconf_Faculty.value =="")
	{
		    alert("'Name of the faculty' Should be entered"); 
			document.frmexp.txtworkconf_Faculty.focus();
		    return false;
	 }
	 if (document.frmexp.txtworkconf_Dept.value =="")
	{
		    alert("'Name of the Department' Should be entered"); 
			document.frmexp.txtworkconf_Dept.focus();
		    return false;
	 }
	 if (document.frmexp.txtStartDate.value =="")
	{
		    alert("'Start Date' Should be entered"); 
			document.frmexp.txtStartDate.focus();
		    return false;
	 }
	 if (isDate(document.frmexp.txtStartDate.value)==false){
		document.frmexp.txtStartDate.focus()
		return false
	}
	if (document.frmexp.txtEndDate.value =="")
	{
		    alert("'End Date' Should be entered"); 
			document.frmexp.txtEndDate.focus();
		    return false;
	 }
	 if (isDate(document.frmexp.txtEndDate.value)==false){
		document.frmexp.txtEndDate.focus()
		return false
	}
	if(compareDates(document.frmexp.txtStartDate.value, document.frmexp.txtEndDate.value) == 1)
	{
			alert("Enter Valid Dates, Start Date should be less than End Date");
			document.frmexp.txtStartDate.focus();
			return false;
	}
	 if (document.frmexp.txtworkconf_Exp.value =="")
	{
		    alert("'Expenditure' Should be entered"); 
			document.frmexp.txtworkconf_Exp.focus();
		    return false;
	 }
	 if (document.frmexp.txtworkconf_Exp.value !="")
	{
			 if(isNaN(document.frmexp.txtworkconf_Exp.value))
			{				
				alert("Expenditure' Should be only Numeric Data");
				document.frmexp.txtworkconf_Exp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtworkconf_Exp.value) < 0)
			{
				alert("Expenditure Should not be Negative values.");
				document.frmexp.txtworkconf_Exp.focus();
				return false;
			}
	}
	
	document.frmexp.submit();
} 
function WCA_clear(){	
	
	document.frmexp.AttddlMonth.value ='0';
		
	document.frmexp.AttddlYear.value ='0';	
	
	document.frmexp.txtworkconf_Attended.value ="";	
	
	document.frmexp.txtworkconf_Venue.value ="";
	
	document.frmexp.txtworkconf_Faculty.value ="";
	
	document.frmexp.txtworkconf_Dept.value ="";
	
	document.frmexp.txtStartDate.value ="";
	
	document.frmexp.txtEndDate.value ="";
	
	document.frmexp.txtworkconf_Exp.value ="";
	
} 	
function WCO_fldsvalidator(){
	
	if (document.frmexp.RcgddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.RcgddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.RcgddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.RcgddlYear.focus();
			  return false;
	}	
	if (document.frmexp.txtworkconf_Recognized.value =="")
	{
		    alert("'Name of the Workshop/Conference Organized' Should be entered"); 
			document.frmexp.txtworkconf_Recognized.focus();
		    return false;
	 }	
	if (document.frmexp.txtworkconf_Dept.value =="")
	{
		    alert("'Name of the Organizing Department' Should be entered"); 
			document.frmexp.txtworkconf_Dept.focus();
		    return false;
	 }
	 if (document.frmexp.txtworkconf_Coordinator.value =="")
	{
		    alert("'Name of the Coordinator' Should be entered"); 
			document.frmexp.txtworkconf_Coordinator.focus();
		    return false;
	 }
	 if (document.frmexp.txtworkconf_Delegates.value =="")
	{
		    alert("'No of Delegates Participated' Should be entered"); 
			document.frmexp.txtworkconf_Delegates.focus();
		    return false;
	 }
	 if (document.frmexp.txtworkconf_Delegates.value !="")
	{
			 if(isNaN(document.frmexp.txtworkconf_Delegates.value))
			{				
				alert("No of Delegates' Should be only Numeric Data");
				document.frmexp.txtworkconf_Delegates.focus();
				return false;
			}
	}
	 if (document.frmexp.txtStartDate.value =="")
	{
		    alert("'Start Date' Should be entered"); 
			document.frmexp.txtStartDate.focus();
		    return false;
	 }
	 if (isDate(document.frmexp.txtStartDate.value)==false){
		document.frmexp.txtStartDate.focus()
		return false
	}
	if (document.frmexp.txtEndDate.value =="")
	{
		    alert("'End Date' Should be entered"); 
			document.frmexp.txtEndDate.focus();
		    return false;
	 }
	 if (isDate(document.frmexp.txtEndDate.value)==false){
		document.frmexp.txtEndDate.focus()
		return false
	}
	if(compareDates(document.frmexp.txtStartDate.value, document.frmexp.txtEndDate.value) == 1)
	{
			alert("Enter Valid Dates, Start Date should be less than End Date");
			return false;
	}
	 if (document.frmexp.txtworkconf_Exp.value =="")
	{
		    alert("'Expenditure' Should be entered"); 
			document.frmexp.txtworkconf_Exp.focus();
		    return false;
	 }
	  if (document.frmexp.txtworkconf_Exp.value !="")
	{
			 if(isNaN(document.frmexp.txtworkconf_Exp.value))
			{				
				alert("Expenditure' Should be only Numeric Data");
				document.frmexp.txtworkconf_Exp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtworkconf_Exp.value) < 0)
			{
				alert("Expenditure Should not be Negative values.");
				document.frmexp.txtworkconf_Exp.focus();
				return false;
			}
	}
	
	document.frmexp.submit();
} 
function WCO_clear(){	
	
	document.frmexp.RcgddlMonth.value ='0';
		
	document.frmexp.RcgddlYear.value ='0';	
	
	document.frmexp.txtworkconf_Recognized.value ="";	
	
	document.frmexp.txtworkconf_Dept.value ="";
	
	document.frmexp.txtworkconf_Coordinator.value ="";
	
	document.frmexp.txtworkconf_Delegates.value ="";
	
	document.frmexp.txtStartDate.value ="";
	
	document.frmexp.txtEndDate.value ="";
	
	document.frmexp.txtworkconf_Exp.value ="";
	
} 	

function paper_fldsvalidator(){ 
	
	if (document.frmexp.PaperddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.PaperddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.PaperddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.PaperddlYear.focus();
			  return false;
	}	
	if (document.frmexp.txtConference.value =="")
	{
		    alert("'Name of the Conference' Should be entered"); 
			document.frmexp.txtConference.focus();
		    return false;
	 }	
	if (document.frmexp.txtVenue.value =="")
	{
		    alert("'Venue' Should be entered"); 
			document.frmexp.txtVenue.focus();
		    return false;
	 }
	 if (document.frmexp.txtFaculty.value =="")
	{
		    alert("'Name of the Faculty' Should be entered"); 
			document.frmexp.txtFaculty.focus();
		    return false;
	 }
	 if (document.frmexp.txtDept.value =="")
	{
		    alert("'Name of the Department' Should be entered"); 
			document.frmexp.txtDept.focus();
		    return false;
	 }
	if (document.frmexp.txPaper.value =="")
	{
		    alert("'Name of the Paper' Should be entered"); 
			document.frmexp.txPaper.focus();
		    return false;
	 }
	 if (document.frmexp.txtArea.value =="")
	{
		    alert("'Area/Specialization of the Paper' Should be entered"); 
			document.frmexp.txtArea.focus();
		    return false;
	 }
	 if (document.frmexp.txtExp.value =="")
	{
		    alert("'Expenditure' Should be entered"); 
			document.frmexp.txtExp.focus();
		    return false;
	 }
	 if (document.frmexp.txtExp.value !="")
	{
			 if(isNaN(document.frmexp.txtExp.value))
			{				
				alert("Expenditure' Should be only Numeric Data");
				document.frmexp.txtExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtExp.value) < 0)
			{
				alert("Expenditure Should not be Negative values.");
				document.frmexp.txtExp.focus();
				return false;
			}
			
	}
	
	document.frmexp.submit();
} 
function paper_clear(){	
	
	document.frmexp.PaperddlMonth.value ='0';
		
	document.frmexp.PaperddlYear.value ='0';	
	
	document.frmexp.txtConference.value ="";	
	
	document.frmexp.txtVenue.value ="";
	
	document.frmexp.txtFaculty.value ="";
	
	document.frmexp.txtDept.value ="";
	
	document.frmexp.txPaper.value ="";
	
	document.frmexp.txtArea.value ="";
	
	document.frmexp.txtExp.value ="";
	
}
		
function PRJ_fldsvalidator(){	

	if (document.frmexp.ResearchddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ResearchddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ResearchddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ResearchddlYear.focus();
			  return false;
	}	
	
	if (document.frmexp.txtNameResearch.value =="")
	{
		      alert("'Name of the Research Work' Should be entered"); 
			  document.frmexp.txtNameResearch.focus();
			  return false;
	}
	if (document.frmexp.txtDepartment.value =="")
	{
		      alert("'Name of the Department' Should be entered"); 
			  document.frmexp.txtDepartment.focus();
			  return false;
	}
	if (document.frmexp.txtUnderResearch.value =="")
	{
		      alert("'Undertaking Research Work' Should be entered"); 
			  document.frmexp.txtUnderResearch.focus();
			  return false;
	}
	if (document.frmexp.txtNameFaculty.value =="")
	{
		      alert("'Name of the Faculty Involved' Should be entered"); 
			  document.frmexp.txtNameFaculty.focus();
			  return false;
	}
	if (document.frmexp.txtCommencedMonth.value == '0')
		 {
		      alert("'Commenced Month' Should be Selected"); 
			  document.frmexp.txtCommencedMonth.focus();
			  return false;
		 }
	 if (document.frmexp.txtCommencedYear.value =='0')
	{
		      alert("'Commenced Year' Should be selected"); 
			  document.frmexp.txtCommencedYear.focus();
			  return false;
	}
	
	
	
	myOption = -1;
      for (i=frmexp.rbtnWorkComp.length-1; i > -1; i--) {
           if (frmexp.rbtnWorkComp[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Research Work Completed (Y/N)' Should be Selected");
              return false;
              }
	myOption = -1;
      for (i=frmexp.rbtnWorkPat.length-1; i > -1; i--) {
           if (frmexp.rbtnWorkPat[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Research Work Patented (Y/N)' Should be Selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtAppNo.value =="") {              
				 alert("'Patent Application No' should be entered");
                 return false;
			 } else if (myOption == 1) {
				 myOpt = -1;
                 for (i=frmexp.rbtnPatApp.length-1; i > -1; i--) {
                     if (frmexp.rbtnPatApp[i].checked) {
                        myOpt = i; i = -1;
                        }
                 }
                if (myOpt == -1) {
                alert("'Whether Applied for Patent (Y/N)' Should be Selected");
                return false;
                }
			 }
	
	document.frmexp.submit();
} 

function PRJ_clear(){	

	document.frmexp.ResearchddlMonth.value ='0';
		
	document.frmexp.ResearchddlYear.value ='0';	
	
	document.frmexp.txtNameResearch.value ="";
	
	document.frmexp.txtDepartment.value ="";
	
	document.frmexp.txtUnderResearch.value ="";
	
	document.frmexp.txtNameFaculty.value ="";
	
	document.frmexp.txtCommencedMonth.value ='0';
		
	document.frmexp.txtCommencedYear.value ='0';
	
	document.frmexp.rbtnWorkPat.value ='0';
	
	document.frmexp.txtAppNo.value ="";
	
	document.frmexp.rbtnPatApp.value ='0';
	
} 
function ac3_unorgclear(){	

	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';	
	
	document.frmexp.txtParameter.value ="";	
	
	document.frmexp.txtSince.value ="";
	
	document.frmexp.txtReason.value ="";
	
	document.frmexp.txtRemarks.value ="";	
} 

function finvals_clear(){	

	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';	
	
	document.frmexp.txtParameter.value ="";
	
	document.frmexp.txtSince.value ="";
	
	document.frmexp.txtReason.value ="";
	
	document.frmexp.txtRemarks.value ="";	
}
function admnvals_clear(){	

	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';	
	
	document.frmexp.txtParameter.value ="";
	
	document.frmexp.txtSince.value ="";
	
	document.frmexp.txtReason.value ="";
	
	document.frmexp.txtRemarks.value ="";	
}

function ac3_community(){	
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtServOffAct.value =="")
	{
              alert("'Activity' Should be entered"); 
			  document.frmexp.txtServOffAct.focus();
			  return false;		
		
	}
	if (document.frmexp.txtServOffMaleben.value =="")
	{
		      alert("'No of Male  baneficiaries' Should be entered"); 
			  document.frmexp.txtServOffMaleben.focus();
			  return false;
	}
	if (document.frmexp.txtServOffMaleben.value !="")
	{
			 if(isNaN(document.frmexp.txtServOffMaleben.value))
			{				
				alert("No of Male  baneficiaries' Should be only Numeric Data");
				document.frmexp.txtServOffMaleben.focus();
				return false;
			}
	}
   if (document.frmexp.txtServOffFemBen.value =="")
	{
		      alert("'No of Female  baneficiaries' Should be entered"); 
			  document.frmexp.txtServOffFemBen.focus();
			  return false;
	}
	if (document.frmexp.txtServOffFemBen.value !="")
	{
			 if(isNaN(document.frmexp.txtServOffFemBen.value))
			{				
				alert("No of Female  baneficiaries' Should be only Numeric Data");
				document.frmexp.txtServOffFemBen.focus();
				return false;
			}
	}	
	if ((document.frmexp.txtServOffMaleben.value == '0') && (document.frmexp.txtServOffFemBen.value == '0'))
	{
		      alert("'No of Male & Female  baneficiaries (both)' Should not be Zero"); 
			  document.frmexp.txtServOffMaleben.focus();
			  return false;
	}
	
	myOption = -1;
      for (i=frmexp.rbtnComm.length-1; i > -1; i--) {
           if (frmexp.rbtnComm[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Actual Expenditure or Advance Given Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtServOffExpAct.value =="") {              
				 alert("'Actual Expenditure' should be entered");
				 document.frmexp.txtServOffExpAct.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtServOffExpAdv.value =="") {   
			     alert("'Advance Given Expenditure' should be entered");
				 document.frmexp.txtServOffExpAdv.focus();
                 return false;
			  }
			  if(document.frmexp.txtServOffExpAct.value !="") {
				  if(parseInt(document.frmexp.txtServOffExpAct.value) < 0)
			{
				alert("Actual Expenditure' Should not be Negative values.");
				document.frmexp.txtServOffExpAct.focus();
				return false;
			}
			 if(isNaN(document.frmexp.txtServOffExpAct.value))
			{				
				alert("Actual Expenditure' Should be only Numeric Data");
				document.frmexp.txtServOffExpAct.focus();
				return false;
			}
			  }
			  if(document.frmexp.txtServOffExpAdv.value !="") {
				  if(parseInt(document.frmexp.txtServOffExpAdv.value) < 0)
			{
				alert("Advance Given' Should not be Negative values.");
				document.frmexp.txtServOffExpAdv.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtServOffExpAdv.value))
			{				
				alert("Advance Given' Should be only Numeric Data");
				document.frmexp.txtServOffExpAdv.focus();
				return false;
			}
			  }

	document.frmexp.submit();
} 
function ac3_unorganized(){	
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtServOffUnorAct.value =="")
	{
              alert("'Activity' Should be entered"); 
			  document.frmexp.txtServOffUnorAct.focus();
			  return false;		
		
	}
	if (document.frmexp.txtServOffUnorMaleBen.value =="")
	{
		      alert("'No of Male  baneficiaries' Should be entered"); 
			  document.frmexp.txtServOffUnorMaleBen.focus();
			  return false;
	}
	if (document.frmexp.txtServOffUnorMaleBen.value !="")
	{
			 if(isNaN(document.frmexp.txtServOffUnorMaleBen.value))
			{				
				alert("No of Male  baneficiaries' Should be only Numeric Data");
				document.frmexp.txtServOffUnorMaleBen.focus();
				return false;
			}
	}

   if (document.frmexp.txtServOffUnorgFemBen.value =="")
	{
		      alert("'No of Female  baneficiaries' Should be entered"); 
			  document.frmexp.txtServOffUnorgFemBen.focus();
			  return false;
	}
	if (document.frmexp.txtServOffUnorgFemBen.value !="")
	{
			 if(isNaN(document.frmexp.txtServOffUnorgFemBen.value))
			{				
				alert("No of Female  baneficiaries' Should be only Numeric Data");
				document.frmexp.txtServOffUnorgFemBen.focus();
				return false;
			}
	}
	if ((document.frmexp.txtServOffUnorMaleBen.value == '0') && (document.frmexp.txtServOffUnorgFemBen.value == '0'))
	{
		      alert("'No of Male & Female  baneficiaries (both)' Should not be Zero"); 
			  document.frmexp.txtServOffUnorMaleBen.focus();
			  return false;
	}
	
	myOption = -1;
      for (i=frmexp.rbtnUnorg.length-1; i > -1; i--) {
           if (frmexp.rbtnUnorg[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Actual Expenditure or Advance Given Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtUnorgExpAct.value =="") {              
				 alert("'Actual Expenditure' should be entered");
				 document.frmexp.txtUnorgExpAct.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtUnorgExpAdv.value =="") {   
			     alert("'Advance Given Expenditure' should be entered");
				 document.frmexp.txtUnorgExpAdv.focus();
                 return false;
			  }
			  if(document.frmexp.txtUnorgExpAct.value !="") {
				  if(parseInt(document.frmexp.txtUnorgExpAct.value) < 0)
			{
				alert("Actual Expenditure' Should not be Negative values.");
				document.frmexp.txtUnorgExpAct.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtUnorgExpAct.value))
			{				
				alert("Actual Expenditure' Should be only Numeric Data");
				document.frmexp.txtUnorgExpAct.focus();
				return false;
			}
			  }
			  if(document.frmexp.txtUnorgExpAdv.value !="") {
				  if(parseInt(document.frmexp.txtUnorgExpAdv.value) < 0)
			{
				alert("Advance Given' Should not be Negative values.");
				document.frmexp.txtUnorgExpAdv.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtUnorgExpAdv.value))
			{				
				alert("Advance Given' Should be only Numeric Data");
				document.frmexp.txtUnorgExpAdv.focus();
				return false;
			}
			  }

	document.frmexp.submit();
} 
function ac3_organized(){	
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtServOffOrgAct.value =="")
	{
              alert("'Activity' Should be entered"); 
			  document.frmexp.txtServOffOrgAct.focus();
			  return false;		
		
	}
	if (document.frmexp.txtServOffOrgMaleBan.value =="")
	{
		      alert("'No of Male  baneficiaries' Should be entered"); 
			  document.frmexp.txtServOffOrgMaleBan.focus();
			  return false;
	}
	if (document.frmexp.txtServOffOrgMaleBan.value !="")
	{
			 if(isNaN(document.frmexp.txtServOffOrgMaleBan.value))
			{				
				alert("No of Male  baneficiaries' Should be only Numeric Data");
				document.frmexp.txtServOffOrgMaleBan.focus();
				return false;
			}
	}
   if (document.frmexp.txtServOffOrgFemBan.value =="")
	{
		      alert("'No of Female  baneficiaries' Should be entered"); 
			  document.frmexp.txtServOffOrgFemBan.focus();
			  return false;
	}
	if (document.frmexp.txtServOffOrgFemBan.value !="")
	{
			 if(isNaN(document.frmexp.txtServOffOrgFemBan.value))
			{				
				alert("No of Female  baneficiaries' Should be only Numeric Data");
				document.frmexp.txtServOffOrgFemBan.focus();
				return false;
			}
	}
	if (document.frmexp.txtServOffOrgMaleBan.value == '0' && document.frmexp.txtServOffOrgFemBan.value == '0')
	{
		      alert("'No of Male & Female  baneficiaries (both)' Should not be Zero"); 
			  document.frmexp.txtServOffOrgMaleBan.focus();
			  return false;
	}
	
	myOption = -1;
      for (i=frmexp.rbtnOrg.length-1; i > -1; i--) {
           if (frmexp.rbtnOrg[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Actual Expenditure or Advance Given Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtOrgExpAct.value =="") {              
				 alert("'Actual Expenditure' should be entered");
				 document.frmexp.txtOrgExpAct.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtOrgExpAdv.value =="") {   
			     alert("'Advance Given Expenditure' should be entered");
				 document.frmexp.txtOrgExpAdv.focus();
                 return false;
			  }
			  if(document.frmexp.txtOrgExpAct.value !="") {
				  if(parseInt(document.frmexp.txtOrgExpAct.value) < 0)
			{
				alert("Actual Expenditure' Should not be Negative values.");
				document.frmexp.txtOrgExpAct.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtOrgExpAct.value))
			{				
				alert("Actual Expenditure' Should be only Numeric Data");
				document.frmexp.txtOrgExpAct.focus();
				return false;
			}
			  }
			  if(document.frmexp.txtOrgExpAdv.value !="") {
				  if(parseInt(document.frmexp.txtOrgExpAdv.value) < 0)
			{
				alert("Advance Given' Should not be Negative values.");
				document.frmexp.txtOrgExpAdv.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtOrgExpAdv.value))
			{				
				alert("Advance Given' Should be only Numeric Data");
				document.frmexp.txtOrgExpAdv.focus();
				return false;
			}
			  }


	document.frmexp.submit();
} 

function ac2_tonetwork(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtNtwkPartner.value =="")
	{
              alert("'Name of the Network Partner' Should be entered"); 
			  document.frmexp.txtNtwkPartner.focus();
			  return false;		
		
	}
		
	   if (document.frmexp.txtServProvActivity.value == '0')
	      {
		      alert("'Activity' Should be Selected"); 
			  document.frmexp.txtServProvActivity.focus();
			  return false;
	     }
	
			
	   if (document.frmexp.txtServProvBaneficiares.value =="")
	      {
		      alert("'No. of baneficiares' Should be entered"); 
			  document.frmexp.txtServProvBaneficiares.focus();
			  return false;
	     }
	
	if (document.frmexp.txtServProvBaneficiares.value !="")
	{
			 if(isNaN(document.frmexp.txtServProvBaneficiares.value))
			{				
				alert("No. of baneficiares' Should be only Numeric Data");
				document.frmexp.txtServProvBaneficiares.focus();
				return false;
			}
	}	
	myOption = -1;
      for (i=frmexp.rbtnServProv.length-1; i > -1; i--) {
           if (frmexp.rbtnServProv[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Activity Completed (Y/N) should be selected");
              return false;
              }
			  
	myOption1 = -1;
      for (i=frmexp.rbtnWorkPat.length-1; i > -1; i--) {
           if (frmexp.rbtnWorkPat[i].checked) {
               myOption1 = i; i = -1;
              }
          }
           if (myOption1 == -1) {
              alert("'Either Actual Expenditure or Advance Given Should be selected");
              return false;
              }
			  if (myOption1 == 0 && document.frmexp.txtServProvExpAct.value =="") {              
				 alert("'Actual Expenditure' should be entered");
				 document.frmexp.txtServProvExpAct.focus();
                 return false;
			  } else if (myOption1 == 1 && document.frmexp.txtServProvExpAdv.value =="") {   
			     alert("'Advance Given Expenditure' should be entered");
				 document.frmexp.txtServProvExpAdv.focus();
                 return false;
			  }
			   if(document.frmexp.txtServProvExpAct.value !="") {
				  if(parseInt(document.frmexp.txtServProvExpAct.value) < 0)
			        {
				     alert("Actual Expenditure' Should not be Negative values.");
				     document.frmexp.txtServProvExpAct.focus();
				     return false;
			        }
				  if(isNaN(document.frmexp.txtServProvExpAct.value))
			       {				
				   alert("Actual Expenditure' Should be only Numeric Data");
				   document.frmexp.txtServProvExpAct.focus();
				   return false;
			       }
			  }
			  if(document.frmexp.txtServProvExpAdv.value !="") {
				  if(parseInt(document.frmexp.txtServProvExpAdv.value) < 0)
			{
				alert("Advance Given' Should not be Negative values.");
				document.frmexp.txtServProvExpAdv.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtServProvExpAdv.value))
			       {				
				   alert("Advance Given' Should be only Numeric Data");
				   document.frmexp.txtServProvExpAdv.focus();
				   return false;
			       }
			  }
	
	document.frmexp.submit();
} 

function ac2_fromnetwork(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtNtwkPartner.value =="")
	{
              alert("'Name of the Network Partner' Should be entered"); 
			  document.frmexp.txtNtwkPartner.focus();
			  return false;		
		
	}
		
	   if (document.frmexp.txtServReceiAct.value == '0')
	      {
		      alert("'Activity' Should be Selected"); 
			  document.frmexp.txtServReceiAct.focus();
			  return false;
	     }
	
			
	   if (document.frmexp.txtServRecBanef.value =="")
	      {
		      alert("'No. of baneficiares' Should be entered"); 
			  document.frmexp.txtServRecBanef.focus();
			  return false;
	     }
	
	if (document.frmexp.txtServRecBanef.value !="")
	{
			 if(isNaN(document.frmexp.txtServRecBanef.value))
			{				
				alert("No. of baneficiares' Should be only Numeric Data");
				document.frmexp.txtServRecBanef.focus();
				return false;
			}
	}	
	myOption = -1;
      for (i=frmexp.rdbtnServReceived.length-1; i > -1; i--) {
           if (frmexp.rdbtnServReceived[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Activity Completed (Y/N) should be selected");
              return false;
              }
			  
	myOption1 = -1;
      for (i=frmexp.rbtnWorkPat.length-1; i > -1; i--) {
           if (frmexp.rbtnWorkPat[i].checked) {
               myOption1 = i; i = -1;
              }
          }
           if (myOption1 == -1) {
              alert("'Either Actual Expenditure or Advance Given Should be selected");
              return false;
              }
			  if (myOption1 == 0 && document.frmexp.txtServRecExpAct.value =="") {              
				 alert("'Actual Expenditure' should be entered");
				 document.frmexp.txtServRecExpAct.focus();
                 return false;
			  } else if (myOption1 == 1 && document.frmexp.txtServRecExpAdv.value =="") {   
			     alert("'Advance Given Expenditure' should be entered");
				 document.frmexp.txtServRecExpAdv.focus();
                 return false;
			  }
			  
			   if(document.frmexp.txtServRecExpAct.value !="") {
				  if(parseInt(document.frmexp.txtServRecExpAct.value) < 0)
			{
				alert("Actual Expenditure' Should not be Negative values.");
				document.frmexp.txtServRecExpAct.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtServRecExpAct.value))
			       {				
				   alert("Actual Expenditure' Should be only Numeric Data");
				   document.frmexp.txtServRecExpAct.focus();
				   return false;
			       }
			  }
			  if(document.frmexp.txtServRecExpAdv.value !="") {
				  if(parseInt(document.frmexp.txtServRecExpAdv.value) < 0)
			{
				alert("Advance Given' Should not be Negative values.");
				document.frmexp.txtServRecExpAdv.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtServRecExpAdv.value))
			       {				
				   alert("Advance Given' Should be only Numeric Data");
				   document.frmexp.txtServRecExpAdv.focus();
				   return false;
			       }
			  }
	
	document.frmexp.submit();
}

function ac2_jointactivities(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtNtwkPartner.value =="")
	{
              alert("'Name of the Network Partner' Should be entered"); 
			  document.frmexp.txtNtwkPartner.focus();
			  return false;		
		
	}
		
	   if (document.frmexp.txtJoinAct.value == '0')
	      {
		      alert("'Activity' Should be Selected"); 
			  document.frmexp.txtJoinAct.focus();
			  return false;
	     }
	
			
	   if (document.frmexp.txtJoinFacultyNo.value =="")
	      {
		      alert("'No. of Staff' Should be entered"); 
			  document.frmexp.txtJoinFacultyNo.focus();
			  return false;
	     }
	
	if (document.frmexp.txtJoinFacultyNo.value !="")
	{
			 if(isNaN(document.frmexp.txtJoinFacultyNo.value))
			{				
				alert("No. of Staff' Should be only Numeric Data");
				document.frmexp.txtJoinFacultyNo.focus();
				return false;
			}
	}	
	myOption = -1;
      for (i=frmexp.rbtnListJoinAct.length-1; i > -1; i--) {
           if (frmexp.rbtnListJoinAct[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Activity Completed (Y/N) should be selected");
              return false;
              }
			  
	myOption1 = -1;
      for (i=frmexp.rbtnWorkPat.length-1; i > -1; i--) {
           if (frmexp.rbtnWorkPat[i].checked) {
               myOption1 = i; i = -1;
              }
          }
           if (myOption1 == -1) {
              alert("'Either Actual Expenditure or Advance Given Should be selected");
              return false;
              }
			  if (myOption1 == 0 && document.frmexp.txtJoinExpAct.value =="") {              
				 alert("'Actual Expenditure' should be entered");
				 document.frmexp.txtJoinExpAct.focus();
                 return false;
			  } else if (myOption1 == 1 && document.frmexp.txtJoinExpAdv.value =="") {   
			     alert("'Advance Given Expenditure' should be entered");
				 document.frmexp.txtJoinExpAdv.focus();
                 return false;
			  }
			  if(document.frmexp.txtJoinExpAct.value !="") {
				  if(parseInt(document.frmexp.txtJoinExpAct.value) < 0)
			{
				alert("Actual Expenditure' Should not be Negative values.");
				document.frmexp.txtJoinExpAct.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtJoinExpAct.value))
			       {				
				   alert("Actual Expenditure' Should be only Numeric Data");
				   document.frmexp.txtJoinExpAct.focus();
				   return false;
			       }
			  }
			   if(document.frmexp.txtJoinExpAdv.value !="") {
				  if(parseInt(document.frmexp.txtJoinExpAdv.value) < 0)
			{
				alert("Advance Given' Should not be Negative values.");
				document.frmexp.txtJoinExpAdv.focus();
				return false;
			}
			if(isNaN(document.frmexp.txtJoinExpAdv.value))
			       {				
				   alert("Advance Given' Should be only Numeric Data");
				   document.frmexp.txtJoinExpAdv.focus();
				   return false;
			       }
			  }
	
	
	
	document.frmexp.submit();
}

function academicvals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtParameter.value =="")
	{
              alert("'Parameter' Should be selected"); 
			  document.frmexp.txtParameter.focus();
			  return false;		
		
	}	
   
	myOption = -1;
      for (i=frmexp.rbtnAcademic.length-1; i > -1; i--) {
           if (frmexp.rbtnAcademic[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Yes or No Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtSince.value =="") {              
				 alert("'Since When' should be entered");
				 document.frmexp.txtSince.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtReason.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason.focus();
                 return false;
			  }


	document.frmexp.submit();
} 

function finvals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtParameter.value =="")
	{
              alert("'Parameter' Should be selected"); 
			  document.frmexp.txtParameter.focus();
			  return false;		
		
	}	
   
	myOption = -1;
      for (i=frmexp.rbtnFin.length-1; i > -1; i--) {
           if (frmexp.rbtnFin[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Yes or No Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtSince.value =="") {              
				 alert("'Since When' should be entered");
				 document.frmexp.txtSince.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtReason.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason.focus();
                 return false;
			  }


	document.frmexp.submit();
} 

function admnvals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtParameter.value =="")
	{
              alert("'Parameter' Should be selected"); 
			  document.frmexp.txtParameter.focus();
			  return false;		
		
	}	
   
	myOption = -1;
      for (i=frmexp.rbtnAdmn.length-1; i > -1; i--) {
           if (frmexp.rbtnAdmn[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Yes or No Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtSince.value =="") {              
				 alert("'Since When' should be entered");
				 document.frmexp.txtSince.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtReason.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason.focus();
                 return false;
			  }


	document.frmexp.submit();
}
function mngvals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtParameter.value =="")
	{
              alert("'Parameter' Should be selected"); 
			  document.frmexp.txtParameter.focus();
			  return false;		
		
	}	
   
	myOption = -1;
      for (i=frmexp.rbtnMng.length-1; i > -1; i--) {
           if (frmexp.rbtnMng[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Either Yes or No Should be selected");
              return false;
              }
			  if (myOption == 0 && document.frmexp.txtSince.value =="") {              
				 alert("'Since When' should be entered");
				 document.frmexp.txtSince.focus();
                 return false;
			  } else if (myOption == 1 && document.frmexp.txtReason.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason.focus();
                 return false;
			  }


	document.frmexp.submit();
}
function mngvals_clear(){	

	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';	
	
	document.frmexp.txtParameter.value ="";
	
	document.frmexp.txtSince.value ="";
	
	document.frmexp.txtReason.value ="";
	
	document.frmexp.txtRemarks.value ="";	
}
function corpusfund_clear(){

	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';	
	
	document.frmexp.txtBank.value ="";
	
	document.frmexp.txtAcno.value ="";
	
	document.frmexp.txtAmount.value ="";
	
	document.frmexp.txtDevFee.value ="";
	
	document.frmexp.txtIRG.value ="";
	
	document.frmexp.txtOthers.value ="";
	
	document.frmexp.txtFromDate.value ="";
	
	document.frmexp.txtFor.value ="";
	
	document.frmexp.txtAmtUtlzd.value ="";
}
function irg_clear(){	

	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';	
	
	document.frmexp.txtFaculty.value ="";
	
	document.frmexp.txtStaff.value ="";
	
	document.frmexp.txtStudents.value ="";
	
	document.frmexp.txtDev.value ="";
	
	document.frmexp.txtOther.value ="";
	
	document.frmexp.txtBank.value ="";
	
	document.frmexp.txtAcno.value ="";
	
	document.frmexp.txtAmount.value ="";
	
}
function eval_clear(){	

	document.frmexp.ddlMonth.value ='0';
		
	document.frmexp.ddlYear.value ='0';	
	
	document.frmexp.txtDtls1.value ="";
	
	document.frmexp.txtReason1.value ="";
	
	document.frmexp.txtDtls2.value ="";
	
	document.frmexp.txtReason2.value ="";
	
	document.frmexp.txtDtls3.value ="";
	
	document.frmexp.txtReason3.value ="";
	
	document.frmexp.txtDtls4.value ="";
	
	document.frmexp.txtReason4.value ="";
	
	document.frmexp.txtDtls5.value ="";
	
	document.frmexp.txtReason5.value ="";
	
	document.frmexp.txtDtls6.value ="";
	
	document.frmexp.txtReason6.value ="";
	
}

function getinv_cost() {
	
	if(document.frmexp.ddlCategory.options[document.frmexp.ddlCategory.selectedIndex].value == '2' || document.frmexp.ddlCategory.options[document.frmexp.ddlCategory.selectedIndex].value == '3') {
	document.frmexp.invcostval.value=document.frmexp.ddlCategory.options[document.frmexp.ddlCategory.selectedIndex].value;		
	} else if(document.frmexp.ddlCategory.options[document.frmexp.ddlCategory.selectedIndex].value == '1') {	
	document.frmexp.invcostval.value = document.frmexp.inv_cost.options[document.frmexp.inv_cost.selectedIndex].value;
	}
	document.frmexp.repyear.value = document.frmexp.ddlYear.options[document.frmexp.ddlYear.selectedIndex].value;
	document.frmexp.repmonth.value = document.frmexp.ddlMonth.options[document.frmexp.ddlMonth.selectedIndex].value;
	
	document.frmexp.submit();
}
function getioc_cost() {
	
	document.frmexp.invcostval.value = document.frmexp.inc_op_cost.options[document.frmexp.inc_op_cost.selectedIndex].value;
	document.frmexp.repyear.value = document.frmexp.ddlYear.options[document.frmexp.ddlYear.selectedIndex].value;
	document.frmexp.repmonth.value = document.frmexp.ddlMonth.options[document.frmexp.ddlMonth.selectedIndex].value;
	document.frmexp.inv_cost.value = '0';
	
	document.frmexp.submit();
}


function corpusfund_vals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	if (document.frmexp.txtBank.value =="")
	{
              alert("'Bank with Branch' Should be Entered"); 
			  document.frmexp.txtBank.focus();
			  return false;		
		
	}	   
	if (document.frmexp.txtAcno.value =="")
	{
              alert("'A/C No' Should be Entered"); 
			  document.frmexp.txtAcno.focus();
			  return false;		
		
	}
	if (document.frmexp.txtAmount.value =="")
	{
              alert("'Amount as on Date' Should be Entered"); 
			  document.frmexp.txtAmount.focus();
			  return false;		
		
	}
	if (document.frmexp.txtAmount.value !="")
	{
			 if(isNaN(document.frmexp.txtAmount.value))
			{				
				alert("Amount as on Date' Should be only Numeric Data");
				document.frmexp.txtAmount.focus();
				return false;
			}
	}
	if (document.frmexp.txtDevFee.value =="")
	{
              alert("'Developement Fee' Should be Entered"); 
			  document.frmexp.txtDevFee.focus();
			  return false;		
		
	}
	if (document.frmexp.txtDevFee.value !="")
	{
			 if(isNaN(document.frmexp.txtDevFee.value))
			{				
				alert("Developement Fee' Should be only Numeric Data");
				document.frmexp.txtDevFee.focus();
				return false;
			}
	}
	if (document.frmexp.txtIRG.value =="")
	{
              alert("'IRG' Should be Entered"); 
			  document.frmexp.txtIRG.focus();
			  return false;		
		
	}
	if (document.frmexp.txtIRG.value !="")
	{
			 if(isNaN(document.frmexp.txtIRG.value))
			{				
				alert("IRG' Should be only Numeric Data");
				document.frmexp.txtIRG.focus();
				return false;
			}
	}
	if (document.frmexp.txtOthers.value =="")
	{
              alert("'Others' Should be Entered"); 
			  document.frmexp.txtOthers.focus();
			  return false;		
		
	}
	if (document.frmexp.txtOthers.value !="")
	{
			 if(isNaN(document.frmexp.txtOthers.value))
			{				
				alert("Others' Should be only Numeric Data");
				document.frmexp.txtOthers.focus();
				return false;
			}
	}
	if (document.frmexp.txtFromDate.value =="")
	{
              alert("'From Date' Should be Entered"); 
			  document.frmexp.txtFromDate.focus();
			  return false;		
		
	}
	if (isDate(document.frmexp.txtFromDate.value)==false){
		document.frmexp.txtFromDate.focus()
		return false
	}
	if (document.frmexp.txtFor.value =="")
	{
              alert("'For' Should be Entered"); 
			  document.frmexp.txtFor.focus();
			  return false;		
		
	}
	if (document.frmexp.txtAmtUtlzd.value =="")
	{
              alert("'Amount Utilized' Should be Entered"); 
			  document.frmexp.txtAmtUtlzd.focus();
			  return false;		
		
	}
	if (document.frmexp.txtAmtUtlzd.value !="")
	{
			 if(isNaN(document.frmexp.txtAmtUtlzd.value))
			{				
				alert("Amount Utilized' Should be only Numeric Data");
				document.frmexp.txtAmtUtlzd.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtAmtUtlzd.value) < 0)
			{
				alert("Amount Utilized' Should not be Negative values.");
				document.frmexp.txtAmtUtlzd.focus();
				return false;
			}
	}
	document.frmexp.submit();
} 


function irg_vals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	myOption = -1;
      for (i=frmexp.rbtnIRGplace.length-1; i > -1; i--) {
           if (frmexp.rbtnIRGplace[i].checked) {
               myOption = i; i = -1;
              }
          }
           if (myOption == -1) {
              alert("'Whether IRG in place (Y/N)' Should be selected");
              return false;
              }
	
   
	myOption1 = -1;
      for (i=frmexp.rbtnIRGcomp.length-1; i > -1; i--) {
           if (frmexp.rbtnIRGcomp[i].checked) {
               myOption1 = i; i = -1;
              }
          }
           if (myOption1 == -1) {
              alert("'Is IRG completely retained by the Inst(Y/N)' Should be selected");
              return false;
              }
			  if (myOption1 == 0 && document.frmexp.txtFaculty.value =="") {              
				 alert("'Faculty' should be entered");
				 document.frmexp.txtFaculty.focus();
                 return false;
			  } 
			  if (document.frmexp.txtFaculty.value !="")
	          {
			   if(isNaN(document.frmexp.txtFaculty.value))
			     {				
				 alert("Faculty' Should be only Numeric Data");
				 document.frmexp.txtFaculty.focus();
				 return false;
			     }
	          }
			  if (myOption1 == 0 && document.frmexp.txtStaff.value =="") {   
			     alert("'Staff' should be entered");
				 document.frmexp.txtStaff.focus();
                 return false;
			  }
			  if (document.frmexp.txtStaff.value !="")
	          {
			   if(isNaN(document.frmexp.txtStaff.value))
			     {				
				 alert("Staff' Should be only Numeric Data");
				 document.frmexp.txtStaff.focus();
				 return false;
			     }
	          }
			  if (myOption1 == 0 && document.frmexp.txtStudents.value =="") {   
			     alert("'Students' should be entered");
				 document.frmexp.txtStudents.focus();
                 return false;
			  }
			   if (document.frmexp.txtStudents.value !="")
	          {
			   if(isNaN(document.frmexp.txtStudents.value))
			     {				
				 alert("'Students' Should be only Numeric Data");
				 document.frmexp.txtStudents.focus();
				 return false;
			     }
	          }			  
			  if (myOption1 == 0 && document.frmexp.txtDev.value =="") {   
			     alert("'Retained For Institutional Developement' should be entered");
				 document.frmexp.txtDev.focus();
                 return false;
			  }
			  if (document.frmexp.txtDev.value !="")
	          {
			   if(isNaN(document.frmexp.txtDev.value))
			     {				
				 alert("'Retained For Institutional Developement' Should be only Numeric Data");
				 document.frmexp.txtDev.focus();
				 return false;
			     }
	          }

     if (document.frmexp.txtBank.value =="")
	{
		      alert("'Bank with Branch Name' Should be entered"); 
			  document.frmexp.txtBank.focus();
			  return false;
	}
	if (document.frmexp.txtAcno.value =="")
	{
		      alert("'A/c No' Should be entered"); 
			  document.frmexp.txtAcno.focus();
			  return false;
	}
	if (document.frmexp.txtAmount.value =="")
	{
		      alert("'Amount' Should be entered"); 
			  document.frmexp.txtAmount.focus();
			  return false;
	}
	if (document.frmexp.txtAmount.value !="")
	   {
		if(isNaN(document.frmexp.txtAmount.value))
		  {				
		  alert("'Amount' Should be only Numeric Data");
		  document.frmexp.txtAmount.focus();
		  return false;
		  }
		  if(parseInt(document.frmexp.txtAmount.value) < 0)
			{
				alert("Amount' Should not be Negative values.");
				document.frmexp.txtAmount.focus();
				return false;
			}
	  }

	document.frmexp.submit();
}

function eval_vals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	myOption1 = -1;
      for (i=frmexp.rbtnEval.length-1; i > -1; i--) {
           if (frmexp.rbtnEval[i].checked) {
               myOption1 = i; i = -1;
              }
          }
           if (myOption1 == -1) {
              alert("'System of Evaluation & Perfomance Appraisal(Y/N)' Should be selected");
              return false;
              }
			  if (myOption1 == 0 && document.frmexp.txtDtls1.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls1.focus();
                 return false;
			  } else if (myOption1 == 1 && document.frmexp.txtReason1.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason1.focus();
                 return false;
			  }
			  
	myOption2 = -1;
      for (i=frmexp.rbtnPer.length-1; i > -1; i--) {
           if (frmexp.rbtnPer[i].checked) {
               myOption2 = i; i = -1;
              }
          }
           if (myOption2 == -1) {
              alert("'System of Performance Appraisal of Faculty by Students(Y/N)' Should be selected");
              return false;
              }
			  if (myOption2 == 0 && document.frmexp.txtDtls2.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls2.focus();
                 return false;
			  } else if (myOption2 == 1 && document.frmexp.txtReason2.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason2.focus();
                 return false;
			  }
			  
	myOption3 = -1;
      for (i=frmexp.rbtnRcg.length-1; i > -1; i--) {
           if (frmexp.rbtnRcg[i].checked) {
               myOption3 = i; i = -1;
              }
          }
           if (myOption3 == -1) {
              alert("'System of Recognizing merit of teachers(Y/N)' Should be selected");
              return false;
              }
			  if (myOption3 == 0 && document.frmexp.txtDtls3.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls3.focus();
                 return false;
			  } else if (myOption3 == 1 && document.frmexp.txtReason3.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason3.focus();
                 return false;
			  }
			  
	myOption4 = -1;
      for (i=frmexp.rbtnAtt.length-1; i > -1; i--) {
           if (frmexp.rbtnAtt[i].checked) {
               myOption4 = i; i = -1;
              }
          }
           if (myOption4 == -1) {
              alert("'Package to attract & retain good teachers(Y/N)' Should be selected");
              return false;
              }
			  if (myOption4 == 0 && document.frmexp.txtDtls4.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls4.focus();
                 return false;
			  } else if (myOption4 == 1 && document.frmexp.txtReason4.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason4.focus();
                 return false;
			  }
	
	document.frmexp.submit();
}
function othfact_vals(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
		
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	
	myOption1 = -1;
      for (i=frmexp.rbtnEval.length-1; i > -1; i--) {
           if (frmexp.rbtnEval[i].checked) {
               myOption1 = i; i = -1;
              }
          }
           if (myOption1 == -1) {
              alert("'System to increase recovery of cost of education(Y/N)' Should be selected");
              return false;
              }
			  if (myOption1 == 0 && document.frmexp.txtDtls1.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls1.focus();
                 return false;
			  } else if (myOption1 == 1 && document.frmexp.txtReason1.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason1.focus();
                 return false;
			  }
			  
	myOption2 = -1;
      for (i=frmexp.rbtnPer.length-1; i > -1; i--) {
           if (frmexp.rbtnPer[i].checked) {
               myOption2 = i; i = -1;
              }
          }
           if (myOption2 == -1) {
              alert("'Policy to fill up all teaching and non-teaching vacancies(Y/N)' Should be selected");
              return false;
              }
			  if (myOption2 == 0 && document.frmexp.txtDtls2.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls2.focus();
                 return false;
			  } else if (myOption2 == 1 && document.frmexp.txtReason2.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason2.focus();
                 return false;
			  }
			  
	myOption3 = -1;
      for (i=frmexp.rbtnRcg.length-1; i > -1; i--) {
           if (frmexp.rbtnRcg[i].checked) {
               myOption3 = i; i = -1;
              }
          }
           if (myOption3 == -1) {
              alert("'Faculty incentive for CE, Consultancy, R&D, SCE etc.(Y/N)' Should be selected");
              return false;
              }
			  if (myOption3 == 0 && document.frmexp.txtDtls3.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls3.focus();
                 return false;
			  } else if (myOption3 == 1 && document.frmexp.txtReason3.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason3.focus();
                 return false;
			  }
			  
	myOption4 = -1;
      for (i=frmexp.rbtnAtt.length-1; i > -1; i--) {
           if (frmexp.rbtnAtt[i].checked) {
               myOption4 = i; i = -1;
              }
          }
           if (myOption4 == -1) {
              alert("'Governance system with participation of stakeholders(Y/N)' Should be selected");
              return false;
              }
			  if (myOption4 == 0 && document.frmexp.txtDtls4.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls4.focus();
                 return false;
			  } else if (myOption4 == 1 && document.frmexp.txtReason4.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason4.focus();
                 return false;
			  }
			
	myOption5 = -1;
      for (i=frmexp.rbtnFms.length-1; i > -1; i--) {
           if (frmexp.rbtnFms[i].checked) {
               myOption5 = i; i = -1;
              }
          }
           if (myOption5 == -1) {
              alert("'Friendly management system for staff and students(Y/N)' Should be selected");
              return false;
              }
			  if (myOption5 == 0 && document.frmexp.txtDtls5.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls5.focus();
                 return false;
			  } else if (myOption5 == 1 && document.frmexp.txtReason5.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason5.focus();
                 return false;
			  }
			  
	myOption6 = -1;
      for (i=frmexp.rbtnUrr.length-1; i > -1; i--) {
           if (frmexp.rbtnUrr[i].checked) {
               myOption6 = i; i = -1;
              }
          }
           if (myOption6 == -1) {
              alert("'Utilization of resources and reducing wastage(Y/N)' Should be selected");
              return false;
              }
			  if (myOption6 == 0 && document.frmexp.txtDtls6.value =="") {              
				 alert("'Details' should be entered");
				 document.frmexp.txtDtls6.focus();
                 return false;
			  } else if (myOption6 == 1 && document.frmexp.txtReason6.value =="") {   
			     alert("'Reasons' should be entered");
				 document.frmexp.txtReason6.focus();
                 return false;
			  }
	
	document.frmexp.submit();
}
function change() {
	document.frmexp.action = "teqip_proforma_cw12.php";
		   frmexp.submit();
}
function change2() {
	document.frmexp.action = "teqip_proforma_cw1.php";
		   frmexp.submit();
}

function cw11_fldsvalidator(){
	
	if (document.frmexp.ddlMonth.value == '0')
		 {
		      alert("'Month' Should be Selected"); 
			  document.frmexp.ddlMonth.focus();
			  return false;
		 }
	 if (document.frmexp.ddlYear.value =='0')
	{
		      alert("'Year' Should be selected"); 
			  document.frmexp.ddlYear.focus();
			  return false;
	}
	 if (document.frmexp.txtGoods.value =="")
	{
		      alert("'Name of the Civil Work' Should be entered"); 
			  document.frmexp.txtGoods.focus();
			  return false;
	}	
	if (document.frmexp.txtProcMethod.value =='0')
	{
		      alert("'Method of Procurement' Should be selected"); 
			  document.frmexp.txtProcMethod.focus();
			  return false;
	}
	
	if (document.frmexp.txtContractValue.value =="")
	{
		      alert("'Value of Contract' Should be entered"); 
			  document.frmexp.txtContractValue.focus();
			  return false;
	}
	else if (document.frmexp.txtContractValue.value !="")
	{
			 if(isNaN(document.frmexp.txtContractValue.value))
			{				
				alert("Value of Contract' Should be only Numeric Data");
				document.frmexp.txtContractValue.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtContractValue.value) < 0)
			{
				alert("Value of Contract' Should not be Negative values.");
				document.frmexp.txtContractValue.focus();
				return false;
			}
	}
	if (document.frmexp.txtPreMonthExp.value =="")
	{
		      alert("'Expenditure upto previous month' Should be entered"); 
			  document.frmexp.txtPreMonthExp.focus();
			  return false;
	}
	else if (document.frmexp.txtPreMonthExp.value !="")
	{
			 if(isNaN(document.frmexp.txtPreMonthExp.value))
			{				
				alert("Expenditure upto previous month' Should be only Numeric Data");
				document.frmexp.txtPreMonthExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtPreMonthExp.value) < 0)
			{
				alert("Expenditure upto previous month' Should not be Negative values.");
				document.frmexp.txtPreMonthExp.focus();
				return false;
			}
	}
	if (document.frmexp.txtrepMonthExp.value =="")
	{
		      alert("'Expenditure during the reporting month' Should be entered"); 
			  document.frmexp.txtrepMonthExp.focus();
			  return false;
	}
	else if (document.frmexp.txtrepMonthExp.value !="")
	{
			 if(isNaN(document.frmexp.txtrepMonthExp.value))
			{				
				alert("Expenditure during the reporting month' Should be only Numeric Data");
				document.frmexp.txtContractValue.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtrepMonthExp.value) < 0)
			{
				alert("Expenditure during the reporting month' Should not be Negative values.");
				document.frmexp.txtrepMonthExp.focus();
				return false;
			}
	}
	if (document.frmexp.txtCummExp.value =="")
	{
		      alert("'Cumulative Expenditure' Should be entered"); 
			  document.frmexp.txtCummExp.focus();
			  return false;
	}
	else if (document.frmexp.txtCummExp.value !="")
	{
			 if(isNaN(document.frmexp.txtCummExp.value))
			{				
				alert("Cumulative Expenditure' Should be only Numeric Data");
				document.frmexp.txtCummExp.focus();
				return false;
			}
			if(parseInt(document.frmexp.txtCummExp.value) < 0)
			{
				alert("Cumulative Expenditure' Should not be Negative values.");
				document.frmexp.txtCummExp.focus();
				return false;
			}
	}
	document.frmexp.add.value="add";
	document.frmexp.submit();
 } 
 
 