function Is() {
    var agent = navigator.userAgent.toLowerCase();
    var version = parseInt(navigator.appVersion);
    this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
    this.ns4 = (this.ns && (version >= 4));
    this.ie = (agent.indexOf("msie") != -1);
    this.ie3 = (this.ie && (version == 2));
    this.ie4 = (this.ie && (version >= 4));
}
var is = new Is();

function preload() {
    this.length = preload.arguments.length;
    for (var i = 0; i < this.length; i++) {
        this[i+1] = new Image();
        this[i+1].src = preload.arguments[i];
    }
}

function imgOn(i) {
    if (is.ie3) {} else {
        var src = document.images[i].src;
        var off = src.lastIndexOf("-off");
        if (off != -1) {
            var newsrc = src.substring(0,off) + "-on";
            document.images[i].src = newsrc + ".gif";
        }
    }
  	//document.images['hd'].src="images/nav_hd_"+ i +".gif"      
}

function imgOnHome(i) {
    if (is.ie3) {} else {
        var src = document.images[i].src;
        var off = src.lastIndexOf("-off");
        if (off != -1) {
            var newsrc = src.substring(0,off) + "-on";
            document.images[i].src = newsrc + ".gif";
        }
    }
}

function imgOff(i) {
    if (is.ie3) {} else {
        var src = document.images[i].src;
        var on = src.lastIndexOf("-on");
        if (on != -1) {
            var newsrc = src.substring(0,on) + "-off" + src.substring(on + 3, src.length);
            document.images[i].src = newsrc;
        }
    }
    //document.images['hd'].src="images/nav_hd_default.gif"               
}

function imgOffHome(i) {
    if (is.ie3) {} else {
        var src = document.images[i].src;
        var on = src.lastIndexOf("-on");
        if (on != -1) {
            var newsrc = src.substring(0,on) + "-off" + src.substring(on + 3, src.length);
            document.images[i].src = newsrc;
        }
    }
}

function opWin(w,h,url,nam,sb) {
        specs = "toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,copyhistory=no,scrollbars=" + sb + ",width=" + w + ",height=" + h
        window.open(url,nam,specs)
}