/**
	IE6 bux fix for li:hover state
**/


startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("main_nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
		if(document.getElementById("action_menu_1")!=null){
			navRoot = document.getElementById("action_menu_1");
		}
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	checkIE6();	
}
function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

if (window.attachEvent) window.attachEvent("onload", startList);

function checkIE6() {
	if (navigator.appVersion.search(/MSIE 6./) != -1 && navigator.appMinorVersion.search(/;SP/) == -1){ //ok we have the nightmare version installed!
		setActiveStyleSheet("ie6");
	}else{ //this will sort out the rest of the IE6 versions
		try {
			document.execCommand("BackgroundImageCache", false, true);
		} catch(err) {} 
	}
  
}


function EnterKeyFocus(ButtonValue)
{
switch (ButtonValue)
  {
	case "Country":
		document.getElementById('imgbuttonCountry').focus();
	break;
	case "WOL":
		document.getElementById('imgbuttonWOL').focus();
	break;
	case "AoI1":
		document.getElementById('imgbuttonAoI1').focus();
	break;
	case "AoI2":
		document.getElementById('imgbuttonAoI2').focus();
	break;
	case "AoI3":
		document.getElementById('imgbuttonAoI3').focus();
	break;
	case "DownPDF1":
		document.getElementById('imgbuttonDownPDF1').focus();
	break;
	case "DownPDF2":
		document.getElementById('imgbuttonDownPDF2').focus();
	break;
	case "DownPDF3":
		document.getElementById('imgbuttonDownPDF3').focus();
	break;


  }
}

if(typeof(WPSC) == "undefined"){
	WPSC = new Object();
	WPSC.Init = function(){
		//do nothing
	}
	WPSC.WebPartPage = new Object();
	WPSC.WebPartPage.Parts = new Object();
	WPSC.WebPartPage.Parts.Register = function(){
		//do nothing
	}
}
