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" + src.substring(off + 4, src.length);
            document.images[i].src = newsrc;
        }
    }
}

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;
        }
    }
}


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

function popWebMail() {
	url = "http://webmail.infinet.net";
	nam = "WebMail";
	w = 800;
	h = 650;
	k = "yes";
    specs = "toolbar=no,location=no,directories=no,status=yes,menubar=no,resizable=yes,copyhistory=no,scrollbars=" + k + ",width=" + w + ",height=" + h
    window.open(url,nam,specs)
}
