//Requires browser_detect.js

//SET ELEMENT PROPERTY

//Set an element's style properties. Supply three string parameters: The element's id, the property to set and the value of the property.

function SetElementProperty(id,prop,value)
{
   if (browser_ie5up)
   {
      eval(id + '.style.' + prop + ' = "' + value + '"');
   }
   else if (browser_ns6up)
   {
      eval ('document.getElementById(id).style.' + prop + ' = "' + value + '"');
   }
   else if (browser_firefox1up && !os_mac)
   {
      eval(id + '.style.' + prop + ' = "' + value + '"');
   }
   else if (browser_opera8up)
   {
      eval(id + '.style.' + prop + ' = "' + value + '"');
   }
   else if (document.getElementById && !document.all)
   {
      eval ('document.getElementById(id).style.' + prop + ' = "' + value + '"');
   }
   else 
   {
      eval(id + '.style.' + prop + ' = "' + value + '"');
   }
}

//////////////////////////////////////////////////////////////////////////////////////////////

//Functions to set specific styles.

//////////////////////////////////////////////////////////////////////////////////////////////

//SET ELEMENT VISIBILTY

//Set an element's visibility. Supply two parameters: The element's id and a boolean value (0 to hide, 1 to show).

function SetElementVisibility(id, visible)
{
   var value = visible?'visible':'hidden';

   SetElementProperty(id,'visibility',value);
}