var x = 0;
var xmlHttp = new Array();
var divid = new Array();
var stborderL = new Array();
var loadmess = new Array();
var stborderC = new Array();
var content = null;
var elements = new Array();


function parseScript(_source) {
	var source = _source;
	var scripts = new Array();
	
	// Strip out tags
	while(source.indexOf("<script") > -1 || source.indexOf("</script") > -1) {
		var s = source.indexOf("<script");
		var s_e = source.indexOf(">", s);
		var e = source.indexOf("</script", s);
		var e_e = source.indexOf(">", e);
		
		// Add to scripts array
		scripts.push(source.substring(s_e+1, e));
		// Strip from source
		source = source.substring(0, s) + source.substring(e_e+1);
	}
	
	// Loop through every script collected and eval it
	for(var i=0; i<scripts.length; i++) {
		try {
			eval(scripts[i]);
		}
		catch(ex) {
			// do what you want here when a script fails
		}
	}
	
	// Return the cleaned source
	return source;
}


function hidesearch()
{
 	document.getElementById("livesearch").
 	innerHTML='';
 	document.getElementById("livesearch").
 	style.border="0px solid #A5ACB5";
}

function statusCH(y)
{ 
if (xmlHttp[y] && divid[y] && (xmlHttp[y].readyState==4 || xmlHttp[y].readyState=="complete"))
 { 
	content = xmlHttp[y].responseText;
	document.getElementById(divid[y]).innerHTML=parseScript(xmlHttp[y].responseText);
 	document.getElementById(divid[y]).style.border=stborderC[y];
	xmlHttp[y]=null;
 } 
if (xmlHttp[y] && divid[y] && (xmlHttp[y].readyState<4 || xmlHttp[y].readyState=="loading"))
 { 
  	document.getElementById(divid[y]).innerHTML=loadmess[y];
 	document.getElementById(divid[y]).style.border=stborderL[y];
 } 
}

function statusCHND(y)
{ 
if (xmlHttp[y] && divid[y] && (xmlHttp[y].readyState==4 || xmlHttp[y].readyState=="complete"))
 { 
	parseScript(xmlHttp[y].responseText);
	xmlHttp[y]=null;
 } 
}

function GetXmlHttpObject(y)
{
xmlHttp[y]=null;
divid[y]="ajax1";
stborderL[y]="1px solid #A5ACB5";
stborderC[y]="0px solid #A5ACB5";
loadmess[y]="loading....";

try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp[y]=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp[y]=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp[y]=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp[y];
}

////////////////////////////////////////////////////////////////var xmlHttp

function getpage(divname,pagename,val1)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
 try
  {
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/"+pagename;
var params=val1+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
  }
 catch (e)
  {
   alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
  }
}

function zipsearch(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
divid[y]='livesearch';
var url="ajax/getzipfill.php"
url=url+"?zip="+str
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function typesearch(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.. Download a newer browser to use this site.")
 return
 }
divid[y]='livesearch';
var url="ajax/findtypes.php"
url=url+"?type="+str
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function changetypelist(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/changetypelist.php"
url=url+"?type="+str
url=url+"&sid="+Math.random()
divid[y]='changetypelist'
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function typelist(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/typelist.php"
url=url+"?type="+str
url=url+"&sid="+Math.random()
divid[y]='typelist';
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function loclist(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/loclist.php"
url=url+"?zip="+str
url=url+"&sid="+Math.random()

divid[y]='loclist';
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function loclistmain(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/loclist.php";
url=url+"?sid="+Math.random();

divid[y]='loclistmain';
xmlHttp[y].open("GET",url,true);
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null);
}

//////////////////////////////////////////////////
function lookhome()
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lookhome.php"
url=url+"?sid="+Math.random()
divid[y]='lookhome'
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function posthome(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/posthome.php"
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function posthomenewjobs(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/posthomenewjobs.php"
url=url+"?sid="+Math.random()
divid[y]=divname
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function posthomecurrentjobs(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/posthomecurrentjobs.php"
url=url+"?sid="+Math.random()
divid[y]=divname
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

/////////////////////////////////////////////
function changeloc(dist,zip)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/changeloc.php";
url=url+"?dist="+dist;
url=url+"&zip="+zip;
url=url+"&sid="+Math.random();
xmlHttp[y].open("GET",url,true);
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null);
}

function addtype(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/addtypes.php"
url=url+"?type="+str
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null)
}

function remtype(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/remtypes.php"
url=url+"?id="+str
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null)
}

function awardto(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/awarded.php"
var params="id="+id;
params=params+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

/////////////////////////////////////////////////////
function donework(str)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/donework.php"
url=url+"?id="+str
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null)
}

function ratework(cleanrat,customerrat,qualityrat,timerat,costrat,wid,at)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/ratework.php"
url=url+"?cleanrat="+cleanrat
url=url+"&customerrat="+customerrat
url=url+"&qualityrat="+qualityrat
url=url+"&timerat="+timerat
url=url+"&costrat="+costrat
url=url+"&wid="+wid
url=url+"&at="+at
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null)
}

function pconfirm(id,lid)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/pconfirm.php"
url=url+"?lid="+lid
url=url+"&id="+id
url=url+"&sid="+Math.random()
divid[y]='posthome'
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function pratework(id)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/pratework.php"
url=url+"?id="+id
url=url+"&sid="+Math.random()
divid[y]='posthome'
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function pconfirmyes(id,lid)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/pconfirmyes.php"
url=url+"?lid="+lid
url=url+"&id="+id
url=url+"&sid="+Math.random()
divid[y]='posthome'
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function pconfirmno(id,lid)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/pconfirmno.php"
url=url+"?lid="+lid
url=url+"&id="+id
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null)
}

function postreadmessages(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/seekmcont.php";
url=url+"?wid="+id
url=url+"&sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function posthomedonejobs(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/posthomedonejobs.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}


//////////////////////////////////////////////////
function looknewleads(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/looknewleads.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function lookcontleads(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lookcontleads.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function lookcurrwork(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lookcurrwork.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function lookfinwork(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lookfinwork.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function checkfillprofile(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/checkfillprofile.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function editrefslist(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/editrefslist.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function changerefs(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/changerefs.php";
url=url+"?id="+id;
url=url+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function typelistentry(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/typelistentry.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function addref(id,cname,continfo,email)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/addref.php";
var params="cname="+cname+"&email="+email+"&id="+id+"&continfo="+continfo+"&sid="+Math.random();
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

//////////////////////////////////////////////////
function delref(id)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/delref.php";
url=url+"?id="+id;
url=url+"&sid="+Math.random()
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function getreflist(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/getreflist.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function lookprofile(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/profile.php";
url=url+"?sid="+Math.random()
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

//////////////////////////////////////////////////
function looksaveprofile(fname,zip,city,state,lname,country,phone,fax,ad,company,title,promo,lic,ins,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/saveprofile.php";
var params="fname="+fname;
params=params+"&zip="+zip;
params=params+"&city="+city;
params=params+"&state="+state;
params=params+"&lname="+lname;
params=params+"&country="+country;
params=params+"&phone="+phone;
params=params+"&fax="+fax;
params=params+"&ad="+ad;
params=params+"&company="+company;
params=params+"&title="+title;
params=params+"&promo="+promo;
params=params+"&lic="+lic;
params=params+"&ins="+ins;
params=params+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

//////////////////////////////////////////////////
function postsaveprofile(fname,zip,city,state,lname,country,phone,fax,ad,company,promo,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/psaveprofile.php";
var params="fname="+fname;
params=params+"&zip="+zip;
params=params+"&city="+city;
params=params+"&state="+state;
params=params+"&lname="+lname;
params=params+"&country="+country;
params=params+"&phone="+phone;
params=params+"&fax="+fax;
params=params+"&ad="+ad;
params=params+"&company="+company;
params=params+"&promo="+promo;
params=params+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

//////////////////////////////////////////////////
function lookuploadlogo(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lookuploadlogo.php";
url=url+"?sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function looklogo(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/looklogo.php";
url=url+"?sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("GET",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].send(null)
}

function advlogin(user,pass,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="advertizing/ajax/advlogon.php";
var params="username="+user+"&password="+pass+"&sid="+Math.random();
divid[y]=divname;
loadmess[y]="Validating identity...";
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function advadlist(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/adlist.php";
var params="sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function advchangead(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="uploadad.php";
var params="id="+id+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function advdeletead(id)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/deletead.php";
var params="id="+id+"&sid="+Math.random();
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCHND(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function lookcommunication(wid,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lookcommunication.php";
var params="wid="+wid+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function looksendmessage(wid,title,message,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/sendmessage.php";
var params="wid="+wid+"&title="+title+"&message="+message+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function reademail2(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/reademail2.php";
var params="id="+id+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}


function lviewproj(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lviewproject.php";
var params="id="+id+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function lmanageproj(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lmanageproject.php";
var params="id="+id+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function savenotes(id,notes,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/savenotes.php";
var params="id="+id+"&notes="+notes+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function lookpayhist(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/lrecpt.php";
var params="sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function postmanagepost(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/responses.php";
var params="id="+id+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function deletepost(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/deletepost.php";
var params="id="+id+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function getposting(id,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/getposting.php";
var params="id="+id+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function updateposting(id,title,details,zip,type,cemail,cphone,budget,esd,ecd,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/updateposting.php";
var params="id="+id+"&title="+title+"&details="+details+"&zip="+zip+"&type="+type+"&cemail="+cemail+"&cphone="+cphone+"&budget="+budget+"&esd="+esd+"&ecd="+ecd+"&sid="+Math.random();
divid[y]=divname;
loadmess[y]="Contacting service providers....";
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function psavenotes(id,notes,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/savenotes.php";
var params="id="+id+"&notes="+notes+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function postprofile(divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/postprofile.php";
var params="sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function matchcont(id,dist,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/matchcont.php";
var params="id="+id+"&dist="+dist+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function matchcontresults(id,dist,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/matchcontresults.php";
var params="id="+id+"&dist="+dist+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function seekermakecont(lid,wid,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/makecont.php";
var params="lid="+lid+"&wid="+wid+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function seekersent(lid,wid,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/seeksent.php";
var params="lid="+lid+"&wid="+wid+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function seekersendmess(lid,wid,title,mess,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/seekersendmess.php";
var params="lid="+lid+"&wid="+wid+"&title="+title+"&mess="+mess+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function seekreadmail(id,wid,readonly,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/readmail.php";
var params="id="+id+"&wid="+wid+"&readonly="+readonly+"&div="+divname+"&sid="+Math.random();
divid[y]=divname;
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function checklogon(user,pass,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/checklogon.php";
var params="user="+user+"&pass="+pass+"&div="+divname+"&sid="+Math.random();
divid[y]=divname;
loadmess[y]="checking identity....";
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function checklogonseek(user,pass,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/seeklogin.php";
var params="user="+user+"&pass="+pass+"&div="+divname+"&sid="+Math.random();
divid[y]=divname;
loadmess[y]="checking identity....";
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function userprovjoin(email,email2,pass,pass2,code,promo,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/submitsignup.php";
var params="email="+email+"&email2="+email2+"&pass="+pass+"&pass2="+pass2+"&code="+code+"&promo="+promo+"&div="+divname+"&sid="+Math.random();
divid[y]=divname;
loadmess[y]="checking identity....";
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function userseekjoin(email,email2,pass,pass2,promo,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/submitsignup.php";
var params="email="+email+"&email2="+email2+"&pass="+pass+"&pass2="+pass2+"&promo="+promo+"&div="+divname+"&sid="+Math.random();
divid[y]=divname;
loadmess[y]="checking identity....";
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function providercatrequest(service,divname)
{ 
var y=0;
while (xmlHttp[y]!=null)
{
	y=y+1;
}

xmlHttp[y]=GetXmlHttpObject(y)
if (xmlHttp[y]==null)
 {
 alert ("Browser does not support HTTP Request. Download a newer browser to use this site.")
 return
 }
var url="ajax/sendcatreq.php";
var params="service="+service+"&sid="+Math.random();
divid[y]=divname;
loadmess[y]="Sending request....";
xmlHttp[y].open("POST",url,true)
xmlHttp[y].onreadystatechange=function(){statusCH(y);}
xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp[y].setRequestHeader("Content-length", params.length);
xmlHttp[y].setRequestHeader("Connection", "close");
xmlHttp[y].send(params)
}

function checkvalidation(form)
{
	var retval=true;
	var element = document.getElementsByName(form)[0];
        var inputs = element.getElementsByTagName('input');
	var inputs2 = element.getElementsByTagName('textarea');

	for(var k=0;k<inputs.length;k++)
	{
		var input = inputs[k];
  		if(input.alt=="verify" && input.value == "") {
			input.style.background="#fff336";
			popnote(input,'This value is required.  You need to fill it in to continue.');
			retval=false;
		}
	}

	for(var k=0;k<inputs2.length;k++)
	{
		var input = inputs2[k];
  		if(input.alt=="verify" && input.value == "") {
			input.style.background="#fff336";
			popnote(input,'This value is required.  You need to fill it in to continue.');
			retval=false;
		}
	}
	return retval;
}

function precheckvalidation(form)
{
	var element = document.getElementsByName(form)[0];
        var inputs = element.getElementsByTagName('input');

	for(var k=0;k<inputs.length;k++)
	{
		var input = inputs[k];
  		if(input.alt=="verify") {
			input.style.background="#fffaac";
		}
	}
}

function pressenter(event,obutton) 
{
  	if (event && event.which == 13)
    		obutton.click();
  	else
    		return true;
}

function ajaxhide(name)
{
	var element = document.getElementById(name);
	if(element)element.style.display='none';
}

function ajaxshow(name)
{
	var element = document.getElementById(name);
	if(element)element.style.display='block';
}

function ajaxtop(inputObj)
{
	var returnValue = inputObj.offsetTop;
	while((inputObj = inputObj.offsetParent) != null){
		returnValue += inputObj.offsetTop;
	}
	return returnValue;
}
	
function ajaxleft(inputObj)
{
	var returnValue = inputObj.offsetLeft;
	while((inputObj = inputObj.offsetParent) != null)returnValue += inputObj.offsetLeft;
	return returnValue;
}

function ajaxcreatediv(name)
{
	var allInputs = document.getElementsByTagName('body');
	var body = allInputs[0];
	var div = document.createElement('DIV');
	div.id = name;
	if(!document.getElementById(name)){body.appendChild(div);}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////Ajax Dropdown
if(navigator.userAgent.indexOf('MSIE')>=0 && navigator.userAgent.indexOf('Opera')<0)ajax_list_MSIE=true;
var searchcache = new Object();

function ajaxdropclear()
{
	// remove all children from element
	var element = document.getElementById("ajaxdropbox");
	while (element.firstChild) {
  		element.removeChild(element.firstChild);
	}
}

function ajaxdroprollover(divobj,val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7)
{
divobj.className='optionDivSelected';
var tokens = searchcache[thisobj.id][val1][divobj.id].split('`');
if(thisobj){thisobj.value=tokens[0];}
if(webobj2){webobj2.value=tokens[1];}
if(webobj3){webobj3.value=tokens[2];}
if(webobj4){webobj4.value=tokens[3];}
if(webobj5){webobj5.value=tokens[4];}
if(webobj6){webobj6.value=tokens[5];}
if(webobj7){webobj7.value=tokens[6];}
}

function ajaxdroprolloff(webobj)
{
	webobj.className='';
}

function ajaxdropfill(val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7)
{
	var body = document.getElementById('ajaxdropbox');

	for (var z in searchcache[thisobj.id][val1])
	{
		var div = document.createElement('DIV');
		div.id = z;
		div.onmouseover = function(){ ajaxdroprollover(this,val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7) }
		div.onmouseout = function(){ ajaxdroprolloff(this) }
		div.onclick = function(){ ajaxhide('ajaxdropbox') }
		var tokens = searchcache[thisobj.id][val1][z].split('`');

		var htmlstring='';
		for(var zz=0;zz<tokens.length;zz++)
		{
			if(tokens[zz]){htmlstring = htmlstring + tokens[zz];}		
		}
		div.innerHTML=htmlstring;
		body.appendChild(div);
	}
}

function createcache(val1,thisobj)
{
searchcache[thisobj.id][val1] = {};
	for(var z=0;z<elements.length;z++)
	{
		searchcache[thisobj.id][val1][z]=elements[z];
	}
}

function ajaxdropSTAT(y,val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7)
{ 
if (xmlHttp[y] && (xmlHttp[y].readyState==4 || xmlHttp[y].readyState=="complete"))
 {
	document.getElementById('ajaxdropbox').innerHTML='';
	content = xmlHttp[y].responseText;
	xmlHttp[y]=null;
	elements = content.split('|');
	createcache(val1,thisobj);
	ajaxdropfill(val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7);
 } 
if (xmlHttp[y] && (xmlHttp[y].readyState<4 || xmlHttp[y].readyState=="loading"))
 { 
  	document.getElementById('ajaxdropbox').innerHTML='Loading data';
 	//document.getElementById('ajaxdropbox').style.border=0;
 } 
}


function ajaxdropdown(phppage,val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7)
{ 
	ajaxcreatediv('ajaxdropbox');
	document.getElementById('ajaxdropbox').style.top = (ajaxtop(thisobj) + thisobj.offsetHeight) + 'px';
	document.getElementById('ajaxdropbox').style.left = ajaxleft(thisobj) + 'px';
	ajaxdropclear();
	if (!searchcache[thisobj.id]){searchcache[thisobj.id]={};}
	val1=val1.toLowerCase();
	if (!searchcache[thisobj.id][val1])
	{
		var y=0;
		while (xmlHttp[y]!=null)
		{
			y=y+1;
		}

		xmlHttp[y]=GetXmlHttpObject(y);
		if (xmlHttp[y]==null)
 		{
 			alert ("Browser does not support HTTP Request. Download a newer browser to use this site.");
 			return;
 		}
		var url="ajax/"+phppage;
		var params="val1="+val1+"&sid="+Math.random();
		xmlHttp[y].open("POST",url,true);
		xmlHttp[y].onreadystatechange=function(){ajaxdropSTAT(y,val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7);}
		xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlHttp[y].setRequestHeader("Content-length", params.length);
		xmlHttp[y].setRequestHeader("Connection", "close");
		xmlHttp[y].send(params);
	}else{
		ajaxdropfill(val1,thisobj,webobj2,webobj3,webobj4,webobj5,webobj6,webobj7);
	}
	ajaxshow('ajaxdropbox');
}
///////////////////////////////////////////Popup Note

function popnote(webobj,text)
{
	ajaxcreatediv('popnote');
	if(!document.getElementById('popnote')){body.appendChild(div);}
	document.getElementById('popnote').style.top = (ajaxtop(webobj) + webobj.offsetHeight) + 'px';
	document.getElementById('popnote').style.left = ajaxleft(webobj) + 'px';
	document.getElementById('popnote').innerHTML=text;
	ajaxshow("popnote");
	if(document.getElementById('popnote')){webobj.onfocus=function() { ajaxhide("popnote");webobj.style.background="#ffffff"; }}
}

//////////////////////////////////////////Popup Screen

function ajaxpopup(phppage,thisobj)
{ 
	ajaxcreatediv('ajaxpopup');
	document.getElementById('ajaxpopup').style.top = (ajaxtop(thisobj) - 250) + 'px';
	document.getElementById('ajaxpopup').style.left = (ajaxleft(thisobj) - 80) + 'px';
		var y=0;
		while (xmlHttp[y]!=null)
		{
			y=y+1;
		}

		xmlHttp[y]=GetXmlHttpObject(y);
		if (xmlHttp[y]==null)
 		{
 			alert ("Browser does not support HTTP Request. Download a newer browser to use this site.");
 			return;
 		}
		divid[y]='ajaxpopup';
		var url="ajax/"+phppage;
		var params="sid="+Math.random();
		xmlHttp[y].open("POST",url,true);
		xmlHttp[y].onreadystatechange=function(){statusCH(y);}
		xmlHttp[y].setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		xmlHttp[y].setRequestHeader("Content-length", params.length);
		xmlHttp[y].setRequestHeader("Connection", "close");
		xmlHttp[y].send(params);
	ajaxshow('ajaxpopup');;
}
