function wait(msecs)
{
	var start = new Date().getTime();
	var cur = start
	while(cur - start < msecs)	{
		cur = new Date().getTime();
	}
}



function horizontal() {

	var navItems = document.getElementById("menu_dropdown").getElementsByTagName("li");
	for (var i=0; i< navItems.length; i++) {
					
		if(navItems[i].className.search("submenu") != -1) {
			if(navItems[i].getElementsByTagName('ul')[0] != null) {
				navItems[i].onmouseover=function() {this.getElementsByTagName('ul')[0].style.display="block";}
				navItems[i].onmouseout=function() {wait(100); this.getElementsByTagName('ul')[0].style.display="none";}
			}
		}
	}
}

$(function()
{
	$('.scroll-pane').jScrollPane({ showArrows:true, scrollbarWidth:21, scrollbarMargin:30, topCapHeight:0, bottomCapHeight:0, reinitialiseOnImageLoad: true });
});

function print_r(theObj){
  if(theObj.constructor == Array ||
     theObj.constructor == Object){
    document.write("<ul>")
    for(var p in theObj){
      if(theObj[p].constructor == Array||
         theObj[p].constructor == Object){
document.write("<li>["+p+"] => "+typeof(theObj)+"</li>");
        document.write("<ul>")
        print_r(theObj[p]);
        document.write("</ul>")
      } else {
document.write("<li>["+p+"] => "+theObj[p]+"</li>");
      }
    }
    document.write("</ul>")
  }
}


	
