// JavaScript Document
if (document.images)
{
button1 = new Image;
button2 = new Image;
button3 = new Image;
button4 = new Image;
button5 = new Image;
button6 = new Image;
button1.src = 'image/self.gif';
button2.src = 'image/self2.gif';
button3.src = 'image/candidates.gif';
button4.src = 'image/candidates2.gif';
button5.src = 'image/employee.gif';
button6.src = 'image/employee2.gif';
}
function tryforfreeClick(clk)
{
var homepg=document.getElementById('homepg');
var email=document.getElementById('email');
var customizecv=document.getElementById('customizecv');
var login=document.getElementById('login');
var signup=document.getElementById('signup');
var contactus=document.getElementById('contactus');
var forgotpassword=document.getElementById('forgotpassword');
var tryfree=document.getElementById('tryfree');
homepg.style.visibility="hidden";
email.style.visibility="hidden";
customizecv.style.visibility="hidden";
login.style.visibility="hidden";
signup.style.visibility="visible";
contactus.style.visibility="hidden";
forgotpassword.style.visibility="hidden";
tryfree.value=clk;
}
function displaydiv(divid)
{
var homepg=document.getElementById('homepg');
var email=document.getElementById('email');
var customizecv=document.getElementById('customizecv');
var login=document.getElementById('login');
var signup=document.getElementById('signup');
var contactus=document.getElementById('contactus');
var forgotpassword=document.getElementById('forgotpassword');
switch(divid)
{
case 'homepg':
            homepg.style.visibility="visible";
			email.style.visibility="hidden";
			customizecv.style.visibility="hidden";
			login.style.visibility="hidden";
			signup.style.visibility="hidden";
			contactus.style.visibility="hidden";
			forgotpassword.style.visibility="hidden";
			break;
case 'email':
            homepg.style.visibility="hidden";
			email.style.visibility="visible";
			customizecv.style.visibility="hidden";
			login.style.visibility="hidden";
			signup.style.visibility="hidden";
			contactus.style.visibility="hidden";
			forgotpassword.style.visibility="hidden";
			break;
case 'customizecv':
            homepg.style.visibility="hidden";
			email.style.visibility="hidden";
			customizecv.style.visibility="visible";
			login.style.visibility="hidden";
			signup.style.visibility="hidden";
			contactus.style.visibility="hidden";
			forgotpassword.style.visibility="hidden";
			break;
case 'login':
            homepg.style.visibility="hidden";
			email.style.visibility="hidden";
			customizecv.style.visibility="hidden";
			login.style.visibility="visible";
			signup.style.visibility="hidden";
			contactus.style.visibility="hidden";
			break;
case 'signup':
            homepg.style.visibility="hidden";
			email.style.visibility="hidden";
			customizecv.style.visibility="hidden";
			login.style.visibility="hidden";
			signup.style.visibility="visible";
			contactus.style.visibility="hidden";
			forgotpassword.style.visibility="hidden";
			break;
case 'contactus':
            homepg.style.visibility="hidden";
			email.style.visibility="hidden";
			customizecv.style.visibility="hidden";
			login.style.visibility="hidden";
			signup.style.visibility="hidden";
			contactus.style.visibility="visible";
			forgotpassword.style.visibility="hidden";
			break;				
case 'forgotpassword':
            homepg.style.visibility="hidden";
			email.style.visibility="hidden";
			customizecv.style.visibility="hidden";
			login.style.visibility="hidden";
			signup.style.visibility="hidden";
			contactus.style.visibility="hidden";
			forgotpassword.style.visibility="visible";
			break;				
default:
            homepg.style.visibility="visible";			
			email.style.visibility="hidden";
			customizecv.style.visibility="hidden";
			login.style.visibility="hidden";
			signup.style.visibility="hidden";
			contactus.style.visibility="hidden";
			forgotpassword.style.visibility="hidden";
			break;	
}
}
function validate()
{
if(document.login.username.value==""){alert("Enter username"); return false;}
else{ 
if(echeck(document.login.username.value)==0){alert ("Invalid username"); return false;} }
if(document.login.password.value==""){alert("Enter  password"); return false;} 
}
function echeck(str) 
{
		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){return (false);}
		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){return (false);}
		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){return (false);}
        if (str.indexOf(at,(lat+1))!=-1){return (false);}
        if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){return (false);}
        if (str.indexOf(dot,(lat+2))==-1){return (false);}
        if (str.indexOf(" ")!=-1){return(false);}
		return (true);
}	
function signupvalidate()
{	
if(document.registration.name.value==""){alert("Enter Name");return false;}
if(document.registration.date.value==""){alert("Select Date of birth");return false;}
if(document.registration.month.value==""){alert("Select Month of birth");return false;}
if(document.registration.year.value==""){alert ("Select Year of birth");return false;}
if(document.registration.current.value==""){alert("Enter Current Location");return false;}
if(document.registration.contactnum.value==""){alert("Enter Contact Number");return false;}
else
{
	TestVar = isNumberString (document.registration.contactnum.value);
	if (TestVar == 0)
	{ 
		alert ("Invalid contact number");
		return false;   
	}
}
if(document.registration.email.value==""){alert("Enter Email ID");return false;}
else
{
	if(echeck(document.registration.email.value)==0)
	{
	alert("Invalid E-mail ID");
	return false;
	}
}
if(document.registration.password.value==""){alert("Enter Password");return false;}
if(document.registration.cpassword.value==""){alert("Confirm Password");return false;}
if(document.registration.password.value == document.registration.cpassword.value)
{	
	var str=document.registration.password.value;
	if(str.length<7)
	{
	alert("Tha Password should have minimum 8 characters");
	return false;
	}
}
else
{
	alert("Password does not match");
	return false;
} 
if(document.registration.couponnum.value!="")
{
var coupon=document.registration.couponnum.value;
	if(coupon.length!=6)
	{
	alert ("Invalid Coupon Number/Promocode");
	return false;
	}
}
if(document.registration.terms.checked== false ){alert('You must accept the terms & conditions');return false;}  
}
function isNumberString (InString)  
{
    if(InString.length==0) return (false); 
    var RefString="1234567890";
    for (Count=0; Count < InString.length; Count++)  
	{
        TempChar= InString.substring (Count, Count+1);
        if (RefString.indexOf (TempChar, 0)==-1) return (false);
    }
    return (true);
}
function contactusvalidate()
{
if(document.contact.name.value==""){alert ("Enter name");return false;}

if(document.contact.email.value==""){alert("Enter Email ID");return false;}
else
{
	if(echeck(document.contact.email.value)==0)
	{
	alert("Invalid E-mail ID");
	return false;
	}
}
if(document.contact.city.value==""){alert ("Enter city");return false;}
if(document.contact.contact.value==""){alert ("Enter contact");return false;}
if(document.contact.subject.value==""){alert ("Enter subject");return false;}
}
function forgotpasswordvalidate()
{
if(document.forgotpassword.email.value==""){alert ("Enter the E-mail ID");return false;}
else
{
if(echeck(document.forgotpassword.email.value)==0){alert ("Invalid E-mail ID");return false;}return true;}
}
//displayTemplate.php script
function selected(a)
{
var i;
obj=document.getElementById(a);
var x=document.images.length;
document.choosetemplate.template.value=a;
for(i=1;i<=x-5;i++)
{
obj2=document.getElementById(i);
if(i==a)
{
obj.style.border="2px solid #af0001"; 
obj.style.padding="3px";
}
else
{
obj2.style.border="2px solid #D7D6D6"; 
obj2.style.padding="3px";
}
}
}
function validhidden()
{
if(document.choosetemplate.template.value=="" || document.choosetemplate.template.value==0){alert("Choose a template for your CV");return false;}
}
//personalDetails.php
function personaldetailsvalidate()
{
if(document.mydetails_form.personaldetailsname.value==""){alert("Enter First name");return false;}
if(document.mydetails_form.colorname.value==""){alert("Choose a color for your Name and Description");return false;} 
if(document.mydetails_form.description.value==""){alert("Enter Description");return false;}
if(document.mydetails_form.objective.value==""){alert("Enter Career Objective");return false;} 
if(document.mydetails_form.fname.value==""){alert("Enter Father's/Husband's Name");return false;}
if(document.mydetails_form.fnameselect.value==-1){alert("Choose Father/Husband");return false;}
if ((document.mydetails_form.gender[0].checked == false ) && ( document.mydetails_form.gender[1].checked == false ) )
{alert ( "Choose your Gender" );return false;}
if(document.mydetails_form.mstatus.value=="-1"){alert("Select Marital status");return false;}
if(document.mydetails_form.mstatus.value=="Married")
{if(document.mydetails_form.noofchild.value==""){alert("Enter number of Children - 0 if none");return false;}}
if(document.mydetails_form.currentlocation.value==""){alert("Enter Current location");return false;}
if(document.mydetails_form.address1.value=="" && document.mydetails_form.address2.value==""){alert("Enter Address");return false;}
if(document.mydetails_form.locality.value=="") {alert("Enter Locality");return false;}
if(document.mydetails_form.city.value=="") {alert("Enter City");return false;}
if(document.mydetails_form.pin.value==""){alert("Enter Pincode");return false;}
if(document.mydetails_form.country.value=="-1") {alert("Select Country");return false;}
else
{
if(document.mydetails_form.country.value=="Other"){
if(document.mydetails_form.ocountry.value==""){alert("Enter Country");return false;}}
}
if(document.mydetails_form.paddress1.value==""&& document.mydetails_form.paddress2.value==""){alert("Enter Permanent Address or click the check box if it is same as the current address");return false;}
if(document.mydetails_form.plocality.value=="") {alert("Enter Locality");return false;}
if(document.mydetails_form.pcity.value=="") {alert("Enter City");return false;}
if(document.mydetails_form.ppin.value==""){alert("Enter Pincode");return false;}
if(document.mydetails_form.pcountry.value=="-1") {alert("Select Country");return false;}
else
{
if(document.mydetails_form.pcountry.value=="Other"){
if(document.mydetails_form.pocountry.value==""){alert("Enter Country");return false;}}
}
if(document.mydetails_form.email.value==""){alert("Enter Email ID");return false;}
if(document.mydetails_form.mobile.value=="" && document.mydetails_form.contactnum.value=="" )
{alert("Enter any contact number");return false;}
if(document.mydetails_form.mobile.value!="")
{if(isNumberString(document.mydetails_form.mobile.value)==0){alert("Enter valid Mobile number");return false;}}
if(document.mydetails_form.contactnum.value!="")
{if(isNumberString(document.mydetails_form.contactnum.value)==0){alert("Enter valid Landline number");return false;}}
if(echeck(document.mydetails_form.email.value)==0){alert("Invalid E-mail ID");	return false;}
}
function displayRemark()
{
   if(document.mydetails_form.mstatus.value!="Married")
   document.getElementById("remarks").style.visibility = "hidden";
   else
   document.getElementById("remarks").style.visibility = "";        
}
function displayOther2()
{
	obj=document.getElementById('country');
	obj2=document.getElementById('ocountry');
    if(obj.selectedIndex=='47')
	{
	obj2.style.visibility="";
	}
	else
	{
	obj2.style.visibility="hidden";
	}
}
function addrcheck()
{
var a=document.mydetails_form.same.checked;
	if(a==true)
	{
	document.mydetails_form.paddress1.value=document.mydetails_form.address1.value;
	document.mydetails_form.paddress2.value=document.mydetails_form.address2.value;
	document.mydetails_form.plocality.value=document.mydetails_form.locality.value;
	document.mydetails_form.pcity.value=document.mydetails_form.city.value;
	document.mydetails_form.ppin.value=document.mydetails_form.pin.value;
	//alert(document.getElementById('country').value);
	document.mydetails_form.pcountry.value=document.mydetails_form.country.value;
	}
	if(a==false)
	{
	document.mydetails_form.paddress1.value="";
	document.mydetails_form.paddress2.value="";
	document.mydetails_form.plocality.value="";
	document.mydetails_form.pcity.value="";
	document.mydetails_form.ppin.value="";
	document.mydetails_form.pcountry.value="Select Country";
	}
}
function bordercolorset(str)
{
document.getElementById(str).border="1";
obj=document.getElementById(str);
obj.style.color="#af0001";
}
function bordercolorreset(str)
{
document.getElementById(str).border="1";
obj=document.getElementById(str);
obj.style.color="#FFFFFF";
}
function colorvalue1()
{document.mydetails_form.colorname.value="";document.mydetails_form.colorname.value="Black";}
function colorvalue2()
{document.mydetails_form.colorname.value="";document.mydetails_form.colorname.value="White";}
function colorvalue3()
{document.mydetails_form.colorname.value="";document.mydetails_form.colorname.value="Navy";}
function colorvalue4()
{document.mydetails_form.colorname.value="";document.mydetails_form.colorname.value="Grey";}
function colorvalue5()
{document.mydetails_form.colorname.value="";document.mydetails_form.colorname.value="Purple";}
function colorvalue6()
{document.mydetails_form.colorname.value="";document.mydetails_form.colorname.value="Olive";}
function displayfather()
{
obj=document.getElementById("selfatoccupation");
obj.style.visibility="visible";
val=document.mydetails_form.fnameselect.value;
if(val=='-1'){document.mydetails_form.selhusoccupation.value="";}
else {document.mydetails_form.selhusoccupation.value=val+"'s occupation";}
}
function getObject(obj)
{
  var theObj;
  if(document.all) {
    if(typeof obj=="string") {
      return document.all(obj);
    } else {
      return obj.style;
    }
  }
  if(document.getElementById) {
    if(typeof obj=="string") {
      return document.getElementById(obj);
    } else {
      return obj.style;
    }
  }
  return null;
}
function toCount(entrance,exit,text,characters) {
  var entranceObj=getObject(entrance);
  var exitObj=getObject(exit);
  var length=characters - entranceObj.value.length;
  if(length <= 0) {
    length=0;
    text='<span class="disable"> '+text+' </span>';
    entranceObj.value=entranceObj.value.substr(0,characters);
  }
  exitObj.innerHTML = text.replace("{CHAR}",length);
}
//educationalDetails.php
function displaydoj()
{
obj=document.getElementById('dojtype');
obj2=document.getElementById('notice');
obj3=document.getElementById('bydate');
if(obj.selectedIndex==1)
{
obj2.style.visibility="hidden";
obj3.style.visibility="hidden";
}
if(obj.selectedIndex==2)
{
obj2.style.visibility="";
obj3.style.visibility="hidden";
}
if(obj.selectedIndex==3)
{
obj2.style.visibility="hidden";
obj3.style.visibility="";
}
if(obj.selectedIndex==0)
{
obj2.style.visibility="hidden";
obj3.style.visibility="hidden";
}
}
function addEvent()
{
	var ni = document.getElementById("asd");
	var numi = document.getElementById("theValue");
	var num = (document.getElementById("theValue").value-1)+1;
	numi.value = num;
	var divIdName = num;
	var newdiv = document.createElement("div");
	newdiv.setAttribute("id",divIdName);
	newdiv.innerHTML = "<table width='100%'><tr><td width='2%' align='left'>"+num+".</td><td width='24%' align='left'>Project title </td><td width='64%' align='left'>&nbsp;<input type='text' size='55' name='oprojtitle"+num+"'/></td><td width='10%' align='left'>&nbsp;</td></tr><tr><td colspan='2' valign='top' align='left'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Project description </td><td align='left'>&nbsp;<textarea cols='55' rows='3' name='oprojdesc"+num+"'></textarea></td><td align='left'><a href=\"javascript:;\" onclick='removeEvent("+num+")'>Remove</a></td></tr></table>";
	ni.appendChild(newdiv);
	document.mydetails_form.hidn.value=num+1;
}
function removeEvent(num)
{
var d = document.getElementById('asd');
var olddiv = document.getElementById(num);
d.removeChild(olddiv);
document.mydetails_form.hidn.value=num;
}
function addEvent1()
{
var ni = document.getElementById('addlanguages');
var numi = document.getElementById('theValue1');
var num = (document.getElementById("theValue1").value -1)+1;
numi.value = num;
var divIdName = num;
var newdiv = document.createElement('div');
newdiv.setAttribute("id",divIdName);
newdiv.innerHTML = "<table cellspacing='0' cellpadding='0' width='100%'><tr><td width='45%'><input type='text' name='otrlanguage"+num+"'/></td><td width='13%'><input type='checkbox' name='read"+num+"' value='r'/></td><td width='13%'><input type='checkbox' name='write"+num+"' value='w'/></td><td width='13%'><input type='checkbox' name='speak"+num+"' value='s'/></td><td width='16%'><a href=\"javascript:;\" onclick=\"removeEvent1('"+num+"')\">Remove </a></td></tr></table>";
ni.appendChild(newdiv);
document.mydetails_form.notrlang.value=num+1;
}
function removeEvent1(num)
{
var d = document.getElementById('addlanguages');
var olddiv = document.getElementById(num);
d.removeChild(olddiv);
document.mydetails_form.notrlang.value=num;
}
function addEvent2()
{
var ni = document.getElementById('references');
var numi = document.getElementById('theValue2');
var num = (document.getElementById("theValue2").value -1)+ 1;
numi.value = num;
var divIdName =num;
//alert(num);
var newdiv = document.createElement('div');
newdiv.setAttribute("id",divIdName);
newdiv.innerHTML = "<table width='100%'><tr><td colspan='4'><b>Reference - "+num+"</b></td></tr><tr><td width='26%'>Name</td><td width='29%'><input type='text' name='orefname"+num+"' size='29'></td><td width='14%'>Designation</td><td width='31%'><input type='text' name='orefdesignation"+num+"'  size='29'></td></tr><tr><td>Relationship</td><td><input type='text' name='orefrelationship"+num+"' size='29'></td><td>Known for</td><td><select name='orefknownfor"+num+"'><option value='' selected>Select</option><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option><option>7</option><option>8</option><option>9</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>25+</option></select>&nbsp;&nbsp;&nbsp;<select name='orefknownfortype"+num+"'><option value='' selected>Select</option><option>Year</option><option>Years</option><option>Month</option><option>Months</option></select></td></tr><tr><td> Contact email</td><td><input type='text' name='orefcontactemail"+num+"' size='29'></td><td>Contact number</td><td><input type='text' name='orefcontactno"+num+"' size='29'></td></tr></table>&nbsp;&nbsp;<a href=\"javascript:;\" onclick='removeEvent2("+num+")'>Remove </a>";
ni.appendChild(newdiv);
document.mydetails_form.nofref.value=num+1;
}
function removeEvent2(num)
{
var d = document.getElementById('references');
var olddiv = document.getElementById(num);
d.removeChild(olddiv);
document.mydetails_form.nofref.value=num;
}
function edudisplayOther()
{
	obj=document.getElementById('jobs');
	obj2=document.getElementById('ojob');
    if(obj.selectedIndex=='95'){obj2.style.visibility="";}
	else{obj2.style.visibility="hidden";}
}
function eduvalidate()
{
if(document.mydetails_form.jobs.value=="-1") {alert("Select prefered job");return false;}
else{if(document.mydetails_form.jobs.value=="Other"){if(document.mydetails_form.ojob.value==""){alert("Enter prefered job");return false;}}}
if(document.mydetails_form.joblocation.value==""){alert("Enter prefered job location");return false;} 
if(document.mydetails_form.currentstatus.value=="-1"){alert("Enter current status");return false;}
if(document.mydetails_form.expectedctc.value==""){alert("Enter expected salary");return false;}
//else{if(isNumberString(document.mydetails_form.expectedctc.value)==0){alert("Enter valid salary");return false;}}
if(document.mydetails_form.dojtype.value=="-1"){alert("Select the date of joining");return false;}
else
{
if((document.mydetails_form.dojtype.value=="Notice period") && (document.mydetails_form.doj3.value=="-1"))
{alert("Select notice period");return false;}
else if((document.mydetails_form.dojtype.value=="By date") && ((document.mydetails_form.dojdate.value=="-1") || (document.mydetails_form.dojmonth.value=="-1") || (document.mydetails_form.dojyear.value=="-1")))
{
alert("Select date of joining");return false;
}
}
}
//publish.php
function publishValidate()
{
if(document.uploadPhoto.image.value==""){alert ("Choose a photo to be uploaded");return false;}
}
function validate2()
{
if(document.publish.declar.checked)
{if(document.publish.declaration.value==""){alert("Enter declaration");return false;}}
}
function displayUpload()
{
	obj=document.getElementById('browse');
	obj2=document.getElementById('submit');
    if(obj.value!="")
	{
	obj2.style.visibility="";
	}
	else
	{
	obj2.style.visibility="hidden";
	}
}
//workExperience.php script
function workExperienceValidate()
{
if(document.mydetail2_form.ttlexpyears.value=="0" && document.mydetail2_form.ttlexpmonths.value=="0")
{alert("Select Total experience"); return false;}
if(document.mydetail2_form.annualsallaks.value=="" || document.mydetail2_form.annualsallaks.value=="0"){alert("Enter Annual salary"); return false;}
if(document.mydetail2_form.annualsalthous.value=="-1"){alert("Select Annual salary type"); return false;}
if(document.mydetail2_form.functionalarea.value=="-1"){alert("Select Functional area"); return false;}
else
{
if (document.mydetail2_form.functionalarea.value=="Other")
{if(document.mydetail2_form.ofunctionalarea.value==""){alert("Enter Functional area");return false;}}
}
if(document.mydetail2_form.industry.value=="-1"){alert("Select Industry"); return false;}
else
{
if (document.mydetail2_form.industry.value=="Other")
{if(document.mydetail2_form.oindustry.value==""){alert("Enter Industry");return false;}}
}
if(document.mydetail2_form.keyskills.value==""){alert("Enter Keyskills"); return false;}
if(document.mydetail2_form.curntcomp.value==""){alert("Enter Current company name"); return false;}
if(document.mydetail2_form.curntdesig.value==""){alert("Enter Current designation"); return false;}
if(document.mydetail2_form.cdfrmmonths.value=="" || document.mydetail2_form.cdfrmyears.selectedIndex==0){alert("Select Duration"); return false;}
if(document.mydetail2_form.cdjobprofile.value==""){alert("Enter Jobprofile"); return false;}
}
function addEventEmp()
{
	var ni = document.getElementById("asd");
	var numi = document.getElementById("theValue");
	var num = (document.getElementById("theValue").value-1)+1;
	numi.value = num;
	var divIdName = num;
	var newdiv = document.createElement("div");
	newdiv.setAttribute("id",divIdName);
	newdiv.innerHTML = "<table width='100%' cellspacing='0' cellpadding='0'><tr height='23'><td align='left' colspan='3'><b>PREVIOUS EMPLOYER</b></td></tr><tr height='23'><td width='16%'>&nbsp;Company Name</td><td>&nbsp;&nbsp;</td><td><input type='text' name='oprevescomp"+num+"' maxlength='150' style='width:300px'/></td></tr><tr height='23'><td>&nbsp;Designation</td><td>&nbsp;&nbsp;</td><td><input type='text' name='oprevesdesig"+num+"'/></td></tr><tr height='23'><td>&nbsp;Duration</td><td>&nbsp;&nbsp;</td><td><select name='opdfrmmonths"+num+"'><option>Jan</option><option>Feb</option><option>Mar</option><option>Apr</option><option>May</option><option>Jun</option><option>Jul</option><option>Aug</option><option>Sep</option><option>Oct</option><option>Nov</option><option>Dec</option></select>&nbsp;&nbsp;<select name='opdfrmyears"+num+"'><option value='0'>Year</option><option>1941</option><option>1942</option><option>1943</option><option>1944</option><option>1945</option><option>1946</option><option>1947</option><option>1948</option><option>1949</option><option>1950</option><option>1951</option><option>1952</option><option>1953</option><option>1954</option><option>1955</option><option>1956</option><option>1957</option><option>1958</option><option>1959</option><option>1960</option><option>1961</option><option>1962</option><option>1963</option><option>1964</option><option>1965</option><option>1966</option><option>1967</option><option>1968</option><option>1969</option><option>1970</option><option>1971</option><option>1972</option><option>1973</option><option>1974</option><option>1975</option><option>1976</option><option>1977</option><option>1978</option><option>1979</option><option>1980</option><option>1981</option><option>1982</option><option>1983</option><option>1984</option><option>1985</option><option>1986</option><option>1987</option><option>1988</option><option>1989</option><option>1990</option><option>1991</option><option>1992</option><option>1993</option><option>1994</option><option>1995</option><option>1996</option><option>1997</option><option>1998</option><option>1999</option><option>2000</option><option>2001</option><option>2002</option><option>2003</option><option>2004</option><option>2005</option><option>2006</option><option>2007</option><option>2008</option></select>&nbsp;&nbsp;to&nbsp;&nbsp;<select name='opdtomonths"+num+"'><option>Jan</option><option>Feb</option><option>Mar</option><option>Apr</option><option>May</option><option>Jun</option><option>Jul</option><option>Aug</option><option>Sep</option><option>Oct</option><option>Nov</option><option>Dec</option></select>&nbsp;&nbsp;<select name='opdtoyears"+num+"'><option value='0'>Year</option><option>1941</option><option>1942</option><option>1943</option><option>1944</option><option>1945</option><option>1946</option><option>1947</option><option>1948</option><option>1949</option><option>1950</option><option>1951</option><option>1952</option><option>1953</option><option>1954</option><option>1955</option><option>1956</option><option>1957</option><option>1958</option><option>1959</option><option>1960</option><option>1961</option><option>1962</option><option>1963</option><option>1964</option><option>1965</option><option>1966</option><option>1967</option><option>1968</option><option>1969</option><option>1970</option><option>1971</option><option>1972</option><option>1973</option><option>1974</option><option>1975</option><option>1976</option><option>1977</option><option>1978</option><option>1979</option><option>1980</option><option>1981</option><option>1982</option><option>1983</option><option>1984</option><option>1985</option><option>1986</option><option>1987</option><option>1988</option><option>1989</option><option>1990</option><option>1991</option><option>1992</option><option>1993</option><option>1994</option><option>1995</option><option>1996</option><option>1997</option><option>1998</option><option>1999</option><option>2000</option><option>2001</option><option>2002</option><option>2003</option><option>2004</option><option>2005</option><option>2006</option><option>2007</option><option>2008</option></select></td></tr><tr height='23'><td valign='top'>Job Profile</td><td>&nbsp;&nbsp;</td><td><textarea name='opdjobprofile"+num+"' cols='42' rows='3'></textarea></td></tr><tr height='23'><td colspan='2'>&nbsp;&nbsp;</td><td align='center'><a style='color:#af0001' href=\"javascript:;\" onclick='removeEventEmp("+num+")'>Remove</a></td></tr></table>";
	ni.appendChild(newdiv);
	document.mydetail2_form.otremp.value=num+1;
}
function removeEventEmp(num)
{
var d = document.getElementById('asd');
var olddiv = document.getElementById(num);
d.removeChild(olddiv);
document.mydetail2_form.otremp.value=num;
}
function displayOtherFunctionalArea()
{
	obj=document.getElementById('functionalarea');
	obj2=document.getElementById('ofunctionalarea');
	if(obj.selectedIndex=='45'){obj2.style.visibility="";}else{obj2.style.visibility="hidden";}
}
function displayOtherIndustry()
{
	obj=document.getElementById('industry');
	obj2=document.getElementById('oindustry');
	if(obj.selectedIndex=='42'){obj2.style.visibility="";}else{obj2.style.visibility="hidden";}
}
//support.php script
function supportValidate()
{
if(document.contact.name.value==""){alert ("Enter Name");return false;}
if(document.contact.email.value==""){alert ("Enter E-mail");return false;}
else {if(echeck(document.contact.email.value)==0){alert("Invalid E-mail ID");return false;}}
if(document.contact.city.value==""){alert ("Enter City");return false;}
if(document.contact.contact.value==""){alert ("Enter Contact");return false;}
if(document.contact.category.value=="-1"){alert ("Select Category");return false;}
if(document.contact.subject.value==""){alert ("Enter Subject");return false;}
if(document.contact.description.value==""){alert ("Enter Description");return false;}
}
//myAccounts.php script
function myAccountValidate()
{	
coupon=document.getElementById('coupon');
if(coupon.value!="")
{
var coupon=coupon.value;
	if(coupon.length!=6)
	{
	alert ("Invalid Coupon Number/Promocode");
	return false;
	}
}
}
function display(str)
{
var div0=document.getElementById('main');
var div1=document.getElementById('display1');
var div2=document.getElementById('congrats');
var div3=document.getElementById('customcv');
//var div4=document.getElementById('display2');
var div6=document.getElementById('reports');
var div7=document.getElementById('signups');
var div8=document.getElementById('acceptAffiliate');
switch(str)
{
case 'main':
	div0.style.visibility="visible";
	div1.style.visibility="hidden";
	div2.style.visibility="hidden";
	div3.style.visibility="hidden";
//	div4.style.visibility="hidden";
	div6.style.visibility="hidden";
	div7.style.visibility="hidden";
	div8.style.visibility="hidden";
	break;
case 'congrats':
	div0.style.visibility="hidden";
	div1.style.visibility="hidden";
	div2.style.visibility="visible";
	div3.style.visibility="hidden";
//	div4.style.visibility="hidden";
	div6.style.visibility="hidden";
	div7.style.visibility="hidden";
	div8.style.visibility="hidden";
	break;
case 'intro':
	div0.style.visibility="hidden";
	div1.style.visibility="visible";
	div2.style.visibility="hidden";
	div3.style.visibility="hidden";
//	div4.style.visibility="hidden";
	div6.style.visibility="hidden";
	div7.style.visibility="hidden";
	div8.style.visibility="hidden";
	break;
//case 'send':
//	div0.style.visibility="hidden";
//	div1.style.visibility="hidden";
//	div2.style.visibility="hidden";
//	div3.style.visibility="hidden";
//	div4.style.visibility="visible";
//	div6.style.visibility="hidden";
//	div7.style.visibility="hidden";
//	div8.style.visibility="hidden";
//	break;
case 'customcv':
	div0.style.visibility="hidden";
	div1.style.visibility="hidden";
	div2.style.visibility="hidden";
	div3.style.visibility="visible";
//	div4.style.visibility="hidden";
	div6.style.visibility="hidden";
	div7.style.visibility="hidden";
	div8.style.visibility="hidden";
	break;
case 'reports':
	div0.style.visibility="hidden";
	div1.style.visibility="hidden";
	div2.style.visibility="hidden";
	div3.style.visibility="hidden";
//	div4.style.visibility="hidden";
	div6.style.visibility="visible";
	div7.style.visibility="hidden";
	div8.style.visibility="hidden";
	break;
case 'signups':
	div0.style.visibility="hidden";
	div1.style.visibility="hidden";
	div2.style.visibility="hidden";
	div3.style.visibility="hidden";
//	div4.style.visibility="hidden";
	div6.style.visibility="hidden";
	div7.style.visibility="visible";
	div8.style.visibility="hidden";
	break;
case 'acceptAffiliate':
	div0.style.visibility="hidden";
	div1.style.visibility="hidden";
	div2.style.visibility="hidden";
	div3.style.visibility="hidden";
//	div4.style.visibility="hidden";
	div6.style.visibility="hidden";
	div7.style.visibility="hidden";
	div8.style.visibility="visible";
	break;
default:
	div0.style.visibility="visible";
	div1.style.visibility="hidden";
	div2.style.visibility="hidden";
	div3.style.visibility="hidden";
//	div4.style.visibility="hidden";
	div6.style.visibility="hidden";
	div7.style.visibility="hidden";
	div8.style.visibility="hidden";
	break;
}
if(str=="sendmail")
{
x1=document.emailsend.email1.value;
x2=document.emailsend.email1.value;
x3=document.emailsend.email1.value;
x4=document.emailsend.email1.value;
x5=document.emailsend.email1.value;
if(x1=="" && x2=="" && x3=="" && x4=="" && x5==""){alert("Enter atleast one Email-id");return false;}
else{
if(x1!=""){if(echeck(x1)==0){alert("Invalid email");return false;}else {div0.style.visibility="hidden";div1.style.visibility="hidden";div2.style.visibility="hidden";div3.style.visibility="hidden";div4.style.visibility="hidden";div6.style.visibility="hidden";div7.style.visibility="hidden";}}
if(x2!=""){if(echeck(x2)==0){alert("Invalid email");return false;}else {div0.style.visibility="hidden";div1.style.visibility="hidden";div2.style.visibility="hidden";div3.style.visibility="hidden";div4.style.visibility="hidden";div7.style.visibility="hidden";}}
if(x3!=""){if(echeck(x3)==0){alert("Invalid email");return false;}else {div0.style.visibility="hidden";div1.style.visibility="hidden";div2.style.visibility="hidden";div3.style.visibility="hidden";div4.style.visibility="hidden";div7.style.visibility="hidden";}}
if(x4!=""){if(echeck(x4)==0){alert("Invalid email");return false;}else {div0.style.visibility="hidden";div1.style.visibility="hidden";div2.style.visibility="hidden";div3.style.visibility="hidden";div4.style.visibility="hidden";div7.style.visibility="hidden";}}
if(x5!=""){if(echeck(x5)==0){alert("Invalid email");return false;}else {div0.style.visibility="hidden";div1.style.visibility="hidden";div2.style.visibility="hidden";div3.style.visibility="hidden";div4.style.visibility="hidden";div7.style.visibility="hidden";}}
}
}
}
function check()
{
document.getElementById('affiliateisactive').value=0;
}
function marq()
{
var chkval=document.getElementById('marque').checked;
if(chkval==false)
{
document.getElementById('marquee').value=0;
}
if(chkval==true)
{
document.getElementById('marquee').value=1;
}
}
function affiliateCheck()
{
var chkval=document.acceptAffiliate.acceptAffiliate.checked;
if(chkval==false)
{
alert("You should accept the terms and conditions");
return false;
}
}
function displayAmt()
{
	obj1=document.getElementById('years');
	obj2=document.getElementById('amt');
	obj3=document.getElementById('amtUSD');
	if(obj1.value!='-1')
	{
	obj2.value="Rs." + ((obj1.value)*499);
	obj3.value="($"+(Math.round((((obj1.value)*12.99))*100)/100)+")";
	document.frmpaypal.amount.value=Math.round((((obj1.value)*12.99))*100)/100;
    document.frmpaypal.item_name.value="CV Website for " + obj1.value + " Years";
	document.frmDemandDraft.itemname.value="CV Website for " + obj1.value + " Years";
	document.frmDemandDraft.amt.value=obj2.value;
	}
	else
	{
	obj2.value="";
	obj3.value="";
	document.frmpaypal.amount.value="";
    document.frmpaypal.item_name.value="";
	document.frmDemandDraft.amt.value="";		
	}
}
function displayAmtpromo()
{
	obj1=document.getElementById('years');
	obj2=document.getElementById('amtpromo');
	obj3=document.getElementById('amtUSDpromo');
	if(obj1.value!='-1')
	{	
	obj2.value="Rs." + ((obj1.value)*249);
	obj3.value="($"+Math.round((((obj1.value)*6.49))*100)/100+")";
	document.frmpaypal.amount.value=Math.round((((obj1.value)*6.49))*100)/100;
    document.frmpaypal.item_name.value="CV Website for " + obj1.value + " Years";
	document.frmDemandDraft.itemname.value="CV Website for " + obj1.value + " Years";
	document.frmDemandDraft.amt.value=obj2.value;
	}
	else
	{
	obj2.value="";
	obj3.value="";
	document.frmpaypal.amount.value="";
    document.frmpaypal.item_name.value="";	
    document.frmDemandDraft.amt.value="";	
	}
}
function displayAmtcoupon()
{
	obj1=document.getElementById('years');
	obj2=document.getElementById('amtcoupon');
	obj3=document.getElementById('amtUSDcoupon');
	if(obj1.value!='-1')
	{	
	obj2.value="Rs." +((obj1.value)*199);
	obj3.value="($"+Math.round((((obj1.value)*4.99))*100)/100+")";
	document.frmpaypal.amount.value=Math.round((((obj1.value)*4.99))*100)/100;
    document.frmpaypal.item_name.value="CV Website for " + obj1.value + " Years";
	document.frmDemandDraft.itemname.value="CV Website for " + obj1.value + " Years";
	document.frmDemandDraft.amt.value=obj2.value;
	}
	else
	{
	obj2.value="";
	obj3.value="";
	document.frmpaypal.amount.value="";
    document.frmpaypal.item_name.value="";	
    document.frmDemandDraft.amt.value="";	
	}
}
function displayPayment()
{
	obj1=document.getElementById('payment');
	obj2=document.getElementById('demandDraft');
    obj4=document.getElementById('paypal');
	if(obj1.selectedIndex=='0')
	{
	 obj4.style.visibility="hidden";
	 obj2.style.visibility="hidden";	 
	}
	if(obj1.selectedIndex=='1')
	{
	 obj4.style.visibility="";
	 obj2.style.visibility="hidden";	 
	}
	if(obj1.selectedIndex=='2')
	{
	 obj2.style.visibility="";
     obj4.style.visibility="hidden";
	}
	if(obj1.selectedIndex=='3')
	{
	 obj2.style.visibility="hidden";
     obj4.style.visibility="hidden";
	}
}
function paymentvalidate()
{
obj1=document.getElementById('years');
obj2=document.getElementById('payment');
if(obj1.value=="-1") {alert("Select number of years");return false;}
if(obj2.value=="-1") {alert("Select payment option");return false;}
if(obj3.value=="-1") {alert("Select number of years");return false;}
}
function paymentvalidate2()
{
obj1=document.getElementById('years');
if(obj1.value=="-1") {alert("Select number of years");return false;}
if(document.frmDemandDraft.ddnum.value=="") {alert("Enter Demand Draft number");return false;}
if(document.frmDemandDraft.chdate.value=="") {alert("Enter Date");return false;}
if(document.frmDemandDraft.amt.value=="") {alert("Enter Amount");return false;}
if(document.frmDemandDraft.ordernum.value=="") {alert("Enter Order number");return false;}
if(document.frmDemandDraft.bank.value=="") {alert("Enter Bank");return false;}
if(document.frmDemandDraft.branch.value=="") {alert("Enter Branch");return false;}
}
function changePasswordValidate()
{
if(document.passchange_form.oldpass.value==""){alert ("Enter old password");return false;}
if(document.passchange_form.newpass.value==""){	alert ("Enter new password");return false;}
if(document.passchange_form.renewpass.value==""){alert ("Retype password");return false;}
if((document.passchange_form.newpass.value)==(document.passchange_form.renewpass.value)){return true;}
else{alert ("The password you retyped is not same");return false;}
}

function dispjoinduty()
{
	curntstatus=document.getElementById('currentstatus').value;
	obj=document.getElementById('joiningtimeperiod');
	if(curntstatus=='Studying') obj.style.visibility='hidden'; else obj.style.visibility='visible';
}
function chkconf()
{
chk=document.mydetail2_form.confident.checked;
obj1=document.getElementById("span1");

if(chk==true)
{
document.mydetail2_form.chkhidden.value=1;
document.mydetail2_form.curntcomp.style.color="#666666";
}
if(chk==false)
{
document.mydetail2_form.chkhidden.value=0;
document.mydetail2_form.curntcomp.style.color="#000000";
}
}