function openUSCoupon() {
	window.open('http://disneyvideos.disney.go.com/disclaimer.html','disclaimer','width=225,height=225,left=100,top=100');
	setTimeout('awaymsg.close()',60000);
	window.open("couponUSA.html", "_blank"); 
}

function openCanadaCoupon() {
	window.open('http://disneyvideos.disney.go.com/disclaimer.html','disclaimer','width=225,height=225,left=100,top=100');
	setTimeout('awaymsg.close()',60000);
	window.open("couponCA.html", "_blank"); 
}

function openwindow(theURL,winName,width,height) {
    popup = window.open(theURL,winName,'width=' + width + ',height=' + height + ',resizable=no,scrollbars=no,menubar=no,toolbar=no,location=no,directories=no,status=no');
	moveToCenter (popup,width,height);
}
function moveToCenter (wind, winX, winY) {
	screenWidth = screen.availWidth;
	screenHeight = screen.availHeight;
	finalX = (screenWidth / 2) - (winX/2);
	finalY = (screenHeight / 2) - (winY/2);
	wind.moveTo (finalX, finalY);
}


//	QUERY SEARCH BEGIN
function QueryString(key)
{
	var value = null;
	for (var i=0;i<QueryString.keys.length;i++)
		if (QueryString.keys[i]==key)
		{
			value = QueryString.values[i];
			break;
		}
	return value;
}
QueryString.keys = new Array();
QueryString.values = new Array();

function QueryString_Parse()
{
	var query = unescape(window.location.search.substring(1) );
    
	var pairs = query.split("&");
	for (var i=0;i<pairs.length;i++)
	{
		var pos = pairs[i].indexOf('=');
		if (pos >= 0)
		{
			var argname = pairs[i].substring(0,pos);
			var value = pairs[i].substring(pos+1);
			QueryString.keys[QueryString.keys.length] = argname;
			QueryString.values[QueryString.values.length] = value;		
		}
	}
}

QueryString_Parse();

var dl = unescape(QueryString("dl") );
//	QUERY SEARCH END

if (dl == "game_coloring") {
		openwindow('coloringGame.html','coloring',750,535);
}

if (dl == "game_princess") {
		openwindow('princessGame.html','princess',700,550);
}


function popScreenSaver(url) {
	win = window.open(url, 'screensaver', 'height=150, width=400, resizable=no, status=no, scrollbars=no, location=no, menubar=no, toolbar=no, left=50, top=50');
}

