var menus = [
    n1 = new ypSlideOutMenu("menu1", "down", 0, 0, 121, 185),   //Home
    n2 = new ypSlideOutMenu("menu2", "down", 0, 0, 121, 185),    //Schools
    n3 = new ypSlideOutMenu("menu3", "down", 0, 0, 121, 30),   //Course Structure
    n4 = new ypSlideOutMenu("menu4", "down", 0, 0, 105, 90),     //Course Package
    n5 = new ypSlideOutMenu("menu5", "down", 0, 0, 113, 158),   //How to Book
    n6 = new ypSlideOutMenu("menu6", "right", 0, 0, 258, 900),    //misc. list
    n7 = new ypSlideOutMenu("menu7", "right", 0, 0, 258, 900)    //misc. list
    ]

ypSlideOutMenu.writeCSS();

window.onload = function()
{
    if(!document.getElementById || !document.createTextNode)
    {
        return;
    }
    
    
    
    //if(document.getElementById('domnews') != null)
    //{
    //    initDOMnews();
    //}
    
    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; }
    
    externalLinks();
}
/* stop scroller when window is closed */
//window.onunload = function()
//{
//    if(document.getElementById('domnews') != null)
//    {
//        clearInterval(dn_interval);
//    }
//}
