//IE Hover Function for main menu
over = function() {
	var sfEls = document.getElementById("primary-nav").getElementsByTagName("li");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			sel = document.getElementsByTagName("select");
			for (var i=0; i<sel.length; i++) {
				sel[i].style.visibility = 'hidden';
			}
		this.className+=" over";
	}

	sfEls[i].onmouseout=function() {
		sel = document.getElementsByTagName("select");
		for (var i=0; i<sel.length; i++) {
			sel[i].style.visibility = 'visible';
		}
		this.className=this.className.replace(new RegExp(" over\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", over);


//Miscellaneous menu changes
function changeleague(frm, menu1) {
 with (frm) {
  str = menu1.options[menu1.selectedIndex].value;
  url="/statistics/index.php/leagues/" + str;
  window.location.href = url;
 }
}

function changeoffseason(frm, menu1) {
 with (frm) {
  str = menu1.options[menu1.selectedIndex].value;
  url="/statistics/index.php/officials_season/" + str;
  window.location.href = url;
 }
}

function adminchangeseason(frm, menu1, url) {
 with (frm) {
  str = menu1.options[menu1.selectedIndex].value;
  newurl=url + str;
  window.location.href = newurl;
 }
}

function changescorers(frm, menu1) {
 with (frm) {
  str = menu1.options[menu1.selectedIndex].value;
  url="/statistics/index.php/goalscorers/" + str;
  window.location.href = url;
 }
}

function changeappearances(frm, menu1) {
 with (frm) {
  str = menu1.options[menu1.selectedIndex].value;
  url="/statistics/index.php/appearances/" + str;
  window.location.href = url;
 }
}

function changediscipline(frm, menu1) {
 with (frm) {
  str = menu1.options[menu1.selectedIndex].value;
  url="/statistics/index.php/discipline/" + str;
  window.location.href = url;
 }
}
