
<!--
/**
 * DHTML dropdown menu script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */
 
 var bName = navigator.appName;
 var bVer = parseInt(navigator.appVersion);
 var NS6 = (bName == "Netscape" && bVer >= 5);
 var NS4 = (bName == "Netscape" && bVer >= 4 && bVer < 5);
 var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
 var NS3 = (bName == "Netscape" && bVer < 4);
 var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);
 window.onerror = null;
 var menuActive = 0
 var menuOn = 0
 var onLayer
 var timeOn = null // LAYER SWITCHING CODE
 if (NS4 || IE4 || NS6) {
	 if (navigator.appName == "Netscape" && !document.getElementById){
	 layerStyleRef="layer.";
	 layerRef="document.layers";
	 styleSwitch="";
	 layerVis="show";
	 layerHid="hide";
	 }
	 else if (!document.all && document.getElementById) {
	 layerStyleRef="layer.style.";
	 layerRef="document.getElementById";
	 styleSwitch=".style";
	 layerVis="visible";
	 layerHid="hidden";
	 }
	 else {
	 layerStyleRef="layer.style.";
	 layerRef="document.all";
	 styleSwitch=".style";
	 layerVis="visible";
	 layerHid="hidden";
	 }
 }
// SHOW MENU
function shLayer(layerName){
 img = getImage("imgTabs");
 x = getImagePageLeft(img);
 y = getImagePageTop(img);
 menuTop = y + 18 ; // LAYER TOP POSITION
 ManualL = x + 11 ; // 'Manual Wheelchairs' LAYER LEFT POSITION
 MotorizedL = x + 186 ;  // 'Motorized Wheelchairs' LAYER LEFT POSITION
 ScootersL = x + 320 ;  // 'Scooters' LAYER LEFT POSITION
 WalkingL = x + 390 ;  // 'Walking Aids' LAYER LEFT POSITION
 LiftL = x + 485 ; // 'Manual Wheelchairs' LAYER LEFT POSITION
 DailyL = x + 562 ;  // 'Motorized Wheelchairs' LAYER LEFT POSITION 	562
 BedroomL = x + 638 ;  // 'Scooters' LAYER LEFT POSITION 				638
 AccessoriesL = x + 737 ;  // 'Walking Aids' LAYER LEFT POSITION		737
if (NS4 || IE4 || NS6) {
 if (timeOn != null) {
 clearTimeout(timeOn)
 hideLayer(onLayer)
 }
 if (NS4 || IE4) {
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="'+layerVis+'"');
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.top="'+menuTop+'"');
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.left="'+eval(layerName+'L')+'"');
 } 
 if (NS6) {
 eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="'+layerVis+'"');
 eval(layerRef+'("'+layerName+'")'+styleSwitch+'.top="'+menuTop+'"');
 eval(layerRef+'("'+layerName+'")'+styleSwitch+'.left="'+eval(layerName+'L')+'"');
 } 
 onLayer = layerName
 }
}// HIDE MENU
function hideLayer(layerName){
 if (menuActive == 0) {
 if (NS4 || IE4) {
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="'+layerHid+'"');
 }
 if (NS6) {
 eval(layerRef+'("'+layerName+'")'+styleSwitch+'.visibility="'+layerHid+'"');
 }
 }
}// TIMER FOR BUTTON MOUSE OUT
function btnTimer() {
 timeOn = setTimeout("btnOut()",1000)
}// BUTTON MOUSE OUT
function btnOut(layerName) {
 if (menuActive == 0) {
 hideLayer(onLayer)
 }
}// MENU MOUSE OVER 
function menuOver(itemName) {
 clearTimeout(timeOn)
 menuActive = 1
}// MENU MOUSE OUT 
function menuOut(itemName) {
 menuActive = 0 
 timeOn = setTimeout("hideLayer(onLayer)", 400)

 }// SET BACKGROUND COLOR 
function setBgColor(layer, color) {
  if (NS6){
    eval('document.getElementById("'+layer+'").style.backgroundColor="'+color+'"');
  }
  else if (NS4){
    eval('window.document.layers["'+layer+'"].document.bgColor="'+color+'"');
	eval('window.document.layers["'+layer+'"].saveColor="'+color+'"');
  }
  else if (IE4){
    eval('document.all.'+layer+'.style.backgroundColor="'+color+'"');
  }
}

function getImage(name) {
  if (NS4 || NS6) {
    return findImage(name, document);
  }
  if (IE4 || NS6)
    return eval('document.all.' + name);
  return null;
}

function findImage(name, doc) {
  var i, img;
  for (i = 0; i < doc.images.length; i++)
    if (doc.images[i].name == name)
      return doc.images[i];
  for (i = 0; i < doc.layers.length; i++)
    if ((img = findImage(name, doc.layers[i].document)) != null) {
      img.container = doc.layers[i];
      return img;
    }
  return null;
}

function getImagePageLeft(img) {
  var x, obj;
  if (NS4 || NS6) {
    if (img.container != null)
      return img.container.pageX + img.x - 1;
    else
      return img.x - 50; // adujusted from -1 to -50 for netscape 7
  }
  if (IE4) {
    x = 0;
    obj = img;
    while (obj.offsetParent != null) {
      x += obj.offsetLeft;
      obj = obj.offsetParent;
    }
    x += obj.offsetLeft;
    return x -50; //added -50 to shift menu left
  }
  return -1;
}

function getImagePageTop(img) {
  var y, obj;
  if (NS4 || NS6) {
    if (img.container != null)
      return img.container.pageY + img.y;
    else
      return img.y;
  }
  if (IE4) {
    y = 0;
    obj = img;
    while (obj.offsetParent != null) {
      y += obj.offsetTop;
      obj = obj.offsetParent;
    }
    y += obj.offsetTop;
    return y;
  }
  return -1;
}

function descbox(msg, i) {

  isNS4 = (document.layers) ? true : false;
  isIE4 = (document.all && !document.getElementById) ? true : false;
  isIE5 = (document.all && document.getElementById) ? true : false;
  isNS6 = (!document.all && document.getElementById) ? true : false;

  if (isNS4){
    lbox = document.layers[msg];
    movelayer(msg);
    NS4_boxtoggle(lbox, i);

  }
  else if (isIE4) {
    lbox = document.all[msg];
    movelayer(msg);
    DOM_boxtoggle(lbox, i);

  }
  else if (isIE5 || isNS6) {
    lbox = document.getElementById(msg);
    movelayer(msg);
    DOM_boxtoggle(lbox, i);

  }


}

// -->

//<!--
function val(){
        var s=true
        for (var i=0;i<document.forms.item.length;i++){
                if (document.addcart.elements[i].type=="select-one"){
                        if (document.addcart.elements[i].value=="1"){
                                alert("Please choose one.");
                                document.addcart.elements[i].focus();
                                s=false;
                                break;
                        }
                
                }
        
        }
return s;
}



function DOM_boxtoggle(lbox, i) {
  if (lbox.style) {
    boxstyle=lbox.style;
    boxstyle.visibility=i;
  }
}


function NS4_boxtoggle(lbox, i) {
  lbox.visibility=i;
}


function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById(objectId)) {
                // W3C DOM
                return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
                // MSIE 4 DOM
                return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
                // NN 4 DOM.. note: this won't find nested layers
                return document.layers[objectId];
    } else {
                return false;
    }
} // getStyleObject


function changeObjectVisibility(objectId, newVisibility) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
                styleObject.visibility = newVisibility;
                return true;
    } else {
                // we couldn't find the object, so we can't change its visibility
                return false;
    }
} // changeObjectVisibility


function moveObject(objectId, newXCoordinate, newYCoordinate) {
    // get a reference to the cross-browser style object and make sure the object exists
    var styleObject = getStyleObject(objectId);
    if(styleObject) {
                styleObject.left = newXCoordinate;
                styleObject.top = newYCoordinate;
                return true;
    } else {
                // we couldn't find the object, so we can't very well move it
                return false;
    }
} // moveObject


function movelayer(obj) {
        y = document.body.scrollTop + 30;
        x = -100 + document.body.clientWidth / 2;
        //alert("X: " + x + " Y: " + y + " Layer: " + obj.name);
        moveObject(obj, x, y);
        return false;
}
//-->
