


var W3CDOM = (document.createElement && document.getElementsByTagName);

function init () {
	if (!W3CDOM) return;
	page_height ();
	OpenActiveMenu ();
}

if (window.attachEvent) {
	window.attachEvent('onload', init);
} else if (window.addEventListener) {
	window.addEventListener('load', init, false);
}

/********* height of #menu_div ***********/

function page_height () {
	if (document.getElementById('right_td')){
	
		window_h = (window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight));
		if (document.getElementById('right_td').offsetHeight > (window_h - 390)){
		document.getElementById('menu_div').style.height = 'auto';
		}
	}
	else return;
}

function OpenActiveMenu () {
    var lid = document.getElementById ('active_item_menu_vert');
    if (lid) {
	    plid = lid.parentNode;
	    if (plid && plid.tagName == "UL")  {
		plid.style.display = "block"; 

		
//OpenLeftMenu(plid);
	    }

    		var pplid=lid.parentNode.parentNode.parentNode;
		pplid.style.display = "block"; 	    		
    }

//		alert(pplid.tagName);

}
