if (navigator.userAgent.indexOf("Opera")!=-1) {document.write('<link rel="stylesheet" href="/usr/templates/opera.css" type="text/css" media="all"/>');};

var ie/*@cc_on=1@*/;
function clearFocus() {
	if(ie) {
		var links = document.getElementsByTagName('a');
		for(var i=0; i<links.length; i++) links[i].onfocus = function() {this.blur()};
	}
	var buttons = document.getElementsByTagName('button');
	for(var i=0; i<buttons.length; i++) buttons[i].onfocus = function() {this.blur()};
	var inputs = document.getElementsByTagName('input');
	for(var i=0; i<inputs.length; i++) inputs[i].onfocus = function() {if (this.type=="radio" || this.type=="checkbox" || this.type=="submit") this.blur()};
}


function sifrGo() {
	sIFR.replaceElement(named ({sSelector:"body h1",sFlashSrc:"/usr/templates/officinasans.swf",sColor:"#ffff99",sWmode:"transparent", bdoGhost:false}));
	sIFR.replaceElement(named ({sSelector:"body h2",sFlashSrc:"/usr/templates/officinasans.swf",sColor:"#ffff99",sWmode:"transparent", bdoGhost:false}));
	sIFR.replaceElement(named ({sSelector:"body #content-sub h3",sFlashSrc:"/usr/templates/officinasans.swf",sColor:"#ffff99",sWmode:"transparent", bdoGhost:false}));
	sIFR.replaceElement(named ({sSelector:"body h3",sFlashSrc:"/usr/templates/officinasans.swf",sColor:"#ffffff",sWmode:"transparent", bdoGhost:false}));
	sIFR.replaceElement(named ({sSelector:"body h4",sFlashSrc:"/usr/templates/officinasans.swf",sColor:"#ffffff",sWmode:"transparent", bdoGhost:false}));
	sIFR.replaceElement(named ({sSelector:"body ul#menu div div",sFlashSrc:"/usr/templates/officinasans.swf",sColor:"#ffffff", sLinkColor:"#ffffff",sBgColor:"#1a4f63",sHoverColor:"#ffffff", sFlashVars:"textalign=center&offsetTop=0", sWmode:"transparent", bdoGhost:true}));
	sIFR.replaceElement(named ({sSelector:"body div#consilium div", sFlashSrc:"/usr/templates/officinasans.swf", sColor:"#ffffff", sLinkColor:"#ffffff", sBgColor:"#1a4f63", sHoverColor:"#ffffff", sWmode:"transparent", nPaddingTop:0, nPaddingRight:0, nPaddingLeft:0, nPaddingBottom:0, sFlashVars:"textalign=center&offsetTop=0", bdoGhost:true}));
	sIFR.replaceElement(named ({sSelector:"body p.more span span",sFlashSrc:"/usr/templates/officinasans.swf",sColor:"#ffffff", sLinkColor:"#ffffff",sBgColor:"#1a4f63",sHoverColor:"#ffffff", sFlashVars:"textalign=center&offsetTop=0",sWmode:"transparent", bdoGhost:true}));
}


function jsHover() {
	var hEls = document.getElementById("menu").getElementsByTagName("LI");
	for (var i=0, len=hEls.length; i<len; i++) {
		hEls[i].onmouseover=function() { this.className+=" jshover"; }
		hEls[i].onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
	}
	var cons = document.getElementById("consilium");
	cons.onmouseover=function() { this.className+=" jshover"; }
	cons.onmouseout=function() { this.className=this.className.replace(" jshover", ""); }
}


function init() {
	clearFocus();
	if(typeof sIFR == "function"){sifrGo();}
	if(ie) jsHover();
}


window.onload = init;
