function getStyleObject(objectId) {
    // cross-browser function to get an object's style object given its Id
    if(document.getElementById && document.getElementById(objectId)) {
        // W3C DOM
        return document.getElementById(objectId).style;
    } else if (document.all && document.all(objectId)) {
        // MSIE 4 DOM
        return document.all(objectId).style;
    } else if (document.layers && document.layers[objectId]) {
        // NN 4 DOM.. note: this won't find nested layers
        return document.layers[objectId];
    } else {
        return false;
    }
} // getStyleObject

function setBackground(ChangeDivId, backgroundURL)
{
  var the_style = getStyleObject(ChangeDivId);
  var theURL = 'url(' + backgroundURL + ')';
  the_style.backgroundImage=theURL;
  closeDiv('help1');
  openDiv('help2');
} // setBackground

function setInfo(name)
{
  var theURL = 'iframe.asp?name=' + name ;
  document.getElementById('iframe_info').src=theURL;
} // setInfo

function closeDiv(CloseDivId)
{
  var the_style = getStyleObject(CloseDivId);
  the_style.display = "none";
} // closeDiv

function openDiv(OpenDivId)
{
  var the_style = getStyleObject(OpenDivId);
  the_style.display = "block";
} // openDiv

function toggleDisplay(toggleDisplay, toggleId) {
    var theStyle = getStyleObject(toggleId);
    switch (toggleDisplay) {
        case 'on' : theStyle.display = 'block';
        break
        case 'off' : theStyle.display = 'none';
        break
        default : if (theStyle.display=='block'){theStyle.display = 'none';} else {theStyle.display = 'block';} // swap
	}
} // toggleDisplay

function getWindowWidth() {
    var adjustWidth = 0;
    if (isIE) {adjustWidth = 7};
    if (isWindows && isFox) {adjustWidth = -12};
    if (isMac && isFox) {adjustWidth = -5};
    if (isSafari) {adjustWidth = -7};
    if (typeof( window.innerWidth ) == 'number' ) {
      // W3C and others
      return (window.innerWidth + adjustWidth );
    } else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      // IE 6 in 'standards compliant mode'
      return (document.documentElement.clientWidth + adjustWidth) ;
    } else if (document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
      // IE 4
      return (document.body.clientWidth + adjustWidth);
    } else { return 750;}
} // getWindowWidth

function getWindowHeight() {
    var adjustHeight = 0;
//    if (isIE) {adjustHeight = 7};
//   if (isWindows && isFox) {adjustHeight = -12};
//    if (isMac && isFox) {adjustHeight = -5};
//    if (isSafari) {adjustHeight = -7};
    if (typeof( window.innerHeight ) == 'number' ) {
      // W3C and others
      return (window.innerHeight + adjustHeight );
    } else if (document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
      // IE 6 in 'standards compliant mode'
      return (document.documentElement.clientHeight + adjustHeight) ;
    } else if (document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
      // IE 4
      return (document.body.clientHeight + adjustHeight);
    } else { return 550;}
} // getWindowHeight