
function showTeamLogixMenu() {
	el = document.getElementById('btTeamLogix');
	w = el.offsetWidth;
	h = el.offsetHeight;
	x = findPosX(el);
	y = findPosY(el);
	el=document.getElementById("menuTeamLogix");
	if (!el)
	{
		menuTxt = "";
//        menuTxt += "<a href='index.php?n=distributor&o=login&mode=distributor'>DISTRIBUTOR’S ROOM</a>";
        menuTxt += "<a href='index.php?n=distributor&o=documents&mode=distributor'>MARKETING LIBRARY</a>";
//		menuTxt += "<a href='index.php?n=staff&o=login&mode=staff'>STAFF ROOM</a>";
        menuTxt += "<a href='index.php?n=newsletters&o=main&mode=distributor'>NEWSLETTERS</a>";
        menuTxt += "<a href='index.php?n=news&o=main&mode=distributor'>NEWS</a>";
		menuTxt += "<a href='index.php?n=builder&o=careers'>CAREERS</a>";
//		menuTxt += "<a href='http://adwear.ca/Merchant2/merchant.mvc?Screen=SFNT&Store_Code=Logix' target='_blank'>LOGIX GEAR</a>";
		menuTxt += "<a href='http://www.logix.uk.com/' target='_blank'>LOGIX UK</a>";
		menuTxt += "<a href='index2.php'>SITE ADMINISTRATION</a>";
		el = document.createElement("div");
		el.id = "menuTeamLogix";
		el.innerHTML = menuTxt;
		el.style.top = (y + h) + "px";
		el.style.left = x + "px";
		bdy = document.getElementsByTagName("body");
		bdy[0].appendChild(el);
	}
	el.style.display = 'inline';
	el.onmouseout = hideTeamLogixMenu;
	el.onmouseover = showTeamLogixMenu;
}

function hideTeamLogixMenu() {
	el=document.getElementById("menuTeamLogix");
	if (el)el.style.display = "none";
}

function showEventsMenu() {
	el = document.getElementById('btEvents');
	w = el.offsetWidth;
	h = el.offsetHeight;
	x = findPosX(el);
	y = findPosY(el);
	el=document.getElementById("menuEvents");
	if (!el)
	{
		menuTxt = "<a href='index.php?n=news&mode=construction'>NEWS</a>";
		menuTxt += "<a href='index.php?n=events&type=show'>SHOWS</a>";
		menuTxt += "<a href='index.php?n=events&type=training'>TRAINING</a>";
//		menuTxt += "<a href='index.php?n=events&type=meeting'>MEETINGS</a>";
		el = document.createElement("div");
		el.id = "menuEvents";
		el.innerHTML = menuTxt;
		el.style.top = (y + h) + "px";
		el.style.left = x + "px";
		bdy = document.getElementsByTagName("body");
		bdy[0].appendChild(el);
	}
	el.style.display = 'inline';
	el.onmouseout = hideEventsMenu;
	el.onmouseover = showEventsMenu;
}

function hideEventsMenu() {
	el=document.getElementById("menuEvents");
	if (el)el.style.display = "none";
}

function showDistributorsMenu() {
	el = document.getElementById('btDistributors');
	w = el.offsetWidth;
	h = el.offsetHeight;
	x = findPosX(el);
	y = findPosY(el);
	el=document.getElementById("menuDistributors");
	if (!el)
	{
		menuTxt = "<table cellpadding=0 cellspacing=0 border=0 width='200'><tr><td width=8>&nbsp;</td><td class='menuCell' width='190'>";
		menuTxt += "<a href='index.php?o=page&id=value-selling'>VALUE SELLING WITH LOGIX</a>";
		menuTxt += "<a href='index.php?o=page&id=bracing-requirements'>BRACING REQUIREMENTS</a>";
//		menuTxt += "<a href='index.php?n=distributor&o=page'>STOCKING REQUIREMENTS</a>";
		menuTxt += "<a href='index.php?o=page&id=distributor-support'>SUPPORT FROM LOGIX</a>";
		menuTxt += "</td></tr></table>";
		el = document.createElement("div");
		el.id = "menuDistributors";
		el.innerHTML = menuTxt;
		el.style.top = (y) + "px";
		el.style.left = (x + w) + "px";
		bdy = document.getElementsByTagName("body");
		bdy[0].appendChild(el);
	}
	el.style.display = 'inline';
	el.onmouseout = hideDistributorsMenu;
	el.onmouseover = showDistributorsMenu;
}

function hideDistributorsMenu() {
	el=document.getElementById("menuDistributors");
	if (el)el.style.display = "none";
}

function showResourcesMenu() {
	el = document.getElementById('btResources');
	w = el.offsetWidth;
	h = el.offsetHeight;
	x = findPosX(el);
	y = findPosY(el);
	el=document.getElementById("menuResources");
	if (!el)
	{
		menuTxt = "<table cellpadding=0 cellspacing=0 border=0 width='200'><tr><td width=8>&nbsp;</td><td class='menuCell' width='190'>";
        menuTxt += "<a href='index.php?n=owner&o=brochures'>RESIDENTIAL BROCHURES</a>";
        menuTxt += "<a href='index.php?n=resources&o=estimating'>ESTIMATING</a>";
		menuTxt += "<a href='index.php?n=resources&o=installation'>INSTALLATION VIDEOS</a>";
        menuTxt += "<a href='index.php?n=resources&o=alignment'>ALIGNMENT & SCAFFOLDING</a>";
		menuTxt += "<a href='index.php?n=resources&o=training'>TRAINING INFORMATION</a>";
        menuTxt += "<a href='index.php?o=page&id=msds'>MSDS</a>";
		menuTxt += "<a href='index.php?n=library&o=main&cat=12'>SUPPORTING PRODUCTS</a>";
		menuTxt += "</td></tr></table>";
		el = document.createElement("div");
		el.id = "menuResources";
		el.innerHTML = menuTxt;
		el.style.top = (y) + "px";
		el.style.left = (x + w) + "px";
		bdy = document.getElementsByTagName("body");
		bdy[0].appendChild(el);
	}
	el.style.display = 'inline';
	el.onmouseout = hideResourcesMenu;
	el.onmouseover = showResourcesMenu;
}

function hideResourcesMenu() {
	el=document.getElementById("menuResources");
	if (el)el.style.display = "none";
}

function showGreenMenu() {
	chk = getQueryVariable("mode");
	if (chk == "green") ;return true;
	el = document.getElementById('btGreen');
	w = el.offsetWidth;
	h = el.offsetHeight;
	x = findPosX(el);
	y = findPosY(el);
	el=document.getElementById("menuGreen");
	if (!el)
	{
		menuTxt = "<table cellpadding=0 cellspacing=0 border=0 width='200'><tr><td width=8>&nbsp;</td><td class='menuCell' width='190'>";
		menuTxt += "<a href='index.php?o=page&id=green-info&mode=green'>BUILDING GREEN</a>";
		menuTxt += "<a href='index.php?o=page&id=green-high-impact&mode=green'>HIGH IMPACT GREEN</a>";
		menuTxt += "<a href='index.php?o=page&id=greenbate&mode=green'>ENVIRONMENT</a>";
        menuTxt += "<a href='index.php?o=page&id=green-awards&mode=green'>GREEN AWARDS</a>";
//        menuTxt += "<a href='index.php?o=page&id=green-projects&mode=green'>GREEN PROJECTS</a>";
		menuTxt += "<a href='index.php?o=green-resources&mode=green'>RESOURCES</a>";
		menuTxt += "</td></tr></table>";
		el = document.createElement("div");
		el.id = "menuGreen";
		el.innerHTML = menuTxt;
		el.style.top = (y) + "px";
		el.style.left = (x + w) + "px";
		bdy = document.getElementsByTagName("body");
		bdy[0].appendChild(el);
	}
	el.style.display = 'inline';
	el.onmouseout = hideGreenMenu;
	el.onmouseover = showGreenMenu;
}

function hideGreenMenu() {
	el=document.getElementById("menuGreen");
	if (el)el.style.display = "none";
}
