<!--
// browser check
var ie4 = (!document.getElementById && document.all) ? true : false;
var ie5 = (document.getElementById && document.all) ? true : false;
var ns = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;


// text for status bar
window.defaultStatus='Hard Metal';
window.status='Hard Metal';

/*
preload images needed for the swap, one for each state
*/
var btn1_on= new Image(); 
btn1_on.src = "images/buttons/homeOn.gif";

var btn1_off= new Image(); 
btn1_off.src = "images/buttons/homeOff.gif";

var btn2_on= new Image(); 
btn2_on.src = "images/buttons/aboutUsOn.gif";

var btn2_off= new Image(); 
btn2_off.src = "images/buttons/aboutUsOff.gif";

var btn3_on= new Image(); 
btn3_on.src = "images/buttons/productsOn.gif";

var btn3_off= new Image(); 
btn3_off.src = "images/buttons/productsOff.gif";

var btn4_on= new Image(); 
btn4_on.src = "images/buttons/depotOn.gif";

var btn4_off= new Image(); 
btn4_off.src = "images/buttons/depotOff.gif";

var btn5_on= new Image(); 
btn5_on.src = "images/buttons/offersOn.gif";

var btn5_off= new Image(); 
btn5_off.src = "images/buttons/offersOff.gif";

var btn6_on= new Image(); 
btn6_on.src = "images/buttons/newsOn.gif";

var btn6_off= new Image(); 
btn6_off.src = "images/buttons/newsOff.gif";

var btn7_on= new Image(); 
btn7_on.src = "images/buttons/contactOn.gif";

var btn7_off= new Image(); 
btn7_off.src = "images/buttons/contactOff.gif";

var leftNav_on= new Image(); 
leftNav_on.src = "images/buttons/leftMenuOn.gif";

var leftNav_off= new Image(); 
leftNav_off.src = "images/pixel.gif";

var moreInfo_on= new Image(); 
moreInfo_on.src = "images/buttons/moreInfoOn.gif";

var moreInfo_off= new Image(); 
moreInfo_off.src = "images/buttons/moreInfoOff.gif";

/*
this function takes in the name of the id of the image that's to be flipped and
the name of the image that its to change to 
*/
function swap(imageId,imageName)
{
    document.images[imageId].src = eval(imageName + ".src");  
}

/*
This function opens the new, empty window named win.
Takes in the HTML file to open, the name of the new window and the height and width
*/
function popImageWin(lnk)
{	    
    var newWin = ""; // url for new window
    var h = 10;
    var w = 50;
    
    // if netscape 4.x then open image only
    if(document.layers)
    {
        // create url using image path
  	    newWin = lnk;
        h = 500;
        w = 400;        
    }
    else
    {
        // add image path as a parameter to the popWin.htm page
        newWin = "popWin.htm?url=" + lnk;                
    }
    popWin(newWin, h, w);
}

function popWin(lnk, h, w)
{
    var newWindow = window.open(lnk, "HardMetal",
                                "height=" + h +", width=" + w +
  	                            ",status=0,scrollbars=0,location=0,resizable=1,toolbar=0,screenX=50,screenY=50,top=50,left=50");
}  
    
// cross-browser function to get an object's style object given its id
function getStyleObject(objectId)
{      
    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
    {
	      return false;
    }
}

    // checks that an element exists before we try and use it
    function doesExist(el)
    {
        
        var isOk = true;
        if( el == '' || typeof el == 'undefined' || el == null)
        {
            isOk = false;
        }
        return isOk;
    }
//-->
