//Detect older browsers and redirect

if(!document.getElementById)top.location.replace("http://disney.go.com/guestservices/upgrade/index.html");


//----------------------------------------------------------------


function PopWindow(url,name,scroll,width,height,top,left,resizable,toolbar,location)
{
	settings="directories=no,status=no,menubar=no,scrollbars="+scroll+",resizable="+resizable+",width="+width+",height="+height+",top="+top+",left="+left+",toolbar="+toolbar+",location="+location;
	
	MyNewWindow = window.open(url,name,settings);
	MyNewWindow.focus();
}

function openMovie(mov){

	movWin = window.open('qt/'+mov+'.html','movWin','width=600,height=316,toolbar=no,scrollbars=no')

}

function pdfNote(position){
	
	if (!position){
		position = 0;
	}
	
	document.writeln('<div class="note" style="left:'+position+'px;" id="pdfNote"><table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td colspan="2"><strong>Plug-ins:</strong></td></tr><tr><td valign="top" width="88"><a href="javascript:winOpener(\'http://www.adobe.com/products/acrobat/readstep.html\',\'pdfWin\',null,null)"><img border="0" height="31" width="88" src="http://wwwimages.adobe.com/images/getacro.gif" alt="Get Acrobat Reader" align="absmiddle" vspace="3"></a></td><td>Adobe Acrobat is needed to access these documents.</td></tr></table></div>');

}

function pdfAndVRNote(position){
	
	if (!position){
		position = 0;
	}
	
	document.writeln('<div class="note" style="left:'+position+'px;" id="pdfNote"><table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td colspan="2"><strong>Plug-ins:</strong></td></tr><tr><td valign="top" width="88"><a href="javascript:winOpener(\'http://www.adobe.com/products/acrobat/readstep.html\',\'pdfWin\',null,null)"><img border="0" height="31" width="88" src="http://wwwimages.adobe.com/images/getacro.gif" alt="Get Acrobat Reader" align="absmiddle" vspace="3"></a></td><td>Adobe Acrobat is needed to access these documents.</td></tr><tr><td valign="top" width="88"><a href="javascript:winOpener(\'http://www.apple.com/quicktime/download\',\'pdfWin\',null,null)"><img border="0" height="31" width="88" src="http://studioservices.go.com/media/quicktime.gif" alt="QuickTime" align="absmiddle" vspace="3"></a></td><td><img src="http://studioservices.go.com/media/downloadqtvr.gif" border="0" align="absmiddle" align="left"> Requires QuickTime.</td></tr></table></div>');

}

function vrNote(position){
	
	if (!position){
		position = 0;
	}
	
	document.writeln('<div class="note" style="left:'+position+'px;" id="pdfNote"><table width="100%" border="0" cellpadding="2" cellspacing="0"><tr><td colspan="2"><strong>Plug-ins:</strong></td></tr><tr><td valign="top" width="88"><a href="javascript:winOpener(\'http://www.apple.com/quicktime/download\',\'pdfWin\',null,null)"><img border="0" height="31" width="88" src="http://studioservices.go.com/media/quicktime.gif" alt="QuickTime" align="absmiddle" vspace="3"></a></td><td><img src="http://studioservices.go.com/media/downloadqtvr.gif" border="0" align="absmiddle" align="left"> Requires QuickTime.</td></tr></table></div>');

}

function winOpener(URL, name, width, height){
	
	if (width != null && height != null){
	
		var newWin = window.open(URL, name, 'width='+width+',height='+height+',toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0');
		newWin.focus();
		
	} else {
		
		var newWin = window.open(URL, name);
		newWin.focus();
		
	}
	
}

//----------------------------------------------------------------

current = 0;

var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
  alert('Query Variable ' + variable + ' not found');
}

function setSlide(imgNum) {
	current = parseInt(imgNum);
	document.images.show.src = slide[current];
}

function next() {
	if (slide[current+1]) {
		document.images.show.src = slide[current+1];
		setCaption(current+2)
		slide.selectedIndex = ++current;
	}
	else first();
}
function previous() {
	if (current-1 >= 0) {
		document.images.show.src = slide[current-1];
		setCaption(current)
		slide.selectedIndex = --current;
	}
	else last();
}
function first() {
	current = 0;
	document.images.show.src = slide[0];
	slide.selectedIndex = 0;
	setCaption(1)
}
function last() {
	current = slide.length-1;
	document.images.show.src = slide[current];
	slide.selectedIndex = current;
	setCaption(current+1)
}
function ap(text) {
	slidebutton.value = (text == "Stop") ? "Start" : "Stop";
	rotate();
}
function change() {
	current = slide.selectedIndex;
	document.images.show.src = slide[current];
}
function rotate() {
	if (slidebutton.value == "Stop") {
		current = (current == slide.length-1) ? 0 : current+1;
		document.images.show.src = slide[current];
		slide.selectedIndex = current;
		window.setTimeout("rotate()", rotate_delay);
	}
}