// =========== resume search =============

function srchchk(chk1) {
   for (var i = 0; i < chk1.elements.length; i++) {
       ename = chk1.elements[i].name ;
       if (ename == 'field_type[]') {
	      var n = 0;
	      for ( opt = 0; opt < chk1.elements[i].options.length; opt++) {
	         if (chk1.elements[i].options[opt].selected==true)
		        n++;
	      }
          if ( n < 1 ) {
		     alert("Select Atleast One Category");
		     chk1.elements[i].focus();
		     return false;
		     break;
	      }
          if ( n > 3 ) {
		     alert("You Cannot Select More Than 3 Categories");
		     chk1.elements[i].focus();
		     return false;
		     break;
	      }
	   }
   }
   if (chk1.state.options[chk1.state.selectedIndex].value == "x") {
      alert("Please select one State");
      chk1.state.focus();
      return false;
   }
   if (chk1.state.options[chk1.state.selectedIndex].value == "x") {
      alert("Please select one State");
      chk1.state.focus();
      return false;
   }
   if ((chk1.state.value=="") && (chk1.resi.checked)) {
      alert("Don't check the Residential State Option");
      chk1.resi.focus();
      return false;
   }
}

// =========== resume search (II Step) =============

function chkArea(chk1) {
	var j = 0;
	for (var i = 0; i < chk1.elements.length; i++) {
	   var n=0;
	   ename = chk1.elements[i].name ;
	   if (ename == 'area0[]' || ename == 'area1[]' || ename == 'area2[]') {
		  for (opt = 0; opt < chk1.elements[i].options.length; opt++) {
			 if (chk1.elements[i].options[opt].selected==true) {
				n++;
				j++;
			 }
		  }
          if ( n > 3 ) {
			 alert("You cannot select more than 3 Job Speciality");
			 chk1.elements[i].focus();
			 return false;
		  }
	   }
	}
    if ( j < 1 ) {
	   alert("You must select ATLEAST ONE AREA from Any of the Category");
	   return false;
	}
}

// =========== pop up window ============

var pop = '';
function openwin(nm,width,height) {
   var name=nm;
	 var NewWIN1='';
   if (pop && !pop.closed) {
      pop.close();
   }
   pop=eval("window.open('"+name+"','NewWIN1','chrome[4],top=5,left=5,toolbar=no,width="+width+",height="+height+",directories=no,menubar=no,SCROLLBARS=yes')");
   if (!pop.opener) popUpWin.opener = self;
}

// ========== job seekers search ============

function validUserPass(id1,id3,id2) {
   if (id3=="valid") {
	   if (!id1.user1.value.length) {
		  alert ("Please do not leave the Email Id field blank");
		  id1.user1.focus();
		  return false;
	   }
	   if (id1.user1.value.indexOf('@') == -1) {
		  alert("Error in e-mail address");
		  id1.user1.focus();
		  return false;
	   }
	   if (id1.user1.value.indexOf('.') == -1) {
		  alert("Error in e-mail address");
		  id1.user1.focus();
		  return false;
	   }
	   if (id1.user1.value.indexOf('@') != id1.user1.value.lastIndexOf('@')) {
		  alert("Please Specify One E-mail address only");
		  id1.user1.focus();
		  return false;
	   }
	   if (!id1.pwd.value.length) {
		  alert ("Please do not leave the password blank");
		  id1.pwd.focus();
		  return false;
	   }
   }
   if (id2=="pmcQuery" &&  id1.pmcqry.value.length==0) {
	  alert ("Please do not leave the query blank");
	  id1.pmcqry.focus();
	  return false;
   }
   else if (id2=="pmcQuery" &&  id1.pmcqry.value.length>1000) {
	  alert("Your Query can't be more than 1000 characters.");
	  id1.pmcqry.focus();
	  return false;
   }
   else if (id2=="comment" &&  id1.eazyComments.value.length==0) {
	  alert ("Please do not leave the comments blank");
	  id1.eazyComments.focus();
	  return false;
   }
   else if (id2=="area") {
      return chkArea(id1);
   }
}

// ======== resume search -- color change on roll over ==========

function rowHover(row){
		if(!eval('document.form3.'+row.value+'.checked'))
		{
			changebg(row);
		}
	}

function changebg(row)
{
		row.className='hover';
}

function restorebg(row)
{
		row.className='None';
}

function selected(chk)
{
		p1=eval("row"+chk.value);
		if(chk.checked)
		{
			p1.className='selected';
		}
		else{
			p1.className='None';
		}
}


function rowOut(row){
		if(!eval('document.form3.'+row.value+'.checked'))
		{
			restorebg(row);
		}
}


// ============ payment form [employers + job seekers] =============

function orderChk(id1) {
   if (!id1.mode[0].checked && !id1.mode[1].checked && !id1.mode[2].checked && !id1.mode[3].checked && !id1.mode[4].checked && !id1.mode[5].checked &&  !id1.mode[6].checked) {
	  id1.mode[0].focus();
      alert("Please check Your mode of Payment");
      return false;
   }
   if (!id1.terms.checked) {
	  alert("Please check the I accept the disclaimer agreement");
	  id1.terms.focus();
	  return false;
   }
}

// ============ payment form [employers] =============

function orderChk1(id1) {
	if (!document.place.comp_name.value.length) {
	   alert("Company name can not be left blank");
	   document.place.comp_name.focus();
	   return false;
	}

	if (!document.place.address.value.length) {
	   alert("Address can not be left blank");
	   document.place.address.focus();
	   return false;
	}
	if (isNaN(document.place.pincode.value)) {
	   alert("Pincode can be numeric only");
	   document.place.pincode.focus();
	   return false;
	}
	if (document.place.cont_code1.value.length==0) {
		alert("::: Please enter the Country Code :::");
		document.place.cont_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.cont_code1.value)) {
			alert("Country Code can be only Numeric");
			document.place.cont_code1.focus();
			return false;
		}
	}
	if (document.place.city_code1.value.length==0) {
		alert("::: Please enter the City Code :::");
		document.place.city_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.city_code1.value)) {
			alert("City Code can be only Numeric");
			document.place.city_code1.focus();
			return false;
		}
	}
	if (document.place.ph1.value.length==0) {
		alert("::: Please enter the Phone number :::");
		document.place.ph1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.ph1.value)) {
			alert("Phone Number can be only Numeric");
			document.place.ph1.focus();
			return false;
		}
	}
	if (!id1.mode[0].checked && !id1.mode[1].checked && !id1.mode[2].checked && !id1.mode[3].checked && !id1.mode[4].checked && !id1.mode[5].checked &&  !id1.mode[6].checked) {
	  id1.mode[0].focus();
      alert("Please check Your mode of Payment");
      return false;
   }
	 if (!id1.terms.checked) {
	  alert("Please check the I accept the disclaimer agreement");
	  id1.terms.focus();
	  return false;
   }
}

// ============= used in ccard.php ================

function orderChk2(id1) {
	if (!document.place.memtype[0].checked && !document.place.memtype[1].checked) {
	  document.place.memtype[0].focus();
      alert("Please Select Your Membership Type [ EMPLOYER / JOBSEEKER ]");
      return false;
    }

    if(document.place.memtype[0].checked) {
	     if(document.place.emp_plan.value=="blank") {
		    alert("Invalid Selection !!");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="pmc") {
		    alert("Please Select Your PMC Membership Plan From => PMC Membership Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="sjl") {
		    alert("Please Select Your Single Job Listing Membership Plan From => Single Job Listing Membership Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="et") {
		    alert("Please Select Your EAZY Tracker Plan From => EAZY Tracker Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="resDown") {
		    alert("Please Select Your Resume Download Plan From => Increase Resume Download Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="jobLimit") {
		    alert("Please Select Your Job Limit Plan From => Increase Job Limit Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="qryLimit") {
		    alert("Please Select Your Query Limit Plan From => Increase Query Limit Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="ban") {
		    alert("Please Select Your Banner Plan From => Banner Advertisement Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="emp_oth") {
		    alert("Please Select Any Other Payment Option From => Other Payments Section");
		    document.place.emp_plan.focus();
		    return false;
	    }

	    if(document.place.emp_plan.value=="emp_othPay") {
		    if(document.place.emp_cur_type.value=="S") {
			    alert("Please Specify The Currency Type");
	    		document.place.emp_cur_type.focus();
	    		return false;
    		}
    		 if(document.place.emp_user_amount.value==0) {
	    		 alert("Please Specify The Amount");
	    		 document.place.emp_user_amount.focus();
	    		 return false;
    		 }
		 }

    }

    if(document.place.memtype[1].checked) {
	     if(document.place.js_plan.value=="blank") {
		    alert("Invalid Selection !!");
		    document.place.js_plan.focus();
		    return false;
	    }
	    if(document.place.js_plan.value=="js_service") {
		    alert("Please Select Any Package From => Paid Services Section");
		    document.place.js_plan.focus();
		    return false;
	    }
	    if(document.place.js_plan.value=="js_oth") {
		    alert("Please Select Any Other Payment Option From => Other Payments Section");
		    document.place.js_plan.focus();
		    return false;
	    }

	    if(document.place.js_plan.value=="js_othPay") {
		    if(document.place.js_cur_type.value=="S") {
			    alert("Please Specify The Currency Type");
	    		document.place.js_cur_type.focus();
	    		return false;
    		}
    		 if(document.place.js_user_amount.value==0) {
	    		 alert("Please Specify The Amount");
	    		 document.place.js_user_amount.focus();
	    		 return false;
    		 }
		 }
    }

    if (document.place.person_name.value==0) {
	   alert("Please Specify Your Name.");
	   document.place.person_name.focus();
	   return false;
	}

	if(document.place.memtype[0].checked) {
		if (document.place.company_name.value==0) {
	   		alert("Please Specify Your Company Name");
	   		document.place.company_name.focus();
	   		return false;
		}
	}

	if (document.place.address.value==0) {
	   alert("Please Specify Your Address");
	   document.place.address.focus();
	   return false;
	}

	if (document.place.city_state.value==0) {
		alert("Please Specify Your Cit / State");
	   	document.place.city_state.focus();
	   	return false;
   	}

   	if (document.place.pincode.value==0) {
		alert("Please Specify The Pincode");
		document.place.pincode.focus();
		return false;
	}
	else {
		if (isNaN(document.place.pincode.value)) {
	   		alert("Pincode Can Be Numeric Only");
	   		document.place.pincode.focus();
	   		return false;
		}
	}

	if (document.place.country.value==0) {
	   alert("Please Specify Your Country.");
	   document.place.country.focus();
	   return false;
	}

	if (document.place.cont_code1.value==0) {
		alert("Please Specify The Country Code");
		document.place.cont_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.cont_code1.value)) {
			alert("Country Code Can Be Only Numeric");
			document.place.cont_code1.focus();
			return false;
		}
	}

	if (document.place.city_code1.value==0) {
		alert("Please Specify The City Code");
		document.place.city_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.city_code1.value)) {
			alert("City Code Can Be Only Numeric");
			document.place.city_code1.focus();
			return false;
		}
	}

	if (document.place.ph1.value==0) {
		alert("Please Specify Your Phone number");
		document.place.ph1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.ph1.value)) {
			alert("Phone Number Can Be Only Numeric");
			document.place.ph1.focus();
			return false;
		}
	}

	if (!document.place.email.value.length) {
		alert ("Please Specify Your Email Address");
		document.place.email.focus();
		return false;
	}

	if (document.place.email.value.indexOf('@') == -1) {
		alert("Error in Email Address");
		document.place.email.focus();
		return false;
	}

	if (document.place.email.value.indexOf('.') == -1) {
		alert("Error in Email Address");
		document.place.email.focus();
		return false;
	}

	if (document.place.email.value.indexOf('@') != document.place.email.value.lastIndexOf('@')) {
		alert("Please Specify One Email Address Only");
		document.place.email.focus();
		return false;
	}

	if (!id1.mode[0].checked && !id1.mode[1].checked && !id1.mode[2].checked && !id1.mode[3].checked) {
	  id1.mode[0].focus();
      alert("Please Check Your Mode Of Payment");
      return false;
   }
	 if (!id1.terms.checked) {
	  alert("Please Check The \"I accept the disclaimer agreement\"");
	  id1.terms.focus();
	  return false;
   }
}

// ========== Eazy Tracker Functions =============

function submitToPopup(formref) {
   if (formref=="chgStatus") {
      var p=2;
   }
   else{
      len=document.eazyA1.elements.length;
      var i=0;
      var pp=1;
      for (i=0; i<len; i++) {
         if (document.eazyA1.elements[i].type == "checkbox" && document.eazyA1.elements[i].checked==true) {
            pp=2;
	     }
      }
   }
   if (pp==1) {
      alert("You have not selected any check box.");
   }
   else {
	  var newwin='';
	  if (newwin && !newwin.closed) {
		  newwin.close();
	  }

	  if (formref=="addComment") {
         if (document.eazyA1.comments.value==0) {
            alert("Enter Your Comments");
            document.eazyA1.comments.focus();
						return false;
         }
				 newwin = window.open('about:blank','vinduenavn','height=300,width=600,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
				 if (!newwin.opener) popUpWin.opener = self;
				 	     document.eazyA1.id1.value="Add Comments";
				 }
				 else if (formref=="sendMail") {

           if (document.eazyA1.mailSubj.value==0) {
              alert("Enter Your Mail Subject");
              document.eazyA1.mailSubj.focus();
							return false;
           }
           if (document.eazyA1.mailMsg.value==0) {
              alert("Enter Your Mail Message");
              document.eazyA1.mailMsg.focus();
							return false;
           }
           if (newwin && !newwin.closed) {
              newwin.close();
           }
           newwin = window.open('about:blank','vinduenavn','height=400,width=600,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
					 if (!newwin.opener) popUpWin.opener = self;
					 document.eazyA1.id1.value="Send Mail";
      	 }

	  else if (formref=="intSchedule") {
         if (newwin && !newwin.closed) {
            newwin.close();
         }
         newwin = window.open('about:blank','vinduenavn','height=400,width=600,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
         if (!newwin.opener) popUpWin.opener = self;
	     document.eazyA1.id1.value="Schedule";
      }
	  else if (formref=="chgStatus") {
         if (newwin && !newwin.closed) {
            newwin.close();
         }
         newwin = window.open('about:blank','vinduenavn','height=300,width=600,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
         if (!newwin.opener) popUpWin.opener = self;
				  document.eazyA1.id1.value="chgStatus";
    }
	  document.eazyA1.submit();
	  return true;
   }
}

function applyET(formref) {
   len=document.eazyA1.elements.length;
   var i=0;
   var pp1=1;
   var pp2=1;
	 var newwin='';
   for (i=0; i<len; i++) {
       if (document.eazyA1.elements[i].type == "radio" && document.eazyA1.elements[i].checked==true) {
          if (document.eazyA1.elements[i].name=="orderID") {
             pp1=2;
	      }
          if (document.eazyA1.elements[i].name=="jobNo") {
             pp2=2;
	      }
	   }
   }
   if (pp1==1) {
      alert("You have not selected any Eazy Tracker Order.");
	  return false;
   }
   if (pp2==1) {
      alert("You have not selected any Job No.");
	  return false;
   }
   if (newwin && !newwin.closed) {
      newwin.close();
   }
   newwin = window.open('about:blank','vinduenavn','height=400,width=600,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
   if (!newwin.opener) popUpWin.opener = self;
   document.eazyA1.submit();
  // newwin.focus();
}

function applyET1(formref) {
   len=document.eazyA1.elements.length;
   var i=0;
   var pp2=1;
   var newwin='';
   for (i=0; i<len; i++) {
       if (document.eazyA1.elements[i].type == "radio" && document.eazyA1.elements[i].checked==true) {
         if (document.eazyA1.elements[i].name=="jobNo") {
	         pp2=2;
	      }
	   }
   }
     if (pp2==1) {
      alert("You have not selected any Job No.");
	  return false;
   }
   if (newwin && !newwin.closed) {
      newwin.close();
   }
   newwin = window.open('about:blank','vinduenavn','height=400,width=600,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
   if (!newwin.opener) popUpWin.opener = self;
   document.eazyA1.submit();
  // newwin.focus();
}

function chgStatus(formref) {
	 var newwin='';
   if (newwin && !newwin.closed) {
      newwin.close();
   }
   newwin = window.open('about:blank','vinduenavn','height=400,width=600,top=10,left=10,directories=no,menubar=no,SCROLLBARS=yes,toolbar=no');
   if (!newwin.opener) popUpWin.opener = self;
   document.eazyA1.id1.value="chgcallStatus";
   document.eazyA1.submit();
}

// ======== fwd resume in html or text format ========

function chkFwdResume(id1) {
   if (!id1.to.value.length) {
	  alert ("Please mention the Email on which Resume is to be forwarded.");
	  id1.to.focus();
	  return false;
   }
   if (id1.to.value.indexOf('@') == -1) {
	  alert("Error in to Email");
	  id1.to.focus();
	  return false;
   }
   if (id1.to.value.indexOf('.') == -1) {
	  alert("Error in to Email");
	  id1.to.focus();
	  return false;
   }
   if (id1.to.value.indexOf('@') != id1.to.value.lastIndexOf('@')) {
	  alert("Please Specify One Email only");
	  id1.to.focus();
	  return false;
   }
   if (!id1.subject.value.length) {
	  alert ("Please mention the Subject of Mail.");
	  id1.subject.focus();
	  return false;
   }
}

// =========== resume posting and updation [STARTS HERE] ===========

function addLocation(num) {
   if (num==1) {
	  var lidx = document.formn.industry.selectedIndex;
	  var lval = document.formn.industry.options[lidx].value;
	  var ltex = document.formn.industry.options[lidx].text;
	  if (document.formn.ind1.options[0].value == "") {
	     document.formn.ind1.options[0] = null;
	  }
	  if(document.formn.ind1.options.length >= 3) { return false;  }
	  for(i=0; i<document.formn.ind1.options.length; i++) {
	    if (lval == document.formn.ind1.options[i].value) {
	       return false;
	    }
	  }
	  var sidx = document.formn.ind1.options.length;
	  document.formn.ind1.options[sidx] = new Option(ltex, lval, 0 ,0);
   }
   else if(num==2) {
	  var lidx = document.formn.l_state.selectedIndex;
	  var lval = document.formn.l_state.options[lidx].value;
	  var ltex = document.formn.l_state.options[lidx].text;
	  if(document.formn.st1.options[0].value == "") {
	    document.formn.st1.options[0] = null;
	  }
	  if(document.formn.st1.options.length >= 3) { return false;  }
	  for(i=0; i<document.formn.st1.options.length; i++) {
	    if (lval == document.formn.st1.options[i].value) {
	      return false;
	    }
	  }
	  var sidx = document.formn.st1.options.length;
	  document.formn.st1.options[sidx] = new Option(ltex, lval, 0 ,0);
   }
}

function remLocation(num) {
   if (num==1) {
	  var sidx  = document.formn.ind1.selectedIndex;
	  document.formn.ind1.options[sidx] = null;
	  if (document.formn.ind1.options.length == 0) {
	    document.formn.ind1.options[0] = new Option("   Selections List Here", "", 0 ,0);
	  }
   }
   else if(num==2){
	   var sidx  = document.formn.st1.selectedIndex;
	  document.formn.st1.options[sidx] = null;
	  if (document.formn.st1.options.length == 0) {
	    document.formn.st1.options[0] = new Option("   Selections List Here", "", 0 ,0);
	  }
   }
}

function loadLocation(num) {
 if(num==1) {
	  if(document.formn.ind1.options.length > 1) {
	    document.formn.ind1.options[0] = null;
	  }
 } else if(num==2){
	  if(document.formn.st1.options.length > 1) {
	    document.formn.st1.options[0] = null;
	  }
 }
}

function getLocations() {
   var ind2 = '';
   for(i=0; i<document.formn.ind1.options.length; i++) {
	  ind2 += document.formn.ind1.options[i].value + "^";
   }
   document.formn.ind2.value = ind2;
   /*var l_state2 = '';
   for(i=0; i<document.formn.st1.options.length; i++) {
	  l_state2 += document.formn.st1.options[i].value + "^";
   }
   document.formn.l_state2.value = l_state2;*/
}

function check() {
	getLocations();
	if (document.formn.qual1.options[document.formn.qual1.selectedIndex].value == "nill") {
	   alert("Please enter your Education Level");
	   document.formn.qual1.focus();
	   return false;
	}
	if (!document.formn.degree1.value.length) {
	   alert("Specific Qualification can't be left blank");
	   document.formn.degree1.focus();
	   return false;
	}
	if (!document.formn.univ1.value.length) {
	   alert("University/Institute Name can't be left blank");
	   document.formn.univ1.focus();
	   return false;
	}
	if (!document.formn.univ1_sc.value.length) {
	   alert("State,Country can't be left blank");
	   document.formn.univ1_sc.focus();
	   return false;
	}
	if (!document.formn.date1.value.length) {
	   alert("Completion Year can't be left blank");
	   document.formn.date1.focus();
	   return false;
	}
	if (!document.formn.dur1.value.length) {
	   alert("Course Duration can't be left blank");
	   document.formn.dur1.focus();
	   return false;
	}
	if (!document.formn.grade1.value.length) {
	   alert("Grade/% Marks can't be left blank");
	   document.formn.grade1.focus();
	   return false;
	}
	if (document.formn.academic_honours.value.length>=250) {
		alert("Academic Honours can't exceed 250 characters");
		document.formn.academic_honours.focus();
		return false;
	}
	if (document.formn.certification.value.length>=250) {
		alert("Certifications can't exceed 250 characters");
		document.formn.certification.focus();
		return false;
	}
	if (document.formn.job1.value.length>=255) {
		alert("Job Description can't exceed 255 characters");
		document.formn.job1.focus();
		return false;
	}
	if (document.formn.job2.value.length>=255) {
		alert("Job Description can't exceed 255 characters");
		document.formn.job2.focus();
		return false;
	}
	if (!document.formn.tot_comp_join.value.length) {
	   alert("Please Enter the Total Companies You have Joined");
	   document.formn.tot_comp_join.focus();
	   return false;
	}
	if (!document.formn.skills1.value.length) {
	   alert("Skills can't be left blank");
	   document.formn.skills1.focus();
	   return false;
	}
	if (document.formn.skills1.value.length>=250) {
		alert("Skills can't exceed 250 characters");
		document.formn.skills1.focus();
		return false;
	}
	if (document.formn.skills2.value.length>=250) {
		alert("Skills can't exceed 250 characters");
		document.formn.skills2.focus();
		return false;
	}
	if (document.formn.skills3.value.length>=250) {
		alert("Skills can't exceed 250 characters");
		document.formn.skills3.focus();
		return false;
	}
    if (document.formn.ind2.value=="^") {
		alert ("Please select atleast one Industry");
		document.formn.ind1.focus();
		return false;
	}
	if (document.formn.area1.options[document.formn.area1.selectedIndex].value == "any") {
	   alert("Please select your Job's Speciality");
	   document.formn.area1.focus();
	   return false;
	}

	if (res_ty=="jm" || res_ty=="cc" || res_ty=="hr" || res_ty=="os") {

		if (document.formn.desg1.options[document.formn.desg1.selectedIndex].value == "any") {
		   alert("Please enter Prefered Designation");
		   document.formn.desg1.focus();
	       return false;
		}

		if (document.formn.des_oth.value.length && document.formn.desg1.options[document.formn.desg1.selectedIndex].value!="Others" && document.formn.desg2.options[document.formn.desg2.selectedIndex].value!="Others" && document.formn.desg3.options[document.formn.desg3.selectedIndex].value!="Others") {
			alert("Other Designaiton is TO BE left blank");
		    document.formn.des_oth.focus();
		    return false;
		}

		if (document.formn.des_oth.value.length==0 && (document.formn.desg1.options[document.formn.desg1.selectedIndex].value=="Others" || document.formn.desg2.options[document.formn.desg2.selectedIndex].value=="Others" || document.formn.desg3.options[document.formn.desg3.selectedIndex].value=="Others")) {
		    alert("Please enter Other Designaiton");
		    document.formn.des_oth.focus();
		    return false;
		}

	} else {

	   	if (document.formn.job_level1.options[document.formn.job_level1.selectedIndex].value == "") {
		   alert("Please enter your Preference Level");
		   document.formn.job_level1.focus();
		   return false;
		}
		if (!document.formn.desg1.value.length) {
		   alert("Prefered Designation can't be left blank");
		   document.formn.desg1.focus();
		   return false;
		}
	}

	if (document.formn.area_oth.value.length && document.formn.area1.options[document.formn.area1.selectedIndex].value!="Others" && document.formn.area2.options[document.formn.area2.selectedIndex].value!="Others" && document.formn.area3.options[document.formn.area3.selectedIndex].value!="Others") {
	   alert("Other Job's Speciality is TO BE left blank");
	   document.formn.area_oth.focus();
	   return false;
	}

	if (document.formn.area_oth.value.length==0 && (document.formn.area1.options[document.formn.area1.selectedIndex].value=="Others" || document.formn.area2.options[document.formn.area2.selectedIndex].value=="Others" || document.formn.area3.options[document.formn.area3.selectedIndex].value=="Others")) {
	   alert("Please enter Other Job's Speciality");
	   document.formn.area_oth.focus();
	   return false;
	}
	if (document.formn.job_detail.value.length>=500) {
		alert("Prefered Job Details can't exceed 500 characters");
		document.formn.job_detail.focus();
		return false;
	}
	if ((!document.formn.job_status.checked) && (!document.formn.job_status1.checked) && (!document.formn.job_status2.checked)) {
	   alert("Check Job Type : JOB PREFERENCES");
       document.formn.job_status.focus();
	   return false;
	}

	form_4 = document.formn.l_country.selectedIndex;
	form_44 = document.formn.l_country.options[form_4].value;
	if (document.formn.job_status.checked) {
		if (form_44 == "India" &&  document.formn.l_state2.value=="^") {
			alert ("Please select atleast one Prefered State");
			document.formn.st1.focus();
			return false;
		}
	}

	if (document.formn.job_status1.checked) {
		if ((!document.formn.part_work[0].checked) && (!document.formn.part_work[1].checked) && (!document.formn.part_work[2].checked)){
			alert("Please select the Basis for Work");
			document.formn.part_work[0].focus();
			return false;
		}
	}
	if (document.formn.job_status2.checked) {
		if ((!document.formn.free_work[0].checked) && (!document.formn.free_work[1].checked) && (!document.formn.free_work[2].checked)){
			alert("Please select the Basis for Work");
			document.formn.free_work[0].focus();
			return false;
		}
	}
	
    document.formn.submit();
}

function chk2() {
   document.formn.char_len.value=document.formn.text_resume.value.length;
	if (document.formn.text_resume.value.length>5000) {
      alert("your text exceed 5000 characters");
      document.formn.text_resume.focus();
      return false;
    }
}

// ========== job seeker registration form [STARTS HERE] ==========

function checkm(id) {
	if (!document.formn.name.value.length) {
	   alert("Name cannot be left blank");
	   document.formn.name.focus();
	   return false;
	}
	if (document.formn.day.options[document.formn.day.selectedIndex].value == 'x') {
	   alert("Date of Birth can not be left blank");
	   document.formn.day.focus();
	   return false;
	}
	if (document.formn.month.options[document.formn.month.selectedIndex].value == 'x') {
	   alert("Date of Birth can not be left blank");
	   document.formn.month.focus();
	   return false;
	}
	if (document.formn.year.options[document.formn.year.selectedIndex].value == 'x') {
	   alert("Date of Birth can not be left blank");
	   document.formn.year.focus();
	   return false;
	}
	
	if (!document.formn.username.value.length) {
	   alert("E-mail can not be left blank");
	   document.formn.username.focus();
	   return false;
	}
	if (document.formn.username.value.indexOf('@') == -1) {
	   alert("Error in E-mail address");
	   document.formn.username.focus();
	   return false;
	}
	if (document.formn.username.value.indexOf('.') == -1) {
	   alert("Error in E-mail address");
	   document.formn.username.focus();
	   return false;
	}

	if (document.formn.username.value.indexOf('@') != document.formn.username.value.lastIndexOf('@')) {
	   alert("Please Specify One E-mail address only");
	   document.formn.username.focus();
	   return false;
	}

	if(document.formn.alternate.value.length) {
		if (document.formn.alternate.value.indexOf('@') == -1) {
		   alert("Error in Alternate E-mail");
		   document.formn.alternate.focus();
		   return false;
		}
		if (document.formn.alternate.value.indexOf('.') == -1) {
		   alert("Error in Alternate E-mail");
		   document.formn.alternate.focus();
		   return false;
		}

		if (document.formn.alternate.value.indexOf('@') != document.formn.alternate.value.lastIndexOf('@')) {
		   alert("Please Specify One Alternate Email only");
		   document.formn.alternate.focus();
		   return false;
		}
	}
	if (!document.formn.add.value.length) {
	   alert("Postal Address can not be left blank");
	   document.formn.add.focus();
	   return false;
	}
	if (!document.formn.state.value.length) {
	   alert("State can not be left blank");
	   document.formn.state.focus();
	   return false;
	}
	if (!document.formn.city.value.length) {
	   alert("City can not be left blank");
	   document.formn.city.focus();
	   return false;
	}
	
	if (document.formn.country.options[document.formn.country.selectedIndex].value == '') {
	   alert("Please select your country");
	   document.formn.country.focus();
	   return false;
	}
	if (!document.formn.pin.value.length) {
	   alert("Pincode/Zip can not be left blank");
	   document.formn.pin.focus();
	   return false;
	}
	if (isNaN(document.formn.pin.value)) {
	   alert("Pin Code can be Numeric only");
	   document.formn.pin.focus();
	   return false;
	}
	
	/*if (document.formn.state.options[document.formn.state.selectedIndex].value == '0') {
	   alert("Please select your State");
	   document.formn.state.focus();
	   return false;
	}
	if (document.formn.city.options[document.formn.city.selectedIndex].value == '') {
	   alert("Please select your city");
	   document.formn.city.focus();
	   return false;
	}
	if ((!document.formn.city_oth.value.length) && (document.formn.city.options[document.formn.city.selectedIndex].value == 'Other')) {
	   alert("Please Enter Your City in field City (if Other)");
	   document.formn.city_oth.focus();
	   return false;
	}
	if ((document.formn.city_oth.value.length) && (document.formn.city.options[document.formn.city.selectedIndex].value != 'Other')) {
	   alert("Please select \"Other\" in City");
	   document.formn.city.focus();
	   return false;
	}
	if (document.formn.pin.options[document.formn.pin.selectedIndex].value == '') {
	   alert("Select the first 2 digits of your PinCode");
	   document.formn.pin.focus();
	   return false;
	}
	if (isNaN(document.formn.pin1.value)) {
	   alert("Pin Code can be Numeric only");
	   document.formn.pin1.focus();
	   return false;
	}
	if (document.formn.pin1.value.length!=4) {
	   alert("Pin Code can not be less then 6 digits");
	   document.formn.pin1.focus();
	   return false;
	}*/
	if (!document.formn.gender[0].checked && !document.formn.gender[1].checked) {
	  document.formn.gender[0].focus();
      alert("Please select the Gender");
      return false;
    }
    if(id=="new") {
		if (document.formn.res_ty.options[document.formn.res_ty.selectedIndex].value == '') {
		   alert("Please select the Resume Category");
		   document.formn.res_ty.focus();
		   return false;
		}
	}
	if (!document.formn.pwd.value.length) {
	   alert("Please Specify the Password");
	   document.formn.pwd.focus();
	   return false;
	}
	if (!document.formn.repass.value.length) {
	   alert("Please Re-Enter Your Password");
	   document.formn.repass.focus();
	   return false;
	}
	if (document.formn.pwd.value != document.formn.repass.value) {
	  alert("Password and Re-entered passwords should be same");
	  document.formn.repass.focus();
	  return false;
	}
	if(id=="new") {
		if (!document.formn.terms.checked) {
			alert("Please check I accept the Disclaimer Agreement");
			document.formn.terms.focus();
			return false;
		}
	}
}

//this function calls up the sub-product data in the sub-product select box

function show_sub_products()
{
   var doc = document.formn._2715;
   if ((doc == null) || (doc.options == null))
       return;
   //window.alert("show_sub_products in action");
   var which_product = document.formn._14.selectedIndex;
   var sub_product = doc.selectedIndex;
   var value;

   if (doc.options[sub_product] == null)
       value = 0;
   else
       value = doc.options[sub_product].value;

   //put the new options into the select box
   var the_selected_product = products_list[which_product];
   var theSelectedProductName;
   var selected_set = 0;

   if (the_selected_product == -97)
      theSelectedProductName = "product_97";
   else
      theSelectedProductName = "product" + the_selected_product;

   SubProductOptions = new Array();
   for(count = 0; count < Products[theSelectedProductName].length; count++) {
      //use x as index to keep "pick one" option first
      var x = count;
      SubProductOptions[x] = new Option();
      SubProductOptions[x].text = Products[theSelectedProductName].captions[count];
      SubProductOptions[x].value = Products[theSelectedProductName][count];
      if (value == SubProductOptions[x].value) {
          selected_set = count;
      }
      doc.options[x] = SubProductOptions[x];
	  x++;
   }
   doc.length = Products[theSelectedProductName].length;
   doc.selectedIndex = selected_set;
}

Products = new Array();
products_list = new Array("0");
Products.product0 = new Array("0");
Products.product0.captions = new Array("All Subproducts");

//this function calls up the sub-category data in the sub-category select box

function show_sub_categories()
{
   var doc = document.formn.city;
   if ((doc == null) || (doc.options == null))
       return;
   //window.alert("show_sub_categories in action");
   var which_category = document.formn.state.selectedIndex;
   var sub_category = doc.selectedIndex;
   var value;

   if (doc.options[sub_category] == null)
       value = 0;
   else
       value = doc.options[sub_category].value;

   //put the new options into the select box
   var the_selected_category = categories_list[which_category];
   var theSelectedCategoryName;
   var selected_set = 0;

   if (the_selected_category == -97)
      theSelectedCategoryName = "category_97";
   else
      theSelectedCategoryName = "category" + the_selected_category;

   SubCategoryOptions = new Array();

   for(count = 0; count < Categories[theSelectedCategoryName].length; count++) {
      //use x as index to keep "pick one" option first
	  var x = count;
      SubCategoryOptions[x] = new Option();

	  SubCategoryOptions[x].text = Categories[theSelectedCategoryName].captions[count];

	  SubCategoryOptions[x].value = Categories[theSelectedCategoryName].captions[count];

	  if (value == SubCategoryOptions[x].value) {
          selected_set = count;
      }
      doc.options[x] = SubCategoryOptions[x];
	  x++;
   }
   doc.length = Categories[theSelectedCategoryName].length;
   doc.selectedIndex = selected_set;

// $$$$$$$$$$$$$$$$$$$ pincodes $$$$$$$$$$$$$$$$$$$$$$

   var doc1 = document.formn.pin;
   if ((doc1 == null) || (doc1.options == null))
       return;
   //window.alert("show_sub_categories in action");

   var which_category = document.formn.state.selectedIndex;
   var sub_category = doc1.selectedIndex;
   var value;

   if (doc1.options[sub_category] == null)
       value = 0;
   else
       value = doc1.options[sub_category].value;

   //put the new options into the select box
   var the_selected_category = categories_list1[which_category];
   var theSelectedCategoryName;
   var selected_set = 0;

   if (the_selected_category == -97)
      theSelectedCategoryName = "categoryp_97";
   else
      theSelectedCategoryName = "categoryp" + the_selected_category;

   SubCategoryOptions = new Array();

   for(count = 0; count < Categories1[theSelectedCategoryName].length; count++) {
      //use x as index to keep "pick one" option first
	  var x = count;
      SubCategoryOptions[x] = new Option();
      SubCategoryOptions[x].text = Categories1[theSelectedCategoryName].captionsp[count];
      SubCategoryOptions[x].value = Categories1[theSelectedCategoryName].captionsp[count];
      if (value == SubCategoryOptions[x].value) {
          selected_set = count;
      }
      doc1.options[x] = SubCategoryOptions[x];
	  x++;
   }
   doc1.length = Categories1[theSelectedCategoryName].length;
   doc1.selectedIndex = selected_set;
}

Categories1 = new Array();
Categories1.categoryp300 = new Array("0","1");
Categories1.categoryp300.captionsp = new Array("Select Zip","74");
Categories1.categoryp301 = new Array("0","2","3","4","5");
Categories1.categoryp301.captionsp = new Array("Select Zip","50","51","52","53");
Categories1.categoryp302 = new Array("0","6");
Categories1.categoryp302.captionsp = new Array("Select Zip","79");
Categories1.categoryp303 = new Array("0","7");
Categories1.categoryp303.captionsp = new Array("Select Zip","78");
Categories1.categoryp304 = new Array("0","8","9","10","11","12","13");
Categories1.categoryp304.captionsp = new Array("Select Zip","80","81","82","83","84","85");
Categories1.categoryp334 = new Array("0","95","96","97","98","99");
Categories1.categoryp334.captionsp = new Array("Select Zip","12","13","14","15","16");
Categories1.categoryp305 = new Array("0","14");
Categories1.categoryp305.captionsp = new Array("Select Zip","49");
Categories1.categoryp306 = new Array("0","15");
Categories1.categoryp306.captionsp = new Array("Select Zip","39");
Categories1.categoryp307 = new Array("0","16");
Categories1.categoryp307.captionsp = new Array("Select Zip","39");
Categories1.categoryp308 = new Array("0","17");
Categories1.categoryp308.captionsp = new Array("Select Zip","11");
Categories1.categoryp309 = new Array("0","18");
Categories1.categoryp309.captionsp = new Array("Select Zip","40");
Categories1.categoryp310 = new Array("0","19","20","21","22");
Categories1.categoryp310.captionsp = new Array("Select Zip","36","37","38","39");
Categories1.categoryp311 = new Array("0","23","24");
Categories1.categoryp311.captionsp = new Array("Select Zip","12","13");
Categories1.categoryp312 = new Array("0","25");
Categories1.categoryp312.captionsp = new Array("Select Zip","17");
Categories1.categoryp313 = new Array("0","26","27");
Categories1.categoryp313.captionsp = new Array("Select Zip","18","19");
Categories1.categoryp314 = new Array("0","28","29","30");
Categories1.categoryp314.captionsp = new Array("Select Zip","81","82","83");
Categories1.categoryp315 = new Array("0","31","32","33","34");
Categories1.categoryp315.captionsp = new Array("Select Zip","56","57","58","59");
Categories1.categoryp316 = new Array("0","35","36","37");
Categories1.categoryp316.captionsp = new Array("Select Zip","67","68","69");
Categories1.categoryp333 = new Array("0","75");
Categories1.categoryp333.captionsp = new Array("Select Zip","68");
Categories1.categoryp317 = new Array("0","38","39","40","41","42");
Categories1.categoryp317.captionsp = new Array("Select Zip","45","46","47","48","49");
Categories1.categoryp318 = new Array("0","43","44","45","46","47");
Categories1.categoryp318.captionsp = new Array("Select Zip","40","41","42","43","44");
Categories1.categoryp319 = new Array("0","48");
Categories1.categoryp319.captionsp = new Array("Select Zip","79");
Categories1.categoryp320 = new Array("0","49");
Categories1.categoryp320.captionsp = new Array("Select Zip","79");
Categories1.categoryp321 = new Array("0","50");
Categories1.categoryp321.captionsp = new Array("Select Zip","79");
Categories1.categoryp322 = new Array("0","51");
Categories1.categoryp322.captionsp = new Array("Select Zip","79");
Categories1.categoryp323 = new Array("0","52","53","54");
Categories1.categoryp323.captionsp = new Array("Select Zip","75","76","77");
Categories1.categoryp324 = new Array("0","55","56");
Categories1.categoryp324.captionsp = new Array("Select Zip","60","67");
Categories1.categoryp325 = new Array("0","57","58","59");
Categories1.categoryp325.captionsp = new Array("Select Zip","14","15","16");
Categories1.categoryp326 = new Array("0","60","61","62","63","64");
Categories1.categoryp326.captionsp = new Array("Select Zip","30","31","32","33","34");
Categories1.categoryp327 = new Array("0","65");
Categories1.categoryp327.captionsp = new Array("Select Zip","73");
Categories1.categoryp328 = new Array("0","66","67","68","69","70");
Categories1.categoryp328.captionsp = new Array("Select Zip","60","61","62","63","64");
Categories1.categoryp329 = new Array("0","71");
Categories1.categoryp329.captionsp = new Array("Select Zip","79");
Categories1.categoryp330 = new Array("0","72","73","74","75","76","77","78","79","80");
Categories1.categoryp330.captionsp = new Array("Select Zip","20","21","22","23","24","25","26","27","28");
Categories1.categoryp331 = new Array("0","81","82","83","84","85","86","87","88","89");
Categories1.categoryp331.captionsp = new Array("Select Zip","20","21","22","23","24","25","26","27","28");
Categories1.categoryp332 = new Array("0","90","91","92","93","94");
Categories1.categoryp332.captionsp = new Array("Select Zip","70","71","72","73","74");


categories_list1 = new Array("0","300","301","302","303","304","334","305","306","307","308","309","310","311","312","313","314","315","316","333","317","318","319","320","321","322","323","324","325","326","327","328","329","330","331","332");
Categories1.categoryp0 = new Array("0");
Categories1.categoryp0.captionsp = new Array("Select Zip");


// ######### state ###############

Categories = new Array();
Categories.category217 = new Array("0","1","195");
Categories.category217.captions = new Array("Select City","Port Blair","Other");
Categories.category218 = new Array("0", "2","3","4","5","6","7","8","9","10","11","12","13","14","15","195");
Categories.category218.captions = new Array("Select City", "Anantapur","Guntakal","Guntur","Hyderabad","Kakinada","Kurnool","Nellore","Nizamabad","Rajahmundry","Secunderabad","Tirupati","Vijayawada","Visakhapatnam","Warangal","Other");
Categories.category219 = new Array("0", "16","195");
Categories.category219.captions = new Array("Select City","Itanagar","Other");
Categories.category220 = new Array("0","17","18","19","20","195");
Categories.category220.captions = new Array("Select City","Dibrugarh","Guwahati","Silchar","Tezpur","Other");
Categories.category221 = new Array("0", "21", "22", "23","24","25","26","27","195");
Categories.category221.captions = new Array("Select City","Bakaro","Bhagalpur","Gaya","Jamalpur","Muzaffarpur","Nalanda","Patna","Other");
Categories.category237 = new Array("0","197","195");
Categories.category237.captions = new Array("Select City","Chandigarh","Other");
Categories.category222 = new Array("0","28","29","30","195");
Categories.category222.captions = new Array("Select City","Bhilai","Bilaspur","Raipur","Other");
Categories.category223 = new Array("0","195");
Categories.category223.captions = new Array("Select City","Other");
Categories.category224 = new Array("0","195");
Categories.category224.captions = new Array("Select City","Other");
Categories.category225 = new Array("0", "31", "32", "33", "34", "35","193","195");
Categories.category225.captions = new Array("Select City","Central Delhi","North Delhi","South Delhi","East Delhi","West Delhi","Delhi Suburbs","Other");
Categories.category226 = new Array("0", "36", "37", "38","195");
Categories.category226.captions = new Array("Select City","Margao","Panaji/Panjim","Vasco da Gama","Other");
Categories.category227= new Array("0","39","40","41","42","43","44","45","46","47","48","49","50","51","195");
Categories.category227.captions = new Array("Select City","Ahmedabad","Anand","Baroda","Bharuch","Bhavnagar","Bhuj","Gandhinagar","Jamnagar","Kandla","Porbandar","Rajkot","Surat","Vadodara","Other");
Categories.category228 = new Array("0","51","52","53","54","55","56","57","58","59","60","61","195");
Categories.category228.captions = new Array("Select City","Ambala","Bahadurgarh","Chandigarh","Faridabad","Gurgaon","Karnal","Kurukshetra","Panipat","Panchkula","Rohtak","Sonipat","Other");
Categories.category229 = new Array("0","62","63","64","65","66","67","195");
Categories.category229.captions = new Array("Select City","Dalhousie","Dharmasala","Kullu","Manali","Shimla","Solan","Other");
Categories.category230 = new Array("0", "68", "69","70","71","195");
Categories.category230.captions = new Array("Select City","Jammu","Leh","Srinagar","Tawi","Other");
Categories.category231 = new Array("0", "72", "73", "74", "75","195");
Categories.category231.captions = new Array("Select City","Dhanbad","Giridih","Jamshedpur","Ranchi","Other");
Categories.category232 = new Array("0","76","77","78","79","80","81","82","83","84","85","195");
Categories.category232.captions = new Array("Select City","Bangalore","Belgaum","Bellary","Bidar","Dharwad","Gulbarga","Hubli","Kolar","Mangalore","Mysore","Other");
Categories.category233 = new Array("0","86","87","88","89","90","91","92","93","94","95","96","195");
Categories.category233.captions = new Array("Select City","Calicut","Cochin/Kochi","Ernakulan","Kollam","Kottayam","Kozhikode","Palghat","Thiruvananthapuram/Trivandrum","Trichy","Trichur","Quilon","Other");
Categories.category234 = new Array("0","195");
Categories.category234.captions = new Array("Select City","Other");
Categories.category235 = new Array("0","97","98","99","100","101","102","195");
Categories.category235.captions = new Array("Select City","Bhopal","Gwalior","Indore","Jabalpur","Khajuraho","Ujjain","Other");
Categories.category236 = new
Array("0","103","104","105","106","107","108","109","110","111","112","113","114","115","116","117","118","119","120","121","122","123","195");
Categories.category236.captions = new Array("Select City","Aurangabad","Ahmednagar","Alibagh","Amravati","Bhusawal","Dombivli","Jalgaon","Kolhapur","Mumbai City","Mumbai Eastern Suburbs","Mumbai Western Suburbs","Mumbai/Bandra","Mahabaleshwar","Nagpur","Nasik","Navi Mumbai","Pune","Sholapur","Thane","Ulhasnagar","Vasai","Other");
Categories.category203 = new Array("0","124","195");
Categories.category203.captions = new Array("Select City","Imphal","Other");
Categories.category204 = new Array("0","125","195");
Categories.category204.captions = new Array("Select City","Shillong","Other");
Categories.category205 = new Array("0","195");
Categories.category205.captions = new Array("Select City","Other");
Categories.category206 = new Array("0","195");
Categories.category206.captions = new Array("Select City","Other");
Categories.category207 = new Array("0","126","127","128","129","130","195");
Categories.category207.captions = new Array("Select City","Baleshwar","Bhubaneswar","Cuttack","Puri","Rourkela","Other");
Categories.category208 = new Array("0","195");
Categories.category208.captions = new Array("Select City","Other");
Categories.category209 = new Array("0","131","132","133","134","135","136","137","195");
Categories.category209.captions = new Array("Select City","Amritsar","Chandigarh","Jalandhar","Ludhiana","Mohali","Pathankot","Patiala","Other");
Categories.category210 = new Array("0","138","139","140","141","142","142","144","195");
Categories.category210.captions = new Array("Select City","Ajmer","Bikaner","Jaipur","Jaisalmer","Jodhpur","Kota","Udaipur","Other");
Categories.category211 = new Array("0","145","146","195");
Categories.category211.captions = new Array("Select City","Gangtok","Rangpo","Other");
Categories.category212 = new Array("0","147","148","149","150","151","152","153","154","155","156","157","158","159","160","195");
Categories.category212.captions = new Array("Select City","Chennai","Coimbatore","Erode","Hosur","Kanniyakumari","Madurai","Mahabalipuram","Ooty","Salem","Tiruchanapalli","Tiruppur","Tuticorin","Tirunelveli","Vellore","Other");
Categories.category213 = new Array("0","195");
Categories.category213.captions = new Array("Select City","Other");
Categories.category214 = new Array("0","161","162","163","164","165","166","167","168","169","170","171","172","173","174","175","176","195");
Categories.category214.captions = new Array("Select City","Agra","Allahabad","Aligarh","Bareilly","Benares","Faizabad","Ghaziabad","Gorakhpur","Kanpur","Lucknow","Meerut","Mathura","Moradabad","Noida","Saharanpur","Varanasi","Other");
Categories.category215 = new Array("0","177","178","179","180","181","182","195");
Categories.category215.captions = new Array("Select City","Dehradun","Haridwar","Mussoorie","Nainital","Pantnagar","Roorkee","Other");
Categories.category216 = new Array("0","183","184","185","186","187","188","189","190","191","192","195");
Categories.category216.captions = new Array("Select City","Bagdora","Bidhan Nagar","Durgapur","Darjeeling","Kalimpang","Kolkata","Kolkata Howrah","Kolkata Suburbs","Kharagpur","Siliguri","Other");

categories_list = new Array("0","217","218","219","220","221","237","222","223","224","225","226","227","228","229","230","231","232","233","234","235","236","203","204","205","206","207","208","209","210","211","212","213","214","215","216");
Categories.category0 = new Array("0");
Categories.category0.captions = new Array("Select City");

function chkList1() {
   if (document.form4.username.value.indexOf('@') == -1) {
      alert("Error in e-mail address");
      document.form4.username.focus();
      return false;
   }
   if (document.form4.username.value.indexOf('.') == -1) {
      alert("Error in e-mail address");
      document.form4.username.focus();
      return false;
   }
   if (document.form4.username.value.indexOf('@') != document.form4.username.value.lastIndexOf('@')) {
      alert("Please Specify One E-mail address only");
      document.form4.username.focus();
      return false;
   }
   if (document.form4.pwd.value == 0) {
      alert("Unable to submit !! Do not leave the pwdword field blank");
      document.form4.pwd.focus();
      return false;
   }
}

// ============= paid service for job seekers =============

function orderChks(id1,fgs) {
	if(fgs=="tr" || fgs=="rh" || fgs=="ms") {
	    var pp=1;
		dml=id1;
		len=dml.elements.length;
		var i=0;
		for(i=0; i<len; i++) {
	       if ((id1.elements[i].type == "radio") && (dml.elements[i].checked==true) && (id1.elements[i].name == "catg")) {
	          pp=2;
		   }
		}
	    if (pp==1) {
	      alert("You have not selected any category.");
	      id1.catg[0].focus();
	      return false;
	    }
    }

	if (!id1.name.value.length) {
	   alert("Name can not be left blank");
	   id1.name.focus();
	   return false;
	}
	if (!id1.address.value.length) {
	   alert("Address can not be left blank");
	   id1.address.focus();
	   return false;
	}
	if (!id1.mode[0].checked && !id1.mode[1].checked && !id1.mode[2].checked && !id1.mode[3].checked && !id1.mode[4].checked && !id1.mode[5].checked &&  !id1.mode[6].checked) {
	  id1.mode[0].focus();
      alert("Please check Your mode of Payment");
      return false;
   }
	 if (!id1.terms.checked) {
	  alert("Please check the I accept the disclaimer agreement");
	  id1.terms.focus();
	  return false;
   }
}

// ========= Order Form [in case of HDFC or ICICI bank] =========

function chk(id1) {
	if (!id1.hbranch.value.length) {
		alert("Bank Branch can not be left blank");
		id1.hbranch.focus();
		return false;
	}
	if (!id1.hdate.value.length) {
		alert('Enter the date of depositing the amount');
		id1.hdate.focus();
		return false;
	}
}

// ========== employer registration form ==========

function chkEmpRegis() {
	if (!document.place.comp_name.value.length) {
		alert("Company name can not be left blank");
		document.place.comp_name.focus();
		return false;
	}

	if (!document.place.cont_person.value.length) {
		alert("Contact Person name can not be left blank");
		document.place.cont_person.focus();
		return false;
	}

	if (!document.place.address.value.length) {
		alert("Address can not be left blank");
		document.place.address.focus();
		return false;
	}

	/*form_1 = document.place.state.selectedIndex;
	form_11 = document.place.state.options[form_1].value;*/

	form_2 = document.place.cont.selectedIndex;
	form_22 = document.place.cont.options[form_2].value;
	if(form_22 == "x"){
		alert("Please Select the Country ");
		document.place.cont.focus();
		return false;
	}
	
	if ((form_22 == "Other") && (!document.place.c_oth.value.length)) {
		alert("Please fill the Country (If Others) field");
		document.place.c_oth.focus();
		return false;
	}

	if ((form_22 != "Other") && (document.place.c_oth.value.length)) {
		alert("Please dont't fill Country (If Others) field");
		document.place.c_oth.focus();
		return false;
	}

  if (document.place.state.value.length==0) {
		alert("State can't be left blank");
		document.place.state.focus();
		return false;
	}
	/*if ((form_22 == "India") && ((form_11 == "x" ) || (form_11 == "Not Applicable"))) {
		alert("Please Select a State");
		document.place.state.focus();
		return false;
	}

	if ((form_22 != "India") && ((form_11 == "x" ) || (form_11 != "Not Applicable"))) {
		alert("Please Select a State as \"Not Aplicable\"");
		document.place.state.focus();
		return false;
	}*/

	if (document.place.pincode.value.length==0) {
		alert("Pincode can't be left blank");
		document.place.pincode.focus();
		return false;
	}

	if (document.place.cont_code1.value.length==0) {
		alert("Please enter the Country Code");
		document.place.cont_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.cont_code1.value)) {
			alert("Country Code can be only Numeric");
			document.place.cont_code1.focus();
			return false;
		}
	}

	if (document.place.city_code1.value.length==0) {
		alert("::: Please enter the City Code :::");
		document.place.city_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.city_code1.value)) {
			alert("City Code can be only Numeric");
			document.place.city_code1.focus();
			return false;
		}
	}
	if (document.place.ph1.value.length==0) {
		alert("::: Please enter the Phone number :::");
		document.place.ph1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.ph1.value)) {
			alert("Phone Number can be only Numeric");
			document.place.ph1.focus();
			return false;
		}
	}

	if (!document.place.username.value.length) {
		alert("E-mail can not be left blank");
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('@') == -1) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('.') == -1) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('@') != document.place.username.value.lastIndexOf('@')) {
		alert("Please Specify One E-mail address only");
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('@placementindia.com') > 0) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}


	if (document.place.alternate.value.length) {
		if (document.place.alternate.value.indexOf('@') == -1) {
			alert('Error In Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}

		if (document.place.alternate.value.indexOf('.') == -1) {
			alert('Error In  Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}

		if (document.place.alternate.value.indexOf('@') != document.place.alternate.value.lastIndexOf('@')) {
			alert("Please Specify One E-mail address only");
			document.place.alternate.focus();
			return false;
		}

		if (document.place.alternate.value.indexOf('@placementindia.com') > 0) {
			alert('Error In Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}

	}

	form_3 = document.place.comp_type.selectedIndex;
	form_33 = document.place.comp_type.options[form_3].value;

	if (form_33 == '') {
		alert("Please select a Company Type");
		document.place.comp_type.focus();
		return false;
	}

	form_4 = document.place.noof_empl.selectedIndex;
	form_44 = document.place.noof_empl.options[form_4].value;

	if (form_44 == '') {
		alert("Please select a No of employees");
		document.place.noof_empl.focus();
		return false;
	}

	if (!document.place.cprofile.value.length) {
		alert("Please specify your Company Profile");
		document.place.cprofile.focus();
		return false;
	}

	if (document.place.cprofile.value.length > 1000) {
		alert("The Company Profile can't exceed 1000 characters");
		document.place.cprofile.focus();
		return false;
	}

	if (!document.place.pwd.value.length) {
		alert("Please enter your password");
		document.place.pwd.focus();
		return false;
	}

	if (!document.place.repwd.value.length) {
		alert("Please re-enter your password");
		document.place.repwd.focus();
		return false;
	}

	if (document.place.pwd.value != document.place.repwd.value) {
		alert("Password and re-entered password should be same");
		document.place.repwd.focus();
		return false;
	}
	if (document.place.status1.value!="update") {
		if (!document.place.terms.checked) {
			alert("Please check I Accept the Disclaimer Agreement");
			document.place.terms.focus();
			return false;
		}
	}
}

// =============== job posting form =================
function chkListKeyword(id2)  {
	getLocations1();
	if (document.place.catg2.value=="^") {
		alert ("Please select atleast one Category");
		document.place.catg1.focus();
		return false;
	}

	if (document.place.drop_email.value.length == 0) {
		alert("Please don't leave the Email ID field blank");
		document.place.drop_email.focus();
		return false;
	}

	if (document.place.drop_email.value.length >0) {
		if (document.place.drop_email.value.indexOf('@') == -1) {
			alert("Error in e-mail address");
			document.place.drop_email.focus();
			return false;
		}
		if (document.place.drop_email.value.indexOf('.') == -1) {
			alert("Error in e-mail address");
			document.place.drop_email.focus();
			return false;
		}
		if (document.place.drop_email.value.indexOf('@') != document.place.drop_email.value.lastIndexOf('@')) {
			alert("Please Specify One E-mail address only");
			document.place.drop_email.focus();
			return false;
		}
	}

	form_1 = document.place.gender.selectedIndex;
	form_11 = document.place.gender.options[form_1].value;

	if (form_11=="x") {
		alert("Please Specify the Gender Preference");
		document.place.gender.focus();
		return false;

	}

	form_2 = document.place.exp_yr.selectedIndex;
	form_22 = document.place.exp_yr.options[form_2].value;

	if (form_22=="x") {
		alert("Please Specify the Required Experience");
		document.place.exp_yr.focus();
		return false;

	}

	form_3 = document.place.salary.selectedIndex;
	form_33 = document.place.salary.options[form_3].value;

	if (form_33=="x") {
		alert("Please Specify the Salary Offered");
		document.place.salary.focus();
		return false;

	}

	if (!document.place.job_title.value.length) {
		alert ("Please Specify the Job Title");
		document.place.job_title.focus();
		return false;
	}

	if (!document.place.vac_detl.value.length) {
		alert ("Do not leave the Job Details blank");
		document.place.vac_detl.focus();
		return false;
	}

	if (id2=="full") {
		form_6 = document.place.l_cont.selectedIndex;
		form_66 = document.place.l_cont.options[form_6].value;
		form_666 = document.place.cont_oth.value.length;

		if (form_66=="x") {
			alert ("Do not leave the Country blank");
			document.place.l_cont.focus();
			return false;
		}

		if ((form_66 == "Other") && (form_666 == 0)) {
			alert ("Do not leave the Country blank");
			document.place.cont_oth.focus();
			return false;
		}
		/*if ((form_66=="India") &&  (document.place.state2.value=="^")) {
			alert ("Please select atleast one State");
			document.place.state1.focus();
			return false;
		}*/
		if (document.place.state3.value=="") {
			alert ("Please enter state");
			document.place.state3.focus();
			return false;
		}
	} else {
		if (document.place.state3.value=="") {
			alert ("Please enter state");
			document.place.state3.focus();
			return false;
		}
	}

	if (!document.place.l_city.value.length) {
	alert ("Do not leave the Cities blank");
	document.place.l_city.focus();
	 return false;
	}
	document.place.submit();
}

function addLocation1(num) {
   if (num==1) {
	  var lidx = document.place.catg.selectedIndex;
	  var lval = document.place.catg.options[lidx].value;
	  var ltex = document.place.catg.options[lidx].text;
	  if (document.place.catg1.options[0].value == "") {
	   	 document.place.catg1.options[0] = null;
	  }
	  if (document.place.catg1.options.length >= 4) {
		  alert("You have already selected 4 Categories. If you wish to make other selections then you have to remove some from the Selected Categories List");
		  return false;
	  }
	  for (i=0; i<document.place.catg1.options.length; i++) {
		  if (lval == document.place.catg1.options[i].value) {
			  return false;
		  }
	  }
	  var sidx = document.place.catg1.options.length;
	  document.place.catg1.options[sidx] = new Option(ltex, lval, 0 ,0);
   }
   else if (num==2) {
	  var lidx = document.place.state.selectedIndex;
	  var lval = document.place.state.options[lidx].value;
		var ltex = document.place.state.options[lidx].text;
		if(document.place.state1.options[0].value == "") {
			document.place.state1.options[0] = null;
	    }
		if(document.place.state1.options.length >= 5) {
			alert("You have already selected 5 states. If you wish to make other selections then you have to remove some from the Selected State/U.T.(s) List");
			return false;
		}
		for(i=0; i<document.place.state1.options.length; i++) {
		  if (lval == document.place.state1.options[i].value) {
			  return false;
		  }
		}
		var sidx = document.place.state1.options.length;
		document.place.state1.options[sidx] = new Option(ltex, lval, 0 ,0);
	}
}

function remLocation1(num) {
	if(num==1) {
		var sidx  = document.place.catg1.selectedIndex;
		document.place.catg1.options[sidx] = null;
		if (document.place.catg1.options.length == 0) {
			document.place.catg1.options[0] = new Option("   Selections List Here", "", 0 ,0);
		}
	}
	else if(num==2) {
		var sidx  = document.place.state1.selectedIndex;
		document.place.state1.options[sidx] = null;
		if (document.place.state1.options.length == 0) {
			document.place.state1.options[0] = new Option("   Selections List Here", "", 0 ,0);
		}
	}
}

function loadLocation1(num) {
	if(num==1) {
		if(document.place.catg1.options.length > 1) {
			document.place.catg1.options[0] = null;
		}
	}
	else if(num==2) {
		if(document.place.state1.options.length > 1) {
			document.place.state1.options[0] = null;
		}
	}
}

function getLocations1(num) {
    var loclist = '';
	for(i=0; i<document.place.catg1.options.length; i++) {
	    loclist += document.place.catg1.options[i].value + "^";
	}
	document.place.catg2.value = loclist;

	/*var loclist = '';
	for(i=0; i<document.place.state1.options.length; i++) {
		loclist += document.place.state1.options[i].value + "^";
	}
	document.place.state2.value = loclist;*/

}

function chk22() {
   document.place.char_len.value=document.place.vac_detl.value.length;
	if (document.place.vac_detl.value.length>=1500) {
      alert("You can't enter more information.");
      document.place.vac_detl.focus();
      return false;
    }
}


// ========== registration form for consultancy services ==========

function chkEmpRegis2() {
	if (!document.place.comp_name.value.length) {
		alert("Company name can not be left blank");
		document.place.comp_name.focus();
		return false;
	}

	if (!document.place.cont_person.value.length) {
		alert("Contact Person name can not be left blank");
		document.place.cont_person.focus();
		return false;
	}

	if (!document.place.address.value.length) {
		alert("Address can not be left blank");
		document.place.address.focus();
		return false;
	}

	form_1 = document.place.state.selectedIndex;
	form_11 = document.place.state.options[form_1].value;

	if (form_11 == "x"  || form_11 == "Not Applicable") {
		alert("Please Select a State");
		document.place.state.focus();
		return false;
	}

	if (document.place.pincode.value.length==0) {
		alert("Pincode can't be left blank");
		document.place.pincode.focus();
		return false;
	}

	if (document.place.cont_code1.value.length==0) {
		alert("Please enter the Country Code");
		document.place.cont_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.cont_code1.value)) {
			alert("Country Code can be only Numeric");
			document.place.cont_code1.focus();
			return false;
		}
	}

	if (document.place.city_code1.value.length==0) {
		alert("::: Please enter the City Code :::");
		document.place.city_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.city_code1.value)) {
			alert("City Code can be only Numeric");
			document.place.city_code1.focus();
			return false;
		}
	}
	if (document.place.ph1.value.length==0) {
		alert("::: Please enter the Phone number :::");
		document.place.ph1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.ph1.value)) {
			alert("Phone Number can be only Numeric");
			document.place.ph1.focus();
			return false;
		}
	}

	if (!document.place.username.value.length) {
		alert("E-mail can not be left blank");
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('@') == -1) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('.') == -1) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('@') != document.place.username.value.lastIndexOf('@')) {
		alert("Please Specify One E-mail address only");
		document.place.username.focus();
		return false;
	}

	if (document.place.username.value.indexOf('@placementindia.com') > 0) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}


	if (document.place.alternate.value.length) {
		if (document.place.alternate.value.indexOf('@') == -1) {
			alert('Error In Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}

		if (document.place.alternate.value.indexOf('.') == -1) {
			alert('Error In  Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}

		if (document.place.alternate.value.indexOf('@') != document.place.alternate.value.lastIndexOf('@')) {
			alert("Please Specify One E-mail address only");
			document.place.alternate.focus();
			return false;
		}

		if (document.place.alternate.value.indexOf('@placementindia.com') > 0) {
			alert('Error In Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}

	}

	form_3 = document.place.comp_type.selectedIndex;
	form_33 = document.place.comp_type.options[form_3].value;

	if (form_33 == '') {
		alert("Please select a Company Type");
		document.place.comp_type.focus();
		return false;
	}

	form_4 = document.place.noof_empl.selectedIndex;
	form_44 = document.place.noof_empl.options[form_4].value;

	if (form_44 == '') {
		alert("Please select a No of employees");
		document.place.noof_empl.focus();
		return false;
	}

	if (!document.place.cprofile.value.length) {
		alert("Please specify your Company Profile");
		document.place.cprofile.focus();
		return false;
	}

	if (document.place.cprofile.value.length > 1000) {
		alert("The Company Profile can't exceed 1000 characters");
		document.place.cprofile.focus();
		return false;
	}

	if (!document.place.pwd.value.length) {
		alert("Please enter your password");
		document.place.pwd.focus();
		return false;
	}

	if (!document.place.repwd.value.length) {
		alert("Please re-enter your password");
		document.place.repwd.focus();
		return false;
	}

	if (document.place.pwd.value != document.place.repwd.value) {
		alert("Password and re-entered password should be same");
		document.place.repwd.focus();
		return false;
	}
}

// =============== job posting form for consultancy services =================
function chkvacpost()  {


	form_1 = document.place.gender.selectedIndex;
	form_11 = document.place.gender.options[form_1].value;

	if (form_11=="x") {
		alert("Please Specify the Gender Preference");
		document.place.gender.focus();
		return false;

	}

	form_2 = document.place.min_exp_yr.selectedIndex;
	form_22 = document.place.min_exp_yr.options[form_2].value;

	if (form_22=="x") {
		alert("Please Specify the Minimum Experience");
		document.place.min_exp_yr.focus();
		return false;

	}

	form_21 = document.place.max_exp_yr.selectedIndex;
	form_221 = document.place.max_exp_yr.options[form_21].value;

	if (form_221=="x") {
		alert("Please Specify the Maximum Experience");
		document.place.max_exp_yr.focus();
		return false;

	}

	if (document.place.saltype[1].checked) {
		if (!document.place.a_min_sal.value.length) {
			alert ("Please Specify the Annual Minimum Salary");
			document.place.a_min_sal.focus();
			return false;
		}
		if (!document.place.a_max_sal.value.length) {
			alert ("Please Specify the Annual Maximum Salary");
			document.place.a_max_sal.focus();
			return false;
		}
	}

	if (document.place.saltype[0].checked) {
		if (!document.place.m_min_sal.value.length) {
			alert ("Please Specify the Monthly Minimum Salary");
			document.place.m_min_sal.focus();
			return false;
		}
		if (!document.place.m_max_sal.value.length) {
			alert ("Please Specify the Monthly Maximum Salary");
			document.place.m_max_sal.focus();
			return false;
		}
	}

	if (!document.place.job_title.value.length) {
		alert ("Please Specify the Job Title");
		document.place.job_title.focus();
		return false;
	}

	if (!document.place.vac_detl.value.length) {
		alert ("Do not leave the Job Details blank");
		document.place.vac_detl.focus();
		return false;
	}

	if (!document.place.job_location.value.length) {
	alert ("Do not leave the Job Location blank");
	document.place.job_location.focus();
	 return false;
	}

	if (!document.place.job_validity.value.length) {
	alert ("Please specify the date till when the opening is valid");
	document.place.job_validity.focus();
	 return false;
	}
	document.place.submit();
}





// =============== home page ================
/*
function rowHover(row){
		if(!eval('document.listing.th_'+row.value+'.checked'))
		{
			changebg(row);
		}
	}

function changebg(row)
{
		row.className='hover';
}*/

function changebg2(row)
{
		row.className='hover2';
}
/*
function restorebg(row)
{
		row.className='None';
}

function selected(chk)
{
		p1=eval("row"+chk.value);
		if(chk.checked)
		{
			p1.className='selected';
		}
		else{
			p1.className='None';
		}
}


function rowOut(row){
		if(!eval('document.listing.th_'+row.value+'.checked'))
		{
			restorebg(row);
		}
}*/

// =========== Apply to Home page Jobs =============

function chk_res() {

	if (document.formn.resume_text.value==0 && document.formn.resume_file.value==0) {
		if (document.formn.yr_name.value==0) {
			alert("Please provide Your Name");
			document.formn.yr_name.focus();
			return false;
		}
		if (document.formn.dob_dd.value==0 || document.formn.dob_mm.value==0 || document.formn.dob_yy.value==0) {
			alert("Please provide Your Date Of Birth");
			document.formn.dob_dd.focus();
			return false;
		}
		if (document.formn.email.value==0) {
			alert("Please provide Your Email ID");
			document.formn.email.focus();
			return false;
		}

		if (document.formn.email.value.indexOf('@') == -1) {
			alert('Error In E-mail Address');
			document.formn.email.focus();
			return false;
		}

		if (document.formn.email.value.indexOf('.') == -1) {
			alert('Error In E-mail Address');
			document.formn.email.focus();
			return false;
		}

		if (document.formn.email.value.indexOf('@') != document.formn.email.value.lastIndexOf('@')) {
			alert("Please Specify One E-mail address only");
			document.formn.email.focus();
			return false;
		}
		if (document.formn.address.value==0) {
			alert("Please provide Your Current Residential Address");
			document.formn.address.focus();
			return false;
		}
		if (document.formn.city.value==0) {
			alert("Please provide Your City");
			document.formn.city.focus();
			return false;
		}
		if (document.formn.mobile.value==0) {
			if (document.formn.phone1.value==0) {
				alert("Please provide Country Code");
				document.formn.phone1.focus();
				return false;
			}
			if (isNaN(document.phone1.mobile.value)) {
				alert("Please provide Valid Country Code");
				document.formn.phone1.focus();
				return false;
			}

			if (document.formn.phone2.value==0) {
				alert("Please provide City Code");
				document.formn.phone2.focus();
				return false;
			}
			if (isNaN(document.phone1.mobile.value)) {
				alert("Please provide Valid City Code");
				document.formn.phone1.focus();
				return false;
			}

			if (document.formn.phone3.value==0) {
				alert("Please provide Phone Number");
				document.formn.phone3.focus();
				return false;
			}
			if (isNaN(document.phone3.mobile.value)) {
				alert("Please provide Valid Phone Number");
				document.formn.phone3.focus();
				return false;
			}
		}
		else {
			if (isNaN(document.formn.mobile.value)) {
				alert("Please provide Valid Mobile Number");
				document.formn.mobile.focus();
				return false;
			}
		}
		if (document.formn.keyskills.value==0) {
			alert("Please provide Your Skills");
			document.formn.keyskills.focus();
			return false;
		}
	}
}

// ========== employer registration form ==========

function chkEmpRegis1() {
	if (!document.place.comp_name.value.length) {
		alert("Company name can not be left blank");
		document.place.comp_name.focus();
		return false;
	}
	if (!document.place.cont_person.value.length) {
		alert("Contact Person name can not be left blank");
		document.place.cont_person.focus();
		return false;
	}
	if (!document.place.address.value.length) {
		alert("Address can not be left blank");
		document.place.address.focus();
		return false;
	}
	form_1 = document.place.state.selectedIndex;
	form_11 = document.place.state.options[form_1].value;

	form_2 = document.place.cont.selectedIndex;
	form_22 = document.place.cont.options[form_2].value;

	if (form_22=="x") {
		alert("Please Select A Country");
		document.place.cont.focus();
		return false;
	}

	if ((form_22 == "Other") && (!document.place.c_oth.value.length)) {
		alert("Please fill the Country (If Others) field");
		document.place.c_oth.focus();
		return false;
	}
	if ((form_22 != "Other") && (document.place.c_oth.value.length)) {
		alert("Please dont't fill Country (If Others) field");
		document.place.c_oth.focus();
		return false;
	}
	if ((form_22 == "India") && ((form_11 == "x" ) || (form_11 == "Not Applicable"))) {
		alert("Please Select a State");
		document.place.state.focus();
		return false;
	}
	if ((form_22 != "India") && ((form_11 == "x" ) || (form_11 != "Not Applicable"))) {
		alert("Please Select a State as \"Not Aplicable\"");
		document.place.state.focus();
		return false;
	}

	if (document.place.pincode.value.length==0) {
		alert("Pincode can't be left blank");
		document.place.pincode.focus();
		return false;
	}
	if (document.place.cont_code1.value.length==0) {
		alert("Please enter the Country Code");
		document.place.cont_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.cont_code1.value)) {
			alert("Country Code can be only Numeric");
			document.place.cont_code1.focus();
			return false;
		}
	}
	if (document.place.city_code1.value.length==0) {
		alert("::: Please enter the City Code :::");
		document.place.city_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.city_code1.value)) {
			alert("City Code can be only Numeric");
			document.place.city_code1.focus();
			return false;
		}
	}
	if (document.place.ph1.value.length==0) {
		alert("::: Please enter the Phone number :::");
		document.place.ph1.focus();
		return false;
	}
	else {
		if (isNaN(document.place.ph1.value)) {
			alert("Phone Number can be only Numeric");
			document.place.ph1.focus();
			return false;
		}
	}

	if (!document.place.username.value.length) {
		alert("E-mail can not be left blank");
		document.place.username.focus();
		return false;
	}
	if (document.place.username.value.indexOf('@') == -1) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}
	if (document.place.username.value.indexOf('.') == -1) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}
	if (document.place.username.value.indexOf('@') != document.place.username.value.lastIndexOf('@')) {
		alert("Please Specify One E-mail address only");
		document.place.username.focus();
		return false;
	}
	if (document.place.username.value.indexOf('@placementindia.com') > 0) {
		alert('Error In E-mail Address');
		document.place.username.focus();
		return false;
	}

	if (document.place.alternate.value.length) {
		if (document.place.alternate.value.indexOf('@') == -1) {
			alert('Error In Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}
		if (document.place.alternate.value.indexOf('.') == -1) {
			alert('Error In  Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}
		if (document.place.alternate.value.indexOf('@') != document.place.alternate.value.lastIndexOf('@')) {
			alert("Please Specify One E-mail address only");
			document.place.alternate.focus();
			return false;
		}
		if (document.place.alternate.value.indexOf('@placementindia.com') > 0) {
			alert('Error In Alternate E-mail');
			document.place.alternate.focus();
			return false;
		}
	}

	form_3 = document.place.comp_type.selectedIndex;
	form_33 = document.place.comp_type.options[form_3].value;

	if (form_33 == 'x') {
		alert("Please select a Company Type");
		document.place.comp_type.focus();
		return false;
	}

	form_4 = document.place.noof_empl.selectedIndex;
	form_44 = document.place.noof_empl.options[form_4].value;

	if (form_44 == '') {
		alert("Please select a No of employees");
		document.place.noof_empl.focus();
		return false;
	}
	if (!document.place.cprofile.value.length) {
		alert("Please specify your Company Profile");
		document.place.cprofile.focus();
		return false;
	}
	if (document.place.cprofile.value.length > 1000) {
		alert("The Company Profile can't exceed 1000 characters");
		document.place.cprofile.focus();
		return false;
	}
	if (!document.place.pwd.value.length) {
		alert("Please enter your password");
		document.place.pwd.focus();
		return false;
	}
	if (document.place.status1.value!="update") {
		if (!document.place.terms.checked) {
			alert("Please check the I accept the Disclaimer Agreement");
			document.place.terms.focus();
			return false;
		}
	}
}

// ========== Catalog Enquiry Form Start ==========

function catalog_enquiry() {
	if (document.formn.cont_person.value==0) {
		alert("Please provide Your Name");
		document.formn.cont_person.focus();
		return false;
	}
	if (document.formn.email.value==0) {
		alert("Please provide Your Email ID");
		document.formn.email.focus();
		return false;
	}
	if (document.formn.email.value.indexOf('@') == -1) {
		alert('Error In E-mail Address');
		document.formn.email.focus();
		return false;
	}
	if (document.formn.email.value.indexOf('.') == -1) {
		alert('Error In E-mail Address');
		document.formn.email.focus();
		return false;
	}
	if (document.formn.email.value.indexOf('@') != document.formn.email.value.lastIndexOf('@')) {
		alert("Please Specify One E-mail address only");
		document.formn.email.focus();
		return false;
	}
	if (document.formn.cont_ph.value==0) {
		alert("Please provide Your Phone Nos.");
		document.formn.cont_ph.focus();
		return false;
	}
	else {
		if (isNaN(document.formn.cont_ph.value)) {
			alert("Phone Nos. can be only Numeric");
			document.formn.cont_ph.focus();
			return false;
		}
	}
	if (document.formn.mobile.value!=0) {
		if (isNaN(document.formn.mobile.value)) {
			alert("Mobile No. can be only Numeric");
			document.formn.mobile.focus();
			return false;
		}
	}
	if (document.formn.address1.value==0) {
		alert("Please provide Your Address");
		document.formn.address1.focus();
		return false;
	}
	if (document.formn.yr_qry.value==0) {
		alert("Please provide Your Query");
		document.formn.yr_qry.focus();
		return false;
	}
}

function admin_report(){
	if(document.formn.concern.value=="") {
		alert("Please select your area of concern");
		document.formn.concern.focus();
		return false;
	}
	if(document.formn.subject.value=="") {
		alert("Please enter subject");
		document.formn.subject.focus();
		return false;
	}
	if(document.formn.query.value=="") {
		alert("Please enter details");
		document.formn.query.focus();
		return false;
	}
}

// ========== Catalog Enquiry Form End  ==========
function chkselect(){
	
	var frm=document.form3;
	count = frm.elements.length;
	count_checked=0;
	
	for (i=0; i < count; i++){
		if(frm.elements[i].type == "checkbox"){
			if(frm.elements[i].checked == 1){
				if(frm.elements[i].value!=0){
					count_checked=1;
				}
			}
			
		} 
	}
	if(count_checked==0){
		alert ("Please select atleast one job-seeker");
		return false;
	}
	if(frm.subject.value==""){
		alert ("Please enter the subject");
		frm.subject.focus();
		return false;
	}
	if(frm.query.value==""){
		alert ("Please enter your query");
		frm.query.focus();
		return false;
	}

}
function chk(){
	form_22 = document.navform.category.options[document.navform.category.selectedIndex].value;
	if (form_22==0) {
		alert("Please select the category");
		document.navform.category.focus();
		return false;

	}
	
	var count=0;
	for(var i=0;i<document.navform.sub_cat.length;i++){
		if(document.navform.sub_cat.options[i].selected==true)
			count=count+1;

	}
	if(count == 0){
		alert("Please select the sub-category");
		document.navform.sub_cat.focus();
		return false;
	}

}


