/*	Index.js
 *	------------------------------------------------------------ *
 *	@desc: resized index page and provides for window launch.
 *	------------------------------------------------------------ */
 
	function popWindow(pageurl,pagename,w,h,resizeable)
	{
		//alert("popWindow("+pageurl+","+pagename+","+w+","+h+","+resizeable+");");
		
		var toolbars_default 	= false;
		var scroll_default 		= false;
		var resizeable_default 	= "no";
		
		var width	= w;
		var height 	= h;
		
		var leftPos	= (screen.width-width)/2;
		var topPos 	= (screen.height-height)/2;
		
		if(!resizeable) { resizeable = resizeable_default };
		DocumentWindow = window.open(pageurl,pagename,'toolbars='+toolbars_default+', scrollbars='+scroll_default+', resizeable='+resizeable+', left='+leftPos+', top='+topPos+', width='+width+', height='+height);
		DocumentWindow.focus();
	}
	
	function getToken(tokenUrl,pagename)
	{
		var TokenWindow = window.open(tokenUrl,pagename);
		TokenWindow.focus();
	}
	
	function orderNow()
	{
		var pageurl = ""; // Update this value for the page to target when the user clicks 'order now' from flash
		var pagename = "ordernow";
				
		if( pageurl != "" )
		{
			var ordernowwindow = window.open(pageurl,pagename);
			ordernowwindow.focus();
			
			/**	Hitbox
			 * 	---------------------------------------- */
				hitbox.Set_hbExitLink("Exit_The+Wild_ORDER");
		}
		else
		{
			alert("Note: no value for page url set!\n Please Update 'files/js/index.js'");
		}
	}
	
	
	// DISCLAIMER POPUP SCRIPT
	function openDisclaimer(URL){
		win = window.open('http://disney.go.com/disneyvideos/javascript/disclaimer/disclaimer.html?'+ URL, 'intermediate', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=370,height=210');
	}
	
	function popup( url, w, h, windowName, r, st, s, l, m, t) {
		try {
			win.close();
		}catch(e){		
		}
		win = window.open(url, windowName, 'height=' +h+ ', width=' +w+ ', resizable=' +r+ ', status= ' +st+ ', scrollbars=' +s+ ', location=' +l+ ', menubar=' +m+  ', toolbar= ' +t+ ', left=5, top=5');
		win.focus();		
	}
