/*function reloadPage(init) {  //reloads the window if window resized
   if (init==true) {
        onresize=reloadPage; }
    else
        location.reload();
}
reloadPage(true);*/


var detect = navigator.userAgent.toLowerCase();
<!--var detect = navigator.appName.toLowerCase();-->
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (checkIt('firefox')) browser = "Firefox"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

if (browser != "Internet Explorer")
{

var ScrnSize = screen.width ; 
if (ScrnSize == 800) {  
// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
 //new ypSlideOutMenu("menu name", "down", px from left, px from top, width, hieght)
	var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, 124, 178, 325)
	var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, 124, 170, 280)
	var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, 124, 170, 278)

// 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, -157); }
	myMenu2.onactivate = function() { repositionMenu(myMenu2, 19); }
	myMenu3.onactivate = function() { repositionMenu(myMenu3, 185); }	

  }
else if (ScrnSize == 1024) {  
// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
 //new ypSlideOutMenu("menu name", "down", px from left, px from top, width, hieght)
	var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, 124, 178, 325)
	var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, 124, 170, 280)
	var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, 124, 170, 278)

// 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, -157); }
	myMenu2.onactivate = function() { repositionMenu(myMenu2, 19); }
	myMenu3.onactivate = function() { repositionMenu(myMenu3, 186); }	

  }

else if (ScrnSize == 1280) {  
// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
 //new ypSlideOutMenu("menu name", "down", px from left, px from top, width, hieght)
	var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, 124, 178, 325)
	var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, 124, 170, 280)
	var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, 124, 170, 278)

// 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, -156); }
	myMenu2.onactivate = function() { repositionMenu(myMenu2, 19); }
	myMenu3.onactivate = function() { repositionMenu(myMenu3, 186); }	

  }
else if (ScrnSize > 1280) {  
// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
 //new ypSlideOutMenu("menu name", "down", px from left, px from top, width, hieght)
	var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, 124, 178, 325)
	var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, 124, 170, 280)
	var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, 124, 170, 278)

// 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, -156); }
	myMenu2.onactivate = function() { repositionMenu(myMenu2, 20); }
	myMenu3.onactivate = function() { repositionMenu(myMenu3, 186); }	

  }
  else{
// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
 //new ypSlideOutMenu("menu name", "down", px from left, px from top, width, hieght)
var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, 129, 178, 325)
var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, 129, 170, 280)
var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, 129, 170, 278)

// 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, -156); }
	myMenu2.onactivate = function() { repositionMenu(myMenu2, 20); }
	myMenu3.onactivate = function() { repositionMenu(myMenu3, 186); }	
}

}
else{
// the number you pass to initLeft doesn't matter since it will get
// changed onactivate
 //new ypSlideOutMenu("menu name", "down", px from left, px from top, width, hieght)
var myMenu1 = new ypSlideOutMenu("menu1", "down", -1000, 124, 178, 325)
var myMenu2 = new ypSlideOutMenu("menu2", "down", -1000, 124, 170, 280)
var myMenu3 = new ypSlideOutMenu("menu3", "down", -1000, 124, 170, 278)

// 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, -136); }
	myMenu2.onactivate = function() { repositionMenu(myMenu2, 39); }
	myMenu3.onactivate = function() { repositionMenu(myMenu3, 206); }	
}




// 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;
} 


//ypSlideOutMenu.writeCSS();