//////////////////////////////////////////////////////////////////////////
// positioning dropdown menus + selecting CSS external file


// HOW TO USE AND MODIFY THE POSITION COORDONATES:
// At the end of each line you see 4 numbers.
// The first two ones determine the LEFT and TOP position of each menu in the window.
// The two last ones determine the active zone of the menu list : WIDTH and HEIGHT. This zone is invisible, you can consider it as a mask. 
// In conclusion, we have: LEFT, TOP, MASK-WIDTH, MASK-HEIGHT

var agt=navigator.userAgent.toLowerCase();
var menus;
//alert("agt:" + agt);

if ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1)) {
        //alert("ie");
	menus = [
			new ypSlideOutMenu("menu1", "down", 206, 84, 190, 75),
			new ypSlideOutMenu("menu2", "down", 285, 84, 120, 110),
			new ypSlideOutMenu("menu3", "down", 370, 84, 180, 140),
			new ypSlideOutMenu("menu4", "down", 505, 84, 120, 130),
			new ypSlideOutMenu("menu5", "down", 615, 84, 180, 110),
			new ypSlideOutMenu("menu6", "down", 310, 84, 190, 75),
			new ypSlideOutMenu("menu7", "down", 404, 84, 120, 100),
			new ypSlideOutMenu("menu8", "down", 501, 84, 180, 140),
			new ypSlideOutMenu("menu9", "down", 647, 84, 190, 140),
			new ypSlideOutMenu("menu11", "down", 206, 84, 190, 75),
			new ypSlideOutMenu("menu12", "down", 270, 84, 120, 110),
			new ypSlideOutMenu("menu13", "down", 340, 84, 180, 140),
			new ypSlideOutMenu("menu14", "down", 470, 84, 120, 130),
			new ypSlideOutMenu("menu15", "down", 615, 84, 180, 110)		
	];
} else {
        //alert("other");
	menus = [
		new ypSlideOutMenu("menu1", "down", 211, 84, 190, 75),
		new ypSlideOutMenu("menu2", "down", 285, 84, 120, 110),
		new ypSlideOutMenu("menu3", "down", 370, 84, 180, 140),
		new ypSlideOutMenu("menu4", "down", 505, 84, 120, 130),
		new ypSlideOutMenu("menu5", "down", 615, 84, 180, 110),
		new ypSlideOutMenu("menu6", "down", 317, 84, 190, 75),
		new ypSlideOutMenu("menu7", "down", 404, 84, 120, 100),
		new ypSlideOutMenu("menu8", "down", 501, 84, 180, 140),
		new ypSlideOutMenu("menu9", "down", 647, 84, 190, 140),
		new ypSlideOutMenu("menu11", "down", 211, 84, 190, 75),
		new ypSlideOutMenu("menu12", "down", 270, 84, 120, 110),
		new ypSlideOutMenu("menu13", "down", 340, 84, 180, 140),
		new ypSlideOutMenu("menu14", "down", 470, 84, 120, 130),
		new ypSlideOutMenu("menu15", "down", 615, 84, 180, 110)		
	];
}

	
for (var i = 0; i < menus.length; i++) {
		menus[i].onactivate = new Function("document.getElementById('act" + i + "').className='active';");
		menus[i].ondeactivate = new Function("document.getElementById('act" + i + "').className='';");
	}