var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var is_nav = ((agt.indexOf('mozilla') != -1) && (agt.indexOf('spoofer') == -1)
              && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera') == -1)
              && (agt.indexOf('webtv') == -1));
var is_nav3up = (is_nav && (is_major >= 3));
var is_ie = (agt.indexOf('msie') != -1);
var is_ie4up = (is_ie && (is_major >= 4));
var menuok = (is_nav3up || is_ie4up);

function menu(imName, over) {
 if (menuok) {
  var theImage = FindImage(document, imName, 0);
  if (theImage) {
  	imHL = imName + "_1";
   imBL = imName + "_0";
  	theImage.src = "../img/" + (over ? imHL : imBL) + ".gif";
  }
 }
}

function FindImage(doc, name, j) {
 var theImage = false;
 if (doc.images) {
  theImage = doc.images[name];
 }
 if (theImage) {
  return theImage;
 }
 if (doc.layers) {
  for (j = 0; j < doc.layers.length; j++) {
   theImage = FWFindImage(doc.layers[j].document, name, 0);
   if (theImage) {
    return (theImage);
   }
  }
 }
 return (false);
}

function MenuPos(posname, posalt, pagename, poswidth, posheight) {
 var DocURL = "" + window.location;
 if (DocURL.indexOf(posname) != -1) {
  document.write('<img src="../img/' + posname + '_2.gif" width="' + poswidth + '" height="' + posheight + '" alt="' + posalt + '">');
 } else {
  document.write('<a href="../' + posname + '/' + pagename + '" onMouseOver=menu("' + posname + '",1) onMouseOut=menu("' + posname + '",0)><img src="../img/' + posname + '_0.gif" width="' + poswidth + '" height="' + posheight + '" alt="' + posalt + '" name="' + posname + '" border="0"></a>');
 }
}

