

//show the first and hide the left
//var divs = document.body.all.tags("div");
 var divs =document.getElementsByTagName("div")
var found = false;
var found1 = false;
if (divs.length > 1)
 {   for (i=0; i < divs.length; i++) 
       { if (divs[i].className == 'tabPanel')
        {
            if (found)
                divs[i].style.display = 'none';
            else
                found = true;
        }
        if (divs[i].className == 'Tab0')
        {
            if (found1)
                divs[i].className = 'Tab1';
            else
                found1 = true;
        }
        }        
}
//showPanelAll();



function showPanel(id) {

    // Show the Panel (and hide the rest)
 //  var divs = document.body.all.tags("div");
  var divs =document.getElementsByTagName("div")
    for (i=0; i < divs.length; i++) { 
    
    if (divs[i].className == 'Tab1'||divs[i].className == 'Tab0'){
    
            
           if (divs[i].id == "Tab_"+id) 
            divs[i].className = 'Tab0'
          else
           divs[i].className = 'Tab1'
    }
    if (divs[i].className == 'tabPanel') {
        if (divs[i].id == id)
           { divs[i].style.display = 'block';
divs[i].style.top='22';
}        
else
            divs[i].style.display = 'none';
        }

    }

}

 
       // var helpPopup = window.createPopup();

        function showHelp(helpID) 
        {
            divHelp = document.getElementById(helpID);
            
            var helpPopBody = helpPopup.document.body;
            helpPopBody.style.backgroundColor = 'lightyellow';
            helpPopBody.style.border = 'solid black 1px';
            helpPopBody.style.padding = '5px';
            helpPopBody.style.fontFamily = 'Arial';
            helpPopBody.style.fontSize = '12px';
            helpPopBody.innerHTML = divHelp.innerHTML;

            // this hidden popup is used to calculate the height
            helpPopup.show(0, 0, 300, 0);
            
            var realHeight = helpPopBody.scrollHeight;
            // Hides the dimension detector popup object.
            helpPopup.hide();

            // Shows the actual popup object with correct height.
            helpPopup.show(0, 20, 300, realHeight, event.srcElement);            
        }
        
        function hideHelp(helpID) 
        {
            helpPopup.hide();
        }
        
        function adjustHelpViewerHeight() 
        {
            if (document.getElementById) 
            {
                var targetElement = document.getElementById("contenttable"), 
                    viewerElement = document.getElementById("helpframe"),
                    elementOffset = 175;
                
                if (targetElement && viewerElement && document.documentElement.offsetHeight && targetElement.offsetHeight && viewerElement.offsetHeight) 
                {
                  targetElement.style.height = String(document.documentElement.offsetHeight - elementOffset) + 'px';
                  viewerElement.style.height = targetElement.style.height;
                }
            }
        }

        function setupHelpViewer()
        {        
            adjustHelpViewerHeight();
            
            window.onresize = adjustHelpViewerHeight;
            window.onload = adjustHelpViewerHeight;
        }
  

function showPanelAll()
 {
  var divs =document.getElementsByTagName("div")
    for (i=0; i < divs.length; i++)
 {  
    if (divs[i].className == 'tabPanel') {
            divs[i].style.display = 'block';
      }

}
}
