<!--
function wui(s) {
	if (s == "on") {
		document.getElementById('wui-img').src = "/media/images/global/wui-on.gif";
	}
	else {
		document.getElementById('wui-img').src = "/media/images/global/wui.gif";
	}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var itemObjs;

function itemMouseOver(){
	this.className='on';
}
function itemMouseOut(){
	this.className='off';
}
function itemClick(){
	alert("In development.");
}
function items(){
	//itemObjs = document.getElementById('left-col').getElementsByTagName("DIV");
	itemObjs = document.getElementById('content').getElementsByTagName("DIV");
	var exception_pointer;
	
	for(i = 0;i < itemObjs.length;i++){
		if(itemObjs[i].id == "item"){
			itemObjs[i].onmouseover = itemMouseOver;
			itemObjs[i].onmouseout = itemMouseOut;			
			exception_pointer = i;
		}
	}		
	itemObjs[exception_pointer].onmouseover = null;
	itemObjs[exception_pointer].onmouseout = null;
	itemObjs[exception_pointer].style.cursor = "auto";
}

function navchange(section) {
	// Turn off all subnavs
	document.getElementById('ex').className = "off";
	document.getElementById('su').className = "off";
	document.getElementById('co').className = "off";
	document.getElementById('ed').className = "off";
	document.getElementById('kc').className = "off";
	// Turn off all header highlights
	document.getElementById('exh').className = "off";
	document.getElementById('suh').className = "off";
	document.getElementById('coh').className = "off";
	document.getElementById('edh').className = "off";
	document.getElementById('kch').className = "off";
	// Turn on correct header highlight and subnav
	document.getElementById(section + "h").className = "on";
	document.getElementById(section).className = "on";
}

function answer(num) {
	// Hide all answers
	document.getElementById('answer1').style.display = "none";
	document.getElementById('answer2').style.display = "none";
	document.getElementById('answer3').style.display = "none";
	document.getElementById('answer1').style.visibility = "hidden";
	document.getElementById('answer2').style.visibility = "hidden";
	document.getElementById('answer3').style.visibility = "hidden";
	// Normalize all questions
	document.getElementById('question1').className = "off";
	document.getElementById('question2').className = "off";
	document.getElementById('question3').className = "off";
	// Show correct answer
	document.getElementById('answer'+num).style.display = "inline";
	document.getElementById('answer'+num).style.visibility = "visible";
	document.getElementById('question'+num).className = "on";
}

var obj_a;

// Top Navigation Highlights
function highlight_section(ul_section_id,section_title){
	navchange(ul_section_id);
	if (section_title) {
		var obj_ul = document.getElementById(ul_section_id);
		var objs_a = obj_ul.getElementsByTagName("A");
		
		for(var i=0;i < objs_a.length;i++){
			if(objs_a[i].innerHTML.indexOf(section_title) != -1){
				obj_a = objs_a[i];
			}
		}
		
		obj_a.style.color = "#FFCC00";
	}
}
// Left Navigation Highlights
function highlight_section2(section_title){
	var ul_section_id = "left-nav";
	if (section_title) {
		var obj_ul = document.getElementById(ul_section_id);
		var objs_a = obj_ul.getElementsByTagName("A");
		
		for(var i=0;i < objs_a.length;i++){
			if(objs_a[i].innerHTML.indexOf(section_title) != -1){
				obj_a = objs_a[i];
			}
		}
		
		obj_a.style.color = "#FFCC00";
	}
}
// Interior Orange Box Navigation Highlights
function highlight_section3(section_title){
	var ul_section_id = "right-nav";
	if (section_title) {
		var obj_ul = document.getElementById(ul_section_id);
		var objs_a = obj_ul.getElementsByTagName("A");
		
		for(var i=0;i < objs_a.length;i++){
			if(objs_a[i].innerHTML.indexOf(section_title) != -1){
				obj_a = objs_a[i];
			}
		}
		
		obj_a.style.background = "#FFFFFF";
		obj_a.style.color = "#346BB4";
	}
}
// Multimedia Gallery Bottom Nav
function highlight_section4(color,section_title){
	var ul_section_id = "bot-nav";
	if (section_title) {
		var obj_ul = document.getElementById(ul_section_id);
		var objs_a = obj_ul.getElementsByTagName("A");
		
		for(var i=0;i < objs_a.length;i++){
			if(objs_a[i].innerHTML.indexOf(section_title) != -1){
				obj_a = objs_a[i];
			}
		}
		
		obj_a.style.background = "#FFFFFF";
		obj_a.style.color = color;
	}
}
// Second Interior Nav Blue
function highlight_section5(section_title){
	var ul_section_id = "spec-right-nav";
	if (section_title) {
		var obj_ul = document.getElementById(ul_section_id);
		var objs_a = obj_ul.getElementsByTagName("A");
		
		for(var i=0;i < objs_a.length;i++){
			if(objs_a[i].innerHTML.indexOf(section_title) != -1){
				obj_a = objs_a[i];
			}
		}
		
		obj_a.style.background = "#FFFFFF";
		obj_a.style.color = "#F26803";
	}
}
// Utility Nav
function highlight_section6(section_title){
	var ul_section_id = "top-nav";
	if (section_title) {
		var obj_ul = document.getElementById(ul_section_id);
		var objs_a = obj_ul.getElementsByTagName("A");
		
		for(var i=0;i < objs_a.length;i++){
			if(objs_a[i].innerHTML.indexOf(section_title) != -1){
				obj_a = objs_a[i];
			}
		}
		obj_a.style.color = "#F26803";
	}
}

function track(category, action, optional_label, optional_value, nextpage, window_type, trackurl){
	var optional_value_int = parseInt(optional_value);
	pageTracker._trackEvent(category, action, optional_label, optional_value_int);
	if (window_type == "_blank") {	
		window.open(nextpage);
	} else {
		window.location = nextpage;
	}
}

function trackNav(category, action, optional_label, trackurl){
	pageTracker._trackEvent(category, action, optional_label);
}
