
// ======================================================================
// page redirect
var pageRedirect = function(pageUrl){
  
  var url = pageUrl;
  
  window.location = url;
  
  
};





// ****** opens link in popup window
 function openWin(url) { 
    topL=130;
    leftL=40;
    width=540;
    height=410;    
    bar=1;      
    wName='popUp';
    width = (arguments.length>1)?arguments[1]:width; // option to pass in width
    bar = (arguments.length>2)?arguments[2]:bar; // option to turn scrollbar on
    wName = (arguments.length>3)?arguments[3]:wName; // option to pass in window name 
    height = (arguments.length>4)?arguments[4]:height; // option to pass in height       
    
    var str="toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+ bar +",width="+ width +",height="+ height +",screenX="+ leftL +",screenY="+ topL +",left="+ leftL +",top="+ topL +",resizable=1";
    var Pwin = window.open(url,wName,str,true)
    Pwin.focus();

}


/* moved here from flash_intro.xsl */
var movieName = "courses";
  function thisMovie(movieName) {
    // IE and Netscape refer to the movie object differently.
    // This function returns the appropriate syntax depending on the browser.
    if (navigator.appName.indexOf ("Microsoft") !=-1) {
      return window[movieName]
    } else {
      return document[movieName]
    }
  }
  // Checks if movie is completely loaded.
  // Returns true if yes, false if no.
  function movieIsLoaded (theMovie) {
    // First make sure the movie's defined.
    if (typeof(theMovie) != "undefined") {
      // If it is, check how much of it is loaded.
      return theMovie.PercentLoaded() == 100;
    } else {
      // If the movie isn't defined, it's not loaded.
      return false;
    }
  }
  function golabel(label) {
    if (movieIsLoaded(thisMovie(movieName))) {
      thisMovie(movieName).TGotoLabel("_level0/",label);
    }
  }
  function playmovie() {
    if (movieIsLoaded(thisMovie(movieName))) {
      thisMovie(movieName).Play();
    }
  }
  
  
  var Menu = {
    init:function() {
      var sfEls = $$('.find-a-course')[0];
      
      if(sfEls){
      
      sfEls.onmouseover=function() {
        
        $('flyout-menu').show();
        
      }
         
      sfEls.onmouseout=function() {
        $('flyout-menu').hide();
        
      }
        //$('flyout-menu').className = $('flyout-menu').className.replace(new RegExp(" sfhover\\b"), "");
      
      }
      
    }
  };
  
  
  Event.observe(window, 'load', function() {
     Menu.init(); 
  });

