//------------------------------------------------------------------------------
// BROWSER INTERACTION FIREFOX
// In this script only functions that need browser-sepcific code.



//Border Width voor FF: T=Top, B=Bottom, L=Left, R=Right
function _BorderTW(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('border-Top-Width'));} 
function _BorderBW(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('border-Bottom-Width'));}
function _BorderLW(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('border-Left-Width'));}
function _BorderRW(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('border-Right-Width'));}

function _PaddingT(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('padding-Top'));}
function _PaddingB(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('padding-Bottom'));}
function _PaddingL(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('padding-Left'));}
function _PaddingR(Obj) 
  {return _StrVal(document.defaultView.getComputedStyle(Obj,null).getPropertyValue('padding-Right'));}

function _BGColor(Obj)
  {return document.defaultView.getComputedStyle(Obj,null).getPropertyValue('background-Color');}

function _SetStyleClass(Obj,Name)   {Obj.setAttribute("class", Name); }

function _SetDesignMode(Obj)
{
  Obj.contentDocument.designMode='On';   
}

// Stylesheets
// IE: rules, FF:cssRules
function _getStyle(StyleName) {
  var rules;
 
  for (var i = document.styleSheets.length - 1; i >= 0; i--) {
    var styleSheet = document.styleSheets[i];    
    rules = styleSheet.cssRules;
    for (var j = rules.length - 1; j >= 0; j--) 
    {
      if (rules[j].selectorText == StyleName) return rules[j].style;
    
    }
  }
}