function showMenu(_obj){
var x=_obj.offsetLeft;
W=_obj.offsetWidth
w=_obj.getElementsByTagName("ul")[0].offsetWidth
_obj.getElementsByTagName("ul")[0].style.left="130px";
}
function menuFix() {
var sfEls = document.getElementById("mainNav").getElementsByTagName("li");
 for (var i=0; i<sfEls.length; i++) {
  if (sfEls[i].parentNode.id=="mainNav"){
    sfEls[i].onmouseover=function() {showMenu(this)}
    sfEls[i].onMouseDown=function() {showMenu(this)}
    sfEls[i].onMouseUp=function() {showMenu(this)}
    sfEls[i].onmouseout=function() {
    this.className=this.getElementsByTagName("ul")[0].style.left="-999px";
    }
  }
 }
}
window.onload=menuFix;