<!--

if (parseInt(navigator.appVersion) >= 3) { browserVer = 1 } // Netscape 3+; IE 4+

if (browserVer == 1) {
    nav_homeoff = new Image();
    nav_homeoff.src = "images/t_nav_home_off.gif";
    nav_homeon = new Image();
    nav_homeon.src = "images/t_nav_home_on.gif";
    nav_companyoff = new Image();
    nav_companyoff.src = "images/t_nav_company_off.gif";
    nav_companyon = new Image();
    nav_companyon.src = "images/t_nav_company_on.gif";
    nav_productoff = new Image();
    nav_productoff.src = "images/t_nav_productrange_off.gif";
    nav_producton = new Image();
    nav_producton.src = "images/t_nav_productrange_on.gif";
    nav_directorsoff = new Image();
    nav_directorsoff.src = "images/t_nav_directors_off.gif";
    nav_directorson = new Image();
    nav_directorson.src = "images/t_nav_directors_on.gif";
    nav_contactoff = new Image();
    nav_contactoff.src = "images/t_nav_contactus_off.gif";
    nav_contacton = new Image();
    nav_contacton.src = "images/t_nav_contactus_on.gif";

}

function changeImage(imgDocID,imgObjName) {
   if (browserVer == 1) { document.images[imgDocID].src = eval(imgObjName + ".src") }
}

//-->
<!--

agent = navigator.userAgent;
ns6 = ((navigator.appName == "Netscape") && (agent.charAt(8) == 5));
ns4 = ((navigator.appName == "Netscape") && (agent.charAt(8) == 4));

///--------------------------------------------------------------------///
//  Define background images and text colours for the drop down navs    //
///--------------------------------------------------------------------///
dropBGColorOn = "url('images/t_dropdown_grey.png')";
dropBGColorOff = "url('images/t_dropdown_red.png')";
dropTxtColorOn = "C5C5C5";
dropTxtColorOff = "FFFFFF";

layerVisible = new Array();

///--------------------------------------------------------------------///
// Define array of layer names                                          //
///--------------------------------------------------------------------///
subnavsList = new Array("topnav1");

///--------------------------------------------------------------------///
// The value below is set to true via the onLoad function in body tag   //
///--------------------------------------------------------------------///
pageLoaded = false;    

function initialise() {
   alignHorizontally();
}

///--------------------------------------------------------------------///
//  Function to make subnavs align correctly on the horizontal axis     //
//  if the screen resolution is greater than 770 pixels                 //
///--------------------------------------------------------------------///
function alignHorizontally() {
   // Get value of the window width
   X = 0;
   if (window.innerHeight) {
      X = window.innerWidth - 15;
   }
   if (document.body) {
      if (document.body.clientWidth) {
         X = document.body.clientWidth;
      }
   }
   if (ns6) {X = X + 14;}

   if (X > 770) { // only move if the horizontal resolution is greater that 770 pixels
      for (var i=0; i < subnavsList.length; i++) {
         var layerName = subnavsList[i];
         if (document.getElementById) {
            eval("tmpX = document.getElementById('"+layerName+"').style.left = parseInt(document.getElementById('"+layerName+"').style.left) + X/2 - 385");
         } else {
            if (document.layers) {
               eval("tmpX = document."+layerName+".left = document."+layerName+".left + X/2 - 385");
            }
            if (document.all) {
               eval("tmpX = document.all."+layerName+".style.pixelLeft = document.all."+layerName+".style.pixelLeft + X/2 - 385");
            }
         }
      }
   }
}

///--------------------------------------------------------------------///
//  Function to make a layer visible or invisible                       //
///--------------------------------------------------------------------///
function makeVisible(onOff,whichLayer) {
   if (pageLoaded) {
      if (document.getElementById) {
         if (onOff == 1) {
            eval('document.getElementById("'+whichLayer+'").style.visibility="VISIBLE"');
         } else {
            eval('document.getElementById("'+whichLayer+'").style.visibility="HIDDEN"');
         }
      } else {
         if (document.layers) { // Netscape 4.x
            if (onOff == 1) {
               eval('document.'+whichLayer+'.visibility = "SHOW" ');
            } else {
               eval('document.'+whichLayer+'.visibility = "HIDE" ');
            }
         }
         if (document.all) {
            if (onOff == 1) { // IE 4.x
               eval('document.all.'+whichLayer+'.style.visibility = "VISIBLE" ');
            } else {
               eval('document.all.'+whichLayer+'.style.visibility = "HIDDEN" ');
            }
         }
      }
   }
}

function turnOnOff(layer1) {
   if (pageLoaded) {
      if (layerVisible[layer1]) {
         eval("makeVisible(1,'"+layer1+"')");
      } else {
         eval("makeVisible(0,'"+layer1+"')");
      }
   }
}

///----------------------------------------------------------------------------------///
//  Function to display 2nd level drop down layers for the top navs                   //
///----------------------------------------------------------------------------------///
function subNav(level2layer,level2TD,level2A,onOff) {
   if (onOff == 1) {
      if (level2layer != "") {
         layerVisible[level2layer] = true;
      }
      if (level2TD != "") {
         if (document.getElementById) { // change background colour and text colour of 2nd level nav
            eval("document.getElementById('"+level2TD+"').style.backgroundImage=\""+dropBGColorOn+"\"");
            eval("document.getElementById('"+level2A+"').style.color='#"+dropTxtColorOn+"'");
         }
      }
   } else {
      if (level2layer != "") {
         layerVisible[level2layer] = false;
      }
      if (level2TD != "") {
         if (document.getElementById) { // change background colour and text colour of 2nd level nav to original
            eval("document.getElementById('"+level2TD+"').style.backgroundImage=\""+dropBGColorOff+"\"");
            eval("document.getElementById('"+level2A+"').style.color='#"+dropTxtColorOff+"'");
         }
      }
   }
   // delay turning the layer off slightly to give user a chance to move onto the sub nav layer
   // Only call the turnOnOff function if there are second level navs
   if (level2layer != "") {
      if (!ns4) {
         milliseconds = 10;
      } else {
         milliseconds = 500;
      }
      eval("setTimeout(\"turnOnOff('"+level2layer+"')\","+milliseconds+")");
   }
}



// -->

<!--
function checkEmail(feedform) {
   var emailValid = true;
   name = feedform.name.value;
   number = feedform.number.value;
   email = feedform.email.value;

   // Check if the users name has been entered

   if (name == '') {
      alert("Please enter your name");
      emailValid = false;
          return;
   }

   // Check if the an email address has been entered

   if (email == '') {
      alert("Please enter an e-mail address");
      emailValid = false;
          return;
   }

   dotInEmail = false;        
   atSymbolInEmail = false;   
   characters=email.length;

   for (var i=0; i<characters; i++) {
      if (email.substring(i,i+1) == '@') {
         atSymbolInEmail = true;
      }

      if (email.substring(i,i+1) == '.') {
         dotInEmail = true;
      }
   }

   if (!(atSymbolInEmail && dotInEmail)) {
      alert("Please make sure your e-mail address is correct");
      emailValid = false;
          return;
   }

   if (number == '') {
      alert("Please enter your telephone number");
      emailValid = false;
          return;
   }

   if (emailValid) {
      document.feedform.submit()
   }
}

//-->
