// identify objects for hiding  & showing layers
function MM_findObj(n, d) { //v3.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); return x;
}

function tmt_findObj(n){
	var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
	x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
	}else{x=document.getElementById(n)}return x;
}
// hide and show layers
function MM_showHideLayers() { //v3.0A Modified by Al Sparber and Massimo Foti for NN6 Compatibility
  var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){
   for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
   v=(v=='show')?'visible':(v='hide')?'hidden':v;
   if(obj)obj.style.visibility=v;}} else{
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }}
}

function loadMainNavRollovers(root) {
	if (document.images) {
		navoff = new Array();
		navon = new Array();

		navoff['menu1nav'] = new Image();
		navoff['menu1nav'].src = root + "http://disney.go.com/investors/annual00/images/spacer.gif";
		navon['menu1nav'] = new Image();
		navon['menu1nav'].src = root + "http://disney.go.com/investors/annual00/images/menu1.gif";

		navoff['menu2nav'] = new Image();
		navoff['menu2nav'].src = root + "http://disney.go.com/investors/annual00/images/spacer.gif";
		navon['menu2nav'] = new Image();
		navon['menu2nav'].src = root + "http://disney.go.com/investors/annual00/images/menu2.gif";

		navoff['menu3nav'] = new Image();
		navoff['menu3nav'].src = root + "http://disney.go.com/investors/annual00/images/spacer.gif";
		navon['menu3nav'] = new Image();
		navon['menu3nav'].src = root + "http://disney.go.com/investors/annual00/images/menu3.gif";

		navoff['menu4nav'] = new Image();
		navoff['menu4nav'].src = root + "http://disney.go.com/investors/annual00/images/spacer.gif";
		navon['menu4nav'] = new Image();
		navon['menu4nav'].src = root + "http://disney.go.com/investors/annual00/images/menu4.gif";

		navoff['navhome'] = new Image();
		navoff['navhome'].src = root + "http://disney.go.com/investors/annual00/images/spacer.gif";
		navon['navhome'] = new Image();
		navon['navhome'].src = root + "http://disney.go.com/investors/annual00/images/spacer.gif";
		
	}
}


	loadMainNavRollovers("");

function turn_mainnavon(id) {
	if (document.images) {
		document.images[id].src = navon[id].src;			
	}
}

function reset_mainnavimages(id){
	if (document.images) {
		if (id == 'all') {
			document.images['menu1nav'].src = navoff['menu1nav'].src;
			document.images['menu2nav'].src = navoff['menu2nav'].src;
			document.images['menu3nav'].src = navoff['menu3nav'].src;
			document.images['menu4nav'].src = navoff['menu4nav'].src;
			document.images['navhome'].src = navoff['navhome'].src;
		}
		else document.images[id].src = navoff[id].src;
	}
}

// netscape resize bug handler
NS4 = document.layers;
if (NS4) {
	origWidth = innerWidth;
	origHeight = innerHeight;
}

function reDo() {
   if (innerWidth != origWidth || innerHeight != origHeight) 
      location.reload();
}

if (NS4) onresize = reDo;
