function initFont() {
	var fontSize = getCookie( 'fontSize' );
	if( fontSize != null ) changeFontSize( fontSize );
}

function changeFontSize(num) {
	if( document.styleSheets[0].rules != undefined ) { //Mozilla
		document.styleSheets[0].rules[0].style.fontSize = num;
		document.styleSheets[0].rules[1].style.fontSize = num;
	} else if( document.styleSheets[0].cssRules != undefined ) { //IE
		document.styleSheets[0].cssRules[0].style.fontSize = num;
		document.styleSheets[0].cssRules[1].style.fontSize = num;
	} else {
		document.body.style.fontSize = num;
	}
	setCookie( 'fontSize', num );
}

function jumpMenu(targ,selObj,restore) { 
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

function popup( URL, w, h ) {
	window.open( URL, "TMTWindow", "toolbar=0,scrollbars=1,location=0,status=0,menubar=0,resizable=1,width="+w+",height="+h );
}

function setCookie( name, value ) {
    document.cookie = name + "=" + escape( value );
}

function 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));
}

initFont();
window.onload = initFont;
