﻿var ImageInit = function(){
    try{  
        var _theMonth = document.getElementById('jltserverTime_hiddenTime').value;
        var leftelement = document.getElementById('left');
        var toprightelement = document.getElementById('topright');

        var _theDivs = document.getElementsByTagName('div');
        var _theImages = document.getElementsByTagName('img');

        for (x in _theImages){
            if (_theImages[x].className == "arrowround"){
                _theImages[x].src = "resources/images/" + _theMonth + "/arrowround.gif";
            } else if (_theImages[x].className == "arrowroundsmall"){
                _theImages[x].src = "resources/images/" + _theMonth + "/arrowround_sm.gif";
            }
        }

        leftelement.style.backgroundImage = "url(resources/images/" + _theMonth + "/CCMark_01.jpg)";
        toprightelement.style.backgroundImage = "url(resources/images/" + _theMonth + "/CCMark_02.jpg)";
    } catch(e){
        //genErrorMess(e);
    }
}


var genErrorMess = function(e){
    var alertstring = "";
    for (x in e){
        if (!(x == "popStackFrame")){
            alertstring += x + ":\n**********\n\t" + e[x] + "\n**********\n\n";
        }
    }
    alert(alertstring);
}

ImageInit();

