﻿var wasOL = window.onload;
if (wasOL != null) window.onload = function(){wasOL();myOL();}
else window.onload = function(){myOL();}
function myOL(){
// Place onload commands here:

    showHideCss();
}

// Set up .js-hide & .js-show classes
function showHideCss(){
    var sh = document.styleSheets[0];
    if (sh.cssRules){ // Compliant
        sh.insertRule(".js-hide { display: none; }", sh.cssRules.length);
        sh.insertRule(".js-show { display: inline; }", sh.cssRules.length);
    }
    else if(navigator.appName == "Microsoft Internet Explorer"){ // IE
        // Don't bother with IE6 or lower
        if(parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5,navigator.appVersion.length-1)) > 6.0){
            sh.addRule(".js-hide", "display: none");
            sh.addRule(".js-show", "display: inline");
        }
    }
}

