/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
IE = document.all &&!window.opera;
function initContent(nList, iId) {
    if(nList == '0') {
        showMonth(1);
    } else {
        showMonth(nList);
    }
    
    if(iId == '0') {
        showContent(1,1);
    } else {
        showContent(nList,iId);
    }
}
function showContent(nList,iId) {
    hideContent();
    var oDiv = document.getElementById("content_" + nList + "_" + iId);
    if(oDiv != null) {
        oDiv.style.display = "inline";
    }
}
function hideContent() {
    var oEl = document.getElementsByName("contentall");
    if(IE) {
        oEl = getElementsByName_iefix("li", "contentall");
    }

    var iL = oEl.length;
    for(var i = 0; i < iL; i++) {
        oEl[i].style.display = "none";
    }
}
function hideMonth() {
    var oEl = document.getElementsByName("lsmonth");
    if(IE) {
        oEl = getElementsByName_iefix("div", "lsmonth");
    }

    var iL = oEl.length;
    for(var i = 0; i < iL; i++) {
        oEl[i].style.display = "none";
    }
}
function showMonth(nList) {
    hideMonth();
    hideContent();
    showContent(nList,1);
    if(parseInt(nList) >= 10) {
        document.getElementById("listmonth_" + (parseInt(nList) - 1)).style.display = "inline";
        document.getElementById("listmonth_" + nList).style.display = "inline";
        return;
    }
    document.getElementById("listmonth_" + nList).style.display = "inline";
    document.getElementById("listmonth_" + (parseInt(nList) + 1)).style.display = "inline";
}
function getElementsByName_iefix(tag, name) {
    var elem = document.getElementsByTagName(tag);
    var arr = new Array();
    for(i = 0,iarr = 0; i < elem.length; i++) {
        att = elem[i].getAttribute("name");
        if(att == name) {
         arr[iarr] = elem[i];
         iarr++;
        }
    }
    return arr;
}
