<!--//--><![CDATA[//><!--

var dropDowns = true;
var highlightMenu = true;
var textResizing = false;
var currentItemOpen = '';

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
		}
	}
}

sfHover = function() {
	var sfEls = document.getElementById("hNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
		}
	}
	
	var sfEls = document.getElementById("nav-prod").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=(this.className.length>0? " ": "") + "sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"), "");
		}
	}
}


activeLink = function() {
    var sfEls = document.getElementById("nav").getElementsByTagName("A");
    for (var i=0; i<sfEls.length; i++) {
        if (location.href.indexOf(sfEls[i].href) != -1) {       
            sfEls[i].parentNode.className+=(sfEls[i].parentNode.className.length>0? " ": "") + "active";
        }
    }
        
}

addOnloads = function() {
	var sfEls = document.getElementById("widgets").getElementsByTagName("a");
	for (var i=0; i<sfEls.length; i++) {
		if(sfEls[i].id == "printToolbar") {
			sfEls[i].onclick=function() {
				return printPage();
			}		
		}
		if(sfEls[i].id == "smallTxtToolbar") {
			sfEls[i].onclick=function() {
				return changeTextSize('smallText');
			}		
		}
		if(sfEls[i].id == "mediumTxtToolbar") {
			sfEls[i].onclick=function() {
				return changeTextSize('mediumText');
			}		
		}
		if(sfEls[i].id == "largeTxtToolbar") {
			sfEls[i].onclick=function() {
				return changeTextSize('largeText');
			}		
		}		
	}
}

if(window.addEventListener) {
	if(dropDowns) window.addEventListener('load', sfHover, false); 		// gecko, safari, konqueror and standard
	if(highlightMenu) window.addEventListener('load', activeLink, false); 
	if(textResizing) window.addEventListener('load', addOnloads, false); 
} else if(document.addEventListener) {
	if(dropDowns) document.addEventListener('load', sfHover, false); 		// opera 7
	if(highlightMenu) window.addEventListener('load', activeLink, false); 
	if(textResizing) window.addEventListener('load', addOnloads, false); 
} else if(window.attachEvent) { 							// win/ie
	if(dropDowns) window.attachEvent('onload', sfHover);
	if(highlightMenu) window.attachEvent('onload', activeLink);
	if(textResizing) window.attachEvent('onload', addOnloads);
} else { 										// mac/ie5
	if(typeof window.onload == 'function') {
		var existing = onload;
		window.onload = function() {
			if(dropDowns) sfHover();
			if(highlightMenu) activeLink();
			if(textResizing) addOnloads();
		}
	} else {
		window.onload = function() {
			if(dropDowns) sfHover();
			if(highlightMenu) activeLink();
			if(textResizing) addOnloads();
		}
	}
}

window.onunload = function(e) {
	if(textResizing) {
		var textSize = document.body.className.split(' ')[1];
		createCookie('style', textSize, 365);
	}
}

//--><!]]>