<!-- 

var layerobject;
var allobject;
var dom;
var activeMenu;

(document.layers) ? layerobject = true : layerobject = false;
(document.all) ? allobject = true : allobject = false;
(document.getElementById) ? dom = true : dom = false;

function HideSelects(zIdx) {
	// By definition, a select can only be in a form
	    oSelects = document.all.tags("SELECT");
	    if( oSelects != null ) {
			for( k = 0; k < oSelects.length; k++ ) {
				oString = oSelects[k].name;
				if( (oString.indexOf("UF") > -1) || (oString.indexOf("ADD_CART_ITEM<>") > -1) ||
				    (oString.indexOf("HD_USED_BIKE_SEARCH") > -1)) {
					if( zIdx > 1) {
						oSelects[k].style.visibility = "hidden";
					}
					else {
						oSelects[k].style.visibility = "visible";
					}
				}
			}
		}
}        


function getElement( layerName, parentLayer ) {
var dString;
    if( layerobject ) {
        parentLayer = (parentLayer) ? parentLayer : self;
        layerCollection = parentLayer.document.layers;
        if( layerCollection[layerName]) {
            return (layerCollection[layerName]);
            }
        for( i = 0; i < layerCollection.length; )   {
            return (getElement( layerName, layerCollection[i++] ));
            }
        }
    if( allobject )   {
        return document.all.item(layerName);
        }
    if( dom ) {
        return (document.getElementById(layerName));
        }
    
}

function layerHide( layerName ) {
   var theLayer = getElement( layerName, null );
   if(theLayer) 
   {
      if( layerobject) 
      {
         theLayer.visibility = 'hide';
      }
      else 
      {
         if (theLayer.style == null)
            theLayer.visibility = 'hidden';
         else
            theLayer.style.visibility = 'hidden';
      }
   }
}        

function layerShow( layerName ) {
    var theLayer = getElement( layerName, null );
    if( theLayer && plugin) {
        if( layerobject )  {
            theLayer.visibility = 'visible';
            }
        else {
            theLayer.style.visibility = 'visible';
            }
            activeMenu = layerName;
     }
}       

function setLayerX( layerName, x )  {

    var theLayer = getElement( layerName, null );
      if( theLayer) {    
    if( layerobject ) {
        theLayer.left = x;
        }
    else    {
        theLayer.style.left = x + "px";
        }
    }
}

function setLayerY( layerName, y )  {

    var theLayer = getElement( layerName, null );
      if( theLayer) {    
    if( layerobject ) {
        theLayer.top = y;
        }
    else    {
        theLayer.style.top = y + "px";
        }
    }
}

function setLayerZ( layerName, zIndex )  {

    var theLayer = getElement( layerName, null );
      if( theLayer) {    
    if( layerobject ) {
            theLayer.zIndex = zIndex;
        }
    else    {
        theLayer.style.zIndex = zIndex;
        }
    }

}


// -->
