// Old school menu to be replaced...



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++)
	{
    	d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];
	}
	}
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.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];}
}




// Menu preloader
MM_preloadImages('/client/client_images/nav_left/nav_left_over_home.gif',
				 '/client/client_images/nav_left/nav_left_over_store.gif',
				 '/client/client_images/nav_left/nav_left_over_events.gif',
				 '/client/client_images/nav_left/nav_left_over_authors_artists.gif',
				 '/client/client_images/nav_left/nav_left_over_storytelling.gif',
				 '/client/client_images/nav_left/nav_left_over_learning_center.gif',
				 '/client/client_images/nav_left/nav_left_over_company_information.gif',
				 '/client/client_images/nav_left/nav_left_over_press_room.gif');

//<!--




function open_win (pop_url, pop_width, pop_height, pop_scrollable, pop_resizeable, pop_status, pop_toolbar, pop_titlebar)
{
	// Window position
	winLeft = Math.floor((screen.width - pop_width) / 2);
	winTop =  Math.floor((screen.height - pop_height) / 2);
	
	
	// Window arguments
	var wargs_a = "width=" + pop_width + ",height=" + pop_height + ",resizable=" + pop_resizeable + ",scrollbars=" + pop_scrollable;
	var wargs_b = ",menubar=" + pop_toolbar + ",status=" + pop_status + ",titlebar=" + pop_titlebar + ",toolbar=" + pop_toolbar + ",z-lock=1,";
	var wargs_c = "location=" + pop_toolbar + ",personalbar=" + pop_titlebar + ",";
	var wargs_d = "screenX=" + winLeft + ",screenY=" + winTop + ",left=" + winLeft + ",top=" + winTop;
	var wargs = wargs_a + wargs_b + wargs_c + wargs_d;
	

	// Random name generator
	var rand_num = Math.floor(Math.random()*10000);
	//alert (rand_num);
	
	// Open the window
	var ext_window = window.open(pop_url, '1b' + rand_num, wargs);
	ext_window.focus()
}




function audioPage(theFile)
{
	var thePage = "/audio/audio_clips.cfm?au=" + theFile;
	window.open(thePage,"AUDIO", 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,height=100,width=300')
}

function clear_form_element(form_id, item_id)
{
	document.forms[form_id][item_id].value="";
}


/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2003-4 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

// NOTE: The functions called onmouseover/out plus the message variables need to be included early in the document 
// or errors will be triggered if user hovers over tooltip-activating links before page completely loaded
function doTooltip(e, msg) 
{
	if (typeof Tooltip == "undefined" || !Tooltip.ready) return;
	
	Tooltip.clearTimer();
  	Tooltip.show(e, msg);
}

function hideTip() 
{
	if (typeof Tooltip == "undefined" || !Tooltip.ready) return;
  	Tooltip.timerId = setTimeout("Tooltip.hide()", 300);
}
//-->


