/* Javascript routines for all files */

// Function to get a style, looking at the inline
//  styles first, then to external
// Parameters:
//  control  -- the id of the element
//  property -- the style requested
function getStyle(control, property)
{
  var element = document.getElementById(control);

  if (element.style)        // has it been defined inline?
    var style = element.style[property];

  else if (element.currentStyle)    // Check the IE way?
    var style = element.currentStyle[property];

  else if (window.getComputedStyle) // Mozilla/Opera
    var style = document.defaultView.getComputedStyle(element,null).getPropertyValue(property);

  else                      // Can't find it
    var style = "";

  return style;
}

