<!--//---------------------------------+
//  Developed by Roshan Bhattarai 
//  Visit http://roshanbh.com.np for this script and more.
//  This notice MUST stay intact for legal use
// --------------------------------->

var actMenuObject ;
var actMenuOverObject ;
$(document).ready(
	function() {
		//slides the element with class "menu_body" when mouse is over the paragraph
		$("#contleft .menu_head").mouseover(function()
	    {
			//clearTimeout($(this).data('timeout'));
			//setTimeout(function() {
			if(actMenuOverObject != this) {
				actMenuOverObject = this;
			    $(this).next("div.menu_body").slideDown(500).siblings("div.menu_body").slideUp("slow") ;
			}
		    //}, 10);
		});
		$("#contleft .menu_head").mouseout(function()
	    {
			
		});
		//slides the element with class "level_2" when mouse is over the paragraph
		$("#contcenter").mouseover(function()
	    {
			//alert(actMenuOverObject.id + " : " + actMenuObject.id);
			if(actMenuObject != null && actMenuOverObject != null) {
			    //alert(actMenuOverObject.id + " : " + actMenuObject.id);
				if( actMenuOverObject != actMenuObject) {
				    $(actMenuOverObject).siblings("div.menu_body").slideUp("slow");
				    $(actMenuObject).css({backgroundColor:"#7ca1d6"}).next("div.menu_body").slideDown(500);
				}
			}
			actMenuOverObject = this;
		}
	);
});

function setActMenuObject(objId, subObjId) {
	//alert(objId);
	actMenuObject = document.getElementById(objId);
	$(actMenuObject).css({backgroundColor:"#7ca1d6"}).next("div.menu_body").slideDown(500);
	
	if( subObjId != null ) {
		actMenuSubObject = document.getElementById(subObjId);
		actMenuSubObject.style.backgroundColor = '#e3e4e5' ; 
		actMenuSubObject.style.color = '#154594' ;
	}
}
