var wm_2_img_type = "png";
var Menues = new Array();
var Menu = new Array();

Menu[0] = new Array();//top menu information
Menu[0][0] = "menu_howTo"; //menuId
Menu[0][1] = "/images/menu/m_howto_cloud_mout.png"; //menuImage default
Menu[0][2] = "/images/menu/m_howto_cloud_movr.png"; //menuImage alternate
Menu[0][3] = new Array(); //submenu
Menu[0][3][0] = new Array(); //item information
Menu[0][3][0][0] = "How&nbsp;to&nbsp;upgrade"; //label
Menu[0][3][0][1] = "/index.aspx?product=slidingmenu&topic=howto_upgrade"; //href
Menu[0][3][0][2] = "If you upgrade from GroupedCollection to SlidingMenu, you need to read this."; //title
Menu[0][3][1] = new Array(); //item information
Menu[0][3][1][0] = "How&nbsp;to&nbsp;install"; //label
Menu[0][3][1][1] = "/index.aspx?product=slidingmenu&topic=howto_install"; //href
Menu[0][3][1][2] = "Write only zeroes in the serial number field and you have yourself a freeware license."; //title
Menu[0][3][2] = new Array();
Menu[0][3][2][0] = "How&nbsp;to&nbsp;use";
Menu[0][3][2][1] = "/index.aspx?product=slidingmenu&topic=howto_use";
Menu[0][3][2][2] = "Just drag it - but what is really happening under the hood";
Menu[0][3][3] = new Array();
Menu[0][3][3][0] = "How to code";
Menu[0][3][3][1] = "/index.aspx?product=slidingmenu&topic=howto_code";
Menu[0][3][3][2] = "Indept discussion of coding examples";
Menu[1] = new Array();
Menu[1][0] = "menu_miscellaneous";
Menu[1][1] = "/images/menu/m_miscellaneous_mout.png";
Menu[1][2] = "/images/menu/m_miscellaneous_movr.png";
Menu[1][3] = new Array();
Menu[1][3][0] = new Array();
Menu[1][3][0][0] = "History";
Menu[1][3][0][1] = "/index.aspx?product=slidingmenu&topic=history";
Menu[1][3][0][2] = "SlidingMenu development history";
Menu[1][3][1] = new Array();
Menu[1][3][1][0] = "Browser&nbsp;support";
Menu[1][3][1][1] = "/index.aspx?product=slidingmenu&topic=compatibilities";
Menu[1][3][1][2] = "Compatibilities, Uplevel and Downlevel Clients";
Menu[1][3][2] = new Array();
Menu[1][3][2][0] = "License";
Menu[1][3][2][1] = "/index.aspx?product=slidingmenu&topic=license";
Menu[1][3][2][2] = "Terms of use - freeware is also licensed";
Menu[1][3][3] = new Array();
Menu[1][3][3][0] = "Known&nbsp;errors";
Menu[1][3][3][1] = "/index.aspx?product=slidingmenu&topic=errors";
Menu[1][3][3][2] = "List of errors and error reporting";
Menu[2] = new Array();
Menu[2][0] = "menu_documentation";
Menu[2][1] = "/images/menu/m_documentation_mout.png";
Menu[2][2] = "/images/menu/m_documentation_movr.png";
Menu[2][3] = new Array();
Menu[2][3][0] = new Array();
Menu[2][3][0][0] = "Concepts";
Menu[2][3][0][1] = "/index.aspx?product=slidingmenu&topic=documentation_concepts";
Menu[2][3][0][2] = "Get a grip on the few concepts involved and you will grasp the logic faster";
Menu[2][3][1] = new Array();
Menu[2][3][1][0] = "Structures";
Menu[2][3][1][1] = "/index.aspx?product=slidingmenu&topic=documentation_structures";
Menu[2][3][1][2] = "Semi code structures as a basic description of xml tags and C# databinding 'rules'";
Menu[2][3][2] = new Array();
Menu[2][3][2][0] = "Elements";
Menu[2][3][2][1] = "/index.aspx?product=slidingmenu&topic=documentation_elements";
Menu[2][3][2][2] = "Description of all the HTML inline tags of the SlidingMenu";
Menu[2][3][3] = new Array();
Menu[2][3][3][0] = "Client API";
Menu[2][3][3][1] = "/index.aspx?product=slidingmenu&topic=documentation_clientapi";
Menu[2][3][3][2] = "Rigorous description of each object in the Client API";

function MenuBuild(){
	for (var m = 0; m < Menu.length; m++){
		var menuId = Menu[m][0];
		var indexOf_ = menuId.indexOf('_');
		var menuName = menuId.substring(indexOf_, menuId.length); //format: _[menuName]
		var str = "";
		str += '<table border="0" cellpadding="0" cellspacing="0">';
		str += '<tr><td><table border="0" cellpadding="4" cellspacing="0">';
		for (var m2 = 0; m2 < Menu[m][3].length; m2++){
			var label = Menu[m][3][m2][0];
			var href = Menu[m][3][m2][1];
			var title = Menu[m][3][m2][2];
			str += '<tr onmouseover="wm_menuShow(\''+ menuName + '\')" onmouseout="wm_menuClose()">';
			str += '<td class="menu_sub_default">-&nbsp;</td>';
			str += '<td class="menu_sub_default" onmouseover="this.className=\'menu_sub_alternate\'" onmouseout="this.className=\'menu_sub_default\'">';
			str += '<a class="menu" href="' + href + '" title="' + title + '">' + label + '</a>';
			str += '</td></tr>';
		}
		str += '</table></td></tr>';
		str += '</table>';
		var oDiv = document.createElement("DIV");
		Menues[Menues.length] = oDiv;
		oDiv.id = menuId;
		oDiv.style.position = "absolute";
		oDiv.style.top = 100;
		oDiv.style.left = 100;
		oDiv.style.visibility = "hidden";
		oDiv.style.overflowY = "hidden";
		oDiv.style.zIndex = "102";
		oDiv.style.background = "#ffffff";
	//	oDiv.style.background = "url(/images/x.gif)";
		oDiv.style.borderLeft = "#012D9A 1px solid";
		oDiv.style.borderBottom = "#012D9A 1px solid";
		oDiv.style.borderRight = "#012D9A 1px solid";
		oDiv.innerHTML = str;
		document.body.appendChild(oDiv)
		
	}
}
