var netscape = (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;

function preloadthem(){
MM_preloadImages('');
}

if (thissection=="front"){
document.getElementById("prodhe").className='products_head';
document.getElementById("servhe").className='services_head';
document.getElementById("newshe").className='news_head';
document.getElementById("comphe").className='company_head';
document.getElementById("agenhe").className='agencies_head';
}


if (thissection=="products"){
document.getElementById("prodhe").className='products_here';
document.getElementById("servhe").className='services_head';
document.getElementById("newshe").className='news_head';
document.getElementById("comphe").className='company_head';
document.getElementById("agenhe").className='agencies_head';
}

if (thissection=="services"){
document.getElementById("prodhe").className='products_head';
document.getElementById("servhe").className='services_here';
document.getElementById("newshe").className='news_head';
document.getElementById("comphe").className='company_head';
document.getElementById("agenhe").className='agencies_head';
}
if (thissection=="news"){
document.getElementById("prodhe").className='products_head';
document.getElementById("servhe").className='services_head';
document.getElementById("newshe").className='news_here';
document.getElementById("comphe").className='company_head';
document.getElementById("agenhe").className='agencies_head';
}
if (thissection=="company"){
document.getElementById("prodhe").className='products_head';
document.getElementById("servhe").className='services_head';
document.getElementById("newshe").className='news_head';
document.getElementById("comphe").className='company_here';
document.getElementById("agenhe").className='agencies_head';
}

//----------------------------------------------------------------------------------------------
if (thissection=="agencies"){
document.getElementById("prodhe").className='products_head';
document.getElementById("servhe").className='services_head';
document.getElementById("newshe").className='news_head';
document.getElementById("comphe").className='company_head';
document.getElementById("agenhe").className='agencies_here';
}
//-------------------------------------------------------------------------------------------------
function fronttopover(event) {
document.getElementById("fronttop").className='contentlinksbigover';
document.images['ocimg'].src = 'images/frontpage-ocon.gif'
}

function fronttopout(event){
document.getElementById("fronttop").className='contentlinks_front';
document.images['ocimg'].src = 'images/frontpage-ocoff.gif'
}

function frontbotover(event) {
document.getElementById("frontbot").className='contentlinksbigover';
document.images['ebimg'].src = 'images/frontpage-ebuson.gif'
}

function frontbotout(event){
document.getElementById("frontbot").className='contentlinks_front';
document.images['ebimg'].src = 'images/frontpage-ebusoff.gif'
}



function productshide() {
document.getElementById("popproducts").style.visibility='hidden';
if (thissection!="products"){
document.getElementById("prodhe").className='products_head';
} else {
document.getElementById("prodhe").className='products_here';
}
}

function productsover(event) {
document.getElementById("popproducts").style.visibility='visible';
if (thissection!="products"){
document.getElementById("prodhe").className='products_over';
} else {
document.getElementById("prodhe").className='products_here';
}
}

function productsout(event) {  
  if ((event.currentTarget != document.getElementById("popproducts")) && (event.currentTarget != document.getElementById("pro"))) {
document.getElementById("popproducts").style.visibility='hidden';
if (thissection!="products"){
document.getElementById("prodhe").className='products_head';
} else {
document.getElementById("prodhe").className='products_here';
}
}
}

function productsgo(theurl) {
productshide();
window.location=theurl;
}

function serviceshide() {
document.getElementById("popservices").style.visibility='hidden';
if (thissection!="services"){
document.getElementById("servhe").className='services_head';
} else {
document.getElementById("servhe").className='services_here';
}
}

function servicesover(event) {
document.getElementById("popservices").style.visibility='visible';
if (thissection!="services"){
document.getElementById("servhe").className='services_over';
} else {
document.getElementById("servhe").className='services_here';
}
}

function servicesout(event) {  
  if ((event.currentTarget != document.getElementById("popservices")) && (event.currentTarget != document.getElementById("pro"))) {
document.getElementById("popservices").style.visibility='hidden';
if (thissection!="services"){
document.getElementById("servhe").className='services_head';
} else {
document.getElementById("servhe").className='services_here';
}
}
}

function servicesgo(theurl) {
serviceshide();
window.location=theurl;
}

function newshide() {
document.getElementById("popnews").style.visibility='hidden';
if (thissection!="news"){
document.getElementById("newshe").className='news_head';
} else {
document.getElementById("newshe").className='news_here';
}
}

function newsover(event) {
document.getElementById("popnews").style.visibility='visible';
if (thissection!="news"){
document.getElementById("newshe").className='news_over';
} else {
document.getElementById("newshe").className='news_here';
}
}

function newsout(event) {  
  if ((event.currentTarget != document.getElementById("popnews")) && (event.currentTarget != document.getElementById("pro"))) {
document.getElementById("popnews").style.visibility='hidden';
if (thissection!="news"){
document.getElementById("newshe").className='news_head';
} else {
document.getElementById("newshe").className='news_here';
}
}
}

function newsgo(theurl) {
newshide();
window.location=theurl;
}

function companyhide() {
document.getElementById("popcompany").style.visibility='hidden';
if (thissection!="company"){
document.getElementById("comphe").className='company_head';
} else {
document.getElementById("comphe").className='company_here';
}
}

function companyover(event) {
document.getElementById("popcompany").style.visibility='visible';
if (thissection!="company"){
document.getElementById("comphe").className='company_over';
} else {
document.getElementById("comphe").className='company_here';
}
}

function companyout(event) {  
  if ((event.currentTarget != document.getElementById("popcompany")) && (event.currentTarget != document.getElementById("pro"))) {
document.getElementById("popcompany").style.visibility='hidden';
if (thissection!="company"){
document.getElementById("comphe").className='company_head';
} else {
document.getElementById("comphe").className='company_here';
}
}
}

function companygo(theurl) {
companyhide();
window.location=theurl;
}


//---------------------ADD START----------------------------------------

function agencieshide() {
document.getElementById("popagencies").style.visibility='hidden';
if (thissection!="agencies"){
document.getElementById("agenhe").className='agencies_head';
} else {
document.getElementById("agenhe").className='agencies_here';
}
}

function agenciesover(event) {
document.getElementById("popagencies").style.visibility='visible';
if (thissection!="agencies"){
document.getElementById("agenhe").className='agencies_over';
} else {
document.getElementById("agenhe").className='agencies_here';
}
}

function agenciesout(event) {  
  if ((event.currentTarget != document.getElementById("popagencies")) && (event.currentTarget != document.getElementById("pro"))) {
document.getElementById("popagencies").style.visibility='hidden';
if (thissection!="agencies"){
document.getElementById("agenhe").className='agencies_head';
} else {
document.getElementById("agenhe").className='agencies_here';
}
}
}

function agenciesgo(theurl) {
agencieshide();
window.location=theurl;
}

//---------------------------ADD STOP-----------------------------------


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function SubmitSearch()
  {
  if (document.forms(0).search.value == "")
    {
    alert('Please provide search keywords in the input box before clicking the search button.');
    }
  else
    {
    document.forms(0).submit()
    }
  }