function rollGoBut(action) {
	actionBoxVar = document.getElementById("actionBoxDesc");
	boxes = actionBoxVar.getElementsByTagName("dt");
	backColor = actionBoxVar.getElementsByTagName("dd");
	linkVar = document.getElementById("actionBox").getElementsByTagName("a");
	visVar = false;
	switch(action) {
		case 0:
			bgColor = "#e2a92b";
			yPos = "-178px";
			break;
		case 1:
			bgColor = "#3d79bf";
			yPos = "-356px";
			break;
		case 2:
			bgColor = "#9e0b0e";
			yPos = "-534px";
			break;
		default:
			bgColor = "#777777";
			yPos = "0";
			visVar = true;
	}
	for(i=0;i<boxes.length;i++) {
		backColor.item(i).style.backgroundColor = bgColor;
		if(action != i && visVar != true) {
			linkVar.item(i).style.display = "none";
		} else {
			linkVar.item(i).style.display = "block";
		}
	}
	boxes.item(0).style.backgroundPosition = "0 "+yPos;
	boxes.item(1).style.backgroundPosition = "-176px "+yPos;
	boxes.item(2).style.backgroundPosition = "-352px "+yPos;
}
function optionsCookieSet(value) {
	document.cookie="optionsBar=" + value;
}
function optionsCookieGet() {
	cookieList = document.cookie;
	optionsCookie = cookieList.indexOf("optionsBar=");
	if(optionsCookie != -1) {
		valStart = 11+optionsCookie;
		valEnd = cookieList.indexOf(";",valStart);
		if(valEnd == -1) {
			valEnd = cookieList.length;
		}
		var cookieValue = cookieList.substring(valStart,valEnd);
		return unescape(cookieValue);
	} else {
		return "open";
	}
}
function optionsLoad() {
	var cookieValue = optionsCookieGet();
	if(cookieValue == "close") {
		optionsSlide();
	}
}
function optionsSlide() {
	var cookieValue = optionsCookieGet();
	optVar = document.getElementById("options");
	butVar = document.getElementById("optionsBut");
	if(optVar.style.display == "none" && cookieValue == "close") {
		optStyle = "block";
		butStyle = "top";
		optionsCookieSet("open");
	} else {
		optStyle = "none";
		butStyle = "bottom";
		optionsCookieSet("close");
	}
	optVar.style.display = optStyle;
	butVar.style.backgroundPosition = "right "+butStyle;
}
function openPop(url, scrollbars) {
	var scrollbarVar = "no";
	if(scrollbars == 1) {
		scrollbarVar = "yes";
	}
	windowpop_handle = window.open(url,"windowpop","scrollbars="+scrollbarVar+",width=500,height=455");
	windowpop_handle.focus();
}
function playStopMov(page, nameToggle) {
	var flashObjTxt = "flashContent";
	if(page == "actionBox") {
		bgObjTxt = "infoBlurb";
		gifTxt = "Main"
	} else {
		bgObjTxt = "leftNav";
		gifTxt = "Content";
	}
	if(nameToggle=="") {
		flashObj = document.getElementById(flashObjTxt);
		flashObj.style.display = "block";
		linkObj = document.getElementById("flashStarter");
		linkObj.style.display = "none";
		bgObj = document.getElementById(bgObjTxt);
		bgObj.style.backgroundImage = "none";
		// Only for IE because it doesn't understand z-index too well
		menuObj = document.getElementById("menu");
		menuObj.style.zIndex = "1";
		optObj = document.getElementById("optionsBar");
		optObj.style.zIndex = "1";
	} else {
		flashObj = document.getElementById(flashObjTxt);
		flashObj.style.display = "none";
		linkObj = document.getElementById("flashStarter");
		linkObj.style.display = "block";
		bgObj = document.getElementById(bgObjTxt);
		bgObj.style.backgroundImage = "url(/siteAssets/mycrediteducation/i/icon_"+nameToggle+gifTxt+".gif)";
		// Only for IE because it doesn't understand z-index too well
		optObj = document.getElementById("optionsBar");
		optObj.style.zIndex = "0";
	}
}
// loads scripts via javascript
function loadScript(url) {
	var e = document.createElement("script");
	e.src = url;
	e.type="text/javascript";
	document.getElementsByTagName("head")[0].appendChild(e);
}
// handles surfaid tagging
window.onload = function() {
	SA_ID="equifax;equifax";
	loadScript("//stats.surfaid.ihost.com/sacdcg3p_equifax_equifax.js?equifax");
	optionsLoad();
}