/*
	Misc/Utils methods.
*/


function getClassAttributeNameForNavigator() {
    //  fix for IE, the <class> attribute is called <className>
    if (navigator.userAgent.indexOf("MSIE") != -1)
        return "className";
    else
        return "class";
}


function setRandomBanner() {
    //  show random blue banner, there are 4
    var bnTag = document.getElementById("td_banner");

    bnTag.setAttribute(getClassAttributeNameForNavigator(), "td_banner" + " " + "td_bannerimage" + Math.floor(1 + (Math.random() * 4)));
}


function setBackgroundStyle(cn) {
    //  override default background and change color
    var bgTag = document.getElementById("td_background");

    bgTag.setAttribute(getClassAttributeNameForNavigator(), cn);
}

function helpWindow(src) {
    var win = window.open('/pan/helpTextServlet?helpText=' + src,'wnd','toolbar=no,location=no,menu=no,scrollbars=yes,directories=no,resizable=yes,width=300,height=300,screenX=0,screenY=0,top=0,left=0');
    win.focus();
}

