// nav li rollover functionality for IE
////////////////////////////////////////////////////////////////////////////////////////////////////////////
function sfHover() {
	var sfEls = document.getElementById("navigation").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className="";
		}
	}	
}

// pop-up function
////////////////////////////////////////////////////////////////////////////////////////////////////////////
function popUp(strURL,strType,strHeight,strWidth) {
var strOptions="";
if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
if (strType=="elastic") 
strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
window.open(strURL, 'newWin', strOptions);
}

// opens and closes the login panel
////////////////////////////////////////////////////////////////////////////////////////////////////////////
function fadeInPop(){
	var logClassName = document.getElementById("loginPop").className;
	var alphaChange = new Fx.Style(document.getElementById("loginPop"), 'opacity', {duration:300});
	if(logClassName == "hideLog") {
		alphaChange.set(0);
		alphaChange.start(.999);
		document.getElementById("loginPop").className = "";
	}else {
		alphaChange.start(0);
		document.getElementById("loginPop").className = "hideLog";	
	}
}

// google analytics
////////////////////////////////////////////////////////////////////////////////////////////////////////////


// functions that will run on window.onload
////////////////////////////////////////////////////////////////////////////////////////////////////////////
window.addEvent('load', sfHover);
window.addEvent('load', startAnalytics);
