/*This function changes action of the form and submits it to fetch_contacts.php*/
var id	=	0;

function fetchContacts()
{
	var contactString = "";
	var count		  =  0;
	
	for(var i = 0;i < document.getElementById("selContacts[]").options.length;i++)
	{
		if(document.getElementById("selContacts[]").options[i].selected)
		{
			if(count > 0)
			{
				contactString += ",";
			}
				contactString += document.getElementById("selContacts[]").options[i].text;
				count++;
		}
	}
	
	document.form1.txtTo.value = contactString;
}

/*This function will make all checkboxes on the form checked or unchecked*/

function checkAll(CheckBoxControl)
{
	if(CheckBoxControl.checked == true)   
	{
		var i = 0;
		var j = 0;
		
		for (i=0; i < document.forms[0].elements.length; i++) 
		{
			if(document.forms[0].elements[i].name == "chkbox" + j)
			{
				document.forms[0].elements[i].checked = true;
			}
			j++;
		}
	}
	
	else if(CheckBoxControl.checked == false)
	{
		var i = 0;
		var j = 0;
		
		for (i=0; i < document.forms[0].elements.length; i++) 
		{
			if(document.forms[0].elements[i].name == "chkbox" +j)
			{
				document.forms[0].elements[i].checked = false;
			}
			j++;
		}
	}
}

/*This function will make all checkboxes on the form checked or unchecked*/

function checkAllOneOne(CheckBoxControl)
{ 

	
	if(CheckBoxControl.checked == true)   
	{ 
		var i = 0;
		var j = 1;
		
		for (i=1; i < document.forms[0].elements.length; i++) 
		{	
			
			if(document.forms[0].elements[i].name == "chkbox" + j)
			{	
				document.forms[0].elements[i].checked = true;
				j++;
			}
		}
	}
	
	else if(CheckBoxControl.checked == false)
	{
		var i = 0;
		var j = 1;
		
		for (i=1; i < document.forms[0].elements.length; i++) 
		{
			if(document.forms[0].elements[i].name == "chkbox" +j)
			{
				document.forms[0].elements[i].checked = false;
				j++;
			}
		}
	}
}

/*This function will make all checkboxes on the form checked or unchecked*/

function checkAllOneOne1(CheckBoxControl)
{ 
	
	if(CheckBoxControl.checked == true)   
	{ 
		var i = 0;
		var j = 1;
		
		for (i=1; i < document.form1.elements.length; i++) 
		{	
			
			if(document.form1.elements[i].name == "chkbox" + j)
			{	
				document.form1.elements[i].checked = true;
				j++;
			}
		}
	}
	
	else if(CheckBoxControl.checked == false)
	{
		var i = 0;
		var j = 1;
		
		for (i=1; i < document.form1.elements.length; i++) 
		{
			if(document.form1.elements[i].name == "chkbox" +j)
			{
				document.form1.elements[i].checked = false;
				j++;
			}
		}
	}
}

/*This function will make all checkboxes on the form checked or unchecked*/






function checkAllOne(CheckBoxControl)
{
	if(CheckBoxControl.checked == true)   
	{
		var i = 0;
		var j = 1;
		for (i=1; i < document.forms[0].elements.length; i++) 
		{
//			alert (document.forms[0].elements[i].name + "==" + "chkbox" + j);
			if(document.forms[0].elements[i].name == "chkbox" + j)
			{
//				alert(document.forms[0].elements[i].name + "now checked");
				document.forms[0].elements[i].checked = true;
				j++;
			}
		}
	}
	
	else if(CheckBoxControl.checked == false)
	{
		var i = 0;
		var j = 1;
		
		for (i=1; i < document.forms[0].elements.length; i++) 
		{
//			alert (document.forms[0].elements[i].name + "==" + "chkbox" + j);
			if(document.forms[0].elements[i].name == "chkbox" +j)
			{
				document.forms[0].elements[i].checked = false;
				j++;
			}
		}
	}
}




function confirmCheckBoxes(flag)
{
	var frm;
	frm	=	this.form1;
	var intCount = document.getElementById("hid_Cont").value;
		
	for(i=0;i < intCount;i++)
	{
		if(document.getElementById("chkbox"+(i+1)).checked == true)
		{
			selected = true;
			break;
		}
		
		else
		{
			selected = false;
		}
	}
	
	if(!selected)
	{
		alert("No message selcted!");
		document.form1.elements(0).focus();
		return false;
	}
	
	/*if flag = 1 form shall be submited to delete_from_inbox.php page
	  if flag = 2 form shall be submited to delete_from_sent.php page 
	  if flag = 3 form shall be submited to delete_from_trash.php page
	*/
	
	if(flag == 1)	
	{
		document.form1.action = "delete_from_inbox.php";
		document.form1.submit(); 	
	}
	
	else if(flag == 2)	
	{
		document.form1.action = "delete_from_sent_items.php";
		document.form1.submit(); 	
	}
	
	else if(flag == 3)
	{
		document.form1.action = "delete_from_trash.php";
		document.form1.submit(); 	
	}	
	
}
//...............................................................................................  
function validate_Form_user()
{
	
	arrayVal	=	new Array();
		
	arrayVal[0]	=	document.getElementById("txt_fname").value;
	arrayVal[1]	=	document.getElementById("txt_mname").value;
	arrayVal[2]	=	document.getElementById("txt_lname").value;
	arrayVal[3]	=	document.getElementById("txt_address1").value;
	arrayVal[4]	=	document.getElementById("txt_address2").value;
	arrayVal[5]	=	document.getElementById("user_country").value;
	arrayVal[6]	=	document.getElementById("userstate").value;
	arrayVal[7]	=	document.getElementById("txt_city").value;
	arrayVal[8]	=	document.getElementById("txt_zipcode").value;
	arrayVal[9]	=	document.getElementById("txt_home_phone").value;
	arrayVal[10]=	document.getElementById("txt_cell_phone").value;
	arrayVal[11]=	document.getElementById("combo_time_zone").value;
	
	
	if(check_name(document.getElementById("txt_fname").value))
	{
		alert("Please enter your First Name");
		document.getElementById("txt_fname").value=""
		document.getElementById("txt_fname").focus();
		return false;
	}
	
	if(check_lname(document.getElementById("txt_lname").value ))
	{
		alert("Please enter your Last Name");
		document.getElementById("txt_lname").value=""
		document.getElementById("txt_lname").focus();
		return false;
	}
	
	if(check_address(document.getElementById("txt_address1").value))
	{
		alert("Please enter your Address 1");
		document.getElementById("txt_address1").value	="";
		document.getElementById("txt_address1").focus();
		return false;
	}
	
	if(document.getElementById("user_country").value == "")
	{
		alert("Please select the Country");
		document.getElementById("user_country").focus();
		return false;
	}
	
	if(document.getElementById("userstate").value == "")
	{
		alert("Please select the State");
		document.getElementById("userstate").focus();
		return false;
	}
	
	if(isvalid_exp1(document.getElementById("txt_city").value ))
		{
			alert("Enter the City Name");
			document.getElementById("txt_city").value	=""
			document.getElementById("txt_city").focus();
			return false;
		}
	
	if(check_zipcode(document.getElementById("txt_zipcode").value))
		{
			alert("Enter the Zip Code/Postal Code");
			document.getElementById("txt_zipcode").focus();
			return false;
		}
	user_info_on_popup(arrayVal);
	return true;
}	
//...............................................................................................  
function check_zipcode(str)
	{
		
		if(isNaN(str) || str=="")
			{
				return true;
			}
		else
			{
				return false;
			}
	}
//..............................	
function check_name(str)
	{
		var str1	=	new String ();
		str1		=	str;	
		var val		=	str1.length;
		
		if(isNaN(str1)==false)
			{
				return true;
			}
		else if (val==0)
			{
				return true;
			}
		else
			{
			return false;
			}
		
	}
//..............................	
function check_lname(str)
	{
		var str1	=	new String ();
		str1		=	str;	
		var val		=	str1.length;
		
		if(isNaN(str1)==false)
			{
				return true;
			}
		else if (val==0)
			{
				return true;
			}
		else
			{
			return false;
			}
		
	}
//..............................	
function check_address(str)
	{
		var str1	=	new String ();
		str1		=	str;	
		var val		=	str1.length;
		
		if(isNaN(str1)==false)
			{
				return true;
			}
		else if (val==0)
			{
				return true;
			}
		else
			{
			return false;
			}
		
	}
//..............................	

function isvalid_exp1(txt)
		{
var val	=	txt.match(/[0-9]+[abcdefghijklmnopqrstuvwxyz]+|[abcdefghijklmnopqrstuvwxyz]+[0-9]+ | [0-9]+/g);

var str1	=	new String ();
str1		=	txt;	
var val1	=	str1.length;
		if(val==null)
			{
					if(val1==0)
					{
						return true;
					}
				else if(txt==" ")
					{
						return true;
						
					}
				else if(isNaN(txt)==false)
					{
						return true;
					}
				else
					{
						return false;
					}
			}
		else
			{
				return true;
			}
		}
		
//...............................................................................................  
function valid_cetagory()
	{
		if(document.getElementById("combo_cat").value=="")
			{
				alert("Please select the category from Drop Down list");
				return false;
			}
		else
			{
				return true;
			}
			
	}
//...............................................................................................  
function validate_Form_employer()
{
	
	arrayVal	=	new Array();
		
	arrayVal[0]	=	document.getElementById("txt_fname").value;
	arrayVal[1]	=	document.getElementById("txt_lname").value;
	arrayVal[2]	=	document.getElementById("txt_company_name").value;
	if(document.getElementById("chk_notify").checked)
		{
			arrayVal[11]=	document.getElementById("chk_notify").value;
		}
	else
		{
			arrayVal[11]=	"";
		}
	if(check_name(document.getElementById("txt_fname").value))
	{
		alert("Please enter your First Name");
		document.getElementById("txt_fname").value="";
		document.getElementById("txt_fname").focus();
		return false;
	}
	
	if(check_lname(document.getElementById("txt_lname").value))
	{
		alert("Please enter your Last Name");
		document.getElementById("txt_lname").value	=	"";
		document.getElementById("txt_lname").focus();
		return false;
	}
	
	if(check_companyname(document.getElementById("txt_company_name").value))
	{
		alert("Please enter your Company Name");
		document.getElementById("txt_company_name").value	=	"";	
		document.getElementById("txt_company_name").focus();
		return false;
	}
	
	emply_info_on_popup(arrayVal);
	return true;
}	
//..............................	
function check_companyname(str)
	{
		var str1	=	new String ();
		str1		=	str;	
		var val		=	str1.length;
		
		if(isNaN(str1)==false)
			{
				return true;
			}
		else if (val==0)
			{
				return true;
			}
		else
			{
			return false;
			}
		
	}
function check_title(str)
	{
		var str1	=	new String ();
		str1		=	str;	
		var val		=	str1.length;
		
		if(isNaN(str1)==false)
			{
				return true;
			}
		else if (val==0)
			{
				return true;
			}
		else
			{
			return false;
			}
		
	}

//.......................................................................................	
/*This function checks blog length, whether it is more than 120 characters or not*/

function checkBlogLength()
{
	var str = "";
	
	str = trimString(document.form1.txtDetail.value);
	
/*	if(str.length > 120)
	{		
		alert("Blog detail must not be more than 120 characters");
		return false;
	}*/
	
	return true;
}

/*This function checks forum length, whether it is more than 120 characters or not*/

function checkForumLength()
{
	var str = "";
	
	str = trimString(document.form1.txtDetailForum.value);
	
/*	if(str.length > 120)
	{		
		alert("Forum detail must not be more than 120 characters");
		return false;
	}*/
	
	return true;
}

/*This function checks forum post post length, whether it is more than 120 characters or not*/

function checkForumPostLength()
{
	var str = "";
	
	str = trimString(document.form1.txtReply.value);
	
/*	if(str.length > 120)
	{		
		alert("Forum reply must not be more than 120 characters");
		return false;
	}*/
	
	return true;
}

/*This function removes leading and trailing white spaces from a string*/

function trimString(str)
{
	str = this != window? this : str;
  	return str.replace(/^\s+|\s+$/g, '').replace(/\s+$/g, '');
}

/*This function performs date comparison between two dates*/

function dateComparison(obj,val1,val2,lbl1,lbl2)
{
	if(document.forms[obj].selType.value == "Daily")
	{
		if(document.forms[obj].txtStartDate.value == "")
		{
			alert("Please select a start date");
			document.forms[obj].txtStartDate.focus();
			return false;
		}
	}

	else if(document.forms[obj].selType.value == "One")
	{
		if(document.forms[obj].txtStartDate.value == "")
		{
			alert("Please select a start date");
			document.forms[obj].txtStartDate.focus();
			return false;
		}
	}

	else if(document.forms[obj].selType.value == "Monthly")
	{
		if(document.forms[obj].txtStartDate.value == "")
		{
			alert("Please select a start date");
			document.forms[obj].txtStartDate.focus();
			return false;
		}
		
		else if(document.forms[obj].txtEndDate.value == "")
		{
			alert("Please select an end date");
			document.forms[obj].txtEndDate.focus();
			return false;
		}
	}
	
	else if(document.forms[obj].selType.value == "Weekly")
	{
		if(document.forms[obj].txtStartDate.value == "")
		{
			alert("Please select a start date");
			document.forms[obj].txtStartDate.focus();
			return false;
		}
		
		else if(document.forms[obj].txtEndDate.value == "")
		{
			alert("Please select an end date");
			document.forms[obj].txtEndDate.focus();
			return false;
		}
	}
		
	var frmName = document.forms[obj].name;	
	var startDate = eval('document.'+frmName+'.'+val1);
	var endDate   = eval('document.'+frmName+'.'+val2);
	
	if(startDate.value != "" && endDate.value != "")
	{
		if(startDate.value > endDate.value)
		{
			alert(lbl1+' must be less or equal to '+lbl2);
			return false;
		}
		
		return true;
	}
}
function delete_cat()
{
	$var	= confirm("Are you sure to delete this category? \n if you delete this catrgory all records related \nto this category will be lost");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function delete_exp()
{
	$var	= confirm("Are you sure to delete this exprience?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function delete_edu()
{
	$var	= confirm("Are you sure to delete this education?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function delete_cv1()
{
	$var	= confirm("Are you sure to delete this CV?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function delete_userall()
{
	$var	= confirm("Are you sure to delete these users?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}

}
function delete_cont()
{
	$var	= confirm("Are you sure to delete this user?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}

}
function delete_reviews()
{
	$var	= confirm("Are you sure to delete this ?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}

}
function delete_pic()
{
	$var	= confirm("Are you sure to delete this Picture?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}

}
//...............................
function delete_category()
{
	$var	= confirm("Are you sure to delete this Category?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}

}
//.................................
function delete_Contents()
{
	$var	= confirm("Are you sure to delete this Record?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}

}
//.................................
function confirm_deletionForCompany(str)
{
	$var	= confirm("Are you sure to delete this Company\n If you delete this Company All the Jobs\n related to this will be delete Automatically?");
	if($var==true)
	{
		deleteComp(str);
	}
	else
	{
		showCompanies();
	}

}

//.................................
function delete_postedjobs()
{
	$var	= confirm("Are you sure to delete this Record?");
	if($var==true)
	{
		return true;
		
	}
	else
	{
		return false;
		
	}

}

//.................................
function delete_MoreContents()
{
	$var	= confirm("Are you sure to delete these Records?");
	if($var==true)
	{
		return true;
	}
	else
	{
		return false;
	}

}

//.................................
function chck_pay_age()
{

	 if(document.frm_user_step1.varify_age.checked == false)
		{
				alert("You are less than 18 so you can not register in this site");
				return false;
		}
	if(document.frm_user_step1.exct_user.checked || document.frm_user_step1.basic_user.checked)
		{
	
				return true;
		}
	else
		{
			alert("Please select the payment first.. ");
			return false;

		}

	
}
//.............................
function submit_form()
	{
		document.frm_user_step1.submit();
	}
//..............................................
function hideDiv(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.hideshow.style.visibility = 'hidden'; 

} 
} 
}

//..............................................
function hideDiv1(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('alljobs').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.alljobs.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.alljobs.style.visibility = 'hidden'; 

} 
} 
}
//..............................................
function showDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'visible'; 
} 
} 
} 
//............................................................
function showDiv1() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('alljobs').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.alljobs.visibility = 'visible'; 
} 
else { // IE 4 
document.all.alljobs.style.visibility = 'visible'; 
} 
} 
} 
//..............................................
function showDivPopupCity() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('city_popup').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.city_popup.visibility = 'visible'; 
} 
else { // IE 4 
document.all.city_popup.style.visibility = 'visible'; 
} 
} 
} 
//..............................................
function hideDivPopupCity(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('city_popup').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.city_popup.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.city_popup.style.visibility = 'hidden'; 

} 
} 
}

//............................................................
function showApplicants() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('applicants').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.applicants.visibility = 'visible'; 
} 
else { // IE 4 
document.all.applicants.style.visibility = 'visible'; 
} 
} 
} 
//..............................................
function showApplicantsHide(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('applicants').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.applicants.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.applicants.style.visibility = 'hidden'; 

} 
} 
}
//............................................................
function showTopEmployers() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('top_emply').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.top_emply.visibility = 'visible'; 
} 
else { // IE 4 
document.all.top_emply.style.visibility = 'visible'; 
} 
} 
} 
//..............................................
function showTopEmployersHide(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('top_emply').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.top_emply.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.top_emply.style.visibility = 'hidden'; 

} 
} 
}

//..............................................
function hideDivCompany(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('companyprofile').style.visibility = 'hidden';

} 
else { 
if (document.layers) { // Netscape 4 
document.companyprofile.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.companyprofile.style.visibility = 'hidden'; 

} 
} 
}
//..............................................
function hideDivUserInfo(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('user_info').style.visibility = 'hidden';

} 
else { 
if (document.layers) { // Netscape 4 
document.user_info.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.user_info.style.visibility = 'hidden'; 

} 
} 
}
//..............................................
function showDivUserInfo() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('user_info').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.user_info.visibility = 'visible'; 
} 
else { // IE 4 
document.all.user_info.style.visibility = 'visible'; 
} 
} 
} 

//..............................................
function hideDivEmplyInfo(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('emply_info').style.visibility = 'hidden';

} 
else { 
if (document.layers) { // Netscape 4 
document.emply_info.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.emply_info.style.visibility = 'hidden'; 

} 
} 
}
//..............................................
function showDivEmplyInfo() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('emply_info').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.emply_info.visibility = 'visible'; 
} 
else { // IE 4 
document.all.emply_info.style.visibility = 'visible'; 
} 
} 
} 

//..............................................
function hideDivBidAmount(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('bidamount').style.visibility = 'hidden';

} 
else { 
if (document.layers) { // Netscape 4 
document.bidamount.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.bidamount.style.visibility = 'hidden'; 

} 
} 
}
//..............................................
function showDivBidAmount() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('bidamount').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.bidamount.visibility = 'visible'; 
} 
else { // IE 4 
document.all.bidamount.style.visibility = 'visible'; 
} 
} 
} 
//..............................................
function hideDivChatWindow(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('chatWindow').style.visibility = 'hidden';

} 
else { 
if (document.layers) { // Netscape 4 
document.chatWindow.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.chatWindow.style.visibility = 'hidden'; 

} 
} 
}
//..............................................
function showChatWindow() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('chatWindow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.chatWindow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.chatWindow.style.visibility = 'visible'; 
} 
} 
} 
//..............................................

//..............................................
function hideDivJobDescript(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('jobdescription').style.visibility = 'hidden';

} 
else { 
if (document.layers) { // Netscape 4 
document.jobdescription.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.jobdescription.style.visibility = 'hidden'; 

} 
} 
}
//..............................................
function showDivJobDescript() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('jobdescription').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.jobdescription.visibility = 'visible'; 
} 
else { // IE 4 
document.all.jobdescription.style.visibility = 'visible'; 
} 
} 
} 




//..............................................
function showDivCompany() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('companyprofile').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.companyprofile.visibility = 'visible'; 
} 
else { // IE 4 
document.all.companyprofile.style.visibility = 'visible'; 
} 
} 
} 

//.............................................................
function hideDivbasic(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshowbasic').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.hideshow.style.visibility = 'hidden'; 

} 
} 
}

function showDivbasic() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshowbasic').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'visible'; 
} 
} 
} 
//.............................................................
function hideDivSubCat(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('sub_cat_pop').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.sub_cat_pop.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.sub_cat_pop.style.visibility = 'hidden'; 

} 
} 
}

function showDivSubCat() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('sub_cat_pop').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.sub_cat_pop.visibility = 'visible'; 
} 
else { // IE 4 
document.all.sub_cat_pop.style.visibility = 'visible'; 
} 
} 
} 
//.............................................................
function hideDivAddCompany(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('add_company').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.add_company.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.add_company.style.visibility = 'hidden'; 

} 
} 
}

function showDivAddCompany() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('add_company').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.add_company.visibility = 'visible'; 
} 
else { // IE 4 
document.all.add_company.style.visibility = 'visible'; 
} 
} 
} 
//.............................................................
function hideDivMyProfile(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('viewMyProfile').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.viewMyProfile.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.viewMyProfile.style.visibility = 'hidden'; 

} 
} 
}

function showDivMyProfile() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('viewMyProfile').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.viewMyProfile.visibility = 'visible'; 
} 
else { // IE 4 
document.all.viewMyProfile.style.visibility = 'visible'; 
} 
} 
} 
//.............................................................
function hideDivcityDropDown(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('drop_down_city').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.drop_down_city.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.drop_down_city.style.visibility = 'hidden'; 

} 
} 
}

function showDivcityDropDown() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('drop_down_city').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.drop_down_city.visibility = 'visible'; 
} 
else { // IE 4 
document.all.drop_down_city.style.visibility = 'visible'; 
} 
} 
} 
//.............................................................
function hideDivFlag_job(action) { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('flag_job').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.flag_job.visibility = 'hidden'; 

} 
else { // IE 4 
document.all.flag_job.style.visibility = 'hidden'; 

} 
} 
}

function showDivFlag_job() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('flag_job').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.flag_job.visibility = 'visible'; 
} 
else { // IE 4 
document.all.flag_job.style.visibility = 'visible'; 
} 
} 
} 

//....................ajax for combox.........................
var xmlHttp;
function show_state(str)
	{ 
		document.getElementById("txthint").innerHTML= 'Wait...<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flag=state&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChanged() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("txthint").innerHTML=xmlHttp.responseText;
			} 
	}
//....................ajax for combox.........................
function showStateEdit(str)
	{ 
		//alert(str);
		document.getElementById("txthint").innerHTML= 'Wait...<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flag=empyEdit&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChanged() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("txthint").innerHTML=xmlHttp.responseText;
			} 
	}

//...............................................................
function check_mail(str)
	{ 
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flag=mail&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedmail;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}

function stateChangedmail() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("available").innerHTML=xmlHttp.responseText;
			} 
	}
//.......................................................................................
function check_pass()
	{ 
		var str1	=	"";
		var str2	=	"";
		str1	=	document.getElementById("txt_password").value;
		str2	=	document.getElementById("txt_confir_password").value;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flag=pass&text1="+str1+"&text2="+str2;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedpass;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}

function stateChangedpass() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("notmach").innerHTML=xmlHttp.responseText;
			} 
	}
//.......................................................................................
function check_passlength()
	{ 
		var str1	=	"";
		var str2	=	"";
		str1	=	document.getElementById("txt_password").value;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flag=len&text1="+str1;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedPassLength;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}

function stateChangedPassLength() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("length").innerHTML=xmlHttp.responseText;
			} 
	}

//..................................for sub category.....................................................
function show_subcategory(str)
	{ 
		//alert(str);
		document.getElementById("cate").innerHTML= 'Wait...<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=cat&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForCategory;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCategory() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("cate").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Activate and Deactivate the jobs...........................................
function showActiveOrDeactiveJob(str)
	{ 
		id	=	str;
		//alert("cate"+str);
		document.getElementById("cat"+id).innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=Ad&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForActive;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForActive() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("cat"+id).innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function makeJobHot(str)
	{ 
		id	=	str;
		//alert("cate"+str);
		document.getElementById("hot"+id).innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=hot&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForHotJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForHotJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("hot"+id).innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Delete the jobs...........................................
function deleteJobs(str)
	{ 
		id	=	str;
		//alert("cate"+str);
		document.getElementById("del"+id).innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=del&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForDelJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForDelJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert(xmlHttp.responseText);
				//document.getElementById("allJobs").innerHTML=xmlHttp.responseText;
				window.location="employer-dashboard.html";
			} 
	}
//..................................Edit jobs...........................................
function EditJobsInDb(str)
	{ 
		//id	=	str;
		//alert("cate"+str);
		var arrayValue	= new Array();
		var arrayValue2	= new Array();
		
		arrayValue [0]		= document.getElementById("comboCat").value;
		//arrayValue [1]		= document.getElementById("comboSubCat").value;
		arrayValue [2]		= document.getElementById("txtJobs").value;
		arrayValue [4]		= document.getElementById("txtEmpRequire").value;
		arrayValue [5]		= document.getElementById("txtDesc").value;
		arrayValue [6]		= str;
		arrayValue [7]		= document.getElementById("company").value;
		arrayValue [8]		= document.getElementById("txtEmpExp").value;
		arrayValue [9]		= document.getElementById("budget").value;
		arrayValue [10]		= document.getElementById("txtDateApply").value;
		arrayValue [11]		= document.getElementById("location").value;
		
		//.............................................................
		var job_description	=	arrayValue [5];
		arrayValue [5]		=	job_description.replace(/,/g,"%");
		job_description		=	arrayValue [5];
		arrayValue [5]		=	job_description.replace(/'/g,"-");
		
		//.............................................................
		
		if(document.getElementById("location").value== "Onsite")
		{
			if(document.getElementById("comboCat1").value=="Other")
				{
					arrayValue [12]		= document.getElementById("txtOther").value;
					arrayValue [13]		= document.getElementById("comboCat1").value;
				}
			else
				{
					arrayValue [12]		= document.getElementById("comboCat1").value;
					
				}
			
		}
		else if(document.getElementById("location").value== "Anywhere")
			{
				arrayValue [12]	=	"";
			}
		
		var combobox = document.getElementById("comboSubCat");
		for(var i = 0; i < combobox.options.length; i++)
			{
				var string	=	new String();
					string  =	combobox.options[i].value;
					arrayValue2[i]	=	string.replace(/&/g,"%");
			}

		document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=editDb&q="+arrayValue+"&q1="+arrayValue2;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForEditJobsDb;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForEditJobsDb() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("allJobs").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Add jobs...........................................
function AddJobsInDb22(str)
	{ 
		//id	=	str;
		//alert("cate"+str);
		var arrayValue	= new Array();
		var arrayValue2	= new Array();
		
		arrayValue [0]		= document.getElementById("comboCat").value;
		arrayValue [2]		= document.getElementById("txtJobs").value;
		arrayValue [4]		= document.getElementById("txtEmpRequire").value;
		arrayValue [5]		= document.getElementById("txtDesc").value;
		arrayValue [7]		= document.getElementById("company").value;
		arrayValue [8]		= document.getElementById("txtEmpExp").value;
		arrayValue [9]		= document.getElementById("budget").value;
		arrayValue [10]		= document.getElementById("txtDateApply").value;
		arrayValue [11]		= document.getElementById("location").value;
		//.............................................................
		var job_description	=	arrayValue [5];
		arrayValue [5]		=	job_description.replace(/,/g,"%");
		job_description		=	arrayValue [5];
		arrayValue [5]		=	job_description.replace(/'/g,"+");
		//.............................................................
		if(document.getElementById("location").value== "Onsite")
		{
			if(document.getElementById("comboCat1").value=="Other")
				{
					arrayValue [12]		= document.getElementById("txtOther").value;
					arrayValue [13]		= document.getElementById("comboCat1").value;
				}
			else
				{
					arrayValue [12]		= document.getElementById("comboCat1").value;
					
				}
		}
		//alert(arrayValue [12]);
		//document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  />';
		if(document.getElementById("chkHot").checked)
			{
				arrayValue [6]	= document.getElementById("chkHot").value;
			}
		else
			{
				arrayValue [6]	=	"";
			}
		
		
		var combobox = document.getElementById("comboSubCat");
		for(var i = 0; i < combobox.options.length; i++)
			{
				var string	=	new String();
					string  =	combobox.options[i].value;
					arrayValue2[i]	=	string.replace(/&/g,"%");
			}

		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=addJobsInDb&q="+arrayValue+"&q1="+arrayValue2;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForAddJobsInDb;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForAddJobsInDb() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("allJobs").innerHTML=xmlHttp.responseText;
			} 
	}

//..................................Add employers registration...........................................
function AddEmployersForm()
	{ 
		//id	=	str;
		//alert("sdfds");
		document.getElementById("editProfile").innerHTML= '<img src="images/loading.gif"  />';
		
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=addEmplyReg";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForAddEmplyReg;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForAddEmplyReg() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat");
				document.getElementById("editProfile").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Add employers registration...........................................
function editEmplyProfile()
	{ 
		//id	=	str;
		//alert("cate"+str);
		var str;
		var arrayValue		= new Array();
		var arrayCompany	= new Array();
		arrayValue [0]		= document.getElementById("txt_email").value;
		arrayValue [1]		= document.getElementById("txt_fname").value;
		arrayValue [2]		= document.getElementById("txt_lname").value;
		arrayValue [3]		= document.getElementById("txt_cmpyname").value;
		str				=	arrayValue [3];
		arrayCompany	=	str.split("&");
		if(arrayCompany[1]!= undefined)
			{
				var specialChar	=	"@";
				arrayValue [3]		=	arrayCompany[0]+specialChar+arrayCompany[1];
			}
		arrayValue [4]		= document.getElementById("txt_title").value;
		arrayValue [5]		= document.getElementById("txt_dept").value;
		arrayValue [6]		= document.getElementById("txt_strt1").value;
		arrayValue [7]		= document.getElementById("txt_strt2").value;
		arrayValue [8]		= document.getElementById("user_country").value;
		arrayValue [9]		= document.getElementById("userstate").value;
		arrayValue [10]		= document.getElementById("txt_city").value;
		arrayValue [11]		= document.getElementById("txt_zip").value;
		arrayValue [12]		= document.getElementById("txt_day_phn").value;
		arrayValue [13]		= document.getElementById("txt_evn_phn").value;
		arrayValue [14]		= document.getElementById("txt_fax").value;
		if(document.getElementById("chk_notify").checked)
			{
				arrayValue [15]		= document.getElementById("chk_notify").value;
			}
		else
			{
				arrayValue [15]	=	"";
			}
		//document.getElementById("editProfile").innerHTML= '<img src="images/loading.gif"  />';
		
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=editEmplyPrfl&q="+arrayValue;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForUpdateEmplyFrfl;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForUpdateEmplyFrfl() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("editProfile").innerHTML=xmlHttp.responseText;
			} 
	}



//..................................Make the jobs hots...........................................
function editJobs(str)
	{ 
		id	=	str;
		//alert("cate"+str);
		document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=edit&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForEditJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForEditJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("allJobs").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function showFormCompany()
	{ 
		//id	=	str;
		//alert("cate"+str);
		document.getElementById("company").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=addCmny";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForAllCompany;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForAllCompany() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("company").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function addCompanyInDb()
	{ 
		//id	=	str;
		//alert("cate"+str);
		
		var str
		var arrayValue		= new Array();
		var arrayCompany	= new Array();
		arrayValue [0]		= document.getElementById("txtName").value;
		//str				=	arrayValue [0];
		arrayCompany	=	str.split("&");
		if(arrayCompany[1]!= undefined)
			{
				var specialChar	=	"@";
				arrayValue [0]		=	arrayCompany[0]+specialChar+arrayCompany[1];
			}
		arrayValue [1]		= document.getElementById("txtDesc").value;
		arrayValue [2]		= document.getElementById("cmpLogo").value;
		alert(arrayValue [2]);
		document.getElementById("company").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=addCmnyInDb&q="+arrayValue;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForAddCompanyInDb;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForAddCompanyInDb() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("company").innerHTML=xmlHttp.responseText;
			} 
	}

//..................................Make the jobs hots...........................................
function showCompanies()
	{ 
		//id	=	str;
		//alert("cate"+str);
		document.getElementById("company").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=showComp";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForshowCompanies;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowCompanies() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("company").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function showEmpProfile()
	{ 
		//id	=	str;
		//alert("cate"+str);
		document.getElementById("editProfile").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=showProfile";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForshowMyProfile;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowMyProfile() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("editProfile").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function showEmpJobs()
	{ 
		//id	=	str;
		//alert("cate"+str);
		document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=showJobs";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForshowEmpJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowEmpJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("allJobs").innerHTML=xmlHttp.responseText;
			} 
	}

//..................................Make the jobs hots...........................................
function deleteComp(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("company").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=Delete&q="+str;
		//url=url+"&sid="+Math.random();
		
		xmlHttp.onreadystatechange=stateChangedForDeleteComp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForDeleteComp() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("company").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function showEditForm(str)
	{ 
		//id	=	str;
		//alert(str);
		document.getElementById("company").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=editCmpny&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForEditComp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForEditComp() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("company").innerHTML=xmlHttp.responseText;
			} 
	}

//..................................Make the jobs hots...........................................
function addEditcompany()
	{ 
		//id	=	str;
		//alert("ssdfds");
		var str;	
		var arrayValue		= new Array();
		var arrayCompany	= new Array();
		
		arrayValue [0]		= document.getElementById("txtName").value;
		arrayValue [1]		= document.getElementById("txtDesc").value;
		
		str					=	arrayValue [0];
		arrayCompany		=	str.split("&");
		if(arrayCompany[1]!= undefined)
			{
				var specialChar		=	"@";
				arrayValue [0]		=	arrayCompany[0]+specialChar+arrayCompany[1];
			}

		
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=editCmpnyInDb&q="+arrayValue;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForEditComp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForEditComp() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("company").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function viewLoginOrApplyForm()
	{ 
		
		//id	=	str;
		document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		
		url=url+"?flg=loginOrApply";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForViewLoginEdit;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForViewLoginEdit() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("detail").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Make the jobs hots...........................................
function closeLoginOrApplyForm()
	{ 
		//id	=	str;
//		alert("ssdfds");
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=closeloginOrApply";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForCloseLoginApply;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCloseLoginApply() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("detail").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Show company Detail...........................................
function showCompanyDetail(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=showCmpnyDetail&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForcompanyDetail;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForcompanyDetail() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}
//..................................Show company Detail...........................................
function showCompanyDetail1(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=showCmpnyDetail&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForcompanyDetail1;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForcompanyDetail1() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				showDivCompany();
			} 
	}

//..................................Show company Detail...........................................
function tellFriendMailForm(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=mailForm&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForMailForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForMailForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}
//..................................Show company Detail...........................................
function forgot_password(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=forgotpass";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForForgotPassword;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForForgotPassword() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop1").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}
//..................................Show company Detail...........................................
function forgot_password_mail()
	{ 
		//id	=	str;
		//alert(str);
		var email_address	=	document.getElementById("txt_femail").value;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=forgotpassMail&q="+email_address;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForForgotPasswordEmail;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForForgotPasswordEmail() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop1").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}

//..................................Show company Detail...........................................
function tellFriendMailFormEm(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=mailForm&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForMailForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForMailForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}

//..................................Show company Detail...........................................
function showAllJobsCompany(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=alljobs&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForAllJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForAllJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showjobs").innerHTML=xmlHttp.responseText;
				showDiv1();
			} 
	}
//..................................Show company Detail...........................................
function showAllJobsCompanyEmp(str)
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=alljobs&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForAllJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForAllJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showjobs").innerHTML=xmlHttp.responseText;
				showDiv1();
			} 
	}


//..................................Show company Detail...........................................
function loginAuser()
	{ 
		var arrayValue	= new Array();
		arrayValue [0]	= document.getElementById("txt_email").value;
		arrayValue [1]	= document.getElementById("txt_password").value;

		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=loginUser&q="+arrayValue;
		xmlHttp.onreadystatechange=stateChangedForUserLogin;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForUserLogin() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				$var	=	xmlHttp.responseText;
				//alert($var);
				if($var==1)
				{
					document.getElementById("detail").innerHTML="<span style='color:#ef8517;font-size:12px;'>You have been login .Click on the APPLY NOW button to apply on this Job</span>";
				}
				else
				{
					document.getElementById("errormsg").innerHTML=xmlHttp.responseText;
				}
				//showDiv();
			} 
	}

//..................................Show company Detail...........................................
function mailAfriend(str)
	{ 
		//alert(str);
		var arrayValue	= new Array();
		arrayValue [0]	= document.getElementById("txt_name").value;
		arrayValue [1]	= document.getElementById("txt_email").value;

		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?jp_id="+str+"&flg=mail_a_friend&q="+arrayValue;
		xmlHttp.onreadystatechange=stateChangedForMailAfriend;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForMailAfriend() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				
				showDiv();
			} 
	}
//..................................Show company Detail...........................................
function mailAfriendEmp(str)
	{ 
		//alert(str);
		var arrayValue	= new Array();
		arrayValue [0]	= document.getElementById("txt_name").value;
		arrayValue [1]	= document.getElementById("txt_email").value;

		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?jp_id="+str+"&flg=mail_a_friend&q="+arrayValue;
		xmlHttp.onreadystatechange=stateChangedForMailAfriendEmp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForMailAfriendEmp() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				
				showDiv();
			} 
	}

//..................................Show pop for login...........................................
function loginPopupWindow()
	{ 
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=loginpopup";
		xmlHttp.onreadystatechange=stateChangedForloginPopup;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForloginPopup() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				
				showDiv();
			} 
	}
//..................................login...........................................
function loginTheUser()
	{ 
		//alert(str);
		var arrayValue	= new Array();
		arrayValue [0]	= document.getElementById("txt_email").value;
		arrayValue [1]	= document.getElementById("txt_password").value;

		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=logintheuser&q="+arrayValue;
		xmlHttp.onreadystatechange=stateChangedForLogintheuser;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForLogintheuser() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
				
				showDiv();
			} 
	}

//..................................apply for job...........................................
function applyForJob(str)
	{ 
		//alert(str);
		var coverLetter	=	new String();
		var arrayValue	=	 new Array();
		var subject		=	new String();
		arrayValue [0]	= document.getElementById("sel_cv").value;
		arrayValue [1]	= document.getElementById("txt_bid_amount").value;
		arrayValue [2]	= document.getElementById("bid_period").value;
		coverLetter  	= document.getElementById("message").value;
		subject			= document.getElementById("txt_subject").value;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=applyforjob&jp_id="+str+"&q="+arrayValue+"&mess="+coverLetter+"&sub="+subject;
		xmlHttp.onreadystatechange=stateChangedForApplyForJob;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForApplyForJob() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				if(xmlHttp.responseText==1)
					{
						document.getElementById("errormege").innerHTML="Please correct the following error<br/>You may not select the cv <br/> You may not enter the bid amount  <br/> Your cover letter may be empty<br/>";
					}
				else
					{
						//alert(xmlHttp.responseText);
						document.getElementById("detail").innerHTML=xmlHttp.responseText;
					}
				//showDiv();
			} 
	}

//..................................apply for job...........................................
function showCompanyProfile(str)
	{ 
		//alert(str);
//		var coverLetter	=	new String();
//		var arrayValue	= new Array();
//		arrayValue [0]	= document.getElementById("sel_cv").value;
//		arrayValue [1]	= document.getElementById("sel_current_salary").value;
//		arrayValue [2]	= document.getElementById("sel_expect_salary").value;
//		coverLetter  	= document.getElementById("message").value;
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=companyprofile&q="+str;
		xmlHttp.onreadystatechange=stateChangedForCompanyProfile;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCompanyProfile() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("company").innerHTML=xmlHttp.responseText;
				
				showDivCompany();
			} 
	}
//..................................apply for job...........................................
function showCompanyProfileEmp(str)
	{ 
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=companyprofile&q="+str;
		xmlHttp.onreadystatechange=stateChangedForCompanyProfile;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCompanyProfile() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				
				document.getElementById("company").innerHTML=xmlHttp.responseText;
				
				showDivCompany();
			} 
	}

//..................................apply for job...........................................
function showUserDetailOnPopUp(str,prgress_id)
	{ 
		id	=	prgress_id
		
		document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=userDetaiEmp&q="+str;
		xmlHttp.onreadystatechange=stateChangedForUserDetailEmp;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForUserDetailEmp() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				var resp	=	xmlHttp.responseText;
				if(resp!=1)
					{
						document.getElementById("user_profile").innerHTML=xmlHttp.responseText;
						document.getElementById(id).innerHTML= '';
						showDiv();
					}
				else
					{
						window.location="employer-login.html";
					}
			} 
	}

//..................................show search form...........................................
function show_search_form()
	{ 
		//id	=	prgress_id
		//alert(str);
		document.getElementById("search").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=searchForm";
		xmlHttp.onreadystatechange=stateChangedForSearchForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForSearchForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
						document.getElementById("search").innerHTML=xmlHttp.responseText;
					
			} 
	}
//..................................show search result...........................................
function show_cv_search_result()
	{ 
		//id	=	prgress_id
		//alert(str);
		$arrayVal	=	new Array();
		
		$arrayVal[0]	=	document.getElementById("sel_option").value;
		$arrayVal[1]	=	document.getElementById("txt_keyword").value;
		
		document.getElementById("sr_result").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=searchResult&q="+$arrayVal;
		xmlHttp.onreadystatechange=stateChangedForSearchResult;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForSearchResult() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("sr_result").innerHTML=xmlHttp.responseText;
				
			} 
	}
//..................................show search result...........................................
function close_cv_search_form()
	{ 
		//id	=	prgress_id
		//alert();
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=close";
		xmlHttp.onreadystatechange=stateChangedForCloseForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCloseForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("search").innerHTML=xmlHttp.responseText;
				
			} 
	}
//..................................show search result...........................................
function show_pop_applicants(str)
	{ 
		//id	=	prgress_id
		//document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  border="0"  />';
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=applicants&q="+str;
		xmlHttp.onreadystatechange=stateChangedForShowApplicants;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForShowApplicants() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("appl").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}

//..................................show search result...........................................
function close_cv_search_result()
	{ 
		//id	=	prgress_id
		//alert();
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=close";
		xmlHttp.onreadystatechange=stateChangedForCloseResult;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCloseResult() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("sr_result").innerHTML=xmlHttp.responseText;
				
			} 
	}
//..................................show search result...........................................
function delete_cv(str,str1)
	{ 
		//id	=	prgress_id
		//alert();
		document.getElementById("del_cv"+str).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=delete_cv&q="+str+"&job_id="+str1;
		xmlHttp.onreadystatechange=stateChangedForDeleteCv;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForDeleteCv() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("appl").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................show search result...........................................
function show_hot_jobs()
	{ 
		//id	=	prgress_id
		//alert();
		document.getElementById("sr_result").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=hot_jobs";
		xmlHttp.onreadystatechange=stateChangedForShowHotJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForShowHotJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("sr_result").innerHTML="";
				document.getElementById("hot_jobs").innerHTML=xmlHttp.responseText;
				
				showApplicants();
			} 
	}
//..................................show search result...........................................
function show_top_employers()
	{ 
		//id	=	prgress_id
		//alert();
		document.getElementById("sr_result").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=top_emply";
		xmlHttp.onreadystatechange=stateChangedForTopEmployers;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForTopEmployers() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("sr_result").innerHTML="";
				document.getElementById("all_to_employer").innerHTML=xmlHttp.responseText;
				
				showTopEmployers();
			} 
	}
//..................................show search result...........................................
function show_skills_cat_wise(str)
	{ 
		
		//id	=	prgress_id
		//alert(str);
		document.getElementById("showTabs").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=show_skills_cat&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshowSkills;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowSkills() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("empHomeDetail").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................show search result...........................................
function show_jobs_on_home(str)
	{ 
		id	=	str;
		//document.getElementById("showtabs").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=show_jobs_cat&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshowJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("tabs").innerHTML=xmlHttp.responseText;
				show_just_jobs_(id);
			} 
	}
//..................................show search result...........................................
function show_just_jobs_(str)
	{ 
		
		//document.getElementById("showtabs").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=show_just_jobs_&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshow_just_jobs_;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshow_just_jobs_() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("jobs_").innerHTML=xmlHttp.responseText;
			} 
	}

//..................................show search result...........................................
function show_subcats_catwise(str)
	{ 
		
		//id	=	prgress_id
		//alert(str);
		document.getElementById("sub_cat").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=showsubcats&q="+str;
		xmlHttp.onreadystatechange=stateChangedForSubCatsCatwise;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForSubCatsCatwise() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("sub_cat").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................show search result...........................................
function show_subcats_catwise_js_dashboard_for_edit(str)
	{ 
		
		//id	=	prgress_id
		//alert(str);
		document.getElementById("sub_cat").innerHTML= '<img src="images/ajax-loader_.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=showsubcats_js&q="+str;
		xmlHttp.onreadystatechange=stateChangedForSubCatsCatwise;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForSubCatsCatwise() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("sub_cat").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................show search result...........................................
function update_user_status()
	{ 
		//id	=	prgress_id
		//alert("sdf");
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="update_users.php";
		xmlHttp.onreadystatechange=stateChangedForuserStat;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForuserStat() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("hello");
				var str;
				str=xmlHttp.responseText;
				//alert(str);
			} 
	}
//..................................connect the users...........................................
function connect_users()
	{ 
		//id	=	prgress_id
		//alert("sdf");
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="chat_processing.php";

		if(document.getElementById("chatWindow").style.visibility=="hidden")
		  {
			 url=url+"?flg=connect_users";
		  }
	   else
		 {
			
			url=url+"?flg=connect_oldusers";
		 }
		xmlHttp.onreadystatechange=stateChangedForuserConnection;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForuserConnection() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				var check	=	xmlHttp.responseText;
 				//alert(check);
				if(document.getElementById("chatWindow").style.visibility=="hidden")
				{
					
					if(check!=1)
					{
					document.getElementById("chatWindow").innerHTML	=	check;
					showChatWindow();
					}
				}
			   else
			  	 {
					//alert(check);
					document.getElementById("chatTxt").innerHTML	=	check;
					//showChatWindow();
			  	 }
				//alert(str);
				/*var neWindow;
				neWindow=window.open('popup.php','sdfd','width=550,height=231,toolbar=no,resizable=no,location=no,scrollbars=no,status=no,copyhistory=no');
				neWindow.locationbar=false;
				neWindow.focus();*/
			} 
	}

//.......................................................................................
function insert_chat_inDb()
	{
		//alert("sdfsd");
		var value,value1;
		
		value	=	document.getElementById("common_text").value;
		value1	=	document.getElementById("common_text2").value;
		
		document.getElementById("common_text").value=	""	;
		document.getElementById("common_text2").value = value1+"\n"+value;
		stringVal	=	new String();
		stringVal	=	value;

		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
				{
					alert ("Browser does not support HTTP Request");
					 return;
				}
				
		var url	=	"chat_processing.php";
		url	=	url+"?flg=insertCommon&v="+stringVal;
		xmlHttp.onreadystatechange	=	statchangeforChatRoom;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function statchangeforChatRoom()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				var val	=	xmlHttp.responseText;
				
			}
	}
//.......................................................................................
function indiviual_chat()
	{
		var value,value1,userId;
		
		value	=	document.getElementById("txt_contents").value;
		value1	=	document.getElementById("mess").value;
		
		userId	=	document.getElementById("user_id").value;

		document.getElementById("mess").value=	""	;
		document.getElementById("txt_contents").value = value+value1;
		
		stringVal	=	new String();
		stringVal	=	value1;

		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
				{
					alert ("Browser does not support HTTP Request");
					 return;
				}
		
		var url	=	"chat_processing.php";
		url	=	url+"?flg=insertInd&v="+stringVal+"&user_to="+userId;
		xmlHttp.onreadystatechange	=	statchangeforIndUser;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function statchangeforIndUser()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				var val	=	xmlHttp.responseText;
				//alert(val);
			}
	}
//.......................................................................................
function hide_window()
	{
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
				{
					alert ("Browser does not support HTTP Request");
					 return;
				}
		
		var url	=	"chat_processing.php";
		url	=	url+"?flg=deleteChat";
		xmlHttp.onreadystatechange	=	statchangeforDelEmpAndUser;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function statchangeforDelEmpAndUser()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				var val	=	xmlHttp.responseText;

				//alert(val);
				hideDivChatWindow();
			}
	}

//.......................................................................................
function open_newwindow(str)
	{
		
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"chat_processing.php";
		url	=	url+"?flg=newWindow&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforNewWindow;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforNewWindow()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("chatWindow").innerHTML	=	xmlHttp.responseText;
				
				showChatWindow();

				
			}
	}
//.......................................................................................
function user_info_on_popup(arrayVal)
	{
		
		
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url		=	url+"?flg=user_info&q="+arrayVal;
		
		xmlHttp.onreadystatechange	=	statchangeforUserInfo;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforUserInfo()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("user_info_pop").innerHTML	=	xmlHttp.responseText;
				
				showDivUserInfo();

				
			}
	}
//.......................................................................................
function emply_info_on_popup(arrayVal)
	{
		
		
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"createcategory.php";
		url		=	url+"?flg=emply_info&q="+arrayVal;
		
		xmlHttp.onreadystatechange	=	statchangeforEmlyInfo;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforEmlyInfo()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("emply_info_pop").innerHTML	=	xmlHttp.responseText;
				
				showDivEmplyInfo();

				
			}
	}

//.......................................................................................
function updat_user_info_in_db()
	{
		
		arrayVal	=	new Array();
		
		arrayVal[1]	=	document.getElementById("txt_fname").value;
		arrayVal[2]	=	document.getElementById("txt_mname").value;
		arrayVal[3]	=	document.getElementById("txt_lname").value;
		arrayVal[4]	=	document.getElementById("txt_address1").value;
		arrayVal[5]	=	document.getElementById("txt_address2").value;
		arrayVal[6]	=	document.getElementById("user_country").value;
		arrayVal[7]	=	document.getElementById("userstate").value;
		arrayVal[8]	=	document.getElementById("txt_city").value;
		arrayVal[9]	=	document.getElementById("txt_zipcode").value;
		arrayVal[10]=	document.getElementById("txt_home_phone").value;
		arrayVal[11]=	document.getElementById("txt_cell_phone").value;
		arrayVal[12]=	document.getElementById("combo_time_zone").value;
		
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url		=	url+"?flg=user_info_db&q="+arrayVal;
		
		xmlHttp.onreadystatechange	=	statchangeforUserInfoInDb;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforUserInfoInDb()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				//document.getElementById("user_info_pop").innerHTML	=	xmlHttp.responseText;
				
				//howDivUserInfo();
			//var info	=	xmlHttp.responseText;
//			alert(info);
			window.location="activationpage.php?msg=yes";
			}
	}

//.......................................................................................
function updat_emply_info_in_db()
	{
		var arrayVal	=	new Array();
		
		arrayVal[0]	=	document.getElementById("txt_fname").value;
		arrayVal[1]	=	document.getElementById("txt_lname").value;
		arrayVal[2]	=	document.getElementById("txt_company_name").value;
		if(document.getElementById("chk_notify").checked)
		{
			arrayVal[11]=	document.getElementById("chk_notify").value;
		}
	else
		{
			arrayVal[11]=	"";
		}
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"createcategory.php";
		url		=	url+"?flg=emply_info_db&q="+arrayVal;
		
		xmlHttp.onreadystatechange	=	statchangeforEmpInfoInDb;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforEmpInfoInDb()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				//var vla	=	xmlHttp.responseText;
				//alert(vla);
				//howDivUserInfo();
				
				window.location="activationpage-msg-yes.html";

			}
	}


//.......................................................................................
function hide_user_popup()
	{
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url	=	url+"?flg=user_info_hide";
		
		xmlHttp.onreadystatechange	=	statchangeforHideUserInfo;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforHideUserInfo()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("user_info_pop").innerHTML	=	xmlHttp.responseText;
				
				hideDivUserInfo();

				
			}
	}
//.......................................................................................
function popup_edit_bid_amount(str)
	{
		//document.getElementById("loader").innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url	=	url+"?flg=show_pop_bid&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforBidAmountForm;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforBidAmountForm()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("editBid").innerHTML	=	xmlHttp.responseText;
				//document.getElementById("loader").innerHTML="";
				showDivBidAmount();

				
			}
	}
//.......................................................................................
function delete_job_appl(str)
	{
		//document.getElementById("loader").innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url	=	url+"?flg=delete_job_appl&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforDeleteAppl;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforDeleteAppl()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("show_appl").innerHTML	=	xmlHttp.responseText;
				//document.getElementById("loader").innerHTML="";
				
			}
	}

//.......................................................................................
function updat_bid_amount_in_db(str)
	{
		var arrayVal = new Array();
		
		arrayVal[0]	=	document.getElementById("txt_name").value;
		arrayVal[1]	=	document.getElementById("sel_period").value;
	
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url		=	url+"?flg=updt_bid_db&q="+arrayVal+"&id="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforBidAmountInDb;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforBidAmountInDb()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("editBid").innerHTML	=	xmlHttp.responseText;
				
				showDivBidAmount();
			}
	}
//.......................................................................................
function show_city_state()
	{
		var str;
		str	=	document.getElementById("location").value;
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"createcategory.php";
		url		=	url+"?flg=showCityState&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforShowCityState;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforShowCityState()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("state_city").innerHTML	=	xmlHttp.responseText;
				if(document.getElementById("txtOther"))
					{
						document.getElementById("other").innerHTML	=	xmlHttp.responseText;
					}
			}
	}
//.......................................................................................
function job_description(str)
	{

		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url		=	url+"?flg=job_decrioption&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforJobDescription;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforJobDescription()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("jp_desc").innerHTML	=	xmlHttp.responseText;
				showDivJobDescript();
			}
	}
//.......................................................................................
function check_words()
	{
		var word_count	= new String();
		var arrary 		= new Array();
		
		word_count		=	document.getElementById("message").value;
		var count		=	word_count.length;
		
		if(count<301)
			{
				
				var remining_words	=	300 - count;
				
				document.getElementById("words").innerHTML	=	remining_words;
			
			}
		else
			{
				var ad	=	word_count.substring(0,300);
				
				document.getElementById("message").value	=	ad;
				
				document.getElementById("words").innerHTML	=	0;
		
			}
	}
//.......................................................................................
function job_seekertour(str)
	{

		xmlHttp 	=	GetXmlHttpObject();
		if(str=='1')
		{
			document.getElementById("login").className="active";
			document.getElementById("dashboard").className="";
			document.getElementById("search").className="";
		}
		if(str=='2')
		{
			document.getElementById("login").className="";
			document.getElementById("dashboard").className="active";
			document.getElementById("search").className="";
		}
		if(str=='3')
		{
			document.getElementById("login").className="";
			document.getElementById("dashboard").className="";
			document.getElementById("search").className="active";
		}
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url		=	url+"?flg=jobseekertour&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforJobSeekerTour;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforJobSeekerTour()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("show_tour").innerHTML	=	xmlHttp.responseText;
			}
	}
//.......................................................................................
function employertour(str)
	{
		xmlHttp 	=	GetXmlHttpObject();
		if(str=='4')
		{
			document.getElementById("login").className="active";
			document.getElementById("dashboard").className="";
			document.getElementById("search").className="";
		}
		if(str=='5')
		{
			document.getElementById("login").className="";
			document.getElementById("dashboard").className="active";
			document.getElementById("search").className="";
		}
		if(str=='6')
		{
			document.getElementById("login").className="";
			document.getElementById("dashboard").className="";
			document.getElementById("search").className="active";
		}
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"createcategory.php";
		url		=	url+"?flg=employertour&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforEmployerTour;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforEmployerTour()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("show_tour").innerHTML	=	xmlHttp.responseText;
			}
	}
//.......................................................................................
function show_sub_cat_phpup(str)
	{
		xmlHttp 	=	GetXmlHttpObject();
		
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"createcategory.php";
		url		=	url+"?flg=showSubCat&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforSubCatPop;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforSubCatPop()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
				document.getElementById("category-popup").innerHTML	=	xmlHttp.responseText;
				showDivSubCat();
			}
	}

//.......................................................................................
function fillComboSubCat()
	{
		xmlHttp 	=	GetXmlHttpObject();
		
		var arryVal	=	new Array();
		var j=0;
		
	  	for (i=0; i < document.forms[0].elements.length; i++) 
			{
				if(document.forms[0].elements[i].name == "chk")
				{
					
					if(document.forms[0].elements[i].checked == true)
						{
							
							var catname=document.forms[0].elements[i].value;
							catname		=	catname.replace(/,/g,"%");
							catname		=	catname.replace(/&/g,"-");
							arryVal[j]	=	catname;
							//combobox.options[j] = new Option(arryVal,arryVal);
							j++;
						}
				}
			
			}
		fillcomboSubCates(arryVal);
	}
//.......................................................................................
function report_violation(str)
	{
		document.getElementById("mail_violate").innerHTML= '<img src="images/loading.gif"  />';

		xmlHttp 	=	GetXmlHttpObject();
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url		=	url+"?flg=reportviolateJob&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforReportViolate;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforReportViolate()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
			
				document.getElementById("mail_violate").innerHTML	=	xmlHttp.responseText;
				
			}
	}
//.......................................................................................
function report_violationUser(str)
	{
		document.getElementById("mail_violate").innerHTML= '<img src="images/loading.gif"  />';

		xmlHttp 	=	GetXmlHttpObject();
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"createcategory.php";
		url		=	url+"?flg=reportviolateUser&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforReportViolateUser;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforReportViolateUser()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
			
				document.getElementById("mail_violate").innerHTML	=	xmlHttp.responseText;
				
			}
	}
//.......................................................................................
function show_blogs_comments(str)
	{

		xmlHttp 	=	GetXmlHttpObject();
		if(xmlHttp==null)
			{
				alert ("Browser does not support HTTP Request");
				return;
			}
				
		var url	=	"get_state.php";
		url		=	url+"?flg=showBlogs&q="+str;
		
		xmlHttp.onreadystatechange	=	statchangeforBlogsComments;
		
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
		
	}
	
function statchangeforBlogsComments()
	{
		if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
			{
				
			
				document.getElementById("colmL").innerHTML	=	xmlHttp.responseText;
				
			}
	}

//..................................Show company Detail...........................................
function forgot_password_jobseeker()
	{ 
		//id	=	str;
		//alert(str);
		//document.getElementById("detail").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=forgotpass";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForForgotPasswordJobSeeker;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForForgotPasswordJobSeeker() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop1").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}
//..................................Show company Detail...........................................
function forgot_password_mail_job()
	{ 
		//id	=	str;
		//alert(str);
		var email_address	=	document.getElementById("txt_femail").value;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=forgotpassMail&q="+email_address;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForForgotPasswordJobseekrEmail;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForForgotPasswordJobseekrEmail() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("showcop1").innerHTML=xmlHttp.responseText;
				showDiv();
			} 
	}
//.......................................................................................
function show_text_field(str)
	{ 
		//id	=	str;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=showTextField&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForForgotshow_text_field;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForForgotshow_text_field() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("other").innerHTML=xmlHttp.responseText;
			} 
	}
//.......................................................................................
function show_text_field_provider(str)
	{ 
		//id	=	str;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=showTextField&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForForgotPasswordJobseekrEmailPro;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForForgotPasswordJobseekrEmailPro() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				
				document.getElementById("other").innerHTML=xmlHttp.responseText;
			} 
	}
//.......................................................................................
function show_text_field_provider2(str)
	{ 
		//id	=	str;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=showTextField2&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForForgotPasswordJobseekrEmailPro2;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForForgotPasswordJobseekrEmailPro2() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				
				document.getElementById("other").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................Show company Detail...........................................
function open_pop_city_search(str)
	{ 
		id	=	str;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=open_pop_search";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForopen_pop_city_search;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForopen_pop_city_search() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert(id);
				
				document.getElementById("jobDropDown").innerHTML=xmlHttp.responseText;
				showDivPopupCity(id);
			} 
	}
//..................................Show company Detail...........................................
function open_pop_city_search1(str)
	{ 
		id	=	str;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=open_pop_search1";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForopen_pop_city_search1;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForopen_pop_city_search1() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert(id);
				
						document.getElementById("jobDropDown").innerHTML=xmlHttp.responseText;
						showDivPopupCity(id);
				
			
			} 
	}

//..................................Show company Detail...........................................
function open_pop_category_search(str)
	{ 
		id	=	str;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=open_pop_category";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForopen_pop_category_search;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForopen_pop_category_search() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("jobDropDown").innerHTML=xmlHttp.responseText;
				showDivPopupCity(id);
			} 
	}
//..................................Show company Detail...........................................
function pop_employerJobs_serviceProvider(str)
	{ 
		id	=	str;
		//alert(str);
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=open_pop_category";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForservicProviderEmployerJobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForservicProviderEmployerJobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
				document.getElementById("jobDropDown").innerHTML=xmlHttp.responseText;
				showDivPopupCity(id);
			} 
	}

//.......................................................................................
function clear_text(str)
	{
		if(str	==	"Enter Search Keywords")
			{
				document.getElementById("keywords").value	= "";
			}
		else if(str	!=	"Enter Search Keywords")
			{
				document.getElementById('keywords').value	=document.getElementById('keywords').value;
			}
	}
//.......................................................................................
function submit_form()
	{
		document.frm_city.submit();
	}
//..................................Show company Detail...........................................
function search_postings_for_provider()
	{ 
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=searching_for_provider";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForsearching_for_provider_database;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForsearching_for_provider_database() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				if(xmlHttp.responseText==1)
					{
						window.location="dashboard.php";
					}
				else
					{
						document.getElementById("sarch_result").innerHTML=xmlHttp.responseText;
						//showDivPopupCity(id);
			} 		}
	}
//.......................................................................................
function go_on_location(url)
	{
		window.location	=	url;
	}
//..................................Show company Detail...........................................
function open_apply_form_on_dahboard(str)
	{ 
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=dashboardApplyForm&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForopen_apply_form_on_dahboard;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForopen_apply_form_on_dahboard() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
						document.getElementById("dsh_aply_frm").innerHTML=xmlHttp.responseText;
			} 		
	}
//..................................apply for job...........................................
function showMyProfileOnDashboard(str,prgress_id)
	{ 
		id	=	prgress_id
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=ViewMyProfile&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshowMyProfileOnDashboard;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowMyProfileOnDashboard() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				document.getElementById("user_profile").innerHTML=xmlHttp.responseText;
				//document.getElementById(id).innerHTML= '';
				showDivMyProfile();
				
			} 
	}
//..................................apply for job...........................................
function showUserContact(str)
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=ViewUserContact&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshowUserContact;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowUserContact() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("contact").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................apply for job...........................................
function CloseUserContact()
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=close";
		xmlHttp.onreadystatechange=stateChangedForshowUserContact;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowUserContact() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("contact").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................apply for job...........................................
function showSendMessageForm(str)
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=showMessForm&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshowSendMessageForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowSendMessageForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("message").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................apply for job...........................................
function CloseMsgeForm()
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=close";
		xmlHttp.onreadystatechange=stateChangedForCloseMsgeForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCloseMsgeForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("message").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................apply for job...........................................
function showInitationForm(str)
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=showIvitationForm&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshowInitationForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshowInitationForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("invitation").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................apply for job...........................................
function CloseInvitationForm()
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=close";
		xmlHttp.onreadystatechange=stateChangedForCloseInvitationForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForCloseInvitationForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("invitation").innerHTML=xmlHttp.responseText;
			} 
	}
//..................................apply for job...........................................
function show_drop_city(str)
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=show_drop_city&q="+str;
		xmlHttp.onreadystatechange=stateChangedForshow_drop_city;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshow_drop_city() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("drop_down").innerHTML=xmlHttp.responseText;
				showDivcityDropDown();
				
			} 
	}
//..................................apply for job...........................................
function save_job_as_favorite(jp_id)
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=save_as_favorite&jp_id="+jp_id;
		xmlHttp.onreadystatechange=stateChangedForsave_job_as_favorite;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForsave_job_as_favorite() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				if(xmlHttp.responseText==1)
					{
						document.getElementById("favt_jp1").innerHTML="Already in Favorite list";
						document.getElementById("favt_jp").innerHTML="Already in Favorite list";
						save_job_as_favorite_ag('0');
					}
				else if(xmlHttp.responseText==2)
					{
						document.getElementById("favt_jp1").innerHTML="Login first to make it Favorite";
						document.getElementById("favt_jp").innerHTML="Login first to make it Favorite";
						window.location="Service-Provider-Login-Form.html";
					}
				else
					{
						document.getElementById("favt_jp1").innerHTML=xmlHttp.responseText;
						document.getElementById("favt_jp").innerHTML=xmlHttp.responseText;
						save_job_as_favorite_ag('1');
					}
			} 
	}
//..................................apply for job...........................................
function save_job_as_favorite_down(jp_id)
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=save_as_favorite&jp_id="+jp_id;
		xmlHttp.onreadystatechange=stateChangedForsave_job_as_favorite_down;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForsave_job_as_favorite_down() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				//document.getElementById("favt_jp1").innerHTML=xmlHttp.responseText;
				//document.getElementById("favt_jp").innerHTML=xmlHttp.responseText;
				if(xmlHttp.responseText==1)
					{
						document.getElementById("favt_jp1").innerHTML="Already in Favorite list";
						document.getElementById("favt_jp").innerHTML="Already in Favorite list";
						save_job_as_favorite_ag('0');
					}
				else if(xmlHttp.responseText==2)
					{
						document.getElementById("favt_jp1").innerHTML="Login first to make it Favorite";
						document.getElementById("favt_jp").innerHTML="Login first to make it Favorite";
						window.location="Service-Provider-Login-Form.html";
					}
				else
					{
						document.getElementById("favt_jp1").innerHTML=xmlHttp.responseText;
						document.getElementById("favt_jp").innerHTML=xmlHttp.responseText;
						save_job_as_favorite_ag('1');
					}
			} 
	}

//..................................apply for job...........................................
function save_job_as_favorite_ag(str)
	{ 
		//alert(str);
		//document.getElementById(prgress_id).innerHTML= '<img src="images/loading.gif"  border="0"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		if(str==1)
			{
				url=url+"?flg=save_as_favorite_ag";
			}
		else if(str==0)
			{
				url=url+"?flg=save_as_favorite_ag1";
			}
		xmlHttp.onreadystatechange=stateChangedForsave_job_as_favorite_ag;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForsave_job_as_favorite_ag() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("favt_jp").innerHTML=xmlHttp.responseText;
				document.getElementById("favt_jp1").innerHTML=xmlHttp.responseText;
			} 
	}

//..................................apply for job...........................................
function delete_favorite_jobs(favt_job_id,span_id)
	{ 
		id=span_id;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=delete_favorite_jobs&favt_job_id="+favt_job_id;
		xmlHttp.onreadystatechange=stateChangedFordelete_favorite_jobs;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedFordelete_favorite_jobs() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
				document.getElementById("favt_jobs"+id).innerHTML=xmlHttp.responseText;
			} 
	}

//.......................................................................................
function insert_city(str)
	{
		//alert(str);
		document.getElementById("city").value=str;
		hideDivcityDropDown();
	}
//..........................................................................................	
function show_image_slider(str)
	{ 
		document.getElementById("loader").innerHTML= '<div style="float:left; padding-left:310px; padding-top:80px;"><img src="images/7hwy7at6.gif"  border="0"/></div>';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="process_msgs.php";
		url=url+"?flg=show_image_slider&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForimage_slider;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForimage_slider() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				
						document.getElementById("image").innerHTML=xmlHttp.responseText;
			} 		
	}
//.......................................................................................
function addFormJobs()
	{ 
		//document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  />';
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=addForm";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForAddForm;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForAddForm() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				var check	=	"";
				check	=	xmlHttp.responseText;
				if(check==1)
					{
						showDivAddCompany();
					}
				else
					{
						
						window.location="post_work.php";

					}
			} 
	}
//.......................................................................................
function send_report(str)
	{ 
		//document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  />';
		var arrayValue	= new Array();
		if(document.getElementById("spam").checked)
			{
				arrayValue[0]	=	document.getElementById("spam").value;
			}
			
		if(document.getElementById("adult").checked)
			{
				arrayValue[1]	=	document.getElementById("adult").value;
			}
			
		if(document.getElementById("hateful").checked)
			{
				arrayValue[2]	=	document.getElementById("hateful").value;
			}
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="get_state.php";
		url=url+"?flg=reportviolateJob&option="+arrayValue+"&job_id="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForSendReport;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForSendReport() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				var check	=	"";
				document.getElementById("thanks_text").innerHTML	=	xmlHttp.responseText;
				
			} 
	}
//.......................................................................................
function send_report_emply(str)
	{ 
		//document.getElementById("allJobs").innerHTML= '<img src="images/loading.gif"  />';
		var arrayValue	= new Array();
		if(document.getElementById("spam").checked)
			{
				arrayValue[0]	=	document.getElementById("spam").value;
			}
			
		if(document.getElementById("adult").checked)
			{
				arrayValue[1]	=	document.getElementById("adult").value;
			}
			
		if(document.getElementById("hateful").checked)
			{
				arrayValue[2]	=	document.getElementById("hateful").value;
			}
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=reportviolateJob&option="+arrayValue+"&user_id="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForsend_report_emply;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForsend_report_emply() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				//alert("cat"+str);
				var check	=	"";
				document.getElementById("thanks_text").innerHTML	=	xmlHttp.responseText;
				
			} 
	}
//..........................................................................................	
function show_story(str)
	{ 
		
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="aynchronous_php.php";
		url=url+"?flg=show_story&q="+str;
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForshow_story;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForshow_story() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("showcop").innerHTML=xmlHttp.responseText;
			} 	showDiv();
	}
//..........................................................................................	
function updat_map()
	{ 
		document.getElementById("map").innerHTML= '<img src="../images/loading.gif"  />';
		//document.getElementById("../images/loading.gif").innerHTML=xmlHttp.responseText;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="aynchronous_php.php";
		url=url+"?flg=update_map&q=";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedupdat_map;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedupdat_map() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("map").innerHTML=xmlHttp.responseText;
			} 	
	}
//..........................................................................................	
function cancel_account_emply()
	{ 
		//document.getElementById("map").innerHTML= '<img src="../images/loading.gif"  />';
		//document.getElementById("../images/loading.gif").innerHTML=xmlHttp.responseText;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=cancel_account";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForcancel_account_emply;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForcancel_account_emply() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("cancel_account").innerHTML=xmlHttp.responseText;
				hide_cancel_account_msg()
			} 	
	}
//..........................................................................................	
function hide_cancel_account_msg()
	{ 
		//document.getElementById("map").innerHTML= '<img src="../images/loading.gif"  />';
		//document.getElementById("../images/loading.gif").innerHTML=xmlHttp.responseText;
		xmlHttp=GetXmlHttpObject();
		if (xmlHttp==null)
 			{
 				alert ("Browser does not support HTTP Request");
				 return;
		 	}
		var url="createcategory.php";
		url=url+"?flg=hide_cancel_msg";
		//url=url+"&sid="+Math.random();
		xmlHttp.onreadystatechange=stateChangedForaccount_msg;
		xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
	}
function stateChangedForaccount_msg() 
	{ 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 			{ 
 				document.getElementById("cancel_account").innerHTML=xmlHttp.responseText;
			} 	
	}
//.......................................................................................
function GetXmlHttpObject()
	{
		var xmlHttp=null;
		try
 			{
 				// Firefox, Opera 8.0+, Safari
 				xmlHttp=new XMLHttpRequest();
 			}
		catch (e)
 			{
 				//Internet Explorer
 				try
  					{
 			 			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  					}
 				catch (e)
  					{
 			  			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  					}
	 		}
		return xmlHttp;
	}
	
	