function doc_win() 
{ 
	myFloater = window.open('docsel.php','Resumeupload','scrollbars=no,status=no,left=100,top=300,width=500,height=165')
    myFloater.focus("Resumeupload")
}
function emprefchk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	
	if(document.frmref.refname1.value=="")
	{
		msg1+="\r\nReferral Name can't be blank";
		if(msgflag1!=1)document.frmref.refname1.focus();
		msgflag1=1;
	}
	if(document.frmref.refdesig1.value=="")
	{
		msg1+="\r\nDesignation can't be blank";
		if(msgflag1!=1)document.frmref.refdesig1.focus();
		msgflag1=1;
	}
	if(document.frmref.refcomp1.value=="")
	{
		msg1+="\r\nCompany can't be blank";
		if(msgflag1!=1)document.frmref.refcomp1.focus();
		msgflag1=1;
	}
	if(document.frmref.refphone1.value=="")
	{
		msg1+="\r\nPhone number can't be blank";
		if(msgflag1!=1)document.frmref.refrelation1.focus();
		msgflag1=1;
	}
	
	if(document.frmref.refemail1.value!="")
	{
		
			if(!checkemail(document.frmref.refemail1.value))
			{
				 msg1+="\r\nInvalid Email ID";
				if(msgflag1!=1)document.frmref.refemail1.focus();
				msgflag1=1;
			}
	}
	/*
	if(document.frmref.refrelation1.value=="")
	{
		msg1+="\r\nMention your relationship with the Referral";
		if(msgflag1!=1)document.frmref.refrelation1.focus();
		msgflag1=1;
	}
	
	if(document.frmref.refemail1.value=="")
	{
		msg1+="\r\nEmailid can't be blank";
		if(msgflag1!=1)document.frmref.refemail1.focus();
		msgflag1=1;
	}
	*/
	
	if(document.frmref.refemail2.value!="")
	{
		
			if(!checkemail(document.frmref.refemail2.value))
			{
				 msg1+="\r\nInvalid Email ID";
				if(msgflag1!=1)document.frmref.refemail2.focus();
				msgflag1=1;
			}
	}
	if(document.frmref.refemail3.value!="")
	{
		
			if(!checkemail(document.frmref.refemail3.value))
			{
				 msg1+="\r\nInvalid Email ID";
				if(msgflag1!=1)document.frmref.refemail3.focus();
				msgflag1=1;
			}
	}
	
	if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			document.frmref.action="emp_ref_action.php";
			document.frmref.submit();
			return true;
		}
}
function emplangchk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	
	if(document.frmlang.langname1.value=="")
	{
		msg1+="\r\nLanguage can't be blank";
		if(msgflag1!=1)document.frmlang.langname1.focus();
		msgflag1=1;
	}
	if(document.frmlang.langprof1.value=="")
	{
		msg1+="\r\nProficiency can't be blank";
		if(msgflag1!=1)document.frmlang.langprof1.focus();
		msgflag1=1;
	}
	if(document.frmlang.langread1.checked==false && document.frmlang.langwrite1.checked==false && document.frmlang.langspeak1.checked== false)
	{
		msg1+="\r\nAbility[Read, Write, Speak] can't be blank";
		if(msgflag1!=1)document.frmlang.langread1.focus();
		msgflag1=1;
	}
	
	if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			document.frmlang.action="emp_lang_action.php";
			document.frmlang.submit();
			return true;
		}
}
function workexpchk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	
	if(document.frmwork.work_sequence.value=="")
	{
		msg1+="\r\nSequence can't be blank";
		if(msgflag1!=1)document.frmwork.work_sequence.focus();
		msgflag1=1;
	}
	if(isNaN(document.frmwork.work_sequence.value))
	{
		msg1+="\r\nSequence should be a number";
		if(msgflag1!=1)document.frmwork.work_sequence.focus();
		msgflag1=1;
	}
	if(document.frmwork.companyname.value=="")
	{
		msg1+="\r\nCompany can't be blank";
		if(msgflag1!=1)document.frmwork.companyname.focus();
		msgflag1=1;
	}
	if(document.frmwork.startmonth.value=="")
	{
		msg1+="\r\nStart Month can't be blank";
		if(msgflag1!=1)document.frmwork.startmonth.focus();
		msgflag1=1;
	}
	if(document.frmwork.startyear.value=="yyyy")
	{
		msg1+="\r\nStart Year can't be blank";
		if(msgflag1!=1)document.frmwork.startyear.focus();
		msgflag1=1;
	}
	
	if(document.frmwork.endmonth.value=="")
	{
		msg1+="\r\nEnd Month can't be blank";
		if(msgflag1!=1)document.frmwork.endmonth.focus();
		msgflag1=1;
	}
	if(document.frmwork.endyear.value=="yyyy")
	{
		msg1+="\r\nEnd Year can't be blank";
		if(msgflag1!=1)document.frmwork.endyear.focus();
		msgflag1=1;
	}
	if(document.frmwork.years.value!="")
	{
	if(isNaN(document.frmwork.years.value))
	{
		msg1+="\r\nYears Of Service should be a number";
		if(msgflag1!=1)document.frmwork.years.focus();
		msgflag1=1;
	}
	}
	if(document.frmwork.position.value=="")
	{
		msg1+="\r\nPosition Held can't be blank";
		if(msgflag1!=1)document.frmwork.position.focus();
		msgflag1=1;
	}
	      
			if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			document.frmwork.action="emp_work_action.php";
			document.frmwork.submit();
			return true;
		}
}
function empskillchk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	
	if(document.frmsoft.skillname1.value=="")
	{
		msg1+="\r\n Skill name can't be blank";
		if(msgflag1!=1)document.frmsoft.skillname1.focus();
		msgflag1=1;
	}
	if(document.frmsoft.skilllevel1.value=="")
	{
		msg1+="\r\nProficiency can't be blank";
		if(msgflag1!=1)document.frmsoft.skilllevel1.focus();
		msgflag1=1;
	}
	if(document.frmsoft.lastused1.value=="")
	{
		msg1+="\r\n Last Used can't be blank";
		if(msgflag1!=1)document.frmsoft.lastused1.focus();
		msgflag1=1;
	}
	if(document.frmsoft.expyears1.value=="")
	{
		msg1+="\r\n Experience Years can't be blank";
		if(msgflag1!=1)document.frmsoft.expyears1.focus();
		msgflag1=1;
	}
	if(document.frmsoft.expmonths1.value=="")
	{
		msg1+="\r\n Experience Months can't be blank";
		if(msgflag1!=1)document.frmsoft.expmonths1.focus();
		msgflag1=1;
	}
	
	if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			document.frmsoft.action="emp_skill_action.php";
			document.frmsoft.submit();
			return true;
		}
}
function resumestatchk()
{
	
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	if(document.frmstatus.resume_status.value=="")
	{
		msg1+="\r\n Resume Status can't be blank";
		if(msgflag1!=1)document.frmstatus.resume_status.focus();
		msgflag1=1;
	}
	if(document.frmstatus.selworktype.value=="")
	{
		msg1+="\r\n Work Type can't be blank";
		if(msgflag1!=1)document.frmstatus.selworktype.focus();
		msgflag1=1;
	}
	
	if(document.frmstatus.seljobstatus.value=="")
	{
		msg1+="\r\nJob Status can't be blank";
		if(msgflag1!=1)document.frmstatus.seljobstatus.focus();
		msgflag1=1;
	}
	
	if(document.frmstatus.expectedsalary.value=="")
	{
		msg1+="\r\n Expected Salary can't be blank";
		if(msgflag1!=1)document.frmstatus.expectedsalary.focus();
		msgflag1=1;
	}
	if(document.frmstatus.expectedamt.value=="")
	{
		msg1+="\r\n Expected Amount can't be blank";
		if(msgflag1!=1)document.frmstatus.expectedamt.focus();
		msgflag1=1;
	}
	if(document.frmstatus.sequence1.value=="")
	{
		msg1+="\r\n Sequence 1 can't be blank";
		if(msgflag1!=1)document.frmstatus.sequence1.focus();
		msgflag1=1;
	}  
	if(document.frmstatus.jobtitle1.value=="")
	{
		msg1+="\r\n Job Title 1 can't be blank";
		if(msgflag1!=1)document.frmstatus.jobtitle1.focus();
		msgflag1=1;
	}  
	 if(document.frmstatus.equivalentexp1.value=="")
	{
		msg1+="\r\n Equivalent Experience 1 can't be blank";
		if(msgflag1!=1)document.frmstatus.equivalentexp1.focus();
		msgflag1=1;
	} 
	if(document.frmstatus.sequence2.value=="")
	{
		msg1+="\r\n Sequence 2 can't be blank";
		if(msgflag1!=1)document.frmstatus.sequence2.focus();
		msgflag1=1;
	}  
	if(document.frmstatus.jobtitle2.value=="")
	{
		msg1+="\r\n Job Title 2 can't be blank";
		if(msgflag1!=1)document.frmstatus.jobtitle2.focus();
		msgflag1=1;
	}  
	 if(document.frmstatus.equivalentexp2.value=="")
	{
		msg1+="\r\n Equivalent Experience 2 can't be blank";
		if(msgflag1!=1)document.frmstatus.equivalentexp2.focus();
		msgflag1=1;
	} 
	 if(document.frmstatus.selworkstatus.value=="")
	{
		msg1+="\r\n Work Status can't be blank";
		if(msgflag1!=1)document.frmstatus.selworkstatus.focus();
		msgflag1=1;
	}
	 if(document.frmstatus.city.value=="")
	{
		msg1+="\r\n City can't be blank";
		if(msgflag1!=1)document.frmstatus.city.focus();
		msgflag1=1;
	}
	 if(document.frmstatus.selstate.value=="")
	{
		msg1+="\r\n  State can't be blank";
		if(msgflag1!=1)document.frmstatus.selstate.focus();
		msgflag1=1;
	}
	 if(document.frmstatus.selcountry.value=="")
	{
		msg1+="\r\n Country can't be blank";
		if(msgflag1!=1)document.frmstatus.selcountry.focus();
		msgflag1=1;
	} 
	if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			document.frmstatus.action="emp_resume_action.php";
			document.frmstatus.submit();
			return true;
		}
}
function empeduchk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	 if(document.frmedu.selcourse1.value=="")
	{
		msg1+="\r\n Qualification can't be blank";
		if(msgflag1!=1)document.frmedu.selcourse1.focus();
		msgflag1=1;
	} 
	  if(document.frmedu.selspecialization1.value=="")
	{
		msg1+="\r\n Specialization can't be blank";
		if(msgflag1!=1)document.frmedu.selspecialization1.focus();
		msgflag1=1;
	}
	if(document.frmedu.institute1.value=="")
	{
		msg1+="\r\n Institute can't be blank";
		if(msgflag1!=1)document.frmedu.institute1.focus();
		msgflag1=1;
	} 
	if(document.frmedu.completedyear1.value=="")
	{
		msg1+="\r\n Completed Year can't be blank";
		if(msgflag1!=1)document.frmedu.completedyear1.focus();
		msgflag1=1;
	} 
		if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		
		else
		{
			document.frmedu.action="emp_edu_action.php";
			document.frmedu.submit();
			return true;
		}
}
function educhk1()
{
			document.frmedu1.action="emp_edu_action.php";
			document.frmedu1.submit();
}
function setcategoryFocus()
{
	document.forms[0].catname.focus(); 
	document.forms[0].catname.select();
}
function setFormFocus() {
	document.forms[0].username.focus(); 
	document.forms[0].username.select();
}
function setpassFocus() {
	document.forms[0].oldpassword.focus(); 
	document.forms[0].oldpassword.select();
}
function seteventFocus()
	{
		document.myform.eventtitle.focus();
		document.myform.eventtitle.select();
	}

function resetchk()
{
		document.frmlogin.username.value="";
		document.frmlogin.userpass.value="";
		document.frmlogin.username.focus();
}
function logoutchk()
{
		alert("You are Signed in. Please Logout and Try again");
}
function fnuserpasschk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	if(document.frmpass.username.value=="")
	{
		msg1+="\r\nUsername can't be blank";
		if(msgflag1!=1)document.frmpass.username.focus();
		msgflag1=1;
	}
	if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			document.frmpass.action="confirmaccount.php";
			document.frmpass.submit();
			return true;
		}
}

function fncategorychk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
		if (document.myform.catname.value.length < 1)
		{
				msg1+="\r\nCategory Title can't be blank";
				if(msgflag1!=1)document.myform.catname.focus();
				msgflag1=1;
		}
		if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			return true;
		}
}
function fnbannerchk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
		if (document.myForm.uploadbanner.value.length < 1)
		{
				msg1+="\r\nBanner Image can't be blank";
				if(msgflag1!=1)document.myForm.uploadbanner.focus();
				msgflag1=1;
		}
		if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			return true;
		}
}
function fneventchk()
	{		
	
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
		if (document.myform.eventtitle.value.length < 1 && document.myform.eventtitle.value.length < 1)
		{
				msg1+="\r\nEvent Title can't be blank";
				if(msgflag1!=1)document.myform.eventtitle.focus();
				msgflag1=1;
		}
		if (document.myform.eventfdate.value.length < 1)
		{
				msg1+="\r\nEvent Start Date can't be blank";
				if(msgflag1!=1)document.myform.eventfdate.focus();
				msgflag1=1;
		}
		if (document.myform.eventtdate.value.length < 1)
		{
				msg1+="\r\nEvent End Date can't be blank";
				if(msgflag1!=1)document.myform.eventtdate.focus();
				msgflag1=1;
		}
		 if (document.myform.starttime.value.length < 1)
		{
				msg1+="\r\nEvent Start Time can't be blank";
				if(msgflag1!=1)document.myform.starttime.focus();
				msgflag1=1;
		}
		 if (document.myform.endtime.value.length < 1)
		{
				msg1+="\r\nEvent End Time can't be blank";
				if(msgflag1!=1)document.myform.endtime.focus();
				msgflag1=1;
		}
		if (document.myform.eventemail.value!="")
		{
			if(!checkemail(document.myform.eventemail.value))
			{
				 msg1+="\r\nInvalid Email ID";
				if(msgflag1!=1)document.myform.eventemail.focus();
				msgflag1=1;
			}
		}	
		if (document.myform.eventvenue.value.length < 1)
		{
				msg1+="\r\nEvent Venue can't be blank";
				if(msgflag1!=1)document.myform.eventvenue.focus();
				msgflag1=1;
		}
		if(msgflag1==1)
		{
			alert(msg1);
			return false;
		}
		else
		{
			return true;
		}
	}
function fnpasschk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	if(document.form1.oldpassword.value=="")
	{
			msg1+="\r\nOLD Password can't be blank";
		if(msgflag1!=1)document.form1.oldpassword.focus();
		msgflag1=1;
	}
	if(document.form1.newpassword.value=="")
	{
		msg1+="\r\nNEW Password can't be blank";
		if(msgflag1!=1)document.form1.newpassword.focus();
		msgflag1=1;
	}
	if(document.form1.confirmpassword.value=="")
	{
		msg1+="\r\nCONFIRM Password can't be blank";
		if(msgflag1!=1)document.form1.confirmpassword.focus();
		msgflag1=1;
	}
		if (document.form1.newpassword.value.length > 0 && document.form1.newpassword.value.length > 0)
		{
			if (document.form1.newpassword.value.length < 5)
			{
				msg1 = msg1 + '\n\tPassword must be 5 characters or more\r';
				if(msgflag1!=1) document.form1.newpassword.focus();
				msgflag1=1;
			}
			
			if (document.form1.confirmpassword.value.length < 5)
			{
				msg1 = msg1 + '\n\tConfirm Password must be 5 characters or more\r';
				if(msgflag1!=1) document.form1.confirmpassword.focus();
				msgflag1=1;
			}
			
			if (document.form1.newpassword.value != document.form1.confirmpassword.value)
			{
				msg1 = msg1 + '\n\tBoth Password and Confirm Password must be same\r';
				if(msgflag1!=1) document.form1.confirmpassword.focus();
				msgflag1=1;
			}			
		}

	if(msgflag1==1)
	{
		alert(msg1);
		return false;
	}
	else
	{
	document.form1.action="act_changepass.php";
	document.form1.submit();
	}
}
function checkavail()
	{
		var usr_id = document.myresume.username.value;
		if (usr_id.length < 5)
		{
			alert("Username must be 5 characters or more.");
			formfocus();
			return;
		}
		/*document.myresume.action="checkuserid.asp";
		document.myresume.method="post";
		document.myresume.submit();*/
		var sfeatures = "scrollbars=no,status=no,left=100,top=100,width=500,height=145,resizable=no";
		window.open("validateuserid.php?user="+usr_id,"winUser",sfeatures);
	}
	function formfocus()
	{
		document.myresume.username.focus();
		document.myresume.username.select();
	}
function delchk(id,page)
{
		var c=confirm("Are You Sure To Delete the Record?");
		if (c)
		{
				document.frm1.action="deldetails.php?id="+id+"&pagename="+page;
				document.frm1.submit();
		}
		
}
function delconfirm(id,page)
{
		var c=confirm("Are You Sure To Delete the Record?");
		if (c)
		{
				document.frm1.action="deljobseeker.php?id="+id+"&pagename="+page;
				document.frm1.submit();
		}
		
}
function viewallcontent()
{
		document.frmsearch.txtsearch.value="";
		document.frmsearch.action="managecontent.php";
		document.frmsearch.submit();
	
}
function viewallbanner()
{
		document.frmsearch.txtsearch.value="";
		document.frmsearch.action="managebanner.php";
		document.frmsearch.submit();
	
}
function viewallevent()
{
		document.myform.txtsearch.value="";
		document.myform.action="manageevent.php";
		document.myform.submit();
	
}
function viewalljobseeker()
{
		document.myform.txtsearch.value="";
		document.myform.action="managejobseeker.php";
		document.myform.submit();
	
}
function viewallcategory()
{
		document.myform.txtsearch.value="";
		document.myform.action="managecategory.php";
		document.myform.submit();
	
}
function viewalljobprompt()
{
		document.frm.alertfrequency.value="";
		document.frm.action="jobprompt.php";
		document.frm.submit();
	
}
function chksearch()
{
var msg;
var flag=0;
msg="Please Check the Following\n";

	if(document.frmsearch.txtsearch.value=="")
	{
		msg+="\r\nSearch Text Can't be Blank";
		if(flag!=1)document.frmsearch.txtsearch.focus();
		flag=1;
	}
	if(flag==1)
	{
			alert(msg);
			return false;
	}
	else
	{
			return true;
	}
}
function setcontentFocus() {
	document.forms[0].pagename.focus(); 
	}
	
	
	
function isIn(astr,nstr)
	// astr :  item in question
	// nstr :  allowable character string; defaults to numbers
	// strip:  determines whether return is true/false or only allowable characters.  Defaults to false.
	{
		//declare and initialize variables to make sure they stay local
		var cc=''
		var dd=''
		var bstr = ''
		var isit  
		var i = 0
		//force number to a string
		astr = '' + astr
		//default to checking for a number
		if (nstr== null || nstr == '') nstr = '1234567890'
		isit=false
		// begin loop which cycles through all of the characters in astr
		for (i = 0 ; i < astr.length ; i++)
			{
				cc=astr.substring(i, i+1)
				// begin loop which cycles through
				// all of the characters in nstr
				for (j =0 ; j< nstr.length ; j++) 
					{
						dd = nstr.substring(j, j + 1)
						//alert('i = ' + i + '\n' + 'j = ' + j  +  '\n' + 'cc = ' + cc + '\n' + 'dd = ' +  dd + '\n' + isit) 
						isit = false
						if (cc == dd)      // so far so good
							{
								isit = true
								bstr += cc    // accumulate good characters
								break         // no need to go further
							}
					}  // end of j loop 
					//you found a mismatch; disqualify the item immediately
					if (isit == false)
						break;
					else continue
			}  // end of i loop
		return isit;             // or return true/false (boolean)
	}
	
function checkDate(bob)
	{
	/*
	PREcondition : bob is a string in the form mm/dd/yy
	POSTcondition: checkDate returns true if the string is a valid date(including leap years) and false otherwise
	*/

		strLength = bob.length;
		firstslash = bob.indexOf('/');
		secondslash = bob.indexOf('/', firstslash+1);
		checksout = true;	
		month = '';
		day = '';
		year = '';

		for( var i=0 ; i < strLength; i++)
		{
			if ( i < firstslash)
				month = month + bob.charAt(i);
			else if ( (i > firstslash) && (i < secondslash) )
				day = day + bob.charAt(i);
			else if ( i > secondslash )
				year = year + bob.charAt(i);
		}

		if ( !isIn(month) || !isIn(day) || !isIn(year) )
		{
			checksout = false;
		
		}

		else if (( (month*1) < 1) || ((month*1) > 12))
			checksout = false;

		else if ( ((year*1) < 0) || ((year*1) > 9999))
			checksout = false;

		
		else if ( ((month*1) == 4) || ((month*1) == 9) || ((month*1) == 6) || ((month*1) == 11) )
		{
			
			if ( ((day*1) < 1) || ((day*1) > 30) )
				checksout = false;
		
		}
		
		else if ((month*1) == 2)
		{
			if ( (year % 4 == 0) && ( (year % 100 != 0) || (year % 400 == 0) ) )
					{//use 29 days for Februrary
				if ( (day < 1) || (day > 29) )
					checksout = false;
			
			} 
        		else
				{//use 28 days for February
				if ( (day < 1) || (day > 28) )
					checksout = false;
			}

		}
		else 
		{

			if ( ((day*1) < 1) || ((day*1) > 31) )
			{
				checksout = false;
			
			}
			else
				checksout = true;
		}
		
		return checksout;
		
	}
	
	function form1()
	{
		
		var msgStr = 'Please fill in these values to continue:\r';
        var error = false;
		
        	if(document.myresume.category.value=="")
		{
			msgStr = msgStr + '\n\tCategory\r';
			if (!error) document.myresume.category.focus();
			error = true;
		}
		
	if(document.myresume.txtemail.value=="")
		{
			msgStr = msgStr + '\n\tUsername\r';
			if (!error) document.myresume.txtemail.focus();
			error = true;
		}
		if(document.myresume.salutation.value=="")
		{
			msgStr = msgStr + '\n\tSalutation\r';
			if (!error) document.myresume.salutation.focus();
			error = true;
		}
		if (document.myresume.firstname.value.length < 1)
		{
			msgStr = msgStr + '\n\tFirst Name\r';
			if (!error) document.myresume.firstname.focus();
			error = true;
		}
		if (document.myresume.lastname.value.length < 1)
		{
			msgStr = msgStr + '\n\tLast Name\r';
			if (!error) document.myresume.lastname.focus();
			error = true;
		}
		
		if (document.myresume.day.value=="")
		{
			msgStr = msgStr + '\n\tDay for dateofbirth\r';
			if (!error) document.myresume.day.focus();
			error = true;
		}
		
		if (document.myresume.month.value=="")
		{
			msgStr = msgStr + '\n\tMonth for dateofbirth\r';
			if (!error) document.myresume.month.focus();
			error = true;
		}
		
		if (document.myresume.year.value=="")
		{
			msgStr = msgStr + '\n\tYear for dateforbirth\r';
			if (!error) document.myresume.year.focus();
			error = true;
		}
		if (document.myresume.gender.value=="")
		{
			msgStr = msgStr + '\n\tGender\r';
			if (!error) document.myresume.gender.focus();
			error = true;
		}
		
		if (document.myresume.country.value=="")
		{
			msgStr = msgStr + '\n\tCountry\r';
			if (!error) document.myresume.country.focus();
			error = true;
		}
		if (document.myresume.zip.value=="")
		{
			msgStr = msgStr + '\n\tZipcode\r';
			if (!error) document.myresume.zip.focus();
			error = true;
		}
		if (document.myresume.primaryphone.value.length < 1)
		{
			msgStr = msgStr + '\n\tPrimary Phone\r';
			if (!error) document.myresume.primaryphone.focus();
			error = true;
		}
	if (document.myresume.selcourse1.value=="")
		{
			msgStr = msgStr + '\n\tEducation\r';
			if (!error) document.myresume.selcourse1.focus();
			error = true;
		}
if (document.myresume.selspecialization1.value=="")
		{
			msgStr = msgStr + '\n\tSpecialization\r';
			if (!error) document.myresume.selspecialization1.focus();
			error = true;
		} 
if (document.myresume.selexpyear.value=="" && document.myresume.selexpmonth.value=="")
		{
			msgStr = msgStr + '\n\tExperience\r';
			if (!error) document.myresume.selexpyear.focus();
			error = true;
		}
if (document.myresume.cindustry.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Industry\r';
			if (!error) document.myresume.currentindustry.focus();
			error = true;
		} 
if (document.myresume.cfarea.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Functional Area\r';
			if (!error) document.myresume.cfarea.focus();
			error = true;
		} 
if (document.myresume.crole.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Role\r';
			if (!error) document.myresume.crole.focus();
			error = true;
		} 
if (document.myresume.keyskills.value=="")
		{
			msgStr = msgStr + '\n\tKey Skills\r';
			if (!error) document.myresume.keyskills.focus();
			error = true;
		} 
if (document.myresume.plocation.value=="")
		{
			msgStr = msgStr + '\n\tPreferred Job Location\r';
			if (!error) document.myresume.plocation.focus();
			error = true;
		} 
if (document.myresume.headline.value=="")
		{
			msgStr = msgStr + '\n\tResume Headline\r';
			if (!error) document.myresume.headline.focus();
			error = true;
		} 
if (document.myresume.resumetitle.value=="")
		{
			msgStr = msgStr + '\n\tResume Title\r';
			if (!error) document.myresume.resumetitle.focus();
			error = true;
		} 
		
		if (error==true)
		{    
			alert(msgStr);
			return false;
		}
		else			
			{
					document.myresume.action="resumepost_action.php";
					document.myresume.submit();
					return true;
			}
	}
function validateform()
	{
		
		var msgStr = 'Please fill in these values to continue:\r';
        var error = false;
        	
	if (document.myresume.username.value.length < 1)
		{
			msgStr = msgStr + '\n\tUsername\r';
			if (!error) document.myresume.username.focus();
			error = true;
		}
if (document.myresume.username.value.length < 5 || document.myresume.username.value.length>20)
		{
			msgStr = msgStr + '\n\tUsername Must be 5-20 characters\r';
			if (!error) document.myresume.username.focus();
			error = true;
		}
		if (document.myresume.password.value.length < 1)
		{
			msgStr = msgStr + '\n\tPassword\r';
			if (!error) document.myresume.password.focus();
			error = true;
		}
		if (document.myresume.password.value.length < 5 || document.myresume.password.value.length>20)
		{
			msgStr = msgStr + '\n\tPassword Must be 5-20 characters\r';
			if (!error) document.myresume.password.focus();
			error = true;
		}
		if (document.myresume.confirmpassword.value.length < 1)
		{
			msgStr = msgStr + '\n\tConfirm Password\r';
			if (!error) document.myresume.confirmpassword.focus();
			error = true;
		}
		
		if (document.myresume.password.value.length > 0 && document.myresume.confirmpassword.value.length > 0)
		{
			if (document.myresume.password.value.length < 5)
			{
				msgStr = msgStr + '\n\tPassword must be 5 characters or more\r';
				if (!error) document.myresume.password.focus();
				error = true;
			}
			
			if (document.myresume.confirmpassword.value.length < 5)
			{
				msgStr = msgStr + '\n\tConfirm password must be 5 characters or more\r';
				if (!error) document.myresume.confirmpassword.focus();
				error = true;
			}
			
			if (document.myresume.password.value != document.myresume.confirmpassword.value)
			{
				msgStr = msgStr + '\n\tBoth Password and Confirm Password must be same\r';
				if (!error) document.myresume.confirmpassword.focus();
				error = true;
			}			
		}
		if (document.myresume.category.value=="")
		{
			msgStr = msgStr + '\n\tCategory\r';
			if (!error) document.myresume.category.focus();
			error = true;
		}

		
		if (document.myresume.pwdq.value=="")
		{
			msgStr = msgStr + '\n\tSecret Question\r';
			if (!error) document.myresume.pwdq.focus();
			error = true;
		}

		if (document.myresume.pwda.value.length < 1)
		{
			msgStr = msgStr + '\n\tSecret Answer\r';
			if (!error) document.myresume.pwda.focus();
			error = true;
		}
		if (document.myresume.txtemail.value.length < 1)
		{
			msgStr = msgStr + '\n\tEmail\r';
			if (!error) document.myresume.txtemail.focus();
			error = true;
		}
		
			if (!checkemail(document.myresume.txtemail.value)) 
			{ 
				msgStr = msgStr + '\n\tInvalid Emailid\r';
				if (!error) document.myresume.txtemail.focus();
				error = true;
			}  	
		//data added during another resume entry
		if (document.myresume.salutation.value=="")
		{
			msgStr = msgStr + '\n\tSalutation\r';
			if (!error) document.myresume.salutation.focus();
			error = true;
		}
		if (document.myresume.firstname.value.length < 1)
		{
			msgStr = msgStr + '\n\tFirst Name\r';
			if (!error) document.myresume.firstname.focus();
			error = true;
		}
		if (document.myresume.lastname.value.length < 1)
		{
			msgStr = msgStr + '\n\tLast Name\r';
			if (!error) document.myresume.lastname.focus();
			error = true;
		}
		/*
		if (document.myresume.txtdob.value.length < 1)
		{
			msgStr = msgStr + '\n\tDate of Birth\r';
			if (!error) document.myresume.txtdob.focus();
			error = true;
		}
		

		if (document.myresume.txtdob.value.length > 0)
		{
			if (!checkDate(document.myresume.txtdob.value)){
				msgStr = msgStr + '\n\tPlease enter a valid DOB\r';
				if (!error) document.myresume.txtdob.focus();
				error = true;
			}
		}
		*/
		if (document.myresume.day.value=="")
		{
			msgStr = msgStr + '\n\tDay for dateofbirth\r';
			if (!error) document.myresume.day.focus();
			error = true;
		}
		
		if (document.myresume.month.value=="")
		{
			msgStr = msgStr + '\n\tMonth for dateofbirth\r';
			if (!error) document.myresume.month.focus();
			error = true;
		}
		
		if (document.myresume.year.value=="")
		{
			msgStr = msgStr + '\n\tYear for dateforbirth\r';
			if (!error) document.myresume.year.focus();
			error = true;
		}
		if (document.myresume.gender.value=="")
		{
			msgStr = msgStr + '\n\tGender\r';
			if (!error) document.myresume.gender.focus();
			error = true;
		}
		
		if (document.myresume.country.value=="")
		{
			msgStr = msgStr + '\n\tCountry\r';
			if (!error) document.myresume.country.focus();
			error = true;
		}
		if (document.myresume.zip.value=="")
		{
			msgStr = msgStr + '\n\tZipcode\r';
			if (!error) document.myresume.zip.focus();
			error = true;
		}
		if (document.myresume.primaryphone.value.length < 1)
		{
			msgStr = msgStr + '\n\tPrimary Phone\r';
			if (!error) document.myresume.primaryphone.focus();
			error = true;
		}
	if (document.myresume.selcourse1.value=="")
		{
			msgStr = msgStr + '\n\tEducation\r';
			if (!error) document.myresume.selcourse1.focus();
			error = true;
		}
if (document.myresume.selspecialization1.value=="")
		{
			msgStr = msgStr + '\n\tSpecialization\r';
			if (!error) document.myresume.selspecialization1.focus();
			error = true;
		} 
if (document.myresume.selexpyear.value=="" && document.myresume.selexpmonth.value=="")
		{
			msgStr = msgStr + '\n\tExperience\r';
			if (!error) document.myresume.selexpyear.focus();
			error = true;
		}
if (document.myresume.cindustry.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Industry\r';
			if (!error) document.myresume.currentindustry.focus();
			error = true;
		} 
if (document.myresume.cfarea.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Functional Area\r';
			if (!error) document.myresume.cfarea.focus();
			error = true;
		} 
if (document.myresume.crole.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Role\r';
			if (!error) document.myresume.crole.focus();
			error = true;
		} 
if (document.myresume.keyskills.value=="")
		{
			msgStr = msgStr + '\n\tKey Skills\r';
			if (!error) document.myresume.keyskills.focus();
			error = true;
		} 
if (document.myresume.plocation.value=="")
		{
			msgStr = msgStr + '\n\tPreferred Job Location\r';
			if (!error) document.myresume.plocation.focus();
			error = true;
		} 
if (document.myresume.headline.value=="")
		{
			msgStr = msgStr + '\n\tResume Headline\r';
			if (!error) document.myresume.headline.focus();
			error = true;
		} 
if (document.myresume.resumetitle.value=="")
		{
			msgStr = msgStr + '\n\tResume Title\r';
			if (!error) document.myresume.resumetitle.focus();
			error = true;
		} 
		if (error==true)
		{    
			alert(msgStr);
			return false;
		}
		else			
			{
					document.myresume.action="signup_action.php";
					document.myresume.submit();
					return true;
			}
	}
	////////////added on march 12////////
	function validateresume()
	{
		var msgStr = 'Please fill in these values to continue:\r';
        var error = false;
		
		if (document.myresume.salutation.value=="")
		{
			msgStr = msgStr + '\n\tSalutation\r';
			if (!error) document.myresume.salutation.focus();
			error = true;
		}
		if (document.myresume.firstname.value.length < 1)
		{
			msgStr = msgStr + '\n\tFirst Name\r';
			if (!error) document.myresume.firstname.focus();
			error = true;
		}
		if (document.myresume.lastname.value.length < 1)
		{
			msgStr = msgStr + '\n\tLast Name\r';
			if (!error) document.myresume.lastname.focus();
			error = true;
		}
		/*
		if (document.myresume.txtdob.value.length < 1)
		{
			msgStr = msgStr + '\n\tDate of Birth\r';
			if (!error) document.myresume.txtdob.focus();
			error = true;
		}
		

		if (document.myresume.txtdob.value.length > 0)
		{
			if (!checkDate(document.myresume.txtdob.value)){
				msgStr = msgStr + '\n\tPlease enter a valid DOB\r';
				if (!error) document.myresume.txtdob.focus();
				error = true;
			}
		}
		*/
		if (document.myresume.day.value=="")
		{
			msgStr = msgStr + '\n\tDay\r';
			if (!error) document.myresume.day.focus();
			error = true;
		}
		
		if (document.myresume.month.value=="")
		{
			msgStr = msgStr + '\n\tMonth\r';
			if (!error) document.myresume.month.focus();
			error = true;
		}
		
		if (document.myresume.year.value=="")
		{
			msgStr = msgStr + '\n\tYear\r';
			if (!error) document.myresume.year.focus();
			error = true;
		}
		
		if (document.myresume.gender.value=="")
		{
			msgStr = msgStr + '\n\tGender\r';
			if (!error) document.myresume.gender.focus();
			error = true;
		}
		
		if (document.myresume.country.value=="")
		{
			msgStr = msgStr + '\n\tCountry\r';
			if (!error) document.myresume.country.focus();
			error = true;
		}
		if (document.myresume.zip.value=="")
		{
			msgStr = msgStr + '\n\tZipcode\r';
			if (!error) document.myresume.zip.focus();
			error = true;
		}
		if (document.myresume.primaryphone.value.length < 1)
		{
			msgStr = msgStr + '\n\tPrimary Phone\r';
			if (!error) document.myresume.primaryphone.focus();
			error = true;
		}
	if (document.myresume.selcourse1.value=="")
		{
			msgStr = msgStr + '\n\tEducation\r';
			if (!error) document.myresume.selcourse1.focus();
			error = true;
		}
if (document.myresume.selspecialization1.value=="")
		{
			msgStr = msgStr + '\n\tSpecialization\r';
			if (!error) document.myresume.selspecialization1.focus();
			error = true;
		} 
if (document.myresume.selexpyear.value=="" && document.myresume.selexpmonth.value=="")
		{
			msgStr = msgStr + '\n\tExperience\r';
			if (!error) document.myresume.selexpyear.focus();
			error = true;
		}
if (document.myresume.cindustry.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Industry\r';
			if (!error) document.myresume.currentindustry.focus();
			error = true;
		} 
if (document.myresume.cfarea.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Functional Area\r';
			if (!error) document.myresume.cfarea.focus();
			error = true;
		} 
if (document.myresume.crole.value=="")
		{
			msgStr = msgStr + '\n\tCurrent Role\r';
			if (!error) document.myresume.crole.focus();
			error = true;
		} 
if (document.myresume.keyskills.value=="")
		{
			msgStr = msgStr + '\n\tKey Skills\r';
			if (!error) document.myresume.keyskills.focus();
			error = true;
		} 
if (document.myresume.plocation.value=="")
		{
			msgStr = msgStr + '\n\tPreferred Job Location\r';
			if (!error) document.myresume.plocation.focus();
			error = true;
		} 
if (document.myresume.headline.value=="")
		{
			msgStr = msgStr + '\n\tResume Headline\r';
			if (!error) document.myresume.headline.focus();
			error = true;
		} 
if (document.myresume.resumetitle.value=="")
		{
			msgStr = msgStr + '\n\tResume Title\r';
			if (!error) document.myresume.resumetitle.focus();
			error = true;
		} 
		if (error==true)
		{    
			alert(msgStr);
			return false;
		}
		else			
			{
					document.myresume.action="signup_action.php";
					document.myresume.submit();
					return true;
			}
	}
	///////function above added on march12////////
function passchk()
{
	var msg1;
	var msgflag1=0;
	msg1="Please check the Following :\r\n";
	if(document.frm7.selcountry.value == "")
	{
		msg1+="\r\nCountry can't be blank";
		if(msgflag1!=1)document.frm7.selcountry.focus();
		msgflag1=1;
	}
	if(document.frm7.zip.value == "")
	{
		msg1+="\r\nZip code can't be blank";
		if(msgflag1!=1)document.frm7.zip.focus();
		msgflag1=1;
	}
	if(document.frm7.pwda.value == "")
	{
		msg1+="\r\nSecret Answer can't be blank";
		if(msgflag1!=1)document.frm7.pwda.focus();
		msgflag1=1;
	}
	
	if(msgflag1==1)
	{
		alert(msg1);
		return false;
	}
	else
	{
		//document.frm7.action="forgotpass.php";
		document.frm7.submit();
		
	}
}
function loginchk()
{
var msg;
var flag=0;
msg="Please Check the Following\n";

	if(document.frmlogin.username.value=="")
	{
		msg+="\r\nUser Name can't be blank";
		if(flag!=1)document.frmlogin.username.focus();
		flag=1;
	}

	if(document.frmlogin.userpass.value=="")
	{
		msg+="\r\nPassword can't be blank";
		if(flag!=1)document.frmlogin.userpass.focus();
		flag=1;
	}
	
	if(flag==1)
	{
			alert(msg);
			return false;
	}
	else
	{
			document.frmlogin.action="login_action.php";
			document.frmlogin.submit();
			return true;
	}
}

		

function checkemail(s){
var str=s;
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
if (filter.test(str))
testresults=true;
else{
testresults=false;
}
return (testresults);
}


function fncontentchk()
{
var msg;
var flag=0;
msg="Please Check the Following\n";

	if(document.frmcontent.pagename.value=="")
	{
		msg+="\r\nPage Name can't be blank";
		if(flag!=1)document.frmcontent.pagename.focus();
		flag=1;
	}
	/*if(document.frmcontent.content.value=="")
	{
		msg+="\r\nPage Content can't be blank";
		if(flag!=1)document.frmcontent.content.focus();
		flag=1;
	}*/
	
	
	if(flag==1)
	{
			alert(msg);
			return false;
	}
	else
	{
			return true;
	}
}






function viewallcust()
{
		document.frmsearch.txtsearch.value="";
		document.frmsearch.action="managecustomer.php";
		document.frmsearch.submit();
}





function winpope(cid) 
{ 
     myFloater = window.open('edupopup.php','myWindow','scrollbars=yes,status=no,width=800,height=400')
}
function popuser(uid) 
{ 
     myFloater = window.open('resumepreview.php?user='+uid,'myWindow','scrollbars=yes,status=no,left=100,top=100,width=800,height=700')
}
function popemployer(cid) 
{ 
     myFloater = window.open('company.php?cname='+cid,'myWindow','scrollbars=yes,status=no,left=100,top=100,width=800,height=700')
}
function eventpop(eid) 
{ 
     myFloater = window.open('eventdet.php?id='+eid,'myWindow','scrollbars=yes,status=no,left=100,top=100,width=600,height=280')
}
function bigimgsel_win() 
{ 
	myFloater = window.open('prod_bigimagesel.php','myImgselect_window','scrollbars=no,status=no,left=100,top=100,width=500,height=190')
    myFloater.focus("myImgselect_window")
}


function img_win(img_id,h,w) 
{ 

	var my_win_h=h;
	var my_win_w=w;
	var my_win_t=10;
	var my_win_l=200;
	
		  var win_style = 'width=' + my_win_w;
          win_style += ', height=' + my_win_h;
		  win_style += ', top=' + my_win_t;
   		  win_style += ', left=' + my_win_l;
          my_win = window.open('prod_bigimage.php?imgid='+img_id,'ImagePreview', win_style);

}




function validateeditform()
	{
		
		var msgStr = 'Please fill in these values to continue:\r';
        var error = false;
        	
		if (document.myresume.salutation.value=="")
		{
			msgStr = msgStr + '\n\tSalutation\r';
			if (!error) document.myresume.salutation.focus();
			error = true;
		}
		if (document.myresume.firstname.value.length < 1)
		{
			msgStr = msgStr + '\n\tFirst Name\r';
			if (!error) document.myresume.firstname.focus();
			error = true;
		}
		if (document.myresume.lastname.value.length < 1)
		{
			msgStr = msgStr + '\n\tLast Name\r';
			if (!error) document.myresume.lastname.focus();
			error = true;
		}
		
		if (document.myresume.txtdob.value.length < 1)
		{
			msgStr = msgStr + '\n\tDate of Birth\r';
			if (!error) document.myresume.txtdob.focus();
			error = true;
		}
		

		if (document.myresume.txtdob.value.length > 0)
		{
			if (!checkDate(document.myresume.txtdob.value)){
				msgStr = msgStr + '\n\tPlease enter a valid DOB\r';
				if (!error) document.myresume.txtdob.focus();
				error = true;
			}
		}
		if (document.myresume.gender.value=="")
		{
			msgStr = msgStr + '\n\tGender\r';
			if (!error) document.myresume.gender.focus();
			error = true;
		}
		if (document.myresume.address1.value.length < 1)
		{
			msgStr = msgStr + '\n\tAddress 1\r';
			if (!error) document.myresume.address1.focus();
			error = true;
		}
		if (document.myresume.city.value.length < 1)
		{
			msgStr = msgStr + '\n\tCity\r';
			if (!error) document.myresume.city.focus();
			error = true;
		}
		if (document.myresume.state.value=="")
		{
			msgStr = msgStr + '\n\tState\r';
			if (!error) document.myresume.state.focus();
			error = true;
		}
		if (document.myresume.zipcode.value.length < 1)
		{
			msgStr = msgStr + '\n\tZip Code\r';
			if (!error) document.myresume.zipcode.focus();
			error = true;
		}
		if (document.myresume.selcountry.value=="")
		{
			msgStr = msgStr + '\n\tCountry\r';
			if (!error) document.myresume.selcountry.focus();
			error = true;
		}
		if (document.myresume.primaryphone.value.length < 1)
		{
			msgStr = msgStr + '\n\tPrimary Phone\r';
			if (!error) document.myresume.primaryphone.focus();
			error = true;
		}
		if (document.myresume.ptype.value=="")
		{
			msgStr = msgStr + '\n\tPrimary Phone Type\r';
			if (!error) document.myresume.ptype.focus();
			error = true;
		}
		if (document.myresume.txtemail.value.length < 1)
		{
			msgStr = msgStr + '\n\tEmail\r';
			if (!error) document.myresume.txtemail.focus();
			error = true;
		}
		else
		{
			if (!checkemail(document.myresume.txtemail.value)) 
			{ 
				msgStr = msgStr + '\n\tEmail\r';
				if (!error) document.myresume.txtemail.focus();
				error = true;
			}  	
		}
		if (document.myresume.emailformat.value=="")
		{
			msgStr = msgStr + '\n\tE-Mail Format\r';
			if (!error) document.myresume.emailformat.focus();
			error = true;
		}
		if (document.myresume.contactpreference.value=="")
		{
			msgStr = msgStr + '\n\tContact Preference\r';
			if (!error) document.myresume.contactpreference.focus();
			error = true;
		}

		if (error==true)
		{    
			alert(msgStr);
			return false;
		}
		else			
			{
					document.myresume.action="updateprofile.php";
					document.myresume.submit();
					return true;
			}
	}
function validateeditform1()
	{
		
		var msgStr = 'Please fill in these values to continue:\r';
        var error = false;
        if (document.myresume.compname.value.length < 1)
		{
			msgStr = msgStr + '\n\tCompany Name\r';
			if (!error) document.myresume.compname.focus();
			error = true;
		}
		if (document.myresume.salutation.value=="")
		{
			msgStr = msgStr + '\n\tSalutation\r';
			if (!error) document.myresume.salutation.focus();
			error = true;
		}
		if (document.myresume.firstname.value.length < 1)
		{
			msgStr = msgStr + '\n\tFirst Name\r';
			if (!error) document.myresume.firstname.focus();
			error = true;
		}
		if (document.myresume.lastname.value.length < 1)
		{
			msgStr = msgStr + '\n\tLast Name\r';
			if (!error) document.myresume.lastname.focus();
			error = true;
		}
		
		
		

		if (document.myresume.address1.value.length < 1)
		{
			msgStr = msgStr + '\n\tAddress 1\r';
			if (!error) document.myresume.address1.focus();
			error = true;
		}
		if (document.myresume.city.value.length < 1)
		{
			msgStr = msgStr + '\n\tCity\r';
			if (!error) document.myresume.city.focus();
			error = true;
		}
		if (document.myresume.state.value=="")
		{
			msgStr = msgStr + '\n\tState\r';
			if (!error) document.myresume.state.focus();
			error = true;
		}
		if (document.myresume.zipcode.value.length < 1)
		{
			msgStr = msgStr + '\n\tZip Code\r';
			if (!error) document.myresume.zipcode.focus();
			error = true;
		}
		if (document.myresume.selcountry.value=="")
		{
			msgStr = msgStr + '\n\tCountry\r';
			if (!error) document.myresume.selcountry.focus();
			error = true;
		}
		if (document.myresume.primaryphone.value.length < 1)
		{
			msgStr = msgStr + '\n\tPrimary Phone\r';
			if (!error) document.myresume.primaryphone.focus();
			error = true;
		}
		if (document.myresume.ptype.value=="")
		{
			msgStr = msgStr + '\n\tPrimary Phone Type\r';
			if (!error) document.myresume.ptype.focus();
			error = true;
		}
		if (document.myresume.txtemail.value.length < 1)
		{
			msgStr = msgStr + '\n\tEmail\r';
			if (!error) document.myresume.txtemail.focus();
			error = true;
		}
		else
		{
			if (!checkemail(document.myresume.txtemail.value)) 
			{ 
				msgStr = msgStr + '\n\tEmail\r';
				if (!error) document.myresume.txtemail.focus();
				error = true;
			}  	
		}
		if (document.myresume.emailformat.value=="")
		{
			msgStr = msgStr + '\n\tE-Mail Format\r';
			if (!error) document.myresume.emailformat.focus();
			error = true;
		}
		if (document.myresume.contactpreference.value=="")
		{
			msgStr = msgStr + '\n\tContact Preference\r';
			if (!error) document.myresume.contactpreference.focus();
			error = true;
		}

		if (error==true)
		{    
			alert(msgStr);
			return false;
		}
		else			
			{
					document.myresume.action="updateprofile.php";
					document.myresume.submit();
					return true;
			}
	}
function perinfoedit()
{
	var msg;
	var msgflag=0;
	msg="Please Check the Following\n";
	
	if(document.frmpersonal.salutation.value=="")
	{
		msg=msg +'\r\n\Salutation';
		if(msgflag!=1)document.frmpersonal.salutation.focus();
		msgflag=1;
	}
	
		if(document.frmpersonal.firstname.value=="")
	{
		msg=msg +'\r\n\First Name';
		if(msgflag!=1)document.frmpersonal.firstname.focus();
		msgflag=1;
	}
	
	
	if(document.frmpersonal.lastname.value=="")
	{
		msg=msg +'\r\n\Last Name';
		if(msgflag!=1)document.frmpersonal.lastname.focus();
		msgflag=1;
	}
	if (document.frmpersonal.day.value=="")
		{
			msgStr = msgStr + '\n\tDay for dateofbirth\r';
			if (!error) document.frmpersonal.day.focus();
			error = true;
		}
		
		if (document.frmpersonal.month.value=="")
		{
			msgStr = msgStr + '\n\tMonth for dateofbirth\r';
			if (!error) document.frmpersonal.month.focus();
			error = true;
		}
		
		if (document.frmpersonal.year.value=="")
		{
			msgStr = msgStr + '\n\tYear for dateforbirth\r';
			if (!error) document.frmpersonal.year.focus();
			error = true;
		}
		if (document.frmpersonal.gender.value=="")
		{
			msg = msg + '\n\tGender\r';
			if (msgflag!=1)document.frmpersonal.gender.focus();
			msgflag=1;
		}
		
		if(msgflag==1)
	{
			alert(msg);
			return false;
	}
	else			
			{
					document.frmpersonal.action="personal_action.php";
					document.frmpersonal.submit();
					return true;
			}
	}
	function coninfoedit()
	{
		var msg;
		var msgflag=0;
		msg=" Please check the following values\n";
		
		if(document.frmcontact.addressline1.value=="")
		{
			msg=msg + '\n\tAddress Line1';
			if(msgflag!=1)document.frmcontact.addressline1.focus();
			msgflag=1;
		}
		
		if(document.frmcontact.primaryphone.value=="")
		{
			msg=msg + '\n\tPrimary Phone';
			if(msgflag!=1)document.frmcontact.primaryphone.focus();
			msgflag=1;
		}
		if(document.frmcontact.city.value=="")
		{
			msg=msg + '\n\tCity';
			if(msgflag!=1)document.frmcontact.city.focus();
			msgflag=1;
		}
		/*
		if(document.frmcontact.state.value=="")
		{
			msg=msg + '\n\tState';
			if(msgflag!=1)document.frmcontact.state.focus();
			msgflag=1;
		}
		*/
		if(document.frmcontact.country.value=="")
		{
			msg=msg + '\n\tCountry';
			if(msgflag!=1)document.frmcontact.country.focus();
			msgflag=1;
		}
		if(document.frmcontact.zip.value=="")
		{
			msg=msg + '\n\tZipcode';
			if(msgflag!=1)document.frmcontact.zip.focus();
			msgflag=1;
		}
		if(document.frmcontact.txtemail.value=="")
		{
			msg=msg + '\n\tEmail ID';
			if(msgflag!=1)document.frmcontact.txtemail.focus();
			msgflag=1;
		}
		 if(!checkemail(document.frmcontact.txtemail.value))
			{
				alert("Invalid Email ID");
				document.frmcontact.txtemail.focus();
				return false;
			}
			
		if(msgflag==1)
		{
			alert(msg);
			return false;
		}
		else
		{
			document.frmcontact.action="contact_action.php";
			document.frmcontact.submit();
			return true;
		}
	}
	function checkemail(s){
var str=s;
var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
if (filter.test(str))
testresults=true;
else{
testresults=false;
}
return (testresults);
}
function profinfoedit()
{
	
 var msg;
 var msgflag=0;
 msg =" Please check the following values\n";

	if(document.frmprofession.selexpyear.value=="")
		{
			msg=msg + '\n\tYear';
			if(msgflag!=1)document.frmprofession.selexpyear.focus();
			msgflag=1;
		}
		
	if(document.frmprofession.selexpmonth.value=="")
		{
			msg=msg + '\n\tMonth';
			if(msgflag!=1)document.frmprofession.selexpmonth.focus();
			msgflag=1;
		}
		
		if(document.frmprofession.cindustry.value=="")
		{
			msg=msg + '\n\tCurrent Industry';
			if(msgflag!=1)document.frmprofession.cindustry.focus();
			msgflag=1;
		}
		
		if(document.frmprofession.cfarea.value=="")
		{
			msg=msg + '\n\tCurrent Functional Area';
			if(msgflag!=1)document.frmprofession.cfarea.focus();
			msgflag=1;
		}
		
		if(document.frmprofession.crole.value=="")
		{
			msg=msg + '\n\tCurrent Role';
			if(msgflag!=1)document.frmprofession.crole.focus();
			msgflag=1;
		}
		
		if(document.frmprofession.keyskills.value=="")
		{
			msg=msg + '\n\tKey Skills';
			if(msgflag!=1)document.frmprofession.keyskills.focus();
			msgflag=1;
		}
		
		if(document.frmprofession.plocation.value=="")
		{
			msg=msg + '\n\tPreffered Job Location';
			if(msgflag!=1)document.frmprofession.plocation.focus();
			msgflag=1;
		}
		
		if(msgflag==1)
	{
			alert(msg);
			return false;
	}
	else			
			{
					document.frmprofession.action="professinfo_action.php";
					document.frmprofession.submit();
					return true;
			}
}
function addinfoedit()
{
	var msg;
	var msgflag=0;
	msg=" Please check the following values\n";
	
	if(document.frmadditionalinfo.targetjob.value=="")
	{
		msg=msg + '\n\tTarget Job';
		if(msgflag!=1)document.frmadditionalinfo.targetjob.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.currentemployer.value=="")
	{
		msg=msg + '\n\tCurrent Employer';
		if(msgflag!=1)document.frmadditionalinfo.currentemployer.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.currentdesignation.value=="")
	{
		msg=msg + '\n\tCurrent Designation';
		if(msgflag!=1)document.frmadditionalinfo.currentdesignation.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.worklevel.value=="")
	{
		msg=msg + '\n\tWork Level';
		if(msgflag!=1)document.frmadditionalinfo.worklevel.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.salary1.value=="")
	{
		msg=msg + '\n\tSalary1';
		if(msgflag!=1)document.frmadditionalinfo.salary1.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.salary2.value=="")
	{
		msg=msg + '\n\tSalary2';
		if(msgflag!=1)document.frmadditionalinfo.salary2.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.currency.value=="")
	{
		msg=msg + '\n\tCurrency';
		if(msgflag!=1)document.frmadditionalinfo.currency.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.salarytype.value=="")
	{
		msg=msg + '\n\tSalaryType';
		if(msgflag!=1)document.frmadditionalinfo.salarytype.focus();
		msgflag=1;
	}
	
	if(document.frmadditionalinfo.curremptype.value=="")
	{
		msg=msg + '\n\tCurrent Employer Type';
		if(msgflag!=1)document.frmadditionalinfo.curremptype.focus();
		msgflag=1;
	}
	
	if(document.frmadditionalinfo.addareaofex.value=="")
	{
		msg=msg + '\n\tAdditional Area Of Expertise';
		if(msgflag!=1)document.frmadditionalinfo.addareaofex.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.dateofavail.value=="")
	{
		msg=msg + '\n\tDate Of Availability';
		if(msgflag!=1)document.frmadditionalinfo.dateofavail.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.residentialstatus.value=="")
	{
		msg=msg + '\n\tResidential Status';
		if(msgflag!=1)document.frmadditionalinfo.residentialstatus.focus();
		msgflag=1;
	}
	if(document.frmadditionalinfo.travel.value=="")
	{
		msg=msg + '\n\tWilling To Travel';
		if(msgflag!=1)document.frmadditionalinfo.travel.focus();
		msgflag=1;
	}
	
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.frmadditionalinfo.action="additionalinfo_action.php";
		document.frmadditionalinfo.submit();
		return true;
	}
}
function workexpedit()
{
	var msg;
	var msgflag=0;
	msg="Please check the following values\n";
	
	if(document.myresume.resumeheadline.value=="")
	{
		msg=msg + '\n\tResume Headline';
		if(msgflag!=1)document.myresume.resumeheadline.focus();
		msgflag=1;
	}
	if(document.myresume.resumetitle.value=="")
	{
		msg=msg + '\n\tResume Title';
		if(msgflag!=1)document.myresume.resumetitle.focus();
		msgflag=1;
	}
	if(document.myresume.docupload.value=="")
	{
		msg=msg + '\n\tResume File';
		if(msgflag!=1)document.myresume.docupload.focus();
		msgflag=1;
	}
	
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.myresume.action="workexperience_action.php";
		document.myresume.submit();
		return true;
	}
}
function upload()
{ 
	myFloater = window.open('docsel.php','uploadlogo','scrollbars=no,status=no,left=100,top=100,width=500,height=190')
    myFloater.focus("uploadlogo")
}
function fnempchk()
{
	var msg;
	var msgflag=0;
	msg ="Please fill in these values to continue:\n\t";
	
	if(document.formemp.username.value=="")
	{
		msg=msg + '\n\tUsername';
		if(msgflag!=1)document.formemp.username.focus();
		msgflag=1;
	}

	if(document.formemp.username.value.length>0)
	{
		if (document.formemp.username.value.length < 5)
			{
				msg = msg + '\n\tUsername must be 5 characters or more\r';
				if(msgflag!=1) document.formemp.username.focus();
				msgflag=1;
			}
	}
	if(document.formemp.password.value=="")
	{
		msg=msg + '\n\tPassword';
		if(msgflag!=1)document.formemp.password.focus();
		msgflag=1;
	}
	if(document.formemp.confirmpassword.value=="")
	{
		msg=msg + '\n\tConfirm Password';
		if(msgflag!=1)document.formemp.confirmpassword.focus();
		msgflag=1;
	}
	if (document.formemp.password.value.length > 0 && document.formemp.confirmpassword.value.length > 0)
		{
			if (document.formemp.password.value.length < 5)
			{
				msg = msg + '\n\tPassword must be 5 characters or more\r';
				if(msgflag!=1) document.formemp.password.focus();
				msgflag=1;
			}
			
			if (document.formemp.confirmpassword.value.length < 5)
			{
				msg = msg +'\n\tConfirm password must be 5 characters or more\r';
				if(msgflag!=1) document.formemp.confirmpassword.focus();
				msgflag=1;
			}
			
			if (document.formemp.password.value != document.formemp.confirmpassword.value)
			{
				msg = msg + + '\n\tBoth Password and Confirm Password must be same\r';
				if(msgflag!=1) document.formemp.confirmpassword.focus();
				msgflag=1;
			}			
		}
	if(document.formemp.primaryemail.value=="")
	{
		msg=msg + '\n\tPrimary Email';
		if(msgflag!=1)document.formemp.primaryemail.focus();
		msgflag=1;
	}
	if (!checkemail(document.formemp.primaryemail.value)) 
			{ 
				msg = msg + '\n\tInvalid Email\r';
				if(msgflag!=1) document.formemp.primaryemail.focus();
				msgflag=1;
			}  
	if(document.formemp.alternateemail.value!="")
	{
		if (!checkemail(document.formemp.alternateemail.value)) 
			{ 
				msg = msg + '\n\tInvalid Alternate Email\r';
				if(msgflag!=1) document.formemp.alternateemail.focus();
				msgflag=1;
			}  
	}
	if(document.formemp.contactname.value=="")
	{
		msg=msg + '\n\tContact Name';
		if(msgflag!=1)document.formemp.contactname.focus();
		msgflag=1;
	}
	if(document.formemp.designation.value=="")
	{
		msg=msg + '\n\tDesignation';
		if(msgflag!=1)document.formemp.designation.focus();
		msgflag=1;
	}
	if(document.formemp.phone1.value=="")
	{
		msg=msg + '\n\tPrimary Phone';
		if(msgflag!=1)document.formemp.phone1.focus();
		msgflag=1;
	}
	if(document.formemp.companyname.value=="")
	{
		msg=msg + '\n\tCompany Name';
		if(msgflag!=1)document.formemp.companyname.focus();
		msgflag=1;
	}
	if(document.formemp.address1.value=="")
	{
		msg=msg + '\n\tAddress Line 1';
		if(msgflag!=1)document.formemp.address1.focus();
		msgflag=1;
	}
	if(document.formemp.country.value=="")
	{
		msg=msg + '\n\tCountry';
		if(msgflag!=1)document.formemp.country.focus();
		msgflag=1;
	}
/*
	if(document.formemp.state.value=="")
	{
		msg=msg + '\n\tState';
		if(msgflag!=1)document.formemp.state.focus();
		msgflag=1;
	}*/
	if(document.formemp.companytype.value=="")
	{
		msg=msg + '\n\tCompany Type';
		if(msgflag!=1)document.formemp.companytype.focus();
		msgflag=1;
	}
	if(document.formemp.industrytype.value=="")
	{
		msg=msg + '\n\tIndustry Type';
		if(msgflag!=1)document.formemp.industrytype.focus();
		msgflag=1;
	}
	if(document.formemp.companycategory.value=="")
	{
		msg=msg + '\n\tCompany Category';
		if(msgflag!=1)document.formemp.companycategory.focus();
		msgflag=1;
	}
	if(document.formemp.salesturnover.value=="")
	{
		msg=msg + '\n\tSales Tunover';
		if(msgflag!=1)document.formemp.salesturnover.focus();
		msgflag=1;
	}
	if(document.formemp.companyprofile.value=="")
	{
		msg=msg + '\n\tCompany Profile';
		if(msgflag!=1)document.formemp.companyprofile.focus();
		msgflag=1;
	}
	if(document.formemp.employeenos.value=="")
	{
		msg=msg + '\n\tEmployeenos';
		if(msgflag!=1)document.formemp.employeenos.focus();
		msgflag=1;
	}
	if(document.formemp.branchnos.value=="")
	{
		msg=msg + '\n\tBranchnos';
		if(msgflag!=1)document.formemp.branchnos.focus();
		msgflag=1;
	}
	if(document.formemp.timezone.value=="")
	{
		msg=msg + '\n\tTime Zone';
		if(msgflag!=1)document.formemp.timezone.focus();
		msgflag=1;
	}
	if(document.formemp.websiteurl.value=="")
	{
		msg=msg + '\n\tWebsite URL';
		if(msgflag!=1)document.formemp.websiteurl.focus();
		msgflag=1;
	}
	/*
	if(document.formemp.uploadlogo.value=="")
	{
		msg=msg + '\n\tUploadlogo';
		if(msgflag!=1)document.formemp.uploadlogo.focus();
		msgflag=1;
	}
	*/
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.formemp.action="emp_action.php";
		document.formemp.submit();
		return true;
	}
}
function checkuseravail()
	{
		var usr_id = document.formemp.username.value;
		if (usr_id.length < 5)
		{
			alert("Username must be 5 characters or more.");
			formfocus1();
			return;
		}
		/*document.myresume.action="checkuserid.asp";
		document.myresume.method="post";
		document.myresume.submit();*/
		var sfeatures = "scrollbars=no,status=no,left=100,top=100,width=500,height=145,resizable=no";
		window.open("validateuserid.php?user="+usr_id,"winUser",sfeatures);
	}
function formfocus1()
	{
		document.formemp.username.focus();
		document.formemp.username.select();
	}
function loginempchk()
{
var msg;
var flag=0;
msg="Please Check the Following\n";

	if(document.frmemplogin.username.value=="")
	{
		msg+="\r\nUser Name can't be blank";
		if(flag!=1)document.frmemplogin.username.focus();
		flag=1;
	}

	if(document.frmemplogin.password.value=="")
	{
		msg+="\r\nPassword can't be blank";
		if(flag!=1)document.frmemplogin.password.focus();
		flag=1;
	}
	
	if(flag==1)
	{
			alert(msg);
			return false;
	}
	else
	{
			document.frmemplogin.action="emplogin_action.php";
			document.frmemplogin.submit();
			return true;
	}
}
function empaccountedit()
{
var msg;
var msgflag=0;
msg="Please Check the Following\n";

	if(document.frmempaccount.oldpassword.value=="")
	{
		msg+="\n\tOld Password";
		if(msgflag!=1)document.frmempaccount.oldpassword.focus();
		msgflag=1;
	}
	if(document.frmempaccount.newpassword.value=="")
	{
		msg+="\n\tNew Password";
		if(msgflag!=1)document.frmempaccount.newpassword.focus();
		msgflag=1;
	}
	
	if(document.frmempaccount.confirmpassword.value=="")
	{
		msg=msg + '\n\tConfirm Password';
		if(msgflag!=1)document.frmempaccount.confirmpassword.focus();
		msgflag=1;
	}
	if(document.frmempaccount.newpassword.value!= document.frmempaccount.confirmpassword.value)
	{
		msg=msg + '\n\tNew Password and Confirm Password doesnot match';
		msgflag=1;
	}
			if(msgflag==1)
	{
			alert(msg);
			return false;
	}
	else
	{
			document.frmempaccount.action="empaccount_action.php";
			document.frmempaccount.submit();
			return true;
	}
}
function checkp()
{
var msg;
var msgflag=0;
msg="Following Values Can't be blank\n";

	if(document.frmpass.oldpassword.value=="")
	{
		msg+="\n\tOld Password";
		if(msgflag!=1)document.frmpass.oldpassword.focus();
		msgflag=1;
	}
	if(document.frmpass.newpassword.value=="")
	{
		msg+="\n\tNew Password";
		if(msgflag!=1)document.frmpass.newpassword.focus();
		msgflag=1;
	}
	
	if(document.frmpass.confirmpassword.value=="")
	{
		msg=msg + '\n\tConfirm Password';
		if(msgflag!=1)document.frmpass.confirmpassword.focus();
		msgflag=1;
	}
	if(document.frmpass.newpassword.value!= document.frmpass.confirmpassword.value)
	{
		msg=msg + '\n\tNew Password and Confirm Password doesnot match';
		msgflag=1;
	}
			if(msgflag==1)
	{
			alert(msg);
			return false;
	}
	else
	{
			document.frmpass.action="pass_action.php";
			document.frmpass.submit();
			return true;
	}
}

function empcompanyedit()
{
	var msg;
	var msgflag=0;
	msg="Please Check the Following\n";
	
if(document.frmempcompany.companyname.value=="")
	{
		msg=msg + '\n\tCompany Name';
		if(msgflag!=1)document.frmempcompany.companyname.focus();
		msgflag=1;
	}
	if(document.frmempcompany.addressline1.value=="")
	{
		msg=msg + '\n\tAddress Line1';
		if(msgflag!=1)document.frmempcompany.addressline1.focus();
		msgflag=1;
	}
		if(document.frmempcompany.country.value=="")
	{
		msg=msg + '\n\tCountry';
		if(msgflag!=1)document.frmempcompany.country.focus();
		msgflag=1;
	}
	/*
	if(document.frmempcompany.state.value=="")
	{
		msg=msg + '\n\tState';
		if(msgflag!=1)document.frmempcompany.state.focus();
		msgflag=1;
	}
	*/
	if(document.frmempcompany.companytype.value=="")
	{
		msg=msg + '\n\tCompany Type';
		if(msgflag!=1)document.frmempcompany.companytype.focus();
		msgflag=1;
	}
	if(document.frmempcompany.industrytype.value=="")
	{
		msg=msg + '\n\tIndustry Type';
		if(msgflag!=1)document.frmempcompany.industrytype.focus();
		msgflag=1;
	}
	if(document.frmempcompany.companycategory.value=="")
	{
		msg=msg + '\n\tCompany Category';
		if(msgflag!=1)document.frmempcompany.companycategory.focus();
		msgflag=1;
	}
	if(document.frmempcompany.salesturnover.value=="")
	{
		msg=msg + '\n\tSales Tunover';
		if(msgflag!=1)document.frmempcompany.salesturnover.focus();
		msgflag=1;
	}
	if(document.frmempcompany.companyprofile.value=="")
	{
		msg=msg + '\n\tCompany Profile';
		if(msgflag!=1)document.frmempcompany.companyprofile.focus();
		msgflag=1;
	}
	if(document.frmempcompany.zip.value=="")
	{
		msg=msg + '\n\tZipcode';
		if(msgflag!=1)document.frmempcompany.zip.focus();
		msgflag=1;
	}
	if(msgflag==1)
	{
			alert(msg);
			return false;adchk()
	}
	else
	{
			document.frmempcompany.action="empcompany_action.php";
			document.frmempcompany.submit();
			return true;
	}
}
function empadditionaledit()
{
	var msg;
	var msgflag=0;
	msg= "Please check the following\n";
	
	if(document.formemp.employeenos.value=="")
	{
		msg=msg + '\n\tEmployeenos';
		if(msgflag!=1)document.formemp.employeenos.focus();
		msgflag=1;
	}
	if(document.formemp.branchnos.value=="")
	{
		msg=msg + '\n\tBranchnos';
		if(msgflag!=1)document.formemp.branchnos.focus();
		msgflag=1;
	}
	if(document.formemp.timezone.value=="")
	{
		msg=msg + '\n\tTime Zone';
		if(msgflag!=1)document.formemp.timezone.focus();
		msgflag=1;
	}
	if(document.formemp.websiteurl.value=="")
	{
		msg=msg + '\n\tWebsite URL';
		if(msgflag!=1)document.formemp.websiteurl.focus();
		msgflag=1;
	}
	
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.formemp.action="empadditional_action.php";
		document.formemp.submit();
		return true;
	}
}
function empcontactedit()
{
	var msg;
	var msgflag=0;
	msg="Please check the following\n";
	
	if(document.frmempcontact.contactname.value=="")
	{
		msg=msg + '\n\tContact Name';
		if(msgflag!=1)document.frmempcontact.contactname.focus();
		msgflag=1;
	}
	if(document.frmempcontact.designation.value=="")
	{
		msg=msg + '\n\tDesignation';
		if(msgflag!=1)document.frmempcontact.designation.focus();
		msgflag=1;
	}
	if(document.frmempcontact.primaryphone.value=="")
	{
		msg=msg + '\n\tPrimary Phone';
		if(msgflag!=1)document.frmempcontact.primaryphone.focus();
		msgflag=1;
	}
	if(document.frmempcontact.primaryemail.value=="")
	{
		msg=msg + '\n\tPrimary Email';
		if(msgflag!=1)document.frmempcontact.primaryemail.focus();
		msgflag=1;
	}
	if(document.frmempcontact.alternateemail.value!="")
	{
		if (!checkemail(document.frmempcontact.alternateemail.value)) 
			{ 
				msg = msg + '\n\tInvalid Alternate Email\r';
				if(msgflag!=1) document.frmempcontact.alternateemail.focus();
				msgflag=1;
			}  
	}
	
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.frmempcontact.action="empcontact_action.php";
		document.frmempcontact.submit();
		return true;
	}
}
function popimage(imgid)
{
	window.open('imgpreview.php?id='+imgid,'Preview','scrollbars=no,status=no,left=100,top=100,width=500,height=190')
	
}

function popphoto(photoid)
{
	
	window.open('photopreview.php?id='+photoid,'Preview','scrollbars=no,status=no,left=100,top=100,width=500,height=190')
	}
function popres(resid)
{
	
	window.open('resumepreview.php?id='+resid,'Preview','scrollbars=no,status=no,left=100,top=100,width=500,height=190')
	}
function photo_win() 
{ 
	myFloater = window.open('photosel.php','Photoupload','scrollbars=no,status=no,left=100,top=100,width=500,height=190')
    //myFloater.focus("Photoupload")
}
function popcover(uid) 
{ 
     myFloater = window.open('coverpreview.php?user='+uid,'myWindow','scrollbars=yes,status=no,left=100,top=100,width=500,height=400')
}
function uploadphoto()
{
	var msg;
	var msgflag=0;
	msg="Please check the values\n";
	if(document.form1.photo.value=="")
	{
		msg=msg + '\n\tUpload Photo';
		if(msgflag!=1)document.form1.photo.focus();
		msgflag=1;
	}
if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.form1.action="uploadphoto_action.php";
		document.form1.submit();
		return true;
	}
}

function postjob()
{
		var msg = 'Please fill in these values to continue:\r';
        var msgflag = 0;
       	
	if(document.formjob.joblocation.value=="")
	{
		msg=msg + '\n\tJob Location';
		if(msgflag!=1)document.formjob.joblocation.focus();
		msgflag=1;
	}
	if(document.formjob.designation.value=="")
	{
		msg=msg + '\n\tDesignation';
		if(msgflag!=1)document.formjob.designation.focus();
		msgflag=1;
	}
	if(document.formjob.education.value=="")
	{
		msg=msg + '\n\tEducation';
		if(msgflag!=1)document.formjob.education.focus();
		msgflag=1;
	}
	
	if(document.formjob.maxyears.value=="")
	{
		msg=msg + '\n\tMaximum Experience';
		if(msgflag!=1)document.formjob.maxyears.focus();
		msgflag=1;
	}
	if(document.formjob.minyears.value=="")
	{
		msg=msg + '\n\tMinimum Experience';
		if(msgflag!=1)document.formjob.minyears.focus();
		msgflag=1;
	}
	/*
	if(document.formjob.minyears.value!="" && document.formjob.maxyears.value!="")
	{
		var temp1;
		temp1=(document.formjob.minyears.value) >= (document.formjob.maxyears.value);
		
		if(temp1==false)
		{
			msg=msg + '\n\tMinimum experience is more than/equal to Maximum experience';
			if(msgflag!=1)document.formjob.minyears.focus();
			msgflag=1;
		}
	}
	*/
	if(document.formjob.industrytype.value=="")
	{
		msg=msg + '\n\tIndustry Type';
		if(msgflag!=1)document.formjob.industrytype.focus();
		msgflag=1;
	}
	if(document.formjob.farea.value=="")
	{
		msg=msg + '\n\tFunctional Area';
		if(msgflag!=1)document.formjob.farea.focus();
		msgflag=1;
	}
	if(document.formjob.jobcategory.value=="")
	{
		msg=msg + '\n\tJob Category';
		if(msgflag!=1)document.formjob.jobcategory.focus();
		msgflag=1;
	}
	if(document.formjob.reference.value=="")
	{
		msg=msg + '\n\tReference';
		if(msgflag!=1)document.formjob.reference.focus();
		msgflag=1;
	}
	if(document.formjob.keywords.value=="")
	{
		msg=msg + '\n\tKey Words';
		if(msgflag!=1)document.formjob.keywords.focus();
		msgflag=1;
	}
	if(document.formjob.posteddate.value=="")
	{
		msg=msg + '\n\tPosted Date';
		if(msgflag!=1)document.formjob.posteddate.focus();
		msgflag=1;
	}
	if(document.formjob.positiontype.value=="")
	{
		msg=msg + '\n\tPosition Type';
		if(msgflag!=1)document.formjob.positiontype.focus();
		msgflag=1;
	}
	if(document.formjob.travel.value=="")
	{
		msg=msg + '\n\tTravel';
		if(msgflag!=1)document.formjob.travel.focus();
		msgflag=1;
	}
	if(document.formjob.openings.value=="")
	{
		msg=msg + '\n\tNumber Of Openings';
		if(msgflag!=1)document.formjob.openings.focus();
		msgflag=1;
	}
	if(document.formjob.daysdisplay.value=="")
	{
		msg=msg + '\n\tNumber of Days of Display';
		if(msgflag!=1)document.formjob.daysdisplay.focus();
		msgflag=1;
	}
	if(document.formjob.expirein.value=="")
	{
		msg=msg + '\n\tDays of Expiry';
		if(msgflag!=1)document.formjob.expirein.focus();
		msgflag=1;
	}
	if(document.formjob.jobstatus.value=="")
	{
		msg=msg + '\n\tJob Status';
		if(msgflag!=1)document.formjob.jobstatus.focus();
		msgflag=1;
	}
	if(document.formjob.keyskills.value=="")
	{
		msg=msg + '\n\tKeyskills';
		if(msgflag!=1)document.formjob.keyskills.focus();
		msgflag=1;
	}
	if(document.formjob.minsalary.value=="")
	{
		msg=msg + '\n\t Minsalary';
		if(msgflag!=1)document.formjob.minsalary.focus();
		msgflag=1;
	}
	if(document.formjob.maxsalary.value=="")
	{
		msg=msg + '\n\t Maxsalary';
		if(msgflag!=1)document.formjob.maxsalary.focus();
		msgflag=1;
	}
	
	if(document.formjob.jobdesc.value=="")
	{
		msg=msg + '\n\tJobDescription';
		if(msgflag!=1)document.formjob.jobdesc.focus();
		msgflag=1;
	}
	if(document.formjob.desprofile.value=="")
	{
		msg=msg + '\n\tDesiredProfile';
		if(msgflag!=1)document.formjob.desprofile.focus();
		msgflag=1;
	}
	/*
	if(document.formjob.minsalary.value!="" && document.formjob.maxsalary.value!="")
	{
		var temp;
		temp=(document.formjob.minsalary.value) >= (document.formjob.maxsalary.value);
		
		if(temp==true)
		{
			msg=msg + '\n\tMinimum Salary is more than/equal to Maximum Salary';
			if(msgflag!=1)document.formjob.minsalary.focus();
			msgflag=1;
		}
	}
	*/
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.formjob.action="job_action.php";
		document.formjob.submit();
		return true;
	}
}
function logchk()
{
	alert("You are already signed in.Please logout and try again");
}
function emplogchk()
{
	alert("You are already signed in.Please logout and try again");
}
function delconfirm(id)
{
		var c=confirm("Are You Sure To Delete the Record?");
		if (c)
		{
				document.frm1.action="deljob.php?id="+id;
				document.frm1.submit();
		}
		
}
function popjob(jid) 
{ 
     myFloater = window.open('jobdetails.php?id='+jid,'myWindow','scrollbars=yes,status=no,left=100,top=10,width=800,height=600')
}
function clickclear(thisfield, defaulttext) {
if (thisfield.value == defaulttext) {
thisfield.value = "";
}
}

function clickrecall(thisfield, defaulttext) 
{
if (thisfield.value == "") {
thisfield.value = defaulttext;
}
}
function chkcat()
{
	 var msg;
	 var msgflag=0;
	 msg="Please check the following\n";
	if(document.form2.category.value=="")
	{
		msg=msg + '\n\tSelect Category';
		if(msgflag!=1)document.form2.category.focus();
		msgflag=1;
	}
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.form2.action="job/searchcat.php";
		document.form2.submit();
		return true;
	}
}
function searchcat()
{
	 var msg;
	 var msgflag=0;
	 msg="Please check the following\n";
	
	if(document.form1.category.value=="")
	{
		msg=msg + '\n\tSelect Category';
		if(msgflag!=1)document.form1.category.focus();
		msgflag=1;
	}
	
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.form1.action="searchcat.php";
		document.form1.submit();
		return true;
	}
}
function fnadvsearch()
{
	 var msg;
	 var msgflag=0;
	 msg="";
	
	if(document.advform.keywords.value=="" && document.advform.location.value=="" && document.advform.salary.value=="" && document.advform.industry.value=="" && document.advform.functionalarea.value=="" && document.advform.mny.value=="mnyrs" && document.advform.mxy.value=="mxyrs" && document.advform.jobstatus[0].checked==false && document.advform.jobstatus[1].checked==false && document.advform.category.value=="Category" && document.advform.jobswithin.value=="")
	{
		msg=msg +'Please enter atleast one search criteria';
		if(msgflag!=1)document.advform.keywords.focus();
		msgflag=1;
	}
	
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.advform.action="advsearch.php";
		document.advform.submit();
		return true;
	}
}

function schk()
{
	//alert("hello");
		if(document.form1.keywords.value=="Keywords" && document.form1.location.value=="Location" && document.form1.category.value=="Category" && document.form1.years.value=="Years" && document.form1.months.value=="Months")
		{
					alert("Please Enter Atleast One Search Criteria");
					document.form1.keywords.focus();
					document.form1.keywords.select();
					return false;
		}
		else
		{
		            document.form1.action="searchres.php";
				    document.form1.submit();
					return true;
		}
							
}
////////////
////////

function indexchk(s)
{
	if(document.form1.keywords.value=="Keywords" && document.form1.location.value=="Location" && document.form1.category.value=="Category")
		{
					alert("Please Enter Atleast One Search Criteria");
					document.form1.keywords.focus();
					document.form1.keywords.select();
					return false;
		}
		else if(s=="job") 
		{           
		            document.form1.action="searchjob.php";
					document.form1.submit();
					return true;
					}
			        
		else if(s=="index"){
					document.form1.action="job/searchjob.php";
					document.form1.submit();
					return true;
					}
}


function sjchk(s)
{
	if(document.form1.keywords.value=="Keywords" && document.form1.location.value=="Location" && document.form1.mny.value=="Mnyrs" && document.form1.mxy.value=="Mxyrs" && document.form1.category.value=="Category")
		{
					alert("Please Enter Atleast One Search Criteria");
					document.form1.keywords.focus();
					document.form1.keywords.select();
					return false;
		}
		
		else if(s=="job") 
		{
					document.form1.action="searchjob.php";
					document.form1.submit();
					return true;
		}
		
}
function cover_win()
{
		window.open('sampleletter.php','SampleCoverLetter','scrollbars=no,status=no,left=300,top=100,width=500,height=400');
}
function coverletter()
{
	 var msg;
	 var msgflag=0;
	 msg="Following Values can't be empty :\n";
	 
	 if(document.formletter.lettertitle.value=="")
	{
		msg=msg + '\n\tCover Letter Title';
		if(msgflag!=1)document.formletter.lettertitle.focus();
		msgflag=1;
	}
	 if(document.formletter.lettermessage.value=="")
	{
		msg=msg + '\n\tCover Letter Message';
		if(msgflag!=1)document.formletter.lettermessage.focus();
		msgflag=1;
	}
	
	if(msgflag==1)
	{
		alert(msg); 
		return false;
	}
	else
	{
		document.formletter.action="coverletter_action.php";
		document.formletter.submit();
		return true;
	}
	 
}

function mailchk()
{
		 var msg;
		 var msgflag=0;
		 msg="Please Check The Following:\n";
		 
		 
		if(document.frmmail.fromadd.value=="")
		{
			msg=msg + '\n\tFrom Address';
			if(msgflag!=1)document.frmmail.fromadd.focus();
			msgflag=1;
		}
		if(!checkemail(document.frmmail.fromadd.value))
		{
			msg+="\r\nInvalid Email ID";
			if(msgflag!=1)document.frmmail.fromadd.focus();
			msgflag=1;
		}
		var arr=new Array();
		var to=document.frmmail.toadd.value;
		arr=to.split(",");
		
		for(i = 0; i < arr.length; i++){
			if(arr[i]!=""){
				if(!checkemail(arr[i]))
				{
					msg+="\r\nInvalid Email ID";
					if(msgflag!=1)document.frmmail.toadd.focus();
					msgflag=1;
				}
			}
		}
		if(document.frmmail.mailsubject.value=="")
		{
			msg=msg + '\n\tMail Subject';
			if(msgflag!=1)document.frmmail.mailsubject.focus();
			msgflag=1;
		}
		if(document.frmmail.mailmessage.value=="")
		{
			msg=msg + '\n\tMail Message';
			if(msgflag!=1)document.frmmail.mailmessage.focus();
			msgflag=1;
		}
		if(msgflag==1)
		{
			alert(msg); 
			return false;
		}
		else
		{
			document.frmmail.action="sendmail.php";
			document.frmmail.submit();
			return true;
		}
}
function adchk()
{
		if(document.form1.keywords.value=="" && document.form1.location.value=="Any" && document.form1.months.value=="months" && document.form1.years.value=="years" && document.form1.currentindustry.value=="currentindustry" && document.form1.currentfunctionalarea.value=="currentfunctionalarea"  && document.form1.role.value==""  && document.form1.dateofavail.value=="dateofavail"  && document.form1.travel.value=="travel" && document.form1.relocate[0].checked==false && document.form1.relocate[1].checked==false && document.form1.category.value=="Category")
		{
					alert("Please Enter Atleast One Search Criteria");
					document.form1.keywords.focus();
					return false;
		}
		else
		{
					document.form1.action="adsearch.php";
					document.form1.submit();
					return true;
												
		}
}

function jobprompt()
{ 
var msg;
		 var msgflag=0;
		 msg="Please Check The Following:\n";
		 		 
		if(document.form.location.value=="")
		{
			msg=msg + '\n\tPreferred Location';
			if(msgflag!=1)document.form.location.focus();
			msgflag=1;
		}
		if(document.form.industry.value=="")
		{
			msg=msg + '\n\tIndustry';
			if(msgflag!=1)document.form.industry.focus();
			msgflag=1;
		}
		if(document.form.yearofexp.value=="")
		{
			msg=msg + '\n\tYearofexp';
			if(msgflag!=1)document.form.yearofexp.focus();
			msgflag=1;
		}
		if(document.form.functionalarea.value=="")
		{
			msg=msg + '\n\tFunctional Area';
			if(msgflag!=1)document.form.functionalarea.focus();
			msgflag=1;
		}
		if(document.form.alertfrequency.value=="")
		{
			msg=msg + '\n\tAlert Frequency';
			if(msgflag!=1)document.form.alertfrequency.focus();
			msgflag=1;
		}
		if(document.form.saveas.value=="")
		{
			msg=msg + '\n\tSave Jobprompt As';
			if(msgflag!=1)document.form.saveas.focus();
			msgflag=1;
		}
		if(msgflag==1)
		{
			alert(msg); 
			return false;
		}
		else
		{
			document.form.action="jobprompt_action.php";
			document.form.submit();
			return true;
		}
}
function myjob()
{
document.frm1.action="myjobprompt_action.php";
document.frm1.submit();
return true;
}
function promptsearch()
{
var msg;
var flag=0;
msg="Please Check the Following\n";

	if(document.frm.alertfrequency.value=="")
	{
		msg+="\r\nSearch Text Can't be Blank";
		if(flag!=1)document.frm.alertfrequency.focus();
		flag=1;
	}
	if(flag==1)
	{
			alert(msg);
			return false;
	}
	else
	{
			return true;
	}
}
function faqchk()
{
var msg;
var msgflag=0;
msg="Please Check the Following\n";
	
	if(document.form.name.value=="")
		{
			msg=msg + '\n\tYour Name';
			if(msgflag!=1)document.form.name.focus();
			msgflag=1;
		}
		
		if(document.form.emailid.value=="")
		{
			msg=msg + '\n\tYour Email Id';
			if(msgflag!=1)document.form.emailid.focus();
			msgflag=1;
		}
		else
		{
		if(!checkemail(document.form.emailid.value))
			{
			msg=msg + "\r\nInvalid Email ID";
			if(msgflag!=1)document.form.emailid.focus();
			msgflag=1;
			}
		}	
		if(document.form.feedback.value=="")
		{
			msg=msg + '\n\tYour Feed Back';
			if(msgflag!=1)document.form.feedback.focus();
			msgflag=1;
		}
		if(msgflag==1)
		{
			alert(msg); 
			return false;
		}
		else
		{
			document.form.action="feedback_action.php";
			document.form.submit();
			return true;
		}
}
	function chkAdvertisersInputControls()
	{
		document.advertiser_info.submit();
		}
	function loadHome()
	{
		location.href='http://www.getcomputerjobs.co.in';
		}





	function frm_chk()
{
var alertMsg='Please Provide the following informations: '+"\r\n";
var alertMsgFlag=0;
if(document.advertiser_info.adContactName.value<=3)
{
alertMsg+="Enter Contact Name?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adContactName.focus();
alertMsgFlag=1;
}
}

if(document.advertiser_info.adWebsite.value<=3)
{
alertMsg+="Enter Website Url?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adWebsite.focus();
alertMsgFlag=1;
}
}
else if(!checkWebUrl())
{
alertMsg+="Enter Valid Website Url? (ex:www.domainname.com)\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adWebsite.focus();
alertMsgFlag=1;
}
	
	}


if(document.advertiser_info.adContactPerson.value<=3)
{
alertMsg+="Enter Contact Persons Name?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adContactPerson.focus();
alertMsgFlag=1;
}
}

if(document.advertiser_info.adContactEmail.value<=3)
{
alertMsg+="Enter email address?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adContactEmail.focus();
alertMsgFlag=1;
}
}
else if(!emailValidaion())
{
alertMsg+="Enter valid email address?  (ex:name@domain.com)\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adContactEmail.focus();
alertMsgFlag=1;
}

}
if(document.advertiser_info.adContactNumber.value<=3)
{
alertMsg+="Enter Contact Number?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adContactNumber.focus();
alertMsgFlag=1;
}
}
else if(!checkPhNumber())
{
alertMsg+="Enter Valid Contact Number?  (ex:001-2346778 or 91-9965726557)\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adContactNumber.focus();
alertMsgFlag=1;
}
}


if(document.advertiser_info.adLocation.options[document.advertiser_info.adLocation.selectedIndex].value==0)
{
alertMsg+="Select the location?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adLocation.focus();
alertMsgFlag=1;
}
}

if(document.advertiser_info.adBudget.options[document.advertiser_info.adBudget.selectedIndex].value==0)
{
alertMsg+="Select the Budget?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adBudget.focus();
alertMsgFlag=1;
}
}

if(document.advertiser_info.adTimeToCall.options[document.advertiser_info.adTimeToCall.selectedIndex].value==0)
{
alertMsg+="Select the Prefered time for contact?\r\n";
if(alertMsgFlag!=1)
{
document.advertiser_info.adTimeToCall.focus();
alertMsgFlag=1;
}
}


if(alertMsgFlag==1)
{
alert(alertMsg);
}
else
{
document.advertiser_info.submit();
}

}

function emailValidaion()
{
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.advertiser_info.adContactEmail.value)){
return (true)
}
//alert("Invalid E-mail Address! Please re-enter.")
return (false)
}

function checkPhNumber()
{
if(/^([0-9]*)-([0-9]*)$/.test(document.advertiser_info.adContactNumber.value)){
return (true)
}
return (false)
}

function checkWebUrl()
{
	if(/^www\.\w+([-_]?\w+)\.\w+$/.test(document.advertiser_info.adWebsite.value))
	{
	return (true)
	}
	return (false)
	}
	
	function mailsearch()
{
	//alert("hello");
		if(document.frmmail.keywords.value=="Keywords" && document.frmmail.location.value=="Location" && document.frmmail.category.value=="Category" && document.frmmail.years.value=="Years")
		{
					alert("Please Enter Atleast One Search Criteria");
					document.frmmail.keywords.focus();
					document.frmmail.keywords.select();
					return false;
		}
		else
		{
		            document.frmmail.action="mailsearch.php";
				    document.frmmail.submit();
					return true;
		}
							
}
function mailsend()
{
		 var msg;
		 var msgflag=0;
		 msg="Please Check The Following:\n";
		 
		
		if(document.frmmail.mailsubject.value=="")
		{
			msg=msg + '\n\tMail Subject';
			if(msgflag!=1)document.frmmail.mailsubject.focus();
			msgflag=1;
		}
		if(document.frmmail.mailbody.value=="")
		{
			msg=msg + '\n\tMail Body';
			if(msgflag!=1)document.frmmail.mailbody.focus();
			msgflag=1;
		}
		if(msgflag==1)
		{
			alert(msg); 
			return false;
		}
		else
		{
			document.frmmail.action="mailing.php";
			document.frmmail.submit();
			return true;
		}
}
function rss()
{
document.footer.action="job/feeds";
document.footer.submit();
}