var currentFontSize = 4; function revertStyles(fontsize){ currentFontSize = fontsize; changeFontSize(0); } function changeFontSize(sizeDifference){ //get css font size var rule = getRuleByName("body.fs" + (currentFontSize + sizeDifference)); if (rule){ document.body.style.fontSize = rule.style.fontSize; currentFontSize = currentFontSize + sizeDifference; createCookie("FontSize", currentFontSize, 365); } return; }; function getRuleByName(ruleName){ for (i=0; i 0){ bclass = bclass.replace(/^\w+/,screentype); }else{ bclass = screentype + ' ' + bclass; } document.body.className = bclass; createCookie("ScreenType", screentype, 365); } String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ""); }; function changeToolHilite(oldtool, newtool) { if (oldtool != newtool) { if (oldtool) { oldtool.src = oldtool.src.replace(/-hilite/,''); } newtool.src = newtool.src.replace(/.gif$/,'-hilite.gif'); } }