var prefsLoaded=false;var currentFontSize=13;var currentFontType=1;var currentWidth=770;setUserOptions();function setUserOptions(){if(!prefsLoaded){cookie=readCookie("pageWidth");currentWidth=cookie?cookie:770;setWidth(currentWidth);cookie=readCookie("fontFace");currentFontType=cookie?cookie:1;setFontFace(currentFontType);cookie=readCookie("fontSize");currentFontSize=cookie?cookie:13;setFontSize(currentFontSize);prefsLoaded=true}}function setWidth(b){var a=document.getElementById("outer");var c=document.getElementById("centrecontent");if(b!=770){newWidth=1200;a.style.width="1015px";c.style.width="81%"}else{a.style.width="770px";c.style.width="580px"}}function revertStyles(){currentFontType=1;setFontFace(1);currentFontSize=13;changeFontSize(0);currentWidth=770;setWidth(770)}function toggleWidth(){currentWidth=parseInt(currentWidth,10);if(currentWidth===770){newWidth=1200}else{newWidth=770}currentWidth=newWidth;setWidth(newWidth)}if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))){setWidth(1200);currentWidth=1200}function changeFontSize(a){currentFontSize=parseInt(currentFontSize,10)+parseInt(a,10);if(currentFontType===1){if(currentFontSize>20){currentFontSize=20}else{if(currentFontSize<8){currentFontSize=8}}}else{if(currentFontSize>22){currentFontSize=22}else{if(currentFontSize<8){currentFontSize=8}}}setFontSize(currentFontSize)}function setFontSize(b){var a=document.getElementById("outer");var c=document.getElementById("listMenuWrapper");a.style.fontSize=b+"px";c.style.fontSize=b-1+"px"}function toggleSerif(){currentFontType=parseInt(currentFontType,10);if(currentFontType===1){currentFontType=2}else{currentFontType=1}setFontFace(currentFontType)}function setFontFace(a){if(a===2){document.getElementById("outer").style.fontFamily="Cambria, times new roman, times, georgia, serif";changeFontSize(1)}else{document.getElementById("outer").style.fontFamily="Candara, Verdana, Arial, Helvetica, sans-serif";changeFontSize(-1)}}function createCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{a=""}document.cookie=c+"="+d+a+"; path=/"}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)===" "){f=f.substring(1,f.length);if(f.indexOf(e)===0){return f.substring(e.length,f.length)}}}return null}window.onunload=saveSettings;function saveSettings(){createCookie("fontSize",currentFontSize,365);createCookie("fontFace",currentFontType,365);createCookie("pageWidth",currentWidth,365)};