/** * Sets a Cookie with the given name and value. */ function chgFontSize_setCookie(name, value, expires, path, domain, secure) { document.cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } /** * Gets the value of the specified cookie. */ function chgFontSize_getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } /** * Deletes a Cookie with the given name. */ function chgFontSize_deleteCookie(name, path, domain) { if (chgFontSize_getCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } /* * This is needed for the cookie functions. * * @see http://www.webreference.com/js/column8/functions.html */ function chgFontSize_fixDate(date) { var base = new Date(0); var skew = base.getTime(); if (skew > 0) date.setTime(date.getTime() - skew); } /** * Displays the font size options. */ function chgFontSize_display(display_text, display_image, display_restore) { if (display_text == 'on' || display_image == 'on') { document.write('
'); if (display_text == 'on') { document.write(''); document.write('