/*************************************************************
	
	FILE:			Window.js
	
	DESCRIPTION:	This file contains scripts for working
					with the window object
	
	VERSIONS:
		02.15.2002 by fred.peck@tesser.com
			file created
			
		04.17.2002 by fred.peck@tesser.com
			Added generic window popup script.
	
**************************************************************/

/**
 * openGame
 *
 *	This function opens a popup window with a flash game
 * 
 * VERSIONS
 *	02.15.2002 by fred.peck@tesser.com
 *		Version 1.0
 *
 * VARIABLES:
 *	game:	The file name of the html page to load in the popup 
 *			window.
 *
 */
 function openGame(page)
{
	switch(page) {
		case 'OlivesAttack.html':
			var URL = "/OlivesWeb/Musco/" + page;
			window.open(URL, "", "width=500,height=500");
			break;
			
		case 'OliveMatch.html': 
			var URL = "/OlivesWeb/Musco/" + page;
			window.open(URL, "", "width=670,height=510");
			break;
		
		case 'OliveFingers.html':
			var URL = "/OlivesWeb/Musco/" + page;
			window.open(URL, "", "width=500,height=300");
			break;
   }

}




/**
 * openCommercial
 *
 *	This function opens a popup window with a TV commercial
 * 
 * VERSIONS
 *	02.19.2002 by fred.peck@tesser.com
 *		Version 1.0
 *
 * VARIABLES:
 *	movie:	The name of the movie we are opeining:
 *				
 *				- Worker
 *				- Birds
 *				- Orphanage
 *
 */
function openCommercial(commercial)
{
	var URL = "/OlivesWeb/Pearls/TVSizeList.aspx?movie=" + commercial;
	
	window.open(URL, "", "width=600,height=550");
}


/**
 * openResizableWindow
 *
 *	This function opens a resizable popup window with any url and width and height.
 * 
 * VERSIONS
 *	04.17.2002 by fred.peck@tesser.com
 *		Version 1.0
 *
 * VARIABLES:
 *	URL:	Absolute path to the URL to open
 *	width:	The width of the window to open
 *	height:	The height of the window to open
 *
 */
function openResizableWindow(URL, width, height)
{
	window.open(URL, "", "resizable=1,scrollbars=1,width=" + width + ",height=" + height);
}

function	openFixedWindow(URL, name, width, height)
{
	window.open(URL, name, "resizable=0;scrollbars=0,width=" + width + ",height=" + height);
}

