<!--
// main layout
opera = (navigator.userAgent.indexOf('Opera') >= 0)? true : false;
ie = (document.all && !opera)? true : false;
dom = (document.getElementById && !ie && !opera)? true : false;
treeOpen = new Array();
treeOpen['1'] = false;
treeOpen['2'] = false;
treeOpen['3'] = false;
treeItems = new Array();
treeItems['1'] = new Array('item1');
treeItems['2'] = new Array('item2');
treeItems['3'] = new Array('item3');

function changeTree(which) {
    if (treeOpen[which]) {
        for (i in treeItems[which]) {
            if (treeItems[which][i] == "") {
                continue;
            }
            removeElem(treeItems[which][i]);
        }
        treeOpen[which] = false;
    } else {
        for (i in treeItems[which]) {
            if (treeItems[which][i] == "") {
                break;
            }
            putElem(treeItems[which][i],"table-row");
        }
        treeOpen[which] = true;
    }
}

function putElem(elemId,displayValue) {
if (dom){
    document.getElementById(elemId).style.display = (displayValue)? displayValue : "block";
}
else if (ie){
    document.all[elemId].style.display = "block";
    }
}
function removeElem(elemId) {
if (dom) {
    document.getElementById(elemId).style.display = "none";
    }

else if (ie) {
    document.all[elemId].style.display = "none";
    }
}
if (dom || ie) {
document.writeln('<style type="text/css">');
document.writeln('.treeElem { display: none; }');
document.writeln('</style>');
}

// pop-up window
  function showImage(name) {
    var inc_y = 50;
    var inc_x = 10;
    params = "top=200, left=350,width=600, height=500, Status=no, toolbar=no, menubar=no, location=no, directories=no, scrollbars=no, resizable=1";
    popupWin = window.open("","popupWin",params);
    popupWin.focus();
    popupWin.document.open();
    popupWin.document.write("<html><head><title></title></head>");
    popupWin.document.write("<sc"+"ript language = JavaScript>");
    popupWin.document.write("function closeWindow(){");
    popupWin.document.write("parent.window.close() };");
    popupWin.document.write("</sc"+"ript>");
    popupWin.document.write("<body leftmargin='15' topmargin='15' marginwidth='15' marginheight='15' rightmargin='15' bottommargin='15'><a href=''><img src='"+name+"' border='0' name='cha1' onClick='closeWindow()' alt=''  onload='window.resizeTo(window.document.images[0].width+30+"+inc_x+",window.document.images[0].height+30+"+inc_y+")'></a></body></html>");
    popupWin.document.close();
  }


// -->
