function switchDiv(div_id)
{
  var style_sheet = getStyleObject(div_id);
  if (style_sheet)
  {
    hideAll();
    changeObjectVisibility(div_id, "visible");
  }
  else
  {
    alert("sorry, this only works in browsers that do Dynamic HTML");
  }
}
function getStyleObject(objectId) {
  // checkW3C DOM, then MSIE 4, then NN 4.
  //
  if(document.getElementById && document.getElementById(objectId)) {
	return document.getElementById(objectId).style;
   }
   else if (document.all && document.all(objectId)) {
	return document.all(objectId).style;
   }
   else if (document.layers && document.layers[objectId]) {
	return document.layers[objectId];
   } else {
	return false;
   }
}
function changeObjectVisibility(objectId, newVisibility) {
    // first get the object's stylesheet
    var styleObject = getStyleObject(objectId);

    // then if we find a stylesheet, set its visibility
    // as requested
    //
    if (styleObject) {
	styleObject.visibility = newVisibility;
	return true;
    } else {
	return false;
    }
}

function changeObjectDisplay(objectId, newDisplay) {
    // first get the object's stylesheet
    var styleObject = getStyleObject(objectId);

    // then if we find a stylesheet, set its display
    // as requested
    //
    if (styleObject) {
	styleObject.display = newDisplay;
	}
}

function changeObjectHeight(objectId, newHeight) {
    // first get the object's stylesheet
    var styleObject = getStyleObject(objectId);

    // then if we find a stylesheet, set its display
    // as requested
    //
    if (styleObject) {
	styleObject.height = newHeight;
	}
}

function SelectOptionInList(lstSelectList, intID )
{
     try
     {
          var intIndex = 0;
          // Loop through all the options
          for( intIndex = 0; intIndex < lstSelectList.options.length; intIndex++ )
          {
               // Is this the ID we are looking for?
               if( lstSelectList.options[intIndex].value == intID )
               {
                    // Select it
                    lstSelectList.selectedIndex = intIndex;
                    // Yes, so stop searching
                    break;
               }
          }
     }
     catch( expError )
     {
          alert( "ClientUtilities1.js::SelectOptionInList( ).\n" +
                    "Error:" + expError.number + ", " + expError.description );
     }
}

