function setSearch()
{
var slocation = document.getElementById("s_Location").value;
var slocationID = document.getElementById('s_Location')
 
if (slocation != 'Street/Area/Town/City/State/Country')  
  { slocationID.className="entry-s2";  } 
else
  { slocationID.className="entry-s";  } 
  
var spostcode = document.getElementById("s_postcode").value;
var spostcodeID = document.getElementById('s_postcode')
 
if (spostcode != 'Zip')  
  { spostcodeID.className="entry-s2";  } 
else
  { spostcodeID.className="entry-s";  } 

var sproduct = document.getElementById("s_product").value;
var sproductID = document.getElementById('s_product')
 
if (sproduct != 'Service/Listed Business Name/Member No/Phone')  
  { sproductID.className="entry-s2";  } 
else
  { sproductID.className="entry-s";  } 
}


function setSearchon(x)
{

switch(x.id)
{
case "s_Location":
  if (x.value == 'Street/Area/Town/City/State/Country') 
  { x.value='';  } 
  x.className="entry-s2";  
  break;
case "s_postcode":
  if (x.value == 'Zip') 
  { x.value=''; } 
  x.className="entry-s2";  
  break;
case "s_product":
  if (x.value == 'Service/Listed Business Name/Member No/Phone') 
  { x.value=''; }
  x.className="entry-s2";  
  break;  
default:
  
}

  
}

function setSearchoff(x)
{
switch(x.id)
{
case "s_Location":
  if (x.value == '') 
  { 
   x.value = 'Street/Area/Town/City/State/Country';
   x.className="entry-s";
  } 
  break;
case "s_postcode":
  if (x.value == '') 
  { 
  x.value = 'Zip';
  x.className="entry-s";
  } 
  break;
case "s_product":
  if (x.value == '') 
  { 
  x.value = 'Service/Listed Business Name/Member No/Phone';
  x.className="entry-s";
  } 
  break;
default:
 
}
 
}


function validateSearch(form) 
{
   if (form.s_Location.value == "Street/Area/Town/City/State/Country")  
   {
     if  (form.s_product.value  == 'Service/Listed Business Name/Member No/Phone')
    {
      if  (form.s_postcode.value  == 'Zip')
	  {
	  alert('Please fill in either one of your search criteria first.');
	  return false;
	  }
    }
  }
 
  return true;
}	
  
 
function bookmark_biz_page(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}
 
 
function popUp(strURL,strType,strHeight,strWidth) {
  
  wleft = (screen.width - strWidth) / 2;
  wtop = (screen.height - strHeight) / 2;
  
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  
  if (screen.width  < strWidth) {
    strWidth = screen.width;
    wleft = 0;
  }
  if (screen.height < strHeight) {
    strHeight = screen.height;
    wtop = 0;
  }
  
var strOptions="";
strOptions="resizable,height="+strHeight+",width="+strWidth+',left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=Yes, resizable=no';
newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}


function popUp(strURL,strType,strHeight,strWidth) {
  
  wleft = (screen.width - strWidth) / 2;
  wtop = (screen.height - strHeight) / 2;
  
  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }
  
  if (screen.width  < strWidth) {
    strWidth = screen.width;
    wleft = 0;
  }
  if (screen.height < strHeight) {
    strHeight = screen.height;
    wtop = 0;
  }
  
var strOptions="";
strOptions="resizable,height="+strHeight+",width="+strWidth+',left=' + wleft + ', top=' + wtop + ', ' +
    'location=no, menubar=no, ' +
    'status=no, toolbar=no, scrollbars=Yes, resizable=no';
newWin = window.open(strURL, 'newWin', strOptions);
newWin.focus();
}

