
var menus = [
    n1 = new ypSlideOutMenu("menu1", "down", 0, 0, 100, 230),   //voyages
    n2 = new ypSlideOutMenu("menu2", "down", 0, 0, 110, 230),    //centres
    n3 = new ypSlideOutMenu("menu3", "down", 0, 0, 110, 230),    //centres
    ]

ypSlideOutMenu.writeCSS();

window.onload = function()
{
    if(!document.getElementById || !document.createTextNode)
    {
        return;
    }
    
    for (var i = 0; i < menus.length; i++)
    {
        menus[i].onactivate = new Function("document.getElementById('nav" + (i+1) + "').className='active';");
        menus[i].ondeactivate = new Function("document.getElementById('nav" + (i+1) + "').className='';");
        
        if (document.getElementById('nav' + (i+1)) != null)
        {
            document.getElementById('nav' + (i+1)).onmouseover = new Function("ypSlideOutMenu.showMenu('menu" + (i+1) + "');");
            document.getElementById('nav' + (i+1)).onmouseout = new Function("ypSlideOutMenu.hideMenu('menu" + (i+1) + "');");
        }
    }

    /*
    document.getElementById('main_photo').onclick = function() { return false; }
    document.getElementById('main_text').onclick = function() { return false; }
    
    var shown = new Array();
    
    document.getElementById('toggle').onclick = function() { toggle(99); return false; } ;
    
		function toggle(idthing){
			if(shown[idthing]==1){
				shown[idthing] = 0;
				document.getElementById('t'+idthing).style.display = "none";
				document.getElementById('i'+idthing).style.display = "block";
                document.getElementById('t'+idthing+'2').style.display = "block";
                
			}else{
				shown[idthing] = 1;
                iterateExternal();
				document.getElementById('t'+idthing).style.display = "block";
				document.getElementById('i'+idthing).style.display = "none";
                document.getElementById('t'+idthing+'2').style.display = "none";
                
			}
		}
        
        function iterateExternal()
        {
            if (!document.getElementsByTagName)
            {
                return;
            }
            
            var anchors = document.getElementsByTagName("a");
            
            for (var i = 0; i < anchors.length; i++)
            {
                var anchor = anchors[i];
                
                if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
                {
                anchor.onclick = function () { popup(this.getAttribute("href"), 350, 500); return false; };
                }
            }
        }
        
        function popup(popurl, wwidth, wheight)
        {
            var popWindow = window.open(popurl,"popup","width="+wwidth+",height="+wheight+",status,scrollbars,resizable");
            popWindow.focus();
            return popWindow;
        }
        */
}