cm=null;
tstat=0;

aaMenus = {};

var menuHoster={
  iebody: null, //
  curmenu: null,

  fadeeffect: [false, 300], //enable Fade? [true/false, duration_milliseconds]
  useroffset: [10, 10], //additional x and y offset of tooltip from mouse cursor, respectively
  resdiv: null
}

jQuery(document).ready(function(){
	menuHoster.iebody=(document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
	$('td.main_menu_s').each(function() {
		var $target=$(this);
		$target.click();
	});
})


function show(name, el, m) {
  if (menuHoster.curmenu != null) {
    menuHoster.curmenu.hide();
    menuHoster.curmenu = null;
  }
  var $placer=$("#" + name);
  var $os=$placer.offset();
  var $sp={top: $os.top+$placer.height(), left: $os.left+$placer.width()};
  
  menuHoster.curmenu=$("#" + m);
  menuHoster.curmenu.show();
  menuHoster.curmenu.css({left: $sp.left, top: $sp.top});
  menuHoster.curmenu.animate({left: $os.left, top: $sp.top}, 1000, null); // {duration: 1500, easing: 'easeOutBounce'}
  
  return false;
}

