// =========== 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[7].checked &&  !id1.mode[8].checked &&  !id1.mode[9].checked &&  !id1.mode[10].checked &&  !id1.mode[11].checked &&  !id1.mode[12].checked &&  !id1.mode[13].checked &&  !id1.mode[14].checked &&  !id1.mode[15].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 Terms Of Use");
	  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[7].checked &&  !id1.mode[8].checked &&  !id1.mode[9].checked &&  !id1.mode[10].checked &&  !id1.mode[11].checked &&  !id1.mode[12].checked &&  !id1.mode[13].checked &&  !id1.mode[14].checked &&  !id1.mode[15].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 Terms Of Use");
	  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 Membership Plan From => 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[4].checked && !id1.mode[5].checked && !id1.mode[6].checked && !id1.mode[7].checked && !id1.mode[8].checked && !id1.mode[9].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 Terms Of Use\"");
	  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(res_ty) {
	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.exp_yr.value != "0" || document.formn.exp_mn.value != "0") && (!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 red()
{
	 LeftCurtain=new Image(midPoint,ht);
		LeftCurtain.src="images/Active.gif";
		LeftCurtain.left="0px";
		LeftCurtain.top="0px";
		LeftCurtain.visibility="visible";
}





function filesize(o,w)
{
document.write(o);
}




function checkm(id){		








if(trim(document.formn.newuserid.value) == ''){
	   alert("Please Enter the Loginid");
	   document.formn.newuserid.focus();
	   return false;
}	



if (document.formn.newuserid.value.length < 4)
{
	alert("Login Id can not be less than 4 characters, Please enter more characters.");
	document.formn.newuserid.focus();
	return false;
}
		
		
	
	
	
	
	

if (document.formn.Available.value == 'Login ID ' + document.formn.newuserid.value + ' is UnAvailable')
{
   alert("Your Username is UnAvailable ");
   document.formn.newuserid.focus();
   return false;
}
	
	
			
if(trim(document.formn.pwd.value) == ''){
	   alert("Please Specify the Password");	   
	   document.formn.pwd.focus();
	   return false;
	   	  
	}
	
	
	if (document.formn.pwd.value.length < 4) {
			alert("Unable to submit!! Password must be of length 4 characters");
			document.formn.pwd.focus();
			return false;
		}
		
		
if(trim(document.formn.repass.value) == ''){
	   alert("Please Re-Enter Your Password");
	   document.formn.repass.focus();
	   return false;
	}
	
		if (document.formn.repass.value.length < 4) {
			alert("Unable to submit!! Password must be of length 4 characters");
			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 (!document.formn.mail.value.length) {
		alert ("Please Specify Your Email Address");
		document.formn.mail.focus();
		return false;
	}

	if (document.formn.mail.value.indexOf('@') == -1) {
		alert("Error in Email Address");
		document.formn.mail.focus();
		return false;
	}

	if (document.formn.mail.value.indexOf('.') == -1) {
		alert("Error in Email Address");
		document.formn.mail.focus();
		return false;
	}

	if (document.formn.mail.value.indexOf('@') != document.formn.mail.value.lastIndexOf('@')) {
		alert("Please Specify One Email Address Only");
		document.formn.mail.focus();
		return false;
	}


	
	if (document.formn.Available1.value=='An Account Already Exists With This Email Id.') {
	   alert("An Account Already Exists With This Email Id.");
	   document.formn.mail.focus();
	   return false;
	}
	
	
	
	
	
		
	
	
	
		if (!document.formn.remAnswer.value.length) {
	   alert("Please Enter the Reminder Answer ");
	   document.formn.remAnswer.focus();
	   return false;
	}

if (!document.formn.firstName.value.length) {
	   alert("Please Enter the firstName");
	   document.formn.firstName.focus();
	   return false;
	}
	
	if (!document.formn.lastName.value.length) {
	   alert("Please Enter the LastName");
	   document.formn.lastName.focus();
	   return false;
	}



  
  
  

	/*if (!document.formn.crefLoc.value.length) {
	   alert("Please enter your Current Location");
	   document.formn.crefLoc.focus();
	   return false;
	} */
	
	if (!document.formn.prefLoc.value.length) {
	   alert("Please select Preferred Location");
	   document.formn.plocation.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 (isNaN(document.formn.ccph1.value)) {
	   alert("City Code can be Numeric only");
	   document.formn.ccph1.value='';
	   document.formn.ccph1.focus();
	   return false;
	}
	
	if (isNaN(document.formn.ph1.value)) {
	   alert("Phone number can be Numeric only");
	   document.formn.ph1.value='';
	   document.formn.ph1.focus();
	   return false;
	}
	
	

		if (!document.formn.mphone.value.length)
		{
		alert("::: Please enter Mobile number :::");
		document.formn.mphone.focus();
		return false;
		}
		
		
		if (isNaN(document.formn.mphone.value)) {
	   alert("Mobile Number can be Numeric only");
	   document.formn.mphone.value='';
	   document.formn.mphone.focus();	  
	   return false;
		}
	
	
	
		
		if (document.formn.mphone.value.length < 10) {
			alert("Unable to submit!! Mobile number must be of length Minimum 10 characters");
			document.formn.mphone.focus();
			return false;
		}
		
		
		
	
/*	if (!document.formn.ccph1.value.length) {
	   alert("Please enter the City Code");
	   document.formn.ccph1.focus();
	   return false;
	}*/
	
	
/*	if (!document.formn.ph1.value.length)
	{
		if (!document.formn.mphone.value.length)
		{
		alert("::: Please enter any one Phone number or Mobile number :::");
		document.formn.ph1.focus();
		return false;
		}
		else
		{
			if (document.formn.mphone.value.length < 10)
			{
			alert("Unable to submit!! Mobile Number must be of Minimum 10 characters");
			document.formn.mphone.focus();
			return false;
			}
		}			
	}
	else
	{
		if (!document.formn.mphone.value.length)
		{
		}
		else
		{
		
		}
	}*/
	
	
	
	if (!document.formn.add.value.length) {
	   alert("Postal Address can not be left blank");
	   document.formn.add.focus();
	   return false;
	}
	
	
	
	
	
	
	
	
	
	 var selected_country    = document.formn.select_country.options[document.formn.select_country.selectedIndex].value;
                var country_text = document.formn.country_text.value;
 
                 if(selected_country == " ")
                 {
                        alert("Please select a Country");
						                        document.formn.select_country.focus();

                        return false;
                 }

                if(selected_country=="" && country_text=="" && trim(selected_country)=="" && trim(country_text)=="")
                {
                        alert("Please select a Country");
                        document.formn.select_country.focus();
                        return false;
                }
                else
                {
                        if(selected_country=="Others" || selected_country=="")
                        {
                                if(country_text=="" || trim(country_text)=="")
                                {
                                        alert("Please enter a country");
                                        document.formn.country_text.focus();
                                        return false;
                                }
                                else
                                        document.formn.ddlSelectCountry.value=country_text;
                        }
                        else
                                document.formn.ddlSelectCountry.value=selected_country;
                }
/* --------- country part ends here ----------- */
/* --------- State Part ends here ------------ */
 var selected_state = document.formn.select_state.options[document.formn.select_state.selectedIndex].value;
        var state_text   = document.formn.state_text.value;

        if(selected_state == " ")
        {
        alert("Please select a State");
        return false;
        }
        if(selected_state=="" && state_text=="" && trim(selected_state)=="" && trim(state_text)=="")
        {
                alert("Please select a State");
                document.formn.select_state.focus();
                return false;
        }
        else {
                if(selected_state=="Others" || selected_state=="")
                {
                        if(state_text=="" || trim(state_text)=="") {
                                alert("Please enter a State");
                                document.formn.state_text.focus();
                                return false;
                        }
                        else
                                document.formn.ddlSelectState.value=state_text;
                }
                else
                                document.formn.ddlSelectState.value=selected_state;
        }
/* ------- state part ends here --------- */
/* ------- City part ends here ---------- */

var selected_city = document.formn.select_city.options[document.formn.select_city.selectedIndex].value;
         var city_text     = document.formn.city_text.value;

        if(selected_city == " ")
        {
         alert("Please select a City");
        return false;
        }
         if(selected_city=="" && city_text=="" && trim(select_city)=="" && trim(city_text)=="")
           {
                alert("Please select a City");
                document.formn.select_city.focus();
                return false;
           }
        else {
                if(selected_city=="Others" || selected_city=="")
                {
                        if(city_text=="" || trim(city_text)=="") {
                                alert("Please enter your City");
                                document.formn.city_text.focus();
                                return false;
                        }
                        else
                                document.formn.ddlSelectCity.value=city_text;
                }
                else
                   document.formn.ddlSelectCity.value=selected_city;
        }
	
	
	
		
		
	

	if (isNaN(document.formn.mphone.value)) {
	   alert("Phone Number can be Numeric only");
	   document.formn.mphone.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 (document.formn.experience.options[document.formn.experience.selectedIndex].value == '-1') {
	   alert("Please select your Experience ");
	   document.formn.experience.focus();
	   return false;
	}
	
	
		if (document.formn.expmonth.options[document.formn.expmonth.selectedIndex].value == '-1') {
	   alert("Please select your Experience(month) ");
	   document.formn.expmonth.focus();
	   return false;
	}
	
	
if (document.formn.experience.options[document.formn.experience.selectedIndex].value == '0' && document.formn.expmonth.options[document.formn.expmonth.selectedIndex].value == '0') 
	{
		
		if (document.formn.industry.options[document.formn.industry.selectedIndex].value == '0') {
				   alert("Please select your Industry ");
				   document.formn.industry.focus();
				   return false;
				}
				
				
				if (document.formn.funcArea.options[document.formn.funcArea.selectedIndex].value == '0') {
				   alert("Please select your Functional Area ");
				   document.formn.funcArea.focus();
				   return false;
				}
					
					
					
					
				if((document.formn.work.options[document.formn.work.selectedIndex].value == "---Accounting---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Taxing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Auditing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Financial services---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Operations/Legal---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Financial Planning---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Others---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Admin/Office Support---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Data Entry---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Advertising---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Event Management---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Media---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---PR---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Airlines---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Travel---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Ticketing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Architecture/Interior Designing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Other---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Construction/Building/Extraction---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Property Management---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Personal/Retail Banking---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Corporate Banking---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Card Division---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Investment---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Insurance---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Operations/Legal---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Treasury---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Engineering design---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Production---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Hotel Management/Catering---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Food Technology---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Programming & Designing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Admin/Maintenance/Security/Data warehousing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Quality Assurance/Testing/Documentation---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Product Management---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Photography---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---TV/Films/Radio---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Technician---"))
				{
				alert("You have selected an invalid option");
				document.formn.work.focus();
				return false;
				}
	
	
	
	
		
		if (!document.formn.keyskills.value.length) {
				   alert("Please Enter the keySkills");
				   document.formn.keyskills.focus();
				   return false;
				}
				
				
	}
	else
	{
				if (document.formn.industry.options[document.formn.industry.selectedIndex].value == '0') {
				   alert("Please select your Industry ");
				   document.formn.industry.focus();
				   return false;
				}
				
				
				if (document.formn.funcArea.options[document.formn.funcArea.selectedIndex].value == '0') {
				   alert("Please select your Functional Area ");
				   document.formn.funcArea.focus();
				   return false;
				}
					
					
					
					
				if((document.formn.work.options[document.formn.work.selectedIndex].value == "---Accounting---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Taxing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Auditing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Financial services---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Operations/Legal---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Financial Planning---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Others---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Admin/Office Support---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Data Entry---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Advertising---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Event Management---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Media---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---PR---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Airlines---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Travel---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Ticketing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Architecture/Interior Designing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Other---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Construction/Building/Extraction---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Property Management---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Personal/Retail Banking---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Corporate Banking---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Card Division---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Investment---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Insurance---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Operations/Legal---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Treasury---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Engineering design---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Production---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Hotel Management/Catering---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Food Technology---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Programming & Designing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Admin/Maintenance/Security/Data warehousing---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Quality Assurance/Testing/Documentation---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Product Management---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Photography---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---TV/Films/Radio---")||(document.formn.work.options[document.formn.work.selectedIndex].value == "---Technician---"))
				{
				alert("You have selected an invalid option");
				document.formn.work.focus();
				return false;
				}
	
	
	
		if (!document.formn.keyskills.value.length) {
				   alert("Please Enter the keySkills");
				   document.formn.keyskills.focus();
				   return false;
				}
				
				
	
	if (document.formn.worklevel.options[document.formn.worklevel.selectedIndex].value == '0') {
	   alert("Please select your Work level ");
	   document.formn.worklevel.focus();
	   return false;
	}	
	
	
	
	
		if (document.formn.emptype.options[document.formn.emptype.selectedIndex].value == '0') {
	   alert("Please select your employment Type ");
	   document.formn.emptype.focus();
	   return false;
	}
	
	
	
	
		
		
		
	}
		














		
	
	if (document.formn.eduHD1.options[document.formn.eduHD1.selectedIndex].value == '0') {
	   alert("Please select your Course ");
	   document.formn.eduHD1.focus();
	   return false;
	}	
	
	if (document.formn.eduHD1.options[document.formn.eduHD1.selectedIndex].value == 'Other')
	{
		 if (!document.formn.eduHD1o.value.length) {
		   alert("Please enter your course");
		   document.formn.eduHD1o.focus();
		   return false;
		}
	}
	
	
	

	if (document.formn.eduSpe1.options[document.formn.eduSpe1.selectedIndex].value == 'Other') {	   
	   if (!document.formn.eduSpe1o.value.length) {
		   alert("Please enter your specialisation");
		   document.formn.eduSpe1o.focus();
		   return false;
		}
	}
	
	
	if (document.formn.eduSpe1.options[document.formn.eduSpe1.selectedIndex].value == '0') {
	   alert("Please select your specialisation ");
	   document.formn.eduSpe1.focus();
	   return false;
	}
	
	
	
	
	if (document.formn.institute.options[document.formn.institute.selectedIndex].value == '0') {
	   alert("Please select your institute ");
	   document.formn.institute.focus();
	   return false;
	}
	
	
	if (document.formn.institute.options[document.formn.institute.selectedIndex].value == 'Other') {	   
	   if (!document.formn.Institutionother1_level.value.length) {
		   alert("Please enter your institute");
		   document.formn.Institutionother1_level.focus();
		   return false;
		}
	}
	
	
	
		if (document.formn.yearofpass1.options[document.formn.yearofpass1.selectedIndex].value == '0') {
	   alert("Please select your Year of Completion ");
	   document.formn.yearofpass1.focus();
	   return false;
	}
	
	
	
	
	
	
	
	


	
	
	
	
	
if (document.formn.edu2HD1.options[document.formn.edu2HD1.selectedIndex].value == 'Other') 
{	   
	   if (!document.formn.eduHD2o.value.length)
	   {
		   alert("Please enter your Couse");
		   document.formn.eduHD2o.focus();
		   return false;
		}
		if (document.formn.edu2Spe1.options[document.formn.edu2Spe1.selectedIndex].value == 'Other') {	   
	   if (!document.formn.edu2Spe1o.value.length) {
		   alert("Please enter your specialisation");
		   document.formn.edu2Spe1o.focus();
		   return false;
		}
	}
	
	
	if (document.formn.institute2.options[document.formn.institute2.selectedIndex].value == '0') {
	   alert("Please select your institute ");
	   document.formn.institute2.focus();
	   return false;
	}
	
	
	if (document.formn.institute2.options[document.formn.institute2.selectedIndex].value == 'Other') {	   
	   if (!document.formn.Institutionother1_level2.value.length) {
		   alert("Please enter your institute");
		   document.formn.Institutionother1_level2.focus();
		   return false;
		}
	}
	
	
	
		if (document.formn.yearofpass2.options[document.formn.yearofpass2.selectedIndex].value == '0') {
	   alert("Please select your Year of Completion ");
	   document.formn.yearofpass1.focus();
	   return false;
	}
	
	
}
else if (document.formn.edu2HD1.options[document.formn.edu2HD1.selectedIndex].value == '-NA-') 
{
	
}
else
{
	
	if (document.formn.edu2Spe1.options[document.formn.edu2Spe1.selectedIndex].value == 'Other') {	   
	   if (!document.formn.edu2Spe1o.value.length) {
		   alert("Please enter your specialisation");
		   document.formn.edu2Spe1o.focus();
		   return false;
		}
	}
	
	
	if (document.formn.institute2.options[document.formn.institute2.selectedIndex].value == '0') {
	   alert("Please select your institute ");
	   document.formn.institute2.focus();
	   return false;
	}
	
	
	if (document.formn.institute2.options[document.formn.institute2.selectedIndex].value == 'Other') {	   
	   if (!document.formn.Institutionother1_level2.value.length) {
		   alert("Please enter your institute");
		   document.formn.Institutionother1_level2.focus();
		   return false;
		}
	}
	
	
	
		if (document.formn.yearofpass2.options[document.formn.yearofpass2.selectedIndex].value == '0') {
	   alert("Please select your Year of Completion ");
	   document.formn.yearofpass2.focus();
	   return false;
	}
	
	
	
	
	
}
	
	
	
	
			if (document.formn.eduHD1.options[document.formn.eduHD1.selectedIndex].value == document.formn.edu2HD1.options[document.formn.edu2HD1.selectedIndex].value && document.formn.eduSpe1.options[document.formn.eduSpe1.selectedIndex].value == document.formn.edu2Spe1.options[document.formn.edu2Spe1.selectedIndex].value) 
	{
		alert("You have selected in same Qualification ");
		document.formn.eduHD1.focus();
	   return false;
	}
	
	
	
	
	
	
	
	

	
	
	/*if (document.formn.edu2HD1.options[document.formn.edu2HD1.selectedIndex].value == '0')
	{
	   alert("Please select your 2nd Qualification ");
	   document.formn.edu2HD1.focus();
	   return false;
	}	
	
	
	if (document.formn.edu2Spe1.options[document.formn.edu2Spe1.selectedIndex].value == '0') {
	   alert("Please select your 2nd Course ");
	   document.formn.edu2Spe1.focus();
	   return false;
	}
	
		if (document.formn.yearOfPass2.options[document.formn.yearOfPass2.selectedIndex].value == '-1') {
	   alert("Please select your 2nd Year of Passing ");
	   document.formn.yearOfPass2.focus();
	   return false;
	}
	
	if (document.formn.institute2.options[document.formn.institute2.selectedIndex].value == '-1') {
	   alert("Please select your Institute");
	   document.formn.institute2.focus();
	   return false;
	}
	
	
	
	if (document.formn.edu3HD1.options[document.formn.edu3HD1.selectedIndex].value == '0')
	{
	   alert("Please select your 3nd Qualification ");
	   document.formn.edu3HD1.focus();
	   return false;
	}	
	
	
	if (document.formn.edu3Spe1.options[document.formn.edu3Spe1.selectedIndex].value == '0') {
	   alert("Please select your 3nd Course ");
	   document.formn.edu3Spe1.focus();
	   return false;
	}
	
		if (document.formn.yearOfPass3.options[document.formn.yearOfPass3.selectedIndex].value == '-1') {
	   alert("Please select your 3nd Year of Passing ");
	   document.formn.yearOfPass3.focus();
	   return false;
	}
	
	if (document.formn.institute3.options[document.formn.institute3.selectedIndex].value == '-1') {
	   alert("Please select your Institute");
	   document.formn.institute3.focus();
	   return false;
	}
	
	*/
	
	
		
	
	
	
	if (!document.formn.txtresumetitle.value.length) {
	   alert("Please Enter the Resumetitle");
	   document.formn.txtresumetitle.focus();
	   return false;
	}
	
	

  

	
	
			if (!document.formn.file1.value.length)
			{
				if (!document.formn.txtpasteresume.value.length) 
				{
				alert( "Select one resume option" );
				document.formn.file1.focus( );
				return false;
				}
			}
			else
			{
				if(!/(\.doc|\.rtf|\.txt)$/i.test(document.formn.file1.value))
				{
				alert("Invalid Text file type.");
				document.formn.file1.focus( );
				return false;
				}
				
				
	
				

			}
			

			
			
			
			
		
		
		
	/*	if (document.formn.Available1.value == "file size should be below 300 KB")
		{
		alert("File size should be below 300 KB");
		document.formn.file1.focus( );
		return false;
		} */
	
	
	
		

if (document.formn.filesize.value > 100000) {
				alert("File size very large .Min.. 100 KB");
				document.formn.file1.focus();
				return false;
				}

	
	
	
			if (!document.formn.terms.checked) {
			alert("Please check the I accept the Terms Of Use");
			document.formn.terms.focus();
			return false;	
	}
		

	
	
	
}


function chkvis() 
{

	if(document.formn.lan1.options[document.form1.lan1.selectedIndex].value == '')
	{
		document.formn.read1.disabled=true;
		document.formn.write1.disabled=true;
		document.formn.speak1.disabled=true;
			document.formn.read1.checked=false;
		document.formn.write1.checked=false;
		document.formn.speak1.checked=false;
	

	}
	else
	{
		document.formn.read1.disabled=false;
		document.formn.write1.disabled=false;
		document.formn.speak1.disabled=false;
		document.formn.read1.checked=true;
		document.formn.write1.checked=true;
		document.formn.speak1.checked=true;	
	}
}



//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;
}



// ######### 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[7].checked &&  !id1.mode[8].checked &&  !id1.mode[9].checked &&  !id1.mode[10].checked &&  !id1.mode[11].checked &&  !id1.mode[12].checked &&  !id1.mode[13].checked &&  !id1.mode[14].checked &&  !id1.mode[15].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 Terms Of Use");
	  id1.terms.focus();
	  return false;
   }
}

// ========= Order Form [in case of HDFC or ICICI bank or UTI Back or CITI 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==0) {
		alert("Company name can not be left blank");
		document.place.comp_name.focus();
		return false;
	}

	if (document.place.cont_person.value==0) {
		alert("Contact Person name can not be left blank");
		document.place.cont_person.focus();
		return false;
	}

	if (document.place.address.value==0) {
		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 == "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==0) {
		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(' ') >=0) {
		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==0) {
		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 the I accept the Terms Of Use");
			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;
		}
	} else {
		if (document.place.state2.value=="^") {
			alert ("Please select atleast one State");
			document.place.state1.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 showselected(element,divId)
{
	var type = element.type;
	var selectDynamicText = "<b>You have selected:</b><br>";
	var sz =0;
	
	if(type == 'select-multiple')
	{
	    for(var c=0; c < element.options.length; c++) 
		{
				if(element.options[c].selected == true)
				{
				    sz++;
					selectDynamicText += element.options[c].text+ '<br>';
				}
		}
        
	}

	if(type == 'select-one')
	{
		sz = element.selectedIndex;
			if (sz > 0 ) 
			{
				selectDynamicText += ' '+ element.options[sz].text;
			}
	}
	 	if(sz <= 0)
            selectDynamicText = "";
		 	writeContent(divId,selectDynamicText);
 }
 
 
 

function makeEnable(element1,element2)
 {

	var type = element1.type;
	// For Other location text box
	if(type == 'select-one' || type == 'select-multiple')
	{
		  var flag = false;
	      for(var c=0; c < element1.options.length; c++)
		  {
	         if(element1.options[c].selected == true) 
			 {
				   if((element1.options[c].text).indexOf("Other") != -1 || (element1.options[c].title).indexOf("Other") != -1 )
						flag = true; 
			  }
	      }
		if(flag == true)
			document.getElementById(element2).style.display='';
		else
			document.getElementById(element2).style.display = 'none';
	}
  
  }
  
  

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==0) {
		alert("Company name can not be left blank");
		document.place.comp_name.focus();
		return false;
	}

	if (document.place.cont_person.value==0) {
		alert("Contact Person name can not be left blank");
		document.place.cont_person.focus();
		return false;
	}

	if (document.place.address.value==0) {
		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==0) {
		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(' ') >=0) {
		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==0) {
		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();
}

function oChk() {
	 if (!document.place.subsc[0].checked && !document.place.subsc[1].checked && !document.place.subsc[2].checked && !document.place.subsc[3].checked && !document.place.subsc[4].checked && !document.place.subsc[5].checked &&  !document.place.subsc[6].checked &&  !document.place.subsc[7].checked &&  !document.place.subsc[8].checked &&  !document.place.subsc[9].checked &&  !document.place.subsc[10].checked &&  !document.place.subsc[11].checked &&  !document.place.subsc[12].checked &&  !document.place.subsc[13].checked &&  !document.place.subsc[14].checked &&  !document.place.subsc[15].checked) {
		 document.place.subsc[0].focus();
         alert("Please check Your Subscription Plan");
         return false;
      }

	 if (!document.place.mode[0].checked && !document.place.mode[1].checked && !document.place.mode[2].checked && !document.place.mode[3].checked && !document.place.mode[4].checked && !document.place.mode[5].checked &&  !document.place.mode[6].checked &&  !document.place.mode[7].checked && !document.place.mode[8].checked && !document.place.mode[9].checked) {
		 document.place.mode[0].focus();
         alert("Please check Your mode of Payment");
         return false;
      }

	  if (!document.place.terms.checked) {
		  alert("Please check the I accept the Terms Of Use");
		  document.place.terms.focus();
		  return false;
	  }
}



// =============== 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;
		}
	}
}

function advac_chkSelection() {
	document.place.part_jobty[0].disabled=true;
	document.place.part_jobty[1].disabled=true;
	document.place.part_jobty[2].disabled=true;
	document.place.pt_work_type[0].disabled=true;
	document.place.pt_work_type[1].disabled=true;
	document.place.pt_work_type[2].disabled=true;
	document.place.part_salary.selectedIndex="null";
	document.place.part_salary.disabled=true;
	if (document.place.job_type[1].checked) {
		document.place.full_salary.selectedIndex="null";
		document.place.full_salary.disabled=true;
		document.place.part_jobty[0].disabled=false;
		document.place.part_jobty[1].disabled=false;
		document.place.part_jobty[2].disabled=false;
		document.place.pt_work_type[0].disabled=false;
		document.place.pt_work_type[1].disabled=false;
		document.place.pt_work_type[2].disabled=false;
		document.place.part_salary.disabled=false;
		document.place.l_cont.disabled=true;
		document.place.cont_oth.disabled=true;
		document.place.state.disabled=true;
		document.place.state1.disabled=true;
		document.place.l_city.disabled=true;
	}
	if (document.place.job_type[0].checked) {
		document.place.full_salary.selectedIndex="null";
		document.place.full_salary.disabled=false;
		document.place.l_cont.disabled=false;
		document.place.cont_oth.disabled=false;
		document.place.state.disabled=false;
		document.place.state1.disabled=false;
		document.place.l_city.disabled=false;
	}
}

function ban_chkSelection() {
	document.place.catg.disabled=true;
	if (document.place.subsc[1].checked || document.place.subsc[2].checked) {
		document.place.catg.disabled=false;
	}
}

function ban_chk() {
	if ((!document.place.mode[0].checked) && (!document.place.mode[1].checked) && (!document.place.mode[2].checked) && (!document.place.mode[3].checked) && (!document.place.mode[4].checked) && (!document.place.mode[5].checked) && (!document.place.mode[6].checked) && (!document.place.mode[7].checked) && (!document.place.mode[8].checked) && (!document.place.mode[9].checked)) {
	   document.place.mode[0].focus();
       alert("Please check Your mode of Payment");
       return false;
    }

    if (!document.place.cperson.value.length) {
	   alert("Please Specify Contact Person Name");
	   document.place.cperson.focus();
	   return false;
	}

    if (!document.place.email.value.length) {
	   alert("Please Specify Your E-mail ID");
	   document.place.email.focus();
	   return false;
	}
	if (document.place.email.value.indexOf('@') == -1) {
	   alert("Error in E-mail address");
	   document.place.email.focus();
	   return false;
	}
	if (document.place.email.value.indexOf('.') == -1) {
	   alert("Error in E-mail address");
	   document.place.email.focus();
	   return false;
	}
	if (document.place.email.value.indexOf('@') != document.place.email.value.lastIndexOf('@')) {
	   alert("Please Specify One E-mail address only");
	   document.place.email.focus();
	   return false;
	}
	if (document.place.email.value.indexOf('@placementindia.com') >= 0) {
		alert("Please specify a valid E-mail address");
		document.place.email.focus();
		return false;
	}

	if ((!document.place.bfile.value.length) && (!document.place.burl.value.length) && (!document.place.msg1.value.length)) {
		alert("Banner Details cannot be left blank");
		document.place.bfile.focus();
		return false;
	}

	if ((!document.place.lurl.value.length) && (!document.place.freepg.checked)) {
		alert("Please mention the link to your banner");
		document.place.lurl.focus();
		return false;
	}

	if (!document.place.terms.checked) {
       alert("Please accept the Terms Of Use");
       document.place.terms.focus();
       return false;
	}

}
// ========== employer registration form ==========

function chkEmpRegis1() {
	if (document.place.comp_name.value==0) {
		alert("Company name can not be left blank");
		document.place.comp_name.focus();
		return false;
	}
	if (document.place.cont_person.value==0) {
		alert("Contact Person name can not be left blank");
		document.place.cont_person.focus();
		return false;
	}
	if (document.place.address.value==0) {
		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==0) {
		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(' ') >=0) {
		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==0) {
		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 Terms Of Use");
			document.place.terms.focus();
			return false;
		}
	}
}

// ========== Catalog Enquiry Form Start ==========

function catalog_enquiry() {
	if (document.formn.comp_name.value==0) {
		alert("Please provide Your Company Name");
		document.formn.comp_name.focus();
		return false;
	}
	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;
	}
}

// ========== Catalog Enquiry Form End  ==========


// ========== CCard Selection Form Start  ==========

function chkSelection() {
	//alert(place.emp_plan.value);
	if(place.emp_plan.value=="emp_othPay") {
		place.emp_cur_type.disabled=false
		place.emp_user_amount.readOnly=false
	}
	else {
		place.emp_cur_type.selectedIndex=0;
		place.emp_cur_type.disabled=true
		place.emp_user_amount.value='';
		place.emp_user_amount.readOnly=true
	}
	chkSelection2();
}

function chkSelection2() {
	//alert(place.emp_plan.value);
	if(place.js_plan.value=="js_othPay") {
		place.js_cur_type.disabled=false
		place.js_user_amount.readOnly=false
	}
	else {
		place.js_cur_type.selectedIndex=0;
		place.js_cur_type.disabled=true
		place.js_user_amount.value='';
		place.js_user_amount.readOnly=true
	}
}
// ========== CCard Selection Form End  ==========

function chk_bus_list()  {
	var msg = "\nDo not leave the following fields blank\n";
	var key = "";

	if (document.formn.cn.value==0) {
		alert("Please specify the name of the company");
		document.formn.cn.focus();
		return false;
	}

	if (document.formn.yn.value==0) {
		alert("Please specify the name of the contact person");
		document.formn.yn.focus();
		return false;
	}

	form_1 = document.formn.catg.selectedIndex;
	form_11 = document.formn.catg.options[form_1].value;
	if (form_11 == "x") {
		alert("Please select a Category");
		document.formn.catg.focus();
		return false;
	}

	if (document.formn.add.value==0) {
		alert("Please specify the company address");
		document.formn.add.focus();
		return false;
	}

	form_2 = document.formn.state.selectedIndex;
	form_22 = document.formn.state.options[form_2].value;

	if (form_22 == "0" )  {
		alert("Please select the State / U.T.");
		document.formn.state.focus();
		return false;
	}

	form_3 = document.formn.city.selectedIndex;
	form_33 = document.formn.city.options[form_3].value;
	if (form_33 == "Select City" || form_33 == "0")  {
		alert("Please select the City");
		document.formn.city.focus();
		return false;
	}


	if (document.formn.pin.value>0) {
		if (isNaN(document.formn.pin.value)) {
			alert("Unable to submit!! Pincode can be numeric only");
			document.formn.pin.focus();
			return false;
		}
		if (document.formn.pin.value.length!= 6) {
			alert("Unable to submit!! Pin code must be of length 6 characters");
			document.formn.pin.focus();
			return false;
		}
	}
	if (document.formn.city_code1.value==0) {
		alert("Please enter the city code");
		document.formn.city_code1.focus();
		return false;
	}
	else {
		if (isNaN(document.formn.city_code1.value)) {
			alert("Unable to submit!! City Code can be numeric only");
			document.formn.city_code1.focus();
			return false;
		}
	}
	if (document.formn.ph.value==0 ) {
		alert("Please enter the phone number");
		document.formn.ph.focus();
		return false;
	}
	else {
		if (isNaN(document.formn.ph.value)) {
			alert("Unable to submit!! Phone Number can be numeric only");
			document.formn.ph.focus();
			return false;
		}
	}
	if (document.formn.username.value==0) {
		alert("E-Mail ID can't be left blank");
		document.formn.username.focus();
		return false;
	}

	if (document.formn.username.value.indexOf('@') == -1) {
		alert("E-mail you have Mentioned is not correct");
		document.formn.username.focus();
		return false;
	}

	if (document.formn.username.value.indexOf('.') == -1) {
		alert("E-mail you have Mentioned is not correct");
		document.formn.username.focus();
		return false;
	}

	if (document.formn.detl.value==0) {
		alert("Details can't be left blank");
		document.formn.detl.focus();
		return false;
	}

	if (document.formn.detl.value.length > 1000 ) {
		alert("Details can't be more then 1000 Characters");
		document.formn.detl.focus();
		return false;
	}

	if (document.formn.pass.value== 0) {
		alert("Password Can't be left blank");
		document.formn.pass.focus();
		return false;
	}

	if (document.formn.repass.value== 0) {
		alert("Please Re-enter your Password");
		document.formn.repass.focus();
		return false;
	}
	if (document.formn.pass.value != document.formn.repass.value) {
		alert("Password and Re-Entered Password should be same");
		document.formn.repass.focus();
		return false;
	}
}

function chkListKeyword3()  {
	getLocations1();

	id2=document.place.job_type.value;

	if (document.place.catg2.value=="^") {
		alert ("Please select atleast one Category");
		document.place.catg1.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;
	}
	alert (document.place.vac_detl.value.length+" Do not leave the Job Details blank");
	return false;
	if (document.place.vac_detl.value.length==0) {
		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;
		}
	}
	else {
		if (document.place.state2.value=="^") {
			alert ("Please select atleast one State");
			document.place.state1.focus();
			return false;
		}
	}

	if (!document.place.l_city.value.length) {
		alert ("Do not leave the Cities blank");
		document.place.l_city.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;
		}
	}
	document.place.submit();
}

function chkListVac()  {
	getLocations1();
	if (document.place.catg2.value=="^") {
		alert ("Please select atleast one Category");
		document.place.catg1.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;

	}
	if (document.place.job_type[0].checked) {
		id2=document.place.job_type[0].value;
		form_3 = document.place.full_salary.selectedIndex;
		form_33 = document.place.full_salary.options[form_3].value;
		if (form_33=="x") {
			alert("Please Specify the Salary Offered");
			document.place.full_salary.focus();
			return false;
		}

	}

	else {
		id2=document.place.job_type[1].value;
		form_3 = document.place.part_salary.selectedIndex;
		form_33 = document.place.part_salary.options[form_3].value;
		if (form_33=="x") {
			alert("Please Specify the Salary Offered");
			document.place.part_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.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;
		}
	}

	document.place.submit();

}

// ========== Home Page Search  ==========

function chk_frnd_valid() {
	if (!document.f1.ynm.value.length) {
		alert("Please enter your name");
	  	document.f1.ynm.focus();
	  	return false;
	}
	if (!document.f1.yem.value.length) {
		alert("Please enter your e-mail");
	  	document.f1.yem.focus();
	  	return false;
	}
	if (document.f1.yem.value.indexOf('@') == -1) {
	  	alert("Error in your e-mail address");
	  	document.f1.yem.focus();
	  	return false;
	}
	if (document.f1.yem.value.indexOf('.') == -1) {
	  	alert("Error in your e-mail address");
	  	document.f1.yem.focus();
	  	return false;
	}
	if (!document.f1.fnm.value.length) {
		alert("Please enter your friend's name");
	  	document.f1.fnm.focus();
	  	return false;
	}
	if (!document.f1.fem.value.length) {
	  	alert("Please enter your friend's e-mail");
	  	document.f1.fem.focus();
	  	return false;
	}
	if (document.f1.fem.value.indexOf('@') == -1) {
	  	alert("Error in your friend's e-mail address");
	  	document.f1.fem.focus();
	  	return false;
	}
	if (document.f1.fem.value.indexOf('.') == -1) {
	  	alert("Error in your friends e-mail address");
	  	document.f1.fem.focus();
	  	return false;
	}
}
// ========== Forward to Friend Form Start  ==========
function srchchkhome() {
	for (var i = 0; i < document.srchform.elements.length; i++) {
		ename = document.srchform.elements[i].name ;
		if (ename == 'field_type[]') {
			var n = 0;
			for ( opt = 0; opt < document.srchform.elements[i].options.length; opt++) {
				if (document.srchform.elements[i].options[opt].selected==true)
				n++;
			}

			if ( n < 1 ) {
				alert("Select Atleast One Category");
				document.srchform.elements[i].focus();
				return false;
				break;
			}

			if ( n > 3 ) {
				alert("You cannot select more than 3 categories");
				document.srchform.elements[i].focus();
				return false;
				break;
			}
		}
	}

   	if (document.srchform.state.options[document.srchform.state.selectedIndex].value == "x") {
	   alert("Please select one State");
	   document.srchform.state.focus();
	   return false;
	}

   if ((document.srchform.state.value=="") && (document.srchform.resi.checked)) {
      alert("Don't check the Residential State Option");
      document.srchform.resi.focus();
      return false;
   }
}

function setval(val){
    window.status=val;
    window.defaultStatus=val;
}


function go1(nm1) {
  if (document.formn2.rtype[0].checked) {
     location='../job-recruiters/vac_srchn.php?catg='+nm1+'&rtype=full';
     return false;
  }
  else {
     location='../job-recruiters/vac_srchn.php?catg='+nm1+'&rtype=part';
     return false;
  }
}
var pop = '';
function openwinVac(nm) {
   var name=nm;
   if (pop && !pop.closed) {
         pop.close();
   }
   pop=eval("window.open('"+name+"','NewWIN','chrome[4],toolbar=no,top=10,left=20,width=500,height=400,directories=no,menubar=no,SCROLLBARS=yes')");
   if (!pop.opener) popUpWin.opener = self;
}