function restore_nav_bg(bgcell) {
	document.getElementById("bgcell").style.background = url("/images/common/nav_bg.gif");
}


//Pops the Send To A Friend popup Form
function pop_sendFriend(siteGameID, emailType) {
	url = "/games/pop_sendToAFriend.aspx?siteGameID=" + siteGameID + "&emailType=" + emailType;
	loginwin = window.open(url,'adbreak','personal=no,toolbar=no,menubar=no,scrollbars=no,location=no,status=no,resizable=no,directories=no,width=280,height=535,screenX=120,screenY=220,left=120,top=220');
	}	


//Used in Learn More Popup:
//Loads URL in Main window and keeps popup open
function loadInMainWindow(url) {
	parent.parent.opener.location.href = url
}

//Used in Learn More Popup:
//Loads URL in Main window and Closes the popup.
function loadInMainAndClose(url) {
	parent.parent.opener.location.href = url;
	parent.parent.close();
}

//1. Functions for Navigation Rollovers
var ASSET_PATH = "/images/"
function rollover_preload(){
	//preloads middle images for the navigation
		if (document.images){
		var argLength = rollover_preload.arguments.length;
			for (arg=0; arg < argLength; arg++){
				eval(arguments[arg] + "_on = new Image();");
				eval(arguments[arg] + "_on.src = '" + ASSET_PATH + "/games/scrn_game_" + arguments[arg] + ".jpg';");
			}
		}
}


function rollover(imageName){
	if (document.images){
		eval("document.preview.src=" + imageName + "_on.src");
	}
}

function restore(imageName){
	if (document.images){
		document.preview.src = "/images/games/scrn_game_preview.gif";
	}
}

function description_rollover(tableCell, rolloverColor) {
	document.getElementById(tableCell).style.backgroundColor = rolloverColor;
}

function description_restore(tableCell, restoreColor) {
	document.getElementById(tableCell).style.backgroundColor = restoreColor;
}

//Popup Scripts
function goHereAndStay(url) {
	if (opener != null) {
		opener.location.href = url;
	} else {
		window.location.href = url;
	}
}
// select link jump	
function linkJump(source)
{
	window.location = source.options[source.selectedIndex].value;

}

var TrackTag = "http://switch.atdmt.com/action/";

function GetActionTag(URL){
	if(GetActionTag){
		document.action_tag.src = TrackTag + URL;
	}
}

function popup(url,height,width){
	window.open(url,'newpopwin','personal=no,toolbar=no,menubar=no,scrollbars=yes,location=no,status=no,resizable=yes,directories=no,width=' + width + ',height=' + height);
}