var navpath="http://disney.go.com/disneyatoz/familymuseum/media/nav/";

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
 theWin = window.open(theURL,winName,features);
 theWin.focus();
}

function popWindow(url, w, h, windowName) {
	win = window.open(url, windowName, "height=" + h + ",width=" + w + ",resizable=no,status=no,scrollbars=no,location=no,menubar=no,toolbar=no");
	win.focus()
}

function popDisclaimer(url){
	  url = "http://disney.go.com/disneyatoz/familymuseum/interstitial.html?appredir=" + url;
	  var intWin = window.open(url,'intWindow','width=520,height=205,resizable=no,scrollbars=no');
	  intWin.focus();
    }

function getNewItem(item,section){
if (section=="familyfriends" || section=="waltsthoughts" || section=="articles"){
document.location = "http://disney.go.com/disneyatoz/familymuseum/exhibits/"+section+"/"+item+"/index.html";
} else if (section=="museumguide"){
document.location = "http://disney.go.com/disneyatoz/familymuseum/resources/"+section+"/"+item+".html";
} else if (section=="booksvideos"){
document.location = "http://disney.go.com/disneyatoz/familymuseum/resources/"+item+".html";
} else if (section=="insidestory"){
document.location = "http://disney.go.com/disneyatoz/familymuseum/collection/"+section+"/inside_"+item+".html";
} else{
document.location = "http://disney.go.com/disneyatoz/familymuseum/collection/"+section+"/"+item+"/index.html";
}
}

function writeDropDown(item,menu){
document.write('<select name="'+menu+'"  ONCHANGE="javascript:getNewItem(this.options[this.selectedIndex].value, \''+menu+'\');">');
   for (var theKey in eval(menu)) {

    if (theKey==item){
     document.write('<option value="'+theKey+'" SELECTED>'+eval(menu)[theKey]+'</option>');
    } else {
     document.write('<option value="'+theKey+'" >'+eval(menu)[theKey]+'</option>');
    }
   }
}

function writePrevNext(item,menu){
	listLength= eval(menu+"_flat").length;

			for(i=0;i<listLength;i++){
			
			if (item==eval(menu+"_flat")[i]){
				prev = eval(menu+"_flat")[i-1];
				next = eval(menu+"_flat")[i+1];


			}
		}
	document.write('<table width="100%"><tr><td width="50%" align="left">');

	if (item!=eval(menu+"_flat")[0]){
		document.write('<a name="lid=dfm_'+pname+ '/contentlink/'+prev+'/080310" href="javascript:getNewItem(\''+prev+'\',\''+menu+'\')"><img src="http://disney.go.com/disneyatoz/familymuseum/media/prev_btn.gif" width="86" height="28" alt="Previous" border="0"></a>');
	}

	document.write('</td><td width="50%" align="right">');

	if (item!=eval(menu+"_flat")[listLength-1]){
		document.write('<a name="lid=dfm_'+pname+ '/contentlink/'+next+'/080310" href="javascript:getNewItem(\''+next+'\',\''+menu+'\')"><img src="http://disney.go.com/disneyatoz/familymuseum/media/next_btn.gif" width="58" height="28" alt="Next" border="0"></a>');
	}

	document.write('</td></tr></table>');

}

function externalDisclaimer(name, URL, position){		
		if (!position){
			position = 0;
		}
	document.writeln('<div style="position:relative;"><div class="pdfNote3" style="left:'+position+'px;" id="'+name+'"></div></div>');
}


function showhide(divID, windowName){
theframe="definition_"+divID;
	
	if (!windowName){
		windowName = "externalWin";
	}
	
	obj=document.getElementById(divID);
	
	if (!obj.style.overflow || obj.style.overflow == "hidden"){
	    obj.innerHTML="<iframe id='definition_"+divID+"' name='definition_"+divID+"' src='http://disney.go.com/disneyatoz/familymuseum/resources/definitions/"+divID+".html' width=380 height=220 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=auto></iframe><br><br><a href='javascript:showhide(\""+divID+"\")'><strong>close</strong></a>";
		obj.style.overflow="visible";
		obj.style.visibility="visible";
	} else {
	    obj.innerHTML="";
		obj.style.overflow="hidden";
		obj.style.visibility="hidden";
	}

}



