function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
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 openSubWin(url, nm, x, y, w, h, atts) {
nm = nm || "subwindow";
atts = atts || "menubar,resizable,scrollbars";
w = w || 600; h = h || 450;
x = (typeof x=="number")? x: window.opera? 100: Math.round( (screen.availWidth - w)/2 );
y = (typeof y=="number")? y: window.opera? 20: Math.round( (screen.availHeight - h)/2 );
atts += ',width='+w+',height='+h+',left='+x+',top='+y;
var win = window.open(url, nm, atts); 
if (win) {
if (!win.closed) { win.resizeTo(w,h); win.moveTo(x,y); win.focus(); return false; }
} 
return true;
}
// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
var myMenu1 = new ypSlideOutMenu("menu1", "down", -800, 84, 400,600)
var myMenu2 = new ypSlideOutMenu("menu2", "down", 0, 84, 100,200)
// for each menu, we set up hte onactivate event to call repositionMenu with the amount offset from center, in pixels
myMenu1.onactivate = function() { repositionMenu(myMenu1, -112); }
myMenu2.onactivate = function() { repositionMenu(myMenu2, -8); }
// this function repositions a menu to the speicified offset from center
function repositionMenu(menu, offset)
{
// the new left position should be the center of the window + the offset
var newLeft = getWindowWidth() / 2 + offset;
// setting the left position in netscape is a little different than IE
menu.container.style ? menu.container.style.left = newLeft + "px" : menu.container.left = newLeft;
}
// this function calculates the window's width - different for IE and netscape
function getWindowWidth()
{
return window.innerWidth ? window.innerWidth : document.body.offsetWidth;
}
