// Script     : CSS Rules add-script for Internet Explorer 4+
// Written by : Martin Hello, A.O.B.M. Automatisering B.V.
// Purpose    : Add additional CSS rules which Netscape Communicator
//              doesn't support like it is supposed to.

// --------------- Simple Browser Detection ---------------
var ie4 = (navigator.userAgent.indexOf("MSIE 4")!=-1) && (parseInt(navigator.appVersion) == 4);
var ie4up = (navigator.userAgent.indexOf("MSIE 5")!=-1) && (parseInt(navigator.appVersion) >= 4);
var ns4 = (navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4);
// --------------------------------------------------------

// Notice : String containing notice for other browsers than Intenet Explorer
var remark = "<p class=\"notice\">U maakt geen gebruik van " +
             "<a href=\"http://www.microsoft.com/windows/ie_intl/nl/download/default.htm\">" +
             "Microsoft Internet Explorer</a>. " +
             "Om deze site volledig tot zijn recht te laten komen " +
             "adviseren wij u toch gebruik te maken van deze browser.</p>";


// Notice : Linked StyleSheets overrule imported sheets,
//          except for rules defined with !important.
function importSheet(url,sheet,pos) {
  document.styleSheets[sheet].addImport(url,pos);
}

// Notice : Added rules overrule linked StyleSheets.
function addCSSRule(selector,rule,sheet) {
  document.styleSheets[sheet].addRule(selector,rule);
}

// Notice : Following script is site specific
if (ie4up) {
  addCSSRule(".float-left", "border : thin solid black; margin : 0px 10px 0px 0px;", 0);
  addCSSRule(".float-right", "border : thin solid black; margin : 0px 0px 0px 10px;", 0);
  addCSSRule(".inset", "border : thin solid black;", 0);
}