var myWindow;

function openCenteredWindow(url) {
    var width = 800;
    var height = 400;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var windowFeatures = "width=" + width + ",height=" + height + ",resizable,scrollbars,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
    myWindow = window.open(url, "subWind", windowFeatures);
}


/** Riki tree menu init funct */
function rikiTreeInit(id) {
	menu = document.getElementById(id);
	if (menu == null)
		return;

	new Riki.Tree( {
		tree :id,
		compact :true,
		highlightSelectedNode :false,
		expandOnSignClick :false,
		expandOnIconClick :false,
		expandOnLabelClick :true,
		initLevel :0,
		saveState :true,
		saveId :"tree_menuid_" + id,
		theme :"riki_treeMenu",
		defaultIcons :"customIcon"
	});
}

