/*
Created by: JDB Technology Solutions, LLC
copyright 2008 JDB Technology Solutions, LLC
www.jdbtech.net
*/


function preloadImages() {

  // Don't bother if image swap not supported
  if (document.images) {
    if (typeof(document.btd) == 'undefined'){
      document.btd = new Object();
    }
    document.btd.loadedImages = new Array();
    // Load all the graphics
    var argLength = preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each graphic, create a new image
      document.btd.loadedImages[arg] = new Image();
      // Then set the source of the graphic
      document.btd.loadedImages[arg].src = preloadImages.arguments[arg];
    }
  }
}

function setElementVisibility(elementToSet, showItSwitch){
 if (showItSwitch) {

   elementToSet.style.display = "inline";
 }
 else{
      elementToSet.style.display = "none";
   }
 }


function removeText(textName){

 setElementVisibility(document.getElementById(textName), false);
}

function showText(textName){
 setElementVisibility(document.getElementById(textName), true);
}

function showHide(shID) {

    if (document.getElementById(shID)) {
        if (document.getElementById(shID+'-show').style.display != 'none') {
            document.getElementById(shID+'-show').style.display = 'none';
            document.getElementById(shID).style.display = 'block';
        }
        else {
            document.getElementById(shID+'-show').style.display = 'inline';
            document.getElementById(shID).style.display = 'none';
        }
    }
}
