function setTextSizeImg(theme) {var src = 'inverse';if(theme=='YellowOnBlack') src='yellow';else if(theme=='default' || theme==null) src='default';src+='.png';$('img.textsize').each(function(){var pos=this.src.indexOf('-')+1;this.src = this.src.substr(0, pos)+src;});}
function setThemeStyleSheet(title) {setTextSizeImg(title);var i, a;for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {if(a.className == "themecss" && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {a.disabled = true;if(a.getAttribute("title") == title) a.disabled = false;}}}
function getThemeStyleSheet() {var i, a;for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {if(a.className == "themecss" && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) {return a.getAttribute("title");}}return null;}
var ABISEE_COOKIE_PATH = "/";
var ABISEE_COOKIE_DOMAIN = "";
var ABISEE_FONT_COOKIE_NAME = "ABISEESiteFont";
var ABISEE_FONT_COOKIE = getFontStyleSheet();
var ABISEE_THEME_COOKIE_NAME = "ABISEETheme";
var ABISEE_THEME_COOKIE = WM_readCookie( ABISEE_THEME_COOKIE_NAME );
var ABISEE_THEME_CSS_TITLE = ABISEE_THEME_COOKIE ? ABISEE_THEME_COOKIE : null;
function WM_browserAcceptsCookies() {var WM_acceptsCookies = false;if ( document.cookie == '' ) {document.cookie = 'WM_acceptsCookies=yes';if ( document.cookie.indexOf( 'WM_acceptsCookies=yes' ) != -1 ) {WM_acceptsCookies = true;}} else {WM_acceptsCookies = true;}return ( WM_acceptsCookies );}
function WM_setCookie( name, value, hours, path, domain, secure ) {if ( WM_browserAcceptsCookies() ) {var numHours = 0;var not_NN2 = ( navigator && navigator.appName && (navigator.appName == 'Netscape') && navigator.appVersion && (parseInt(navigator.appVersion) == 2) ) ? false : true;if ( hours && not_NN2 ) {if ( (typeof(hours) == 'string') && Date.parse(hours) ) {numHours = hours;} else if ( typeof(hours) == 'number' ) {numHours = ( new Date((new Date()).getTime() + hours*3600000) ).toGMTString();}}document.cookie = name + '=' + escape(value) + ((numHours)?(';expires=' + numHours):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':'');}}
function WM_readCookie( name ) {if ( document.cookie == '' ) {return false;} else {var firstChar, lastChar;var theBigCookie = document.cookie;firstChar = theBigCookie.indexOf(name);var NN2Hack = firstChar + name.length;if ( (firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=') ) {firstChar += name.length + 1;lastChar = theBigCookie.indexOf(';', firstChar);if (lastChar == -1) lastChar = theBigCookie.length;return unescape( theBigCookie.substring(firstChar, lastChar) );} else {return false;}}}
function WM_killCookie( name, path, domain ) {var theValue = WM_readCookie( name );if ( theValue ) {document.cookie = name + '=' + theValue + '; expires=Fri, 13-Apr-1970 00:00:00 GMT' + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'');}}
$(window).unload(function() {if (getFontStyleSheet() != ABISEE_FONT_COOKIE) {WM_setCookie(ABISEE_FONT_COOKIE_NAME, ABISEE_FONT_COOKIE, 24*31, ABISEE_COOKIE_PATH, ABISEE_COOKIE_DOMAIN, '');}if (getThemeStyleSheet() != null) {if (getThemeStyleSheet() != ABISEE_THEME_COOKIE) {WM_setCookie(ABISEE_THEME_COOKIE_NAME, getThemeStyleSheet(), 24*31, ABISEE_COOKIE_PATH, ABISEE_COOKIE_DOMAIN, '');}} else WM_killCookie(ABISEE_THEME_COOKIE_NAME, ABISEE_COOKIE_PATH, ABISEE_COOKIE_DOMAIN );});
function setFontStyleSheet(m) {if(m == "SizeUp") ABISEE_FONT_COOKIE++;else ABISEE_FONT_COOKIE--;setFontStyleSheetInternal(m);}
function setFontStyleSheetInternal(m) {if(m == "SizeUp") $(".resizable").each(function (index, elem) {var size = $(this).css("font-size");$(this).css("font-size", (Math.round(size.substring(0, size.length-2))+2)+"px").css("line-height", "150%");});else $(".resizable").each(function (index, elem) {var size = $(this).css("font-size");$(this).css("font-size", (Math.round(size.substring(0, size.length-2))-2)+"px").css("line-height", "150%");});}
function getFontStyleSheet() {var value = WM_readCookie( ABISEE_FONT_COOKIE_NAME );if(value === false || value == '') value = 0;value = parseInt(value);if(value > 20) value = 20;if(value < -20) value = -20;return value;}
$(function() {if(ABISEE_FONT_COOKIE > 0) {for(var i = ABISEE_FONT_COOKIE; i > 0; i--) setFontStyleSheetInternal("SizeUp");} else if(ABISEE_FONT_COOKIE < 0) {	for(var i = ABISEE_FONT_COOKIE; i < 0; i++) setFontStyleSheetInternal("");}});
$(document).ready(function() {setThemeStyleSheet(ABISEE_THEME_CSS_TITLE);$('img.textsize').click(function() {if($(this).hasClass('smaller'))setFontStyleSheet('');else setFontStyleSheet('SizeUp');return false;});
$('.theme').click(function() {var theme = 'default';if($(this).hasClass('wonblack'))theme='WhiteOnBlack';else if ($(this).hasClass('yonblack'))theme='YellowOnBlack';else if ($(this).hasClass('wonblue'))theme='WhiteOnBlue';setThemeStyleSheet(theme);return false;});});
function open_popup(url, width, height) {window.open(url,  "", 'width='+width+';height='+height+';');return false;}

