/***********************************************
* Dynamic Ajax Content- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function getHTTPObject() {
  var xmlhttp;

  if(window.XMLHttpRequest){
    xmlhttp = new XMLHttpRequest();
  }
  else if (window.ActiveXObject){
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    if (!xmlhttp){
        xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
}
  return xmlhttp;
}

var http = getHTTPObject(); // We create the HTTP Object


var anitha=5;
var bustcachevar=1 //bust potential caching of external pages after initial request? (1=yes, 0=no)
var loadedobjects=""
var rootdomain="http://"+window.location.hostname
var bustcacheparameter=""
function ajaxpage(url, contentarea){
	
	/*if(document.getElementById("msgdiv").innerHTML!=""){
	document.getElementById("msgdiv").innerHTML="";
	}*/
	if(document.getElementById('divforpaging').innerHTML!=""){
	document.getElementById('divforpaging').innerHTML="";
	}
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.onreadystatechange=
	function(){
loadpage(page_request, contentarea);
}
if (bustcachevar) //if bust caching of external page
bustcacheparameter=(url.indexOf("?")!=-1)? "&"+new Date().getTime() : "?"+new Date().getTime()
page_request.open('GET', url+bustcacheparameter, true)
page_request.send(null)
}

function loadpage(page_request, contentarea){
if (page_request.readyState == 4 ){
//if( page_request.status==200 || window.location.href.indexOf("http")==-1){
document.getElementById('contentarea').innerHTML=page_request.responseText
//}
}
}

function loadobjs(){
if (!document.getElementById)
return
for (i=0; i<arguments.length; i++){
var file=arguments[i]
var fileref=""
if (loadedobjects.indexOf(file)==-1){ //Check to see if this object has not already been added to page before proceeding
if (file.indexOf(".js")!=-1){ //If object is a js file
fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript");
fileref.setAttribute("src", file);
}
else if (file.indexOf(".css")!=-1){ //If object is a css file
fileref=document.createElement("link")
fileref.setAttribute("rel", "stylesheet");
fileref.setAttribute("type", "text/css");
fileref.setAttribute("href", file);
}
}
if (fileref!=""){
document.getElementsByTagName("head").item(0).appendChild(fileref)
loadedobjects+=file+" " //Remember this object as being already added to page
}
}
}



function ShowMenu11(){
var a=document.getElementById("chgmenunetworks1").options[document.getElementById("chgmenunetworks1").selectedIndex].text;
if(a!="Change Industry"){
var divnetworks11=document.getElementById('divnetworks11');
divnetworks11.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Networks "+ '</font>';
}
}

function ShowMenulink(){
var a=document.getElementById("chgmenunetworks1").options[document.getElementById("chgmenunetworks1").selectedIndex].text;
if(a!="Change Industry"){
	var divnetworkss=document.getElementById('divnetworkss');

divnetworkss.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Networks"+ '</font>';
}
retail(a);
}

function ShowMenu2(arg){
var a=document.getElementById("chgmenucompanies").options[document.getElementById("chgmenucompanies").selectedIndex].text;
if(a!="Change Industry"){
var divcompanies=document.getElementById('divcompanies');
divcompanies.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Groups "+ '</font>';
}

if(arg=="G"){
groupdSearch(a);
}
else{
gssearch(a);
}
}

function ShowMenucomp(){
var a=document.getElementById("chgmenucompanies").options[document.getElementById("chgmenucompanies").selectedIndex].text;
if(a!="Change Industry"){
var divcompanies=document.getElementById('divcompanies');
divcompanies.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Companies "+ '</font>';
}
compadv(a);
}

function ShowMenu3(){
	var a=document.getElementById("chgmenuevents").options[document.getElementById("chgmenuevents").selectedIndex].text;
	if(a!="Change Industry"){
		var divevents=document.getElementById('divevents');
		divevents.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Leads"+ '</font>';
	}
	leadsHsearch(a);
}

function ShowMenu3sell(){
	var a=document.getElementById("chgmenuevents").options[document.getElementById("chgmenuevents").selectedIndex].text;
	if(a!="Change Industry"){
		var divevents=document.getElementById('divevents');
		divevents.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Leads"+ '</font>';
	}
	leadsellHsearch(a);
}

function ShowMenueve(){
	var a=document.getElementById("chgmenuevents1").options[document.getElementById("chgmenuevents1").selectedIndex].text;
	if(a!="Change Industry"){
		var divevents=document.getElementById('divevents');
		divevents.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Events"+ '</font>';
	}
eventmainsearch('main',a);
}

function ShowMenu4(){
var a=document.getElementById("chgmenujobs").options[document.getElementById("chgmenujobs").selectedIndex].text;
if(a!="Change Industry"){
var divjobs=document.getElementById('divjobs');
divjobs.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Jobs"+ '</font>';
}
var val=2;
jobsearch(val,a);
}

function ShowMenu5(){
var a=document.getElementById("chgmenucompanies").options[document.getElementById("chgmenucompanies").selectedIndex].text;
if(a!="Change Industry"){
var divevents=document.getElementById('divevents');
divevents.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Events"+ '</font>';
}
eventmainsearch('main',a);
}

function ShowMenu6(){
var a=document.getElementById("chgmenucompanies").options[document.getElementById("chgmenucompanies").selectedIndex].text;
if(a!="Change Industry"){
var divcompanies=document.getElementById('divcompanies');
divcompanies.innerHTML= '<font class="SearchHead">' +a+'</font><font class="SearchHead1">'+" Groups"+ '</font>';
}
groupdSearch(a);
}

function ShowMenu7(){
var a=document.getElementById("chgmenucompanies").options[document.getElementById("chgmenucompanies").selectedIndex].text;
if(a!="Change Industry"){
var divcompanies=document.getElementById('divcompanies');
divcompanies.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Advice"+ '</font>';
}
}

function ShowMenu15(){
var a=document.getElementById("chgmenuadvice").options[document.getElementById("chgmenuadvice").selectedIndex].text;
if(a!="Change Industry"){
var divadvice=document.getElementById('divadvice');
divadvice.innerHTML= '<font class="SearchHead">' + a +'</font><font class="SearchHead1">'+" Advice"+ '</font>';
}
adviceSearch120(a);
}

function eventsearch(){
var k_word=document.getElementById("kword").value;
var industry=document.getElementById("indus1").options[document.getElementById("indus1").selectedIndex].text
var edate=document.getElementById("Eday").options[document.getElementById("Eday").selectedIndex].text
var ccat=document.getElementById("catag").options[document.getElementById("catag").selectedIndex].text
var cpub=document.getElementById("PUB").options[document.getElementById("PUB").selectedIndex].text
var ccountry=document.getElementById("count").options[document.getElementById("count").selectedIndex].text
var czip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hEsearch1.php?kw="+escape(k_word)+"&indus="+escape(industry)+"&eday="+escape(edate)+"&cata="+escape(ccat)+"&pub="+escape(cpub)+"&zip="+escape(czip)+"&country="+escape(ccountry),true);
http.onreadystatechange = handleHttpeventResponse;
http.send(null);
	}
        }
function handleHttpeventResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divEventInfo').innerHTML = results;
              }
        }

function eventsearch(){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hEsearch1.php?kw="+escape(k_word)+"&indus="+escape(industry)+"&eday="+escape(edate)+"&cata="+escape(ccat)+"&pub="+escape(cpub)+"&zip="+escape(czip)+"&country="+escape(ccountry),true);
http.onreadystatechange = handleHttpeventResponse;
http.send(null);
	}
        }
function handleHttpeventResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divEventInfo').innerHTML = results;
              }
        }
//events main search

function eventmainsearch(id,arg){
var ziplocst=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text
var k_word=document.getElementById("kword").value;
 for(var i=0;i<k_word.length;i++){
k_word=k_word.replace("\'","");
k_word=k_word.replace("\"","");
}
if(arg!="eve"){
var industry=arg;
}
else{
industry=document.getElementById("indus1").options[document.getElementById("indus1").selectedIndex].value;
}
var edate= document.getElementById("edate").options[document.getElementById("edate").selectedIndex].text
var ccat=document.getElementById("catag").options[document.getElementById("catag").selectedIndex].text
var cpub=document.getElementById("PUB").options[document.getElementById("PUB").selectedIndex].text
var ccountry=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value;
}
var czip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","eventmnsearch.php?stat="+escape(id)+"&kword="+escape(k_word)+"&indus="+escape(industry)+"&eday="+escape(edate)+"&cata="+escape(ccat)+"&pub="+escape(cpub)+"&zip="+escape(czip)+"&country="+escape(ccountry)+"&near="+escape(ziplocst)+"&state="+escape(state),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
        }
/*function handleHttpeventResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
        }*/

function pagingeventmainsearch(PageNo,kword,industry,edate,ccat,cpub,ccountry,czip){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
http.open("GET","eventmnsearch.php?PageNo="+escape(PageNo)+"&kword="+escape(kword)+"&indus="+escape(industry)+"&eday="+escape(edate)+"&cata="+escape(ccat)+"&pub="+escape(cpub)+"&zip="+escape(czip)+"&country="+escape(ccountry),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}
/*function handleHttpeventmResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
        }*/
//events main search ends

function groupsSearch(){
  var kword = document.getElementById("kword").value;
  var industry = document.getElementById("industry").value;
  var category = document.getElementById("category").value;
  var public = document.getElementById("public").value;
  var memsize= document.getElementById("memsize").value;
  var postdate= document.getElementById("postdate").value;
  var near= document.getElementById("near").value;
  var anywhere= document.getElementById("anywhere").value;
  var country= document.getElementById("country").value;
  var zip= document.getElementById("zip").value;
   if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
  http.open("GET","hGsearch3.php?kw="+escape(kword)+"&industry="+escape(industry)+"&category="+escape(category)+"&public="+escape(public)+"&memsize="+escape(memsize)+"&postdate="+escape(postdate)+"&near="+escape(near)+"&anywhere="+escape(anywhere)+"&country="+escape(country)+"&zip="+escape(zip) ,true);
  http.onreadystatechange = handleGroupsResponse;
  http.send(null);
	}
}

function handleGroupsResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divGroupsInfo').innerHTML = results;
              }
}

function pagingForhGsearchthree(PageNo,kword,industry,category,public1,memsize,postdate,near,anywhere,country,zip)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
  http.open("GET","hGsearch3.php?PageNo="+escape(PageNo)+"&kw="+escape(kword)+"&industry="+escape(industry)+"&category="+escape(category)+"&public="+escape(public1)+"&memsize="+escape(memsize)+"&postdate="+escape(postdate)+"&near="+escape(near)+"&anywhere="+escape(anywhere)+"&country="+escape(country)+"&zip="+escape(zip) ,true);
  http.onreadystatechange = handlepagingForhGsearchthree;
  http.send(null);
	}
}

function handlepagingForhGsearchthree()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divGroupsInfo').innerHTML = results;
              }
       }

function groupdSearch(x){
//alert("hi");
if(x!="Groups"){
var industry=x;
}
else{
  var industry = document.getElementById("gindustry").options[document.getElementById("gindustry").selectedIndex].value;
}
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text;
var kword = document.getElementById("gkword").value;
/*for(var i=0;i<kword.length;i++){
kword=kword.replace("\'","");
kword=kword.replace("\"","");
}*/
  var category = document.getElementById("gcategory").options[document.getElementById("gcategory").selectedIndex].text;
  var gpublic = document.getElementById("gpublic").options[document.getElementById("gpublic").selectedIndex].value;
  var memsize= document.getElementById("gmemsize").options[document.getElementById("gmemsize").selectedIndex].text;
  var postdate= document.getElementById("gpostdate").value;
  var country=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
  var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value;
}
var zip= document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
//alert(escape(kword));
http.open("GET","Gdsearch.php?kw="+escape(kword)+"&industry="+escape(industry)+"&category="+escape(category)+"&public="+escape(gpublic)+"&memsize="+escape(memsize)+"&postdate="+escape(postdate)+"&country="+escape(country)+"&state="+escape(state)+"&near="+escape(near)+"&zip="+escape(zip),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}

/*function handlegResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
}*/

function pagingForhGsearch3(PageNo,kword,industry,category,public1,memsize,postdate,near,anywhere,country,zip)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
  http.open("GET","Gdsearch.php?PageNo="+escape(PageNo)+"&kw="+escape(kword)+"&industry="+escape(industry)+"&category="+escape(category)+"&public="+escape(public1)+"&memsize="+escape(memsize)+"&postdate="+escape(postdate)+"&near="+escape(near)+"&anywhere="+escape(anywhere)+"&country="+escape(country)+"&zip="+escape(zip) ,true);
  http.onreadystatechange = handleallresults;
  http.send(null);
	}
}

/*function handlepagingForhGsearch3()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divforpaging').innerHTML = results;
              }
       }*/

/*GroupSearch.php*/
function gssearch(vr){
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text
var kword = document.getElementById("gskword").value;
for(var i=0;i<kword.length;i++){
kword=kword.replace("\'","");
kword=kword.replace("\"","");
}
if(vr!="gs")
	{
var industry=vr;
	}
	else{
  industry = document.getElementById("gsindustry").options[document.getElementById("gsindustry").selectedIndex].value;
	}
  var category = document.getElementById("gscategory").options[document.getElementById("gscategory").selectedIndex].text;
  var spublic = document.getElementById("gspublic").options[document.getElementById("gspublic").selectedIndex].text;
  var memsize= document.getElementById("gsmemsize").options[document.getElementById("gsmemsize").selectedIndex].text;
  var postdate= document.getElementById("gpostdate").value;
var country=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value;
}
  var zip= document.getElementById("zip").value;
   if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
  document.getElementById("gifval").value="1";
  showgif();
  http.open("GET","Gssearch.php?kw="+escape(kword)+"&near="+escape(near)+"&industry="+escape(industry)+"&category="+escape(category)+"&public="+escape(spublic)+"&memsize="+escape(memsize)+"&postdate="+escape(postdate)+"&country="+escape(country)+"&state="+escape(state)+"&zip="+escape(zip) ,true);
  http.onreadystatechange = handleallresults;
  http.send(null);
	}
}

/*function handlegsResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
              }*/

function pagingForGssearch3y(PageNo,kword,industry,category,public1,memsize,postdate,near,anywhere,country,zip)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
  http.open("GET","Gssearch.php?PageNo="+escape(PageNo)+"&kw="+escape(kword)+"&industry="+escape(industry)+"&category="+escape(category)+"&public="+escape(public1)+"&memsize="+escape(memsize)+"&postdate="+escape(postdate)+"&near="+escape(near)+"&anywhere="+escape(anywhere)+"&country="+escape(country)+"&zip="+escape(zip) ,true);
  http.onreadystatechange = handleallresults;
  http.send(null);
	}
}

/*function handlepagingForhGssearch3()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divforpaging').innerHTML = results;
              }
       }*/

/*GroupSearch.php*/

function adviceSearch120(advice)
{
	var kword = document.getElementById("kword").value;
	 for(var i=0;i<kword.length;i++)
		 {
	kword=kword.replace("\'","");
	kword=kword.replace("\"","");
		}
	if(advice!="A"){
	var industry=advice;
	}
	else{
	industry =  document.getElementById("indus1").options[document.getElementById("indus1").selectedIndex].value;
	}
	var category = document.getElementById("catag").value;
	var postdatefrom = document.getElementById("dateadv").value;
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	document.getElementById("gifval").value="1";
	showgif();
	http.open("GET","hAdvSearch1.php?kw="+escape(kword)+"&industry="+escape(industry)+"&category="+escape(category)+"&postdatefrom="+escape(postdatefrom),true);
	http.onreadystatechange = handleallresults;
	http.send(null);
	}
}

/*function handleAdviceResponse()
{
  if (http.readyState == 4) 
  {
          var results=http.responseText;
		  if(results!=""){
          document.getElementById('divforpaging').innerHTML = results;
		  document.getElementById("gifval").value="0";
		  showgif();
		  }
     }
  }*/

// Network search
function netNameSearch()
{
	var name = document.getElementById("kword").value;
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","hnetmemser.php?kword="+escape(name)+"&search=1",true);
	http.onreadystatechange = handleNetworkResponse;
	http.send(null);
	}
}

function netcollegeSearch()
{
	var contry = document.getElementById("country").value;
	var states = document.getElementById("state").value;
	var coll = document.getElementById("collegename").value;
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","hnetmemser.php?country="+escape(contry)+"&state="+escape(states)+"&collegename="+escape(coll)+"&search1=1",true);
	http.onreadystatechange = handleNetworkResponse;
	http.send(null);
	}
}

function netAdvSearch()
{
	var jtit = document.getElementById("jtitle").value;
	var ind = document.getElementById("Indutry").value;
	var cata = document.getElementById("category").value;
	var jin = document.getElementById("Join").value;
	var dist = document.getElementById("dist").value;
	var count = document.getElementById("country1").value;
	var zip = document.getElementById("zip").value;
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","hnetmemser.php?jtitle="+escape(jtit)+"&Indutry="+escape(ind)+"&category="+escape(cata)+"&Join="+escape(jin)+"&dist="+escape(dist)+"&country1="+escape(count)+"&zip="+escape(zip)+"&search2=1",true);
	http.onreadystatechange = handleNetworkResponse;
	http.send(null);
	}
}

function handleNetworkResponse()
{
  if (http.readyState == 4) 
  {
          var results=http.responseText;
		  alert(document.getElementById('divNetworkInfo'));
          document.getElementById('divNetworkInfo').innerHTML = results;
	 }
  }

function jobsearch(val,arg){
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text
var k_word=document.getElementById("kword").value;
for(var i=0;i<k_word.length;i++){
k_word=k_word.replace("\'","");
k_word=k_word.replace("\"","");
}
var job=document.getElementById("jobcatagory").value;
if(arg!="myjobs"){
var industry=arg;
}
else{
industry=document.getElementById("industry").options[document.getElementById("industry").selectedIndex].value;
}
var srange=document.getElementById("salaryrange").value;
var srange1=document.getElementById("salaryrange1").value;
var exp=document.getElementById("exprequired").value;
var sdate=document.getElementById("startdate").value;
var country=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value;
}
var zip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","hmyJobSearch.php?val="+escape(val)+"&kw="+escape(k_word)+"&jobc="+escape(job)+"&indus="+escape(industry)+"&range="+escape(srange)+"&rangeto="+escape(srange1)+"&exp="+escape(exp)+"&near="+escape(near)+"&date="+escape(sdate)+"&country="+escape(country)+"&state="+escape(state)+"&zip="+escape(zip),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}
/*function handleHttpResponse2() {
        if (http.readyState == 4) {
              var results=http.responseText;
			  if(results!=""){
              document.getElementById("divforpaging").innerHTML = results;
			  document.getElementById("gifval").value="0";
			  showgif();
			  }
              }
              }*/
function pagingForhmyJobSearch(PageNo,k_word,sortby,job,industry,srange,srange1,near,exp,sdate,state,country,zip)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
	http.open("GET","hmyJobSearch.php?PageNo="+escape(PageNo)+"&sby="+escape(sortby)+"&kw="+escape(k_word)+"&jobc="+escape(job)+"&indus="+escape(industry)+"&range="+escape(srange)+"&rangeto="+escape(srange1)+"&near="+escape(near)+"&exp="+escape(exp)+"&date="+escape(sdate)+"&country="+escape(country)+"&zip="+escape(zip)+"&state="+escape(state),true);
    http.onreadystatechange = handleallresults;
    http.send(null);
	}
}

/*function handlepagingForhmyJobSearch(){
    if (http.readyState == 4) {
           var results=http.responseText;
           document.getElementById('divforpaging').innerHTML = results;
        }
    }*/

function innerscriptForjobsearch(ButtonNo,PageSize,RecordCount,sortby,kword,
cata,ind,type,typeto,jtype,exp,jdate,country,zip)
{
   var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("pagefieldforhbsd1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
		
			var pagenoforsearch = parseInt(pagenoforsearch);
   
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}
	else if(pagenoforsearch){
		    if(pagenoforsearch<=0){
				 alert("Negitive page numbers are not valid");
			} else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
				 alert("Page number is out of search result range");
			} else{
				pagingForhmyJobSearch(pagenoforsearch,sortby,kword,cata,ind,type,typeto,jtype,exp,jdate,country,zip);
			}
    }else{
          alert("Enter valid page number");
	}
}

/* jobs main search*/
/*
function jobmssearch(){
var k_word=document.getElementById("jkword").value;
var job=document.getElementById("jcatagory").value;
var industry=document.getElementById("jindustry").value;
var srange=document.getElementById("jsalary").value;
var jtype=document.getElementById("jtype").value;
var exp=document.getElementById("jexpreq").value;
var sdate=document.getElementById("jstartdate").value;
var country=document.getElementById("jcountry").value;
var zip=document.getElementById("jzip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","JobSMSearchfun.php?kw="+escape(k_word)+"&jobc="+escape(job)+"&indus="+escape(industry)+"&range="+escape(srange)+"&type="+escape(jtype)+"&exp="+escape(exp)+"&date="+escape(sdate)+"&country="+escape(country)+"&zip="+escape(zip),true);
http.onreadystatechange = handlejobsmResponse;
http.send(null);
	}
}
function handlejobsmResponse() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divJobsInfo').innerHTML = results;
              }
              }

function pagingForJobsmSearch(PageNo,k_word,job,industry,srange,jtype,exp,sdate,country,zip)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","JobSMSearchfun.php?PageNo="+escape(PageNo)+"&kw="+escape(k_word)+"&jobc="+escape(job)+"&indus="+escape(industry)+"&range="+escape(srange)+"&type="+escape(jtype)+"&exp="+escape(exp)+"&date="+escape(sdate)+"&country="+escape(country)+"&zip="+escape(zip),true);
    http.onreadystatechange = handlepagingForhmyJobsmSearch;
    http.send(null);
	}
}

function handlepagingForhmyJobsmSearch(){
    if (http.readyState == 4) {
           var results=http.responseText;
           document.getElementById('divJobsInfo').innerHTML = results;
    }
 }*/

/* jobs main search*/

try{
function candidate(){
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text;
var kw=document.getElementById("keyword1").value;
for(var i=0;i<kw.length;i++){
kw=kw.replace("\'","");
kw=kw.replace("\"","");
}
var country=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value
}
var industry=document.getElementById("industry").options[document.getElementById("industry").selectedIndex].value;
var zip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","candidatesearch.php?kword="+escape(kw)+"&country="+escape(country)+"&state="+escape(state)+"&industry="+escape(industry)+"&zip="+escape(zip)+"&near="+escape(near),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}
}
catch (e) {
     var msg = '';
     for(var i in e) {
       msg += i+':'+e[i]+"<br>\n";

    }
  }

function pagingForhireJobSearch(PageNo,kw,country,industry,zip,distance){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
http.open("GET","candidatesearch.php?PageNo="+escape(PageNo)+"&kword="+escape(kw)+"&country="+escape(country)+"&industry="+escape(industry)+"&zip="+escape(zip)+"&dist="+escape(distance),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}

/*function handlCandidateResp()
{
     if (http.readyState == 4) {
	  var results=http.responseText;
          document.getElementById("jobcandidate").innerHTML = results;
 }
}*/

/*function companyHsearchName(){
var compnm=document.getElementById("cname").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hcompSearch.php?cpnm="+escape(compnm),true);
http.onreadystatechange = handleHttpResponse3;
http.send(null);
	}
}

function companyHsearch(){
var kwds=document.getElementById("services").value;
var emps=document.getElementById("employ1").value;
var revn=document.getElementById("revenue").value;
var estdt=document.getElementById("date1").value;
var jned=document.getElementById("join").value;
var indus=document.getElementById("ind1").value;
var nesr=document.getElementById("status").value;
var cont=document.getElementById("coun1").value;
var zip=document.getElementById("zip1").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hcompSearch.php?kws="+escape(kwds)+"&emp="+escape(emps)+"&rev="+escape(revn)+"&est="+escape(estdt)+"&jdt="+escape(jned)+"&ind="+escape(indus)+"&dist="+escape(nesr)+"&cont="+escape(cont)+"&zip="+escape(zip),true);
http.onreadystatechange = handleHttpResponse3;
http.send(null);
	}
}

function handleHttpResponse3() {
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById("divCompInfo").innerHTML = results;
              }
       }

function pagingForhcompSearch(PageNo,compnm,kwds,emps,revn,estdt,jned,indus,nesr,cont,zip)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","hcompSearch.php?PageNo="+escape(PageNo)+"&cpnm="+escape(compnm)+"&kws="+escape(kwds)+"&emp="+escape(emps)+"&rev="+escape(revn)+"&est="+escape(estdt)+"&jdt="+escape(jned)+"&ind="+escape(indus)+"&dist="+escape(nesr)+"&cont="+escape(cont)+"&zip="+escape(zip),true);
    http.onreadystatechange = handlepagingForhcompSearch;
    http.send(null);
	}
}

function handlepagingForhcompSearch()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById("divCompInfo").innerHTML = results;
              }
      }*/

//company name search//

/*function cname1(){
var compnm=document.getElementById("cname").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","divforpaging.php?cname="+escape(compnm),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}*/

/*function handlecnameres() {
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById("divforpaging").innerHTML = results;
       }
}*/

function pagingdivforpaging(PageNo,compnm)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
	http.open("GET","divforpaging.php?PageNo="+escape(PageNo)+"&cname="+escape(compnm),true);
    http.onreadystatechange = handleallresults;
    http.send(null);
	}
}

/*function handlepagingdivforpaging()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById("divforpaging").innerHTML = results;
              }
      }*/
//company name search//


//company adv search//

/*function compadv(id){
var near = document.getElementById('ziploc').options[document.getElementById("ziploc").selectedIndex].text;
var compnm=document.getElementById("serv").value;
for(var i=0;i<compnm.length;i++){
compnm=compnm.replace("\'","");
compnm=compnm.replace("\"","");
}

var employ=document.getElementById("employ").options[document.getElementById("employ").selectedIndex].text;
var revenue=document.getElementById("revenue").options[document.getElementById("revenue").selectedIndex].text;
var join=document.getElementById("joincomp").value;
if(id!="cs"){
var ind1=id;
}
else{
var ind1=document.getElementById("ind1").options[document.getElementById("ind1").selectedIndex].value;
}

var country=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value
}
var zip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","cadvsearch.php?cname="+escape(compnm)+"&emp="+escape(employ)+"&rev="+escape(revenue)+"&join="+escape(join)+"&ind1="+escape(ind1)+"&near="+escape(near)+"&country="+escape(country)+"&state="+escape(state)+"&zip="+escape(zip),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}*/

/*function handlecompanyadvres() {
    if (http.readyState == 4) {
                  var results=http.responseText;
				  if(results!=""){
	              document.getElementById("divforpaging").innerHTML = results;
				  document.getElementById("gifval").value="0";
				  showgif();
				  }
       }
}*/

/*function handlepagingcadvSearch()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById("divforpaging").innerHTML = results;
              }
}*/

/*function allleads(ind){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","allleads.php?industry="+escape(ind),true);
            http.onreadystatechange = handleHttpallleads;
            http.send(null);
	}
}*/

/*function handleHttpallleads() {
	if (http.readyState == 4) {
			var results=http.responseText;
            document.getElementById("divforpaging").innerHTML = results;
		}
	}*/

//Leads search
function leadsHsearch(id){
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text;
var kwds=document.getElementById("kword").value;
for(var i=0;i<kwds.length;i++){
kwds=kwds.replace("\'","");
kwds=kwds.replace("\"","");
}
if(kwds.charAt(0)==" "){
alert("Enter valid keyword.");
document.getElementById("kword").focus();
return false;
}
v=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value
}
var cost=document.getElementById("price").options[document.getElementById("price").selectedIndex].value;
if(id!="search"){
var indust=id;
}
else{
indust=document.getElementById("indus").options[document.getElementById("indus").selectedIndex].value;
}
var lstdt=document.getElementById("listdt").options[document.getElementById("listdt").selectedIndex].value;
var reps=document.getElementById("repls").options[document.getElementById("repls").selectedIndex].text;
var zip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","hBuySearchDet.php?kws="+escape(kwds)+"&cost1="+escape(cost)+"&indus="+escape(indust)+"&ldt="+escape(lstdt)+"&near="+escape(near)+"&cont="+escape(v)+"&state="+escape(state)+"&zip="+escape(zip)+"&replies="+escape(reps),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}

/*function handleHttpResponse4() {
	if (http.readyState == 4) {
			var results=http.responseText;
			if(results!=""){
            document.getElementById("divforpaging").innerHTML = results;
			document.getElementById("gifval").value="0";
			showgif();
			}
	}
}*/

function pagingForhBuySearchDet(PageNo,kwds,cost,indust,lstdt,near,cont,zip,replies,state,stat)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
	http.open("GET","hBuySearchDet.php?PageNo="+escape(PageNo)+"&kws="+escape(kwds)+"&cost1="+escape(cost)+"&indus="+escape(indust)+"&ldt="+escape(lstdt)+"&near="+escape(near)+"&cont="+escape(cont)+"&zip="+escape(zip)+"&replies="+escape(replies)+"&state="+escape(state)+"&stat="+escape(stat),true);
    http.onreadystatechange = handleallresults;
    http.send(null);
	}
}

/*function handlepagingForhBuySearchDet()
{
	if (http.readyState == 4) {
			var results=http.responseText;
            document.getElementById("divforpaging").innerHTML = results;
		}
}*/

function innerscriptForSerachGo(ButtonNo,PageSize,RecordCount,kwds,cost,indust,lstdt,nesr,cont,zip)
{
   var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("pagefieldforhbsd1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
		
			var pagenoforsearch = parseInt(pagenoforsearch);
		
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}
	else if(pagenoforsearch){
		    if(pagenoforsearch<=0){
				 alert("Negitive page numbers are not valid");
			} else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
				 alert("Page number is out of search result range");
			} else{
			    pagingForhBuySearchDet(pagenoforsearch,kwds,cost,indust,lstdt,nesr,cont,zip)
			}
    }else{
          alert("Enter valid page number");
	}
}

function innerscriptForleads(ButtonNo,PageSize,RecordCount,kwds,cost,indust,lstdt,nesr,cont,zip,replies,state,stat)
{
   var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("pagefieldforhbsd1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
		
			var pagenoforsearch = parseInt(pagenoforsearch);

	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}
	else if(pagenoforsearch){
		    if(pagenoforsearch<=0){
				 alert("Negitive page numbers are not valid");
			} else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
				 alert("Page number is out of search result range");
			} else{
			    pagingForhBuySearchDet(pagenoforsearch,kwds,cost,indust,lstdt,nesr,cont,zip,replies,state,stat)
			}
    }else{
          alert("Enter valid page number");
	}
}

function innerscriptForSerachGo(ButtonNo,PageSize,RecordCount,kwds,cost,indust,lstdt,nesr,cont,zip)
{
   var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("pagefieldforhbsd1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
		
				var pagenoforsearch = parseInt(pagenoforsearch);

	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}
	else if(pagenoforsearch){
		    if(pagenoforsearch<=0){
				 alert("Negitive page numbers are not valid");
			} else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
				 alert("Page number is out of search result range");
			} else{
			    pagingForhBuySearchDet(pagenoforsearch,kwds,cost,indust,lstdt,nesr,cont,zip)
			}
    }else{
          alert("Enter valid page number");
	}
}

/*function leadsbuysell(obj){
var indust=obj;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","bothbuynsell.php?indus="+escape(indust),true);
http.onreadystatechange = handleHttpleadboth;
http.send(null);
	}
}
var http;
function handleHttpleadboth() {
	if (http.readyState == 4) {
			var results=http.responseText;
            document.getElementById("divforpaging").innerHTML = results;
	}
}*/

/*function pagingforbothleads(PageNo,indust)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","bothbuynsell.php?PageNo="+escape(PageNo)+"&indus="+escape(indust),true);
    http.onreadystatechange = handlepagingforbothleads;
    http.send(null);
	}
}
function handlepagingforbothleads()
{
	if (http.readyState == 4) {
			var results=http.responseText;
            document.getElementById("divforpaging").innerHTML = results;
	}
}
function Buttonforboth(ButtonNo,PageSize,RecordCount,indust)
{
   var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("pagefieldforhbsd1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
		
					var pagenoforsearch = parseInt(pagenoforsearch);
		
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}
	else if(pagenoforsearch){
		    if(pagenoforsearch<=0){
				 alert("Negitive page numbers are not valid");
			} else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
				 alert("Page number is out of search result range");
			} else{
			    pagingforbothleads(pagenoforsearch,indust)
			}
    }else{
          alert("Enter valid page number");
	}
}
*/

function leadsellHsearch(obj){
statleads=obj;
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text;
var kwds=document.getElementById("kword").value;
for(var i=0;i<kwds.length;i++){
kwds=kwds.replace("\'","");
kwds=kwds.replace("\"","");
}
if(kwds.charAt(0)==" "){
alert("Enter valid keyword.");
document.getElementById("kword").focus();
return false;
}
var cost=document.getElementById("price").options[document.getElementById("price").selectedIndex].value;
if(statleads!="search"){
var indust=statleads;
}
else{
indust=document.getElementById("indus").options[document.getElementById("indus").selectedIndex].value;
}
var lstdt=document.getElementById("listdt").options[document.getElementById("listdt").selectedIndex].value;
var reps=document.getElementById("repls").options[document.getElementById("repls").selectedIndex].text;
var cont=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value
}
var zip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","SellSearchdet1.php?kws="+escape(kwds)+"&cost1="+escape(cost)+"&indus="+escape(indust)+"&ldt="+escape(lstdt)+"&near="+escape(near)+"&cont="+escape(cont)+"&state="+escape(state)+"&zip="+escape(zip)+"&replies="+escape(reps),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}

/*var http;
function handleHttpResponsesell() {
	if (http.readyState == 4) {
			var results=http.responseText;
			if(results!=""){
            document.getElementById("divforpaging").innerHTML = results;
			document.getElementById("gifval").value="0";
			showgif();
			}
	}
}*/

function pagingForhBuySearchDetsell(PageNo,kwds,cost,indust,lstdt,nesr,cont,zip,replies,state,stat)
{	
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
		document.getElementById("gifval").value="1";
showgif();
	http.open("GET","SellSearchdet1.php?PageNo="+escape(PageNo)+"&kws="+escape(kwds)+"&cost1="+escape(cost)+"&indus="+escape(indust)+"&ldt="+escape(lstdt)+"&dist="+escape(nesr)+"&cont="+escape(cont)+"&zip="+escape(zip)+"&replies="+escape(replies)+"&state="+escape(state)+"&stat="+escape(stat),true);
    http.onreadystatechange = handleallresults;
    http.send(null);
	}
}
/*function handlepagingForhBuySearchDetsell()
{
	if (http.readyState == 4) {
			var results=http.responseText;
            document.getElementById("divforpaging").innerHTML = results;
		}
	}*/
function innerscriptForSerachGosell(ButtonNo,PageSize,RecordCount,kwds,cost,indust,lstdt,nesr,cont,zip,replies,state,stat)
{
   var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("pagefieldforhbsd1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
		
					var pagenoforsearch = parseInt(pagenoforsearch);

	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}
	else if(pagenoforsearch){
		    if(pagenoforsearch<=0){
				 alert("Negitive page numbers are not valid");
			} else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
				 alert("Page number is out of search result range");
			} else{
			    pagingForhBuySearchDetsell(pagenoforsearch,kwds,cost,indust,lstdt,nesr,cont,zip,replies,state,stat)
			}
    }else{
          alert("Enter valid page number");
	}
}
function openSite(url)
{
window.open(url,'','');
}

function changeStatus(statusnew,username){
var date=new Date();
var time=date.getTime();
var status1=statusnew;
if(status1=="online"){
status1=1;
}
if(status1=="offline"){
status1=0;
}
var username=username;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","changestatus.php?status="+escape(status1)+"&uname="+escape(username)+"&timaval="+escape(time),true);
http.onreadystatechange = handleHttpResponse6;
http.send(null);
	}
}

function handleHttpResponse6() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById("divStatusInfo").innerHTML = results;
              }
              }

// for others company network paging..............

function forCNetworkGonew(url,ButtonNo,PageSize,RecordCount,cuid,sby)
{
	var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("searchpage1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("searchpage2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingForCNetworknew(url,pagenoforsearch,sby,cuid);
		}
	}else{
		alert("Enter valid page number");
	}
}

function pagingForCNetworknew(url,PageNo,sby,cuid)
{
	if(PageNo == undefined)
	{
		PageNo = 1;
	}
	if(sby == undefined)
	{
		sby = '';
	}
	if(url=="innerCNetwork1"){
		 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerCNetwork1.php?PageNo="+escape(PageNo)+"&sby="+escape(sby)+"&cuid="+escape(cuid),true);
	}
	}

else if(url=="innerCNetwork1m"){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerCNetwork1m.php?PageNo="+escape(PageNo)+"&sby="+escape(sby)+"&cuid="+escape(cuid),true);
	}
	}
    http.onreadystatechange = handlepagingForCNetwork1;
    http.send(null);
}

function handlepagingForCNetwork1()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divNetworkPage').innerHTML = results;
              }
}
// end of others company network paging...............

// CODE to open others network
function pagingForNetwork2(PageNo)
{ if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerNetwork1m.php?PageNo="+escape(PageNo),true);
    http.onreadystatechange = handlepagingForNetwork2;
    http.send(null);
	}
}

function handlepagingForNetwork2()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divNetworkPage').innerHTML = results;
              }
       }

//paging for the same network

function forNetworkGonew(url,ButtonNo,PageSize,RecordCount,uid,sby)
{
	var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("searchpage1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("searchpage2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingForNetworknew(url,pagenoforsearch,sby,uid);
		}
	}else{
		alert("Enter valid page number");
	}
}

function pagingForNetworknew(url,PageNo,sby,uid)
{
	if(PageNo == undefined)
	{
		PageNo = 1;
	}
	if(sby == undefined)
	{
		sby = '';
	}
	if(url=="innerNetwork1"){
		 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerNetwork1.php?PageNo="+escape(PageNo)+"&sby="+escape(sby)+"&id="+escape(uid),true);
	}
	}
	else if(url=="innernetwork1m"){
		 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerNetwork1m.php?PageNo="+escape(PageNo)+"&sby="+escape(sby)+"&id="+escape(uid),true);
	}
	}
    http.onreadystatechange = handlepagingForNetwork1;
    http.send(null);
}

function handlepagingForNetwork1()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divNetworkPage').innerHTML = results;
              }
}
//end of paging for this network...........// end of code to open others network

// code to open network-othersm..................

function pagingForNetwork3(PageNo)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerNetwork1.php?PageNo="+escape(PageNo),true);
    http.onreadystatechange = handlepagingForNetwork1;
    http.send(null);
	}
}

function handlepagingForNetwork3()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divNetworkPage').innerHTML = results;
       }
}

function forNetworkGo2(ButtonNo,PageSize,RecordCount)
{
	var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("searchpage1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("searchpage2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingForNetwork2(pagenoforsearch);
		}
	}else{
		alert("Enter valid page number");
	}
}

function forNetworkGo3(ButtonNo,PageSize,RecordCount)
{
	var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("searchpage1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("searchpage2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingForNetwork3(pagenoforsearch);
		}
	}else{
		alert("Enter valid page number");
	}
}

/*function namedivforpaging(){
var kw=document.getElementById("kword").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","netnamesearch.php?kword="+escape(kw),true);
http.onreadystatechange = handldivforpaging;
http.send();
	}
}

function handldivforpaging()
{
     if (http.readyState == 4) {
          var results=http.responseText;
          document.getElementById('divforpaging').innerHTML = results;
 }
}*/

/*function pagingFornetname(PageNo,kw){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","jobsnamesearch.php?PageNo="+escape(PageNo)+"&kword="+escape(kw),true);
http.onreadystatechange = handlCandidateResp;
http.send();
	}
}

function handlCandidateResp()
{
     if (http.readyState == 4) {
     var results=http.responseText;
	 document.getElementById("divforpaging").innerHTML = results;
 }
}*/

function deletetest(id){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","deleteTest.php?id="+escape(id),true);
http.onreadystatechange = deleteTest;
http.send();
	}
}

function deleteTest()
{
     if (http.readyState == 4) {
     var results=http.responseText;
	 window.location.href="EditTestimonials.php";
     }
}

function pagingForCNetwork2(PageNo)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerCNetwork1m.php?PageNo="+escape(PageNo),true);
    http.onreadystatechange = handlepagingForCNetwork2;
    http.send(null);
	}
}

function handlepagingForCNetwork2()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divNetworkPage').innerHTML = results;				
              }
       }

function pagingForCNetwork3(PageNo)
{
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","innerCNetwork1.php?PageNo="+escape(PageNo),true);
    http.onreadystatechange = handlepagingForCNetwork3;
    http.send(null);
	}
}

function handlepagingForCNetwork3()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('divNetworkPage').innerHTML = results;
       }
}
function forCNetworkGo1(ButtonNo,PageSize,RecordCount)
{
	var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("searchpage1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("searchpage2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingForCNetwork1(pagenoforsearch);
		}
	}else{
		alert("Enter valid page number");
	}
}

function forCNetworkGo2(ButtonNo,PageSize,RecordCount)
{
	var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("searchpage1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("searchpage2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingForCNetwork2(pagenoforsearch);
		}
	}else{
		alert("Enter valid page number");
	}
}

function forCNetworkGo3(ButtonNo,PageSize,RecordCount)
{
	var  pagenoforsearch;
	if(ButtonNo == 1)
		pagenoforsearch = document.getElementById("searchpage1").value;
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("searchpage2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingForCNetwork3(pagenoforsearch);
		}
	}else{
		alert("Enter valid page number");
	}
}

function pagingForOffice(PageNo)
{	
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
	http.open("GET","officeviewall.php?PageNo="+escape(PageNo),true);
    http.onreadystatechange = handlepagingForOffice;
    http.send(null);	
	}
}

function handlepagingForOffice()
{
        if (http.readyState == 4) {
                  var results=http.responseText;
	              document.getElementById('view').innerHTML = results;
              }
       }

/*function utilities(id){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hlinkersutilities.php?kw="+escape(id),true);
http.onreadystatechange = handleHttpResponseu;
http.send(null);
	}
}

function handleHttpResponseu() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
        }*/

/*function center(id){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hlinkerscenter.php?kw="+escape(id),true);
http.onreadystatechange = handleHttpResponsec;
http.send(null);
	}
}
function handleHttpResponsec() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
              }*/

try{	
function retail(id){
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text;
var jtitle="";
//var jtitle=document.getElementById("kword").value;
if(id!=""){
industry=id;
}
else{
var industry=document.getElementById("industry").options[document.getElementById("industry").selectedIndex].value;
}
var category=document.getElementById("category").options[document.getElementById("category").selectedIndex].text;
var country=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].value;
var s=document.getElementById("slinker").type;
if(s=="text"){
var state=document.getElementById("slinker").value;
}
else{
state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].value;
}
var join=document.getElementById("join").value;
var zip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
document.getElementById("gifval").value="1";
showgif();
http.open("GET","netadvsearch.php?jtitle="+escape(jtitle)+"&industry="+escape(industry)+"&category="+escape(category)+"&country="+escape(country)+"&join="+escape(join)+"&near="+escape(near)+"&state="+escape(state)+"&zip="+escape(zip),true);
http.onreadystatechange = handleallresults;
http.send(null);
	}
}
}
catch (e4) {
     var msg4 = '';
     for(var i in e4) {
       msg4 += i+':'+e4[i]+"<br>\n";
    }
    document.getElementById('divforpaging').innerHTML = msg4;
}

/*function handladvResumehome()
{
     if (http.readyState == 4) {
          var results=http.responseText;
          document.getElementById("divforpaging").innerHTML = results;
     }
 }*/
				
/*function construct(id){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hlinkersconstuct.php?kw="+escape(id),true);
http.onreadystatechange = handleHttpResponseco;
http.send(null);
	}
}
function handleHttpResponseco() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
              }*/

/*function jobutilities(id){
	 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","jobutil.php?kw="+escape(id),true);
http.onreadystatechange = handleHttpResponseju;
http.send(null);
	}
}

function handleHttpResponseju() {
        if (http.readyState == 4) {
                  var results=http.responseText;
              document.getElementById('divforpaging').innerHTML = results;
              }
        }*/

function forEventGo(ButtonNo,PageSize,RecordCount,sby)
{
	var  pagenoforsearch;
	if(ButtonNo == 1){
		pagenoforsearch = document.getElementById("pagefieldforhbsd1").value;
	}
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
		
					var pagenoforsearch = parseInt(pagenoforsearch);
		
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}
	else if(pagenoforsearch){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingeventmainsearchBack(pagenoforsearch,sby);
		}
	}else{
		alert("Enter valid page number");
	}
}

function forEventGo1(ButtonNo,PageSize,RecordCount)
{
	var  pagenoforsearch;
	if(ButtonNo == 1){
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
	}
    else if(ButtonNo == 2)
		pagenoforsearch = document.getElementById("pagefieldforhbsd2").value;
	if(pagenoforsearch == "" || pagenoforsearch == null){
		alert("Enter page number in the text field");
	}else if(parseInt(pagenoforsearch)){
		if(pagenoforsearch<=0){
		   alert("Negitive page numbers are not valid");
		}else if(pagenoforsearch > Math.ceil(RecordCount/PageSize)){
			alert("Page number is out of search result range");
		}else{
			pagingeventmainsearchBack(pagenoforsearch);
		}
	}else{
		alert("Enter valid page number");
	}
}

function grouplinks(ind){
groupdSearch(ind);
}

function grouplinks1(ind){
gssearch(ind);
}

function eventlinks(ind){
eventmainsearch('main',ind);
}

function eventlinks1(ind){
adviceSearch120(ind);
}
function jeventlinks(ind){
var val=2;
jobsearch(val,ind);
}
function leadlink(ind){
leadsHsearch(ind);
}

//new function for buy and sell search
/*function leadlink1(ind){
leadsHsearch111(ind);
}

function leadsHsearch111(id){
var near=document.getElementById("ziploc").options[document.getElementById("ziploc").selectedIndex].text;
var kwds=document.getElementById("kword").value;
v=document.getElementById("countrylink").options[document.getElementById("countrylink").selectedIndex].text;
var t=document.getElementById("slinker").type;
if(t=="text"){
var state=document.getElementById("slinker").value;
}
else{
var state=document.getElementById("slinker").options[document.getElementById("slinker").selectedIndex].text
}
var cost=document.getElementById("price").options[document.getElementById("price").selectedIndex].text;
if(id!="search"){
var indust=id;
}
else{
indust=document.getElementById("indus").options[document.getElementById("indus").selectedIndex].text;
}
var lstdt=document.getElementById("listdt").options[document.getElementById("listdt").selectedIndex].value;
var reps=document.getElementById("repls").options[document.getElementById("repls").selectedIndex].text;
var zip=document.getElementById("zip").value;
 if (http.readyState != 4 && http.readyState!=0){ 
		return;
		}
	else{
http.open("GET","hbuysearchdetbs.php?kws="+escape(kwds)+"&cost1="+escape(cost)+"&indus="+escape(indust)+"&ldt="+escape(lstdt)+"&near="+escape(near)+"&cont="+escape(v)+"&state="+escape(state)+"&zip="+escape(zip)+"&replies="+escape(reps),true);
http.onreadystatechange = handleHttpResponse4;
http.send(null);
	}
}*/

/*function handleHttpResponse4() {
	if (http.readyState == 4) {
			var results=http.responseText;
            document.getElementById("divforpaging").innerHTML = results;
	}
}*/

//end new function

function leadlinkbs(ind){
leadsbuysell(ind);
}

function sleadlink(ind){
leadsellHsearch(ind);
}

function SEARCHLEADS()
	{
var searchtype=document.getElementById("leadtype").options[document.getElementById("leadtype").selectedIndex].text;
if(searchtype=="Sell Lead (Selling)")
	{
	leadsellHsearch('search');
}
else if(searchtype=="Buy Lead (Purchasing)")
	{
	leadsHsearch('search');
}
document.getElementById('divforpaging').innerHTML="&nbsp;";
document.getElementById("gifval").value="1";
showgif();
}

function valid_testimonial_form(){
	var testres=testimonialform();
if(testres==true){
document.getElementById("testvall").value="1";
document.testi.submit();

}

}


function testimonialform(){
	var desc=document.getElementById("testdesc123").value;
	if(desc==""){
	alert("Please enter the message.");	
	document.getElementById("testdesc123").focus();
	return false;
	}
	else if(desc!=""){
if(/^\S+/.test(desc)==false){
alert("Please enter valid message.");
	return false;
}
	}
	return true;
}

function checktestimonial(){
	var desc=document.getElementById("testimonial").value;
	if(desc==""){
	alert("Please enter the message.");	
	document.getElementById("testimonial").focus();
	return false;
	}
	return true;
}

 function check_length(mess1,charcount1,divid1,maxchars)
     {
		 var mess=document.getElementById(mess1);
var charcount=document.getElementById(charcount1);
var divid=document.getElementById(divid1);
       var message = mess;
       var len = message.value.length;

       if (len > maxchars) {
         message.value = message.value.substr(0,maxchars);
         len = maxchars;
       }
	   charcount.innerHTML = maxchars - len+"  characters are remaining.";
	   divid.style.display="block";

if(maxchars - len==0){
	
 charcount.innerHTML = maxchars - len+"  You have reached maximum number of characters.";
}
	     }

		 function checkbkgr(){
var rep=checkbkground();
if(rep==true){
document.getElementById("subval").value="1";
document.addimage.submit();
}

		 }

function checkbkground()
	{
		var res=true;
var cdesc=document.getElementById("cdesc").value;
if(cdesc!=""){
if(/^\S+/.test(cdesc)==false){
alert("Please enter vaild company background.");
		res=false;
}
}
return res;
		 }


// ********  dispaly results  *************

function handleallresults() {
	if (http.readyState == 4) {
			var results=http.responseText;
			if(results!=""){
            document.getElementById("divforpaging").innerHTML = results;
			document.getElementById("gifval").value="0";
			showgif();
			}
	}
}

// ********  End of results displaying  ******

// >>>>>>>>  For gif Image <<<<<<<<<<

function showgif(){
setlefttop();
var gifval=document.getElementById("gifval").value;
//alert(gifval);
var res= document.getElementById('divforpaging').innerHTML;
if((gifval!="0") && (res!="")){
document.getElementById("loading_message_join").style.display = 'block';
}
else{
document.getElementById("loading_message_join").style.display = 'none';
}
}

// >>>>>>>>>>>  End Of Gif  <<<<<<<<<<<<<< 