﻿sfHover = function() 
{ 
    var sfEls = document.getElementById("navbar").getElementsByTagName("LI"); 
    
    for (var i = 0; i < sfEls.length; i++) 
    { 
        sfEls[i].onmouseover = function() 
        { 
            var list = this.getElementsByTagName("UL")[0]; 
            
            if (list) 
            { 
                list.style.left = "auto"; 
            } 
        }; 
        
        sfEls[i].onmouseout = function() 
        { 
            var list = this.getElementsByTagName("UL")[0]; 
            
            if (list) 
            { 
                list.style.left = "-999em"; 
            } 
        } 
    } 
}; 

if (window.attachEvent) 
{ 
    window.attachEvent("onload", sfHover); 
} 

if (window.addEventListener) 
{ 
    window.addEventListener("load", sfHover, false); 
};