/**
sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			this.style.zIndex = "1000";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
**/


/** JavaScript **/
ieHover = function() {
	var ieLIs = document.getElementById('nav').getElementsByTagName('li');
	for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
		ieLIs[i].onmouseover=function() {
			
		var ieUL = this.getElementsByTagName('ul')[0];
		if (ieUL) {
		var ieMat = document.createElement('iframe');
						ieMat.style.width=ieUL.offsetWidth+"px";
						ieMat.style.height=ieUL.offsetHeight+"px";	
						ieUL.insertBefore(ieMat,ieUL.firstChild);
						ieUL.style.zIndex="99";
						}
			
			this.className+=" iehover";
			}
		ieLIs[i].onmouseout=function() {
			this.className=this.className.replace(' iehover', '');
			}
			}
	}
if (window.attachEvent) window.attachEvent('onload', ieHover);
/** end **/

/** ----------------------------------------------------------------------------------------------------------------  **/


function selectStyle() {
	if(screen.availHeight < 800){
		changeStyle('Small')
	} else {
		changeStyle('Default')
	}
}

function getAllSheets() {
	if( !window.ScriptEngine && navigator.__ice_version ) { return document.styleSheets; }
	if( document.getElementsByTagName ) { var Lt = document.getElementsByTagName('link'), St = document.getElementsByTagName('style');
	} else if( document.styleSheets && document.all ) { var Lt = document.all.tags('LINK'), St = document.all.tags('STYLE');
	} else { return []; } for( var x = 0, os = []; Lt[x]; x++ ) {
		var rel = Lt[x].rel ? Lt[x].rel : Lt[x].getAttribute ? Lt[x].getAttribute('rel') : '';
		if( typeof( rel ) == 'string' && rel.toLowerCase().indexOf('style') + 1 ) { os[os.length] = Lt[x]; }
	} for( var x = 0; St[x]; x++ ) { os[os.length] = St[x]; } return os;
}
function changeStyle() {
	window.userHasChosen = window.MWJss;
	for( var x = 0, ss = getAllSheets(); ss[x]; x++ ) {
		if( ss[x].title ) { ss[x].disabled = true; }
		for( var y = 0; y < arguments.length; y++ ) { if( ss[x].title == arguments[y] ) { ss[x].disabled = false; } }
} }
