﻿var m_vSelectedSip = "FULLload";
var m_arrSipDesc = new Array("1-2LOAD","1-3LOAD","1-4LOAD","1-6LOAD","1-8LOAD","2-3LOAD","3-4LOAD","3-8LOAD","5-6LOAD","5-8LOAD","7-8LOAD","FULLload","MINcharge");
var m_arrSipAlt = new Array("1-2LOAD","1-3LOAD","1-4LOAD","1-6LOAD","1-8LOAD","2-3LOAD","3-4LOAD","3-8LOAD","5-6LOAD","5-8LOAD","7-8LOAD","FULLload","MINcharge");
var m_vWebPath = "/ca_en";
function loadSipImage(vVol){
    var oImg = document.getElementById("sipImage");
    if (oImg) oImg.src = m_vWebPath + "/images/sip/SIP_" + vVol + ".jpg";
    var oPrevButton = document.getElementById(m_vSelectedSip);
    if (oPrevButton) oPrevButton.className = "volButton";
    highlightButton(vVol);
    loadSipDesc(vVol);
}
function highlightButton(vVol){
    var oButton = document.getElementById(vVol);
    if (oButton) oButton.className = "volButtonSelected";
    m_vSelectedSip = vVol;
}
function loadSipDesc(vVol){
    var oImg = document.getElementById("sipImage");
    if (oImg) oImg.alt = m_arrSipAlt[vVol];
}
function loadData(){
    loadImages();
    loadAltText();
}
function loadAltText(){
    m_arrSipAlt["1-2LOAD"] = "1/2 Load";
    m_arrSipAlt["1-3LOAD"] = "1/3 Load";
    m_arrSipAlt["1-4LOAD"] = "1/4 Load";
    m_arrSipAlt["1-6LOAD"] = "1/6 Load";
    m_arrSipAlt["1-8LOAD"] = "1/8 Load";
    m_arrSipAlt["2-3LOAD"] = "2/3 Load";
    m_arrSipAlt["3-4LOAD"] = "3/4 Load";
    m_arrSipAlt["3-8LOAD"] = "3/8 Load";
    m_arrSipAlt["5-6LOAD"] = "5/6 Load";
    m_arrSipAlt["5-8LOAD"] = "5/8 Load";
    m_arrSipAlt["7-8LOAD"] = "7/8 Load";
    m_arrSipAlt["FULLload"] = "Full Load";
    m_arrSipAlt["MINcharge"] = "Minimum Charge";
}
function loadImages(){
    var aImages = new Array(13);
    var iWidth, iHeight;
    iWidth = 526;
    iHeight = 350;
    for (var i=0; i<13; i++){
        aImages[i] = new Image(iWidth, iHeight);
        aImages[i].src = m_vWebPath + "/images/sip/SIP_" + m_arrSipAlt[i] + ".jpg";
    }
}
function initSipPage(){
    loadData();
}
if(window.attachEvent) window.attachEvent("onload",initSipPage);
else window.addEventListener("load",initSipPage,false);