
var aButtons = new Array();
aButtons[1] = { onimg : "theme/topbarH1V1_hover.jpg" , offimg : "theme/topbarH1V1.jpg" , label : "e-Business Forms" , url : "ebusiness_forms.html" };
aButtons[2] = { onimg : "theme/topbarH1V2_hover.jpg" , offimg : "theme/topbarH1V2.jpg" , label : "e-Advisor Service" , url : "eadvisor.html" };
aButtons[3] = { onimg : "theme/topbarH1V3_hover.jpg" , offimg : "theme/topbarH1V3.jpg" , label : "Customer References" , url : "references.html" };
aButtons[4] = { onimg : "theme/topbarH1V4_hover.jpg" , offimg : "theme/topbarH1V4.jpg" , label : "Business Partners" , url : "partners.html" };
aButtons[5] = { onimg : "theme/topbarH1V5_hover.jpg" , offimg : "theme/topbarH1V5.jpg" , label : "Employment" , url : "employment.html" };
aButtons[6] = { onimg : "theme/topbarH1V6_hover.jpg" , offimg : "theme/topbarH1V6.jpg" , label : "About Us" , url : "aboutus.html" };


// Preload "on" theme to eliminate load lag later
var aImages = new Array();
for (var i = 0; i < aButtons.length-1; i++)
{
    aImages[i] = document.createElement("img");
    aImages[i].src = aButtons[i+1].onimg;
}


// +--------------------------------------------------------------------------+
//   Procedure:         displayPage
// +--------------------------------------------------------------------------+
//   Description:       Opens the page associated with the clicked button.
// +--------------------------------------------------------------------------+
function displayPage(obj)
{
    var idx = new Number(obj.id);
    document.location = aButtons[idx].url;
}


// +--------------------------------------------------------------------------+
//   Procedure:		hover
// +--------------------------------------------------------------------------+
//   Description:	Change the mouse-overed image to its "on" state.
// +--------------------------------------------------------------------------+
function hover(obj)
{
    var idx = new Number(obj.id);
    obj.src = aButtons[idx].onimg;

    var lbl = document.getElementById("lblLink");
    if (lbl.innerText == undefined) {
        lbl.textContent = aButtons[idx].label;	//file.substr(file.lastIndexOf("/")+1);
    }
    else {
        lbl.innerText = aButtons[idx].label;		//file.substr(file.lastIndexOf("/")+1);
    }
}



// +--------------------------------------------------------------------------+
//   Procedure:		unhover
// +--------------------------------------------------------------------------+
//   Description:	Change the mouse-overed image to its "off" state.
// +--------------------------------------------------------------------------+
function unhover(obj)
{
//    var file = obj.src;

//    file = file.substr(0, file.indexOf("_")) + ".jpg";
//    obj.src = file;

    var idx = new Number(obj.id);
    obj.src = aButtons[idx].offimg;

    var lbl = document.getElementById("lblLink");
    lbl.innerHTML = "&nbsp;";

}
