var baseurl = location.protocol + "//" + location.host + "/";
var basecategory = "";

function swapImageOver(jitem, jimgname) {
    var imgpath;
    if (jimgname) {
        imgpath = jimgname;
    } else {
        imgpath = "line_menu";
    }
    swapImage(jitem, baseurl + "images/" + imgpath + "_on.gif");
}
function swapImageOut(jitem, jimgname) {
    var imgpath;
    if (jimgname) {
        imgpath = jimgname;
    } else {
        imgpath = "line_menu" + basecategory;
    }
    swapImage(jitem, baseurl + "images/" + imgpath + ".gif");
}
function swapImageOverRev(jitem, jimgname) {
    swapImageOut(jitem, jimgname);
}
function swapImageOutRev(jitem, jimgname) {
    swapImageOver(jitem, jimgname);
}
function swapImage(jitem, jurl) {
    d = document;
    if (d.images) {
        var img;
        img = null;
        if (d.layers) {
            img = findElement(jitem, 0);
        } else {
            img = d.images[jitem];
        }
        if (img) {
            img.src = jurl;
        }
    }
}
