//--------------------------------------------
// Functions for showing and hiding IDs (one at a time)
// ie: <div id="test1" style="display:none;">
//     <tr id="test2" style="display:none;">
//--------------------------------------------
function ShowHideSimpleID(strId) 
{
 if(document.getElementById(strId).style.display=="none") 
 { document.getElementById(strId).style.display=""; }  
 
 else if(document.getElementById(strId).style.display=="") 
 { document.getElementById(strId).style.display="none"; }
}

function ShowSimpleID(objID) {
	document.getElementById(objID).style.display = '';
}

function HideSimpleID(objID) {
	document.getElementById(objID).style.display = 'none';
}

//--------------------------------------------
// Functions for showing and hiding div classes
// ie: <div class="test" style="display:none;">
//--------------------------------------------

function ShowHideSimpleCLASS(cName) {
 var arrDiv = document.getElementsByTagName("div");
 for(var i=0;i<arrDiv.length;i++){
   if(arrDiv[i].className==cName){
     if(arrDiv[i].style.display=="none"){
       arrDiv[i].style.display="block";
     } else {
       arrDiv[i].style.display="none";
     }
   }
 }
}

function ShowSimpleCLASS(cName) {
 var arrDiv = document.getElementsByTagName("div");
 for(var i=0;i<arrDiv.length;i++){
   if(arrDiv[i].className==cName){
     arrDiv[i].style.display="block";
   }
 }
}

function HideSimpleCLASS(cName) {
 var arrDiv = document.getElementsByTagName("div");
 for(var i=0;i<arrDiv.length;i++){
   if(arrDiv[i].className==cName){
     arrDiv[i].style.display="none";
   }
 }
}

//--------------------------------------------
// Functions for showing and hiding ids in table rows
// ie: <tr id="test" style="display:none;">
//--------------------------------------------
function ShowHideSimpleTR(strId) {
 var theRow = document.getElementById(strId);
 var disp = theRow.style.display;
 disp = (disp=="none")?"":"none";
 var rows = theRow.parentNode.rows;
 for(var i=0;i<rows.length;i++){
   if(rows[i].id==strId){
     rows[i].style.display = disp;
   }
 }
}

function ShowSimpleTR(strId) {
 var theRow = document.getElementById(strId);
 var rows = theRow.parentNode.rows;
 
 for(var i=0;i<rows.length;i++){
   if(rows[i].id==strId){
     rows[i].style.display = '';
   }
 }
}

function HideSimpleTR(strId) {
 var theRow = document.getElementById(strId);
 var rows = theRow.parentNode.rows;
 for(var i=0;i<rows.length;i++){
   if(rows[i].id==strId){
     rows[i].style.display = 'none';
   }
 }
}
//--------------------------------------------

