var xmlHttp
function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest) {
		objXMLHttp=new XMLHttpRequest()	}
	else if (window.ActiveXObject)	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")	}
	if (objXMLHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	return objXMLHttp
}
///////////////// NO CHANGE ABOVE/////////////////////


//////////////// GET SUBCATEGORY WITH CATEGOEY//////////////////////
function showHintother(str,prs,element,suggested)
{
	
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	
	url=url+"?id="+str+"&selected="+prs+"&types=subcatother&suggested="+suggested;
	xmlHttp3.onreadystatechange=function stateChanged() { 
		if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp3.responseText } }  
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
} 
function showHintother1(str,prs,element,suggested)
{
	//alert(element);
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=subcatother1&suggested="+suggested;
	xmlHttp3.onreadystatechange=function stateChanged() { 
		if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp3.responseText } }  
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
} 

function showHintother2(str,prs,element,suggested)
{
	//alert(element);
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=subcatother2&suggested="+suggested;
	xmlHttp3.onreadystatechange=function stateChanged() { 
		if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp3.responseText } }  
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
} 

function showHintpostproject(str,prs,element,suggested)
{
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";
	//alert(str);
	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=subcatpostproject&suggested="+suggested;
	xmlHttp3.onreadystatechange=function stateChanged() { 
		if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp3.responseText } }  
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
} 
//////////////// GET SUBCATEGORY//////////////////////
function showHint(str,prs,element)
{
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=subcat1"
	xmlHttp3.onreadystatechange=function stateChanged() { 
		if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp3.responseText } }  
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
}
function showHint1(str,prs,element)
{	
	//alert(element);
	xmlHttp31=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=subcat2"
	xmlHttp31.onreadystatechange=function stateChanged() { 
		if (xmlHttp31.readyState==4 || xmlHttp31.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp31.responseText } }  
	xmlHttp31.open("GET",url,true)
	xmlHttp31.send(null)
}
function showHint2(str,prs,element)
{
	//alert("aa"+element)
	xmlHttp32=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=subcat3"
	xmlHttp32.onreadystatechange=function stateChanged() { 
		if (xmlHttp32.readyState==4 || xmlHttp32.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp32.responseText } }  
	xmlHttp32.open("GET",url,true)
	xmlHttp32.send(null)
}
///////////////GET SUBCAT////////////////////////////////
function showHint_projects(str,prs,element)
{
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="projectsaj.php"
	url=url+"?id="+str+"&selected="+prs+"&types=subcat1"
	xmlHttp3.onreadystatechange=function stateChanged() { 
		if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp3.responseText } }  
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
} 
//////////////// GET STATE //////////////////////
function getstate(str,prs,element,cityname,zipcode)
{
	if(!cityname)
	{
		var cityname = '';
	}
	if(!zipcode)
	{
		var zipcode = '';
	}
	xmlHttp=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	if(str!=170)	{
		document.getElementById("citybox").innerHTML="<input type=\"text\" name=\"city\" id=\"city\" value='"+cityname+"'>";
		document.getElementById("zipbox").innerHTML="<input type=\"text\" name=\"zip\" id=\"zip\" value='"+zipcode+"'>";
		document.getElementById("truezip").value='Y' }
	url=url+"?id="+str+"&selected="+prs+"&types=state"
	xmlHttp.onreadystatechange=function stateChanged() { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp.responseText } }  
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
} 
//////////////// GET CITY //////////////////////
function getcity(str,prs,element)
{
	//alert(str);
	
	xmlHttp1=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait"

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=city"
	xmlHttp1.onreadystatechange=function stateChanged() { 
		if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp1.responseText } }  
	xmlHttp1.open("GET",url,true)
	xmlHttp1.send(null)
} 
function getcity1(str,prs,element)
{
	//alert(str);
	/*if(str=='ALL')
	{
		//alert(str);
		document.getElementById("pack").style.display = "none" ;
		document.getElementById("allstatepack").style.display = "inline" ;
	}else {
		document.getElementById("pack").style.display = "inline" ;
		document.getElementById("allstatepack").style.display = "none" ;
	}*/
	xmlHttp1=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait"

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=city"
	xmlHttp1.onreadystatechange=function stateChanged() { 
		if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp1.responseText } }  
	xmlHttp1.open("GET",url,true)
	xmlHttp1.send(null)
} 

function getcityonly(str,prs,element)
{
	xmlHttp1=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait"

	var url="getsubcat.php"
	url=url+"?id="+str+"&selected="+prs+"&types=cityonly"
	xmlHttp1.onreadystatechange=function stateChanged() { 
		if (xmlHttp1.readyState==4 || xmlHttp1.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp1.responseText } }  
	xmlHttp1.open("GET",url,true)
	xmlHttp1.send(null)
}
function getzip(prs,element)
{
	xmlHttp2=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait"
	document.getElementById("truezip").value='N'
	var url="getsubcat.php"
	url=url+"?selected="+prs+"&types=zip"
	xmlHttp2.onreadystatechange=function stateChanged() { 
		if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp2.responseText } }  
	xmlHttp2.open("GET",url,true)
	xmlHttp2.send(null)
}
function checkzip(abc,code)
{
	if(code!="")
	{
	xmlHttp=GetXmlHttpObject()
	var url="getsubcat.php"
	url=url+"?id="+abc+"&code="+code+"&types=getzip"
	xmlHttp.onreadystatechange=function stateChanged() { 
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")	{ 
		if(xmlHttp.responseText=="Y") {
				document.getElementById("truezip").value='Y' 
				}
		else { 
			document.frm.zip.value=""	
			document.getElementById("truezip").value='N'
			//alert("Invalid ZipCode")
			} }  }
			
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	}
}

//////////////// GET CITY //////////////////////
function getareaservedcity(str,element,userid)
{
	xmlHttp4=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait"

	var url="getsubcat.php"
	url=url+"?id="+str+"&types=areaservedcity&userid="+userid;
	xmlHttp4.onreadystatechange=function stateChanged() { 
		if (xmlHttp4.readyState==4 || xmlHttp4.readyState=="complete")	{ 
			document.getElementById(element).innerHTML=xmlHttp4.responseText } }  
	xmlHttp4.open("GET",url,true)
	xmlHttp4.send(null)
}
////////////////////GET Other SUB-CATEGORY////////////
function othersubcat(subcatvalue,element)
{
	if(subcatvalue=='0')
	{
		document.getElementById(element).innerHTML='&nbsp;&nbsp;Please specify a subcategory:&nbsp;<input type=\"text\" name=\"other_subcategory\" id=\"other_subcategory\" value=\"Sub-Category\" onFocus="prsclear();" />';
	}
	else
	{
		document.getElementById(element).innerHTML='';
	}
}
function prsclear()
{
	if(document.getElementById('other_subcategory').value=="Sub-Category")
	{
		document.getElementById('other_subcategory').value="";
	}
}
//////////////////Edit Email Address///////////////
function editemail(email,element)
{
	xmlHttp3=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?email="+email+"&types=email";
	xmlHttp3.onreadystatechange=function newstateChanged() { 
						if (xmlHttp3.readyState==4 || xmlHttp3.readyState=="complete")	
						{ 
							document.getElementById(element).innerHTML=xmlHttp3.responseText 
						} 
					}
	xmlHttp3.open("GET",url,true)
	xmlHttp3.send(null)
}
/////////////////GET A EXPEREINCE of JOB SEEKER ///////////////////////
function getexperiancejobsk(uid,removevalue,element,alreadyremoveid)
{
	//alert(removevalue);alert(alreadyremoveid);
	xmlHttp10=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?uid="+uid+"&types=experiancejobsk"+"&removevalue="+removevalue+"&alreadyremoveid="+alreadyremoveid;
	xmlHttp10.onreadystatechange=function newstateChanged() { 
				if (xmlHttp10.readyState==4 || xmlHttp10.readyState=="complete")	
				{ 
					document.getElementById(element).innerHTML=xmlHttp10.responseText 
				} 
					}
	xmlHttp10.open("GET",url,true)
	xmlHttp10.send(null)
}
function getexperiancejobsk_jobseeker(uid,removevalue,element,alreadyremoveid)
{
	//alert(removevalue);alert(alreadyremoveid);
	xmlHttp12=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?uid="+uid+"&types=experiancejobsk_jobseeker"+"&removevalue="+removevalue+"&alreadyremoveid="+alreadyremoveid;
	xmlHttp12.onreadystatechange=function newstateChanged() { 
				if (xmlHttp12.readyState==4 || xmlHttp12.readyState=="complete")	
				{ 
					document.getElementById(element).innerHTML=xmlHttp12.responseText 
				} 
					}
	xmlHttp12.open("GET",url,true)
	xmlHttp12.send(null)
}

function getskilljobsk(uid,removevalue,element,alreadyremoveid)
{
	//alert(removevalue);alert(alreadyremoveid);
	xmlHttp11=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?uid="+uid+"&types=skilljobsk"+"&removevalue="+removevalue+"&alreadyremoveid="+alreadyremoveid;
	xmlHttp11.onreadystatechange=function newstateChanged() { 
	if (xmlHttp11.readyState==4 || xmlHttp11.readyState=="complete")	
	{ 
		document.getElementById(element).innerHTML=xmlHttp11.responseText 
	} 
					}
	xmlHttp11.open("GET",url,true)
	xmlHttp11.send(null)
}
function getskilljobsk_jobseeker(uid,removevalue,element,alreadyremoveid)
{
	//alert(removevalue);alert(alreadyremoveid);
	xmlHttp13=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?uid="+uid+"&types=skilljobsk_jobseeker"+"&removevalue="+removevalue+"&alreadyremoveid="+alreadyremoveid;
	xmlHttp13.onreadystatechange=function newstateChanged() { 
	if (xmlHttp13.readyState==4 || xmlHttp13.readyState=="complete")	
	{ 
		document.getElementById(element).innerHTML=xmlHttp13.responseText 
	} 
					}
	xmlHttp13.open("GET",url,true)
	xmlHttp13.send(null)
}
/////////////////GET A Task of Projects		///////////////////////
function gettask(pid,uid,removevalue,element,alreadyremoveid)
{
	xmlHttp12=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?uid="+uid+"&types=task"+"&pid="+pid+"&types=task"+"&removevalue="+removevalue+"&alreadyremoveid="+alreadyremoveid;
	xmlHttp12.onreadystatechange=function newstateChanged() { 
				if (xmlHttp12.readyState==4 || xmlHttp12.readyState=="complete")	
				{ 
					document.getElementById(element).innerHTML=xmlHttp12.responseText 
				} 
					}
	xmlHttp12.open("GET",url,true)
	xmlHttp12.send(null)
}
/////////////////REMOVE Task of Projects		///////////////////////
function gettask_remove(ptid,uid,removevalue,element,alreadyremoveid)
{
	//alert(removevalue);alert(alreadyremoveid);
	xmlHttp13=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?uid="+uid+"&types=skilljobsk_jobseeker"+"&removevalue="+removevalue+"&alreadyremoveid="+alreadyremoveid;
	xmlHttp13.onreadystatechange=function newstateChanged() { 
	if (xmlHttp13.readyState==4 || xmlHttp13.readyState=="complete")	
	{ 
		document.getElementById(element).innerHTML=xmlHttp13.responseText 
	} 
	}
	xmlHttp13.open("GET",url,true)
	xmlHttp13.send(null)
}
/////////////////GET A TASK PROJECT ///////////////////////
function gettaskremove(pid,removevalue,element,alreadyremoveid)
{
	xmlHttp14=GetXmlHttpObject()
	document.getElementById(element).innerHTML="Please Wait";

	var url="getsubcat.php"
	url=url+"?pid="+pid+"&types=gettaskremove"+"&removevalue="+removevalue+"&alreadyremoveid="+alreadyremoveid;
	xmlHttp14.onreadystatechange=function newstateChanged() { 
				if (xmlHttp14.readyState==4 || xmlHttp14.readyState=="complete")	
				{ 
					document.getElementById(element).innerHTML=xmlHttp14.responseText 
				}
					}
	xmlHttp14.open("GET",url,true)
	xmlHttp14.send(null)
}
