// JavaScript Document

function showmenu()
{
	var xmlHttpReq = null;
	var responseTxt = "";

	if (window.XMLHttpRequest)
		xmlHttpReq = new XMLHttpRequest();
	else if (window.ActiveXObject)
		xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");

	if (xmlHttpReq.overrideMimeType)
		xmlHttpReq.overrideMimeType('text/html');

	xmlHttpReq.open('GET', '/ui/public/productsmenu.php', true);
	xmlHttpReq.onreadystatechange = function()
	{
		if (xmlHttpReq.readyState == 4)
		{
			if(xmlHttpReq.status == 200)
			{
				var w = document.createElement("divinfo");
				var url = "/ui/public/productsmenu.php";

				var html = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
				html += "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
				html += "<head>";
				html += "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
				html += "</head>";
				html += "<body>";

				responseTxt = xmlHttpReq.responseText;

				html += responseTxt;
				html += "</body>";
				html += "</html> ";
				w.innerHTML = html;
				w.style.position = "absolute";
				w.setAttribute("id", "divinfo");
				w.style.top = "130px";
				w.style.backgroundColor = "#F8F8F8";
				/*w.style.left = "422px";*/

				if ((screen.width>=800) && (screen.height>=600))
					w.style.left = "180px";

				if ((screen.width>=1024) && (screen.height>=768))
					w.style.left = "290px";

				if ((screen.width>=1152) && (screen.height>=864))
					w.style.left = "360px";

				if ((screen.width>=1280) && (screen.height>=720))
					w.style.left = "420px";

				if ((screen.width>=1280) && (screen.height>=768))
					w.style.left = "420px";

				if ((screen.width>=1280) && (screen.height>=960))
					w.style.left = "422px";

				if ((screen.width>=1280) && (screen.height>=1024))
					w.style.left = "420px";
					
				
				/*if (parseInt(navigator.appVersion)>3) {
				 if (navigator.appName=="Netscape") {
				  winW = window.innerWidth-16;
				  winH = window.innerHeight-16;
				 }
				 if (navigator.appName.indexOf("Microsoft")!=-1) {
				  winW = document.body.offsetWidth-20;
				  winH = document.body.offsetHeight-20;
				 }
				}

				w.style.left = ((winW / 2) - 200) + "px";*/

				w.style.width = "200px";
				document.forms[0].appendChild(w);
			}
		}
	}
	xmlHttpReq.send(null);

}
function hideMenu()
	{
		var divinfo = document.getElementById("divinfo");
		if(divinfo != null)
			document.forms[0].removeChild(divinfo);
}