<!--
	//MacroMedia:

	function MM_findObj(n, d) { //v4.0
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && document.getElementById) x=document.getElementById(n); return x;
	}


	//Janus:

	function FB_settingsValues(whichSetting){
		var arTags = new Array("span","div","td","tr","p","b","table","strong","em","a","h1","h2","h3","pre","sub","sup","i","th","cp","ul","ol","li","dt","dd","input");

		var arStyles = new Array("fontFamily:Serif","fontStyle:normal","fontWeight:normal","lineHeight:normal","fontSize:1.00em");

		var arColors = new Array(2);
		//highcontrast:
		arColors[0] = new Array("background:#000000","color:#FFFF00","link:#00FFFF","separator:#7B7D7B");
		//text:
		arColors[1] = new Array("background:#FFFFFF","color:#000000","link:#0000FF","separator:#000000");

		switch(whichSetting){
			case "tags":
				return arTags;
				break;
			case "textstyles":
				return arStyles;
				break;
			case "highcontrast":
				return arColors[0];
				break;
			case "text":
				return arColors[1];
				break;
			default:
				return null;
				break;
		}
	}

	function FB_getContainerStyle(){	
		var container = MM_findObj("container");
		if(container.style) container = container.style;
		return container;
	}

	function FB_getFontSize(tagObj){
		var nowFontSize = tagObj.fontSize;	
		nowFontSize = nowFontSize.substring(0,(nowFontSize.length -2));
		return nowFontSize;
	}

	function FB_changeFontSize(fontSize){
		var container = FB_getContainerStyle();
		var nowFontSize = FB_getFontSize(container);

		switch(fontSize){
			case "+":
				var newSize = new Number(Math.round(110*nowFontSize)/100);				
				break;
			case "-":
				var newSize = new Number(Math.round(90*nowFontSize)/100);
				break;
			case "reset":
				var newSize = new Number(1);
				break;
			default:
				var newSize = fontSize;
				break;
		}

		container.fontSize = newSize.toString() + "em";
	}
	
	function FB_disableTextStyle(tagObject){
		var arPars = FB_settingsValues("textstyles");

		for(var i=0; i<arPars.length; i++){
			var arPar = arPars[i].split(":");
			eval("tagObject."+arPar[0]+" = \""+arPar[1]+"\";");
		}
	}

	function FB_parseTagStyle(whichColors){	
		var arTags = FB_settingsValues("tags");

		var arPars = FB_settingsValues(whichColors);
		for(var i=0; i<arPars.length; i++){
			var arPar = arPars[i].split(":");
			eval("var "+arPar[0]+" = \""+arPar[1]+"\";");
		}

		var docBody = document.getElementsByTagName('body')[0];
		docBody.style.background = background;
		
		if(whichColors == "text") FB_disableTextStyle(docBody.style);

		var container = MM_findObj("container");
		for (i = 0 ; i < arTags.length ; i++ ) {	
			allarTags = container.getElementsByTagName(arTags[i]);

			for (k = 0 ; k < allarTags.length ; k++) {
				allarTagsStyle = allarTags[k].style;

				allarTagsStyle.background = background;
				allarTagsStyle.color = (arTags[i] == "a")?link:color;

				allarTagsStyle.borderLeftColor = background;
				allarTagsStyle.borderRightColor = background;
				
				if(allarTags[k].id == "mainContentBox"){
					allarTagsStyle.borderTop = "2px solid "+separator;
					allarTagsStyle.borderBottom = "2px solid "+separator;
				}
				else{
					allarTagsStyle.borderTopColor = background;
					allarTagsStyle.borderBottomColor = background;
				}

				if(whichColors == "text"){
					FB_disableTextStyle(allarTagsStyle);
					if(arTags[i] == "a") allarTagsStyle.textDecoration = "underline";
				}	

				if(arTags[i] == "div"){ 
					allarTagsStyle.clear = "both";
					allarTagsStyle.styleFloat = "none";
					allarTagsStyle.cssFloat = "none";
				}
			}
		}
	}

	var strColors = "";
	function FB_displayStyle(whichStyle){
		if(whichStyle.indexOf(":") > 0){
			var strStyle = whichStyle.split(":");
			FB_parseTagStyle(strStyle[1]);

			return null;
		}

		strColors = (whichStyle == "reset")?"":("cookie:"+whichStyle);
		window.location.reload();

		return null;
	}

	function FB_print(){
		window.print();
	}

	function createCookie(name,value,days) {
		if (days) {
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}

	function readCookie(name) {
		var nameEQ = name+"=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
				if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}

	function FB_onload(sitename){
		var font_cookie = readCookie(sitename+"_fontsize");
		if (font_cookie && font_cookie != "null") FB_changeFontSize(font_cookie);	
		
		var style_cookie = readCookie(sitename+"_pagestyle");
		if (style_cookie && style_cookie != "null"){
			strColors = style_cookie;
			FB_displayStyle(style_cookie);
		}

		return null;
	}

	function FB_onunload(sitename){
		var container = FB_getContainerStyle(sitename);
		var nowFontSize = FB_getFontSize(container);
		createCookie(sitename+"_fontsize", nowFontSize, 365);	
		
		createCookie(sitename+"_pagestyle",strColors, 365);

		return null;
	}

	function FB_openHelp(helpUrl){
        var wndHelp = window.open(helpUrl,'wndHelp','scrollbars=yes,resizable=yes,width=530,height=370,status=no,location=no,toolbar=no');
	}
//-->
