rootsAjax=new Array();
rootsAjax['default'] = 'navig_menu_3.php?key=';
menuOptions=new Array();
closeMenu=new Array();
nowLoading='';
reallyHideTriangle=new Array();
shownMenus=new Array();
loadedMenus=new Array();
var agt=navigator.userAgent.toLowerCase();
var m_is_ie;
if((typeof navigator.vendor!="undefined" && navigator.vendor=="KDE")||(agt.indexOf('webtv')!=-1)||(typeof window.opera!="undefined")) {
m_is_ie=0;
} else if(typeof document.all!="undefined") {
m_is_ie=1;
} else {
m_is_ie=0;
}
function setRoots(ajaxUrl,rootKey) {
var key = 'default';
if(rootKey) {
key=rootKey;
}
rootsAjax[key]=ajaxUrl;
}
function setOption(option,val) {
menuOptions[option]=val;
if((agt.indexOf('win')==-1)&&(option=='has_flash')) {
menuOptions['linux_flash']=val;
}}
function makeRequest(url,element,rootKey,type) {
var httpRequest;
var elm=element;
showNotice(elm);
if (window.XMLHttpRequest) { 
httpRequest=new XMLHttpRequest();
}
else if (window.ActiveXObject) { 
try {
httpRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
httpRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}}}
if (!httpRequest) {
return false;
}
httpRequest.onreadystatechange=function() {
processData(httpRequest,elm,rootKey,type);
};
httpRequest.open('GET', url, true);
httpRequest.send('');
}
function showNotice(e) {
return; 
var txt = document.createTextNode('...\u00a0loading\u00a0menu\u00a0...');
e.appendChild(txt);
}
function removeNotice(e) {
return; 
var c=e.childNodes;
var n;
for(i in c) {
n=c.item(i);
if(n.nodeType == 3 && n.nodeValue == '...\u00a0loading\u00a0menu\u00a0...') {
e.removeChild(n);
return;
}}}
function processData(httpRequest,element,rootKey,type) {
if (httpRequest.readyState==4) {
if (httpRequest.status==200) {
removeNotice(element);
fillElementMain(httpRequest.responseXML,element,rootKey,type);
} else {
return false;
}}}
function fillElementEin(dataNode,element,rootKey) {
switch (element.menuDepth) {
case 0:
element.style.width = '710px';
drawNodeMenu(dataNode, element, rootKey, 'menuSubDivDark', 'menuSubLinkDark', 'ein');
break;
case 1:
var placeholder = document.createElement('SPAN');
element.appendChild(placeholder);
var itms = drawNodeMenu(dataNode, element, rootKey, 'firstChoiceDiv', 'firstChoiceLink', 'ein');
var defaultDiv = document.createElement('DIV');
defaultDiv.id = element.id + ':default';
var title = dataNode.getAttribute('t');
if(title == undefined || title == 'Regions') {
title = 'Countries';
}
if(itms==0) {
drawLeafMenu(dataNode, defaultDiv, rootKey, '', 430, title);
} else {
drawLeafMenu(dataNode, defaultDiv, rootKey, '172px', 330, title);
}
element.replaceChild(defaultDiv,placeholder);
break;
case 2:
drawLeafMenu(dataNode, element, rootKey, '172px', 330); 
break;
default:
return false;
break;
}}
function fillElementMain(xmlDoc,element,rootKey,type) {
if(xmlDoc==undefined) {
return false;
}
var items = xmlDoc.getElementsByTagName('m');
if(items.item(0)==undefined) {
return false;
}
var dataNode=items.item(0);
if(!type || type == undefined || type.match('undef')) {
type = 'old';
}
if(type != 'old') {
var level = dataNode.getAttribute('lvl');
switch(level) { 
case '1':
type = 'one';
break;
case '2':
type = 'two';
break;
}}
switch(type) {
case 'ein': 
fillElementEin(dataNode,element,rootKey);
break;
case 'two': 
fillElementTwo(dataNode,element,rootKey);
break;
case 'one': 
fillElementOne(dataNode,element,rootKey);
break;
case 'old': //old blue menu (or unspecified type)
default:
fillElementOld(dataNode,element,rootKey);
break;
}
if(element.id==nowLoading) nowLoading=null; 
}
function fillElementOne(dataNode,element,rootKey) {
var defaultDiv = document.createElement("DIV");
defaultDiv.id = element.id + ":default";
var title = dataNode.getAttribute("t");
var dataW = dataNode.getAttribute("w");
dataW-=0;
if(dataW > 35) {
var width=550;
}else{
var width=430;
}
if( title != undefined && title.match("[Pp][Ii][Cc][Kk]")) {
width=230;
}
drawLeafMenu(dataNode, defaultDiv, rootKey, '', width);
element.style.width = (width + 30) + 'px';
element.appendChild(defaultDiv);
}
function fillElementTwo(dataNode,element,rootKey) {
switch (element.menuDepth) {
case 0:
element.style.width = '710px';
drawNodeMenu(dataNode, element, rootKey, 'menuSubDivDark', 'menuSubLinkDark', 'two');
break;
case 1:
var defaultDiv = document.createElement('DIV');
defaultDiv.id = element.id + ':default';
defaultDiv.leftInPx=element.leftInPx;
drawLeafMenu(dataNode, defaultDiv, rootKey, '', 500,'Choose a Topic');
element.appendChild(defaultDiv);
break;
default:
return false;
break;
}}
function getLinksRoot(dataNode) {
var linksRoot = dataNode.getAttribute('r');
if(! linksRoot) {
linksRoot = '';
}
return linksRoot;
}
function getMagicConst(maxWidth) {
magicConst=1.3;
if(maxWidth >=70) {
magicConst=0.8;
} else if(maxWidth >=40) {
magicConst=0.9;
} else if(maxWidth >=26) {
magicConst=1;
} else if(maxWidth >=20) {
magicConst=1.1;
} else if(maxWidth >=15) {
magicConst=1.2;
}
return magicConst;
}
function getColCount(l) {
if(l <=20) {
return 10;
}
if(l <=35) {
return 12;
}
return 15;
}
function drawNodeMenu(dataNode,element,rootKey,divStyle,linkStyle,type) {
var linksRoot=getLinksRoot(dataNode);
var oneItem=dataNode.firstChild;
var myId = element.getAttribute('id');
var subTitle = dataNode.getAttribute('t');
var maxWidth = dataNode.getAttribute('w');
maxWidth-=0;
if(! maxWidth) {
maxWidth=20;
}
var magicConst=getMagicConst(maxWidth);
var disableEvent;
var itemCount=0;
var linkWidth;
if(divStyle == 'firstChoiceDiv') {
disableEvent=true;
linkWidth=170;
} else {
disableEvent=false;
linkWidth=Math.ceil(maxWidth * magicConst * 7);
}
if(subTitle != undefined && subTitle != '') { 
var titleDiv = document.createElement("DIV");
titleDiv.setAttribute('class','subCatTitle');
titleDiv.setAttribute('className','subCatTitle');
var titleText=document.createTextNode(subTitle);
titleDiv.appendChild(titleText);
element.appendChild(titleDiv);
}
while(oneItem !=null && oneItem !=undefined) { 
if(oneItem.nodeType==1) {
if(oneItem.nodeName == 's') {
itemCount++;
var subMenuName = escape(oneItem.getAttribute('i'));
var linkTarget = oneItem.getAttribute('l');
if(! linkTarget) {
linkTarget = '#';
} else {
if(! linkTarget.match(/^https?:\/\//)) {
linkTarget=linksRoot+linkTarget;
}}
var link = document.createElement('A');
link.linkSubMenuName=subMenuName;
link.linkMenuName=myId;
link.rootKey=rootKey;
link.menuType=type;
link.setAttribute('href', linkTarget);
link.setAttribute('class', linkStyle);
link.setAttribute('className', linkStyle);
if(disableEvent !=true) {
if(link.attachEvent) { 
link.attachEvent('onmouseover', function(e) {
show_menu(e.srcElement.linkSubMenuName,e.srcElement.linkMenuName,e.srcElement.rootKey,e.srcElement.menuType);
});
} else if(link.addEventListener) { 
link.addEventListener('mouseover', function() {
show_menu(this.linkSubMenuName,this.linkMenuName,this.rootKey,this.menuType);
},false);
}}
var liText = document.createTextNode('');
liText.nodeValue = oneItem.getAttribute('t');
link.appendChild(liText);
link.style.width = linkWidth + 'px';
if(disableEvent !=true) {
var div = document.createElement('DIV');
var zi=element.style.zIndex;
if(! zi) {
zi=100;
} else {
zi+=1;
}
div.style.zIndex=zi;
div.style.top = '0px';
div.style.left = (linkWidth + 9) + 'px';
div.leftInPx=linkWidth+9;
div.myName=subMenuName;
div.id=subMenuName;
div.upperElementId = element.getAttribute('id');
div.setAttribute('class', divStyle);
div.setAttribute('className', divStyle);
if(div.attachEvent) { //MICRO$OFT
div.attachEvent('onmouseout', function(e) {
var src=e.srcElement;
while(src.myName==undefined) {
src=src.parentNode;
}
leaving_element(src.myName);
});
div.attachEvent('onmouseover', function(e) {
var src=e.srcElement;
while(src.myName==undefined) {
src=src.parentNode;
}
show_element_by_id_recursive(src.myName);
});
} else if(div.addEventListener) { 
div.addEventListener('mouseout', function() {
leaving_element(this.myName);
},false);
div.addEventListener('mouseover', function() {
show_element_by_id(this.myName);
},false);
}
element.appendChild(div);
}
element.appendChild(link);
}} //of nodeType==1
oneItem=oneItem.nextSibling;
}
return itemCount;
}
function drawLeafMenu(dataNode,element,rootKey,styleLeft,boxWidth,forceTitle) {
var linksRoot=getLinksRoot(dataNode);
var oneItem=dataNode.firstChild;
var myId = element.getAttribute('id');
element.setAttribute('class','firstChoiceDiv');
element.setAttribute('className','firstChoiceDiv');
if(styleLeft != undefined && styleLeft != '') {
element.style.left=styleLeft;
}
var subTitle;
if(forceTitle != undefined && forceTitle != '') { 
subTitle=forceTitle;
} else {
subTitle = dataNode.getAttribute('t');
}
if(subTitle != undefined && subTitle != '') { 
var titleDiv = document.createElement("DIV");
titleDiv.setAttribute('class','subCatTitle');
titleDiv.setAttribute('className','subCatTitle');
var titleText=document.createTextNode(subTitle);
titleDiv.appendChild(titleText);
element.appendChild(titleDiv);
}
var items=new Array();
while(oneItem !=null && oneItem !=undefined) { 
if(oneItem.nodeType==1) {
if(oneItem.nodeName == 'i') {
items.push(
createLink(
oneItem,
linksRoot,
1,1,
myId,
'subSubItem'
)
);
}}//nodetype==1
oneItem=oneItem.nextSibling;
} 
var table = document.createElement('TABLE');
table.setAttribute('myDivId', element.id);
var tbody = document.createElement('TBODY');
tbody.setAttribute('myDivId', element.id);
var tr = document.createElement('TR');
tr.setAttribute('myDivId', element.id);
var td = document.createElement('TD');
td.setAttribute('myDivId', element.id);
td.setAttribute('vAlign', 'top');
var colCount=getColCount(items.length);
boxWidth-=0;
if(element.leftInPx > 0) {
boxWidth=boxWidth+170-element.leftInPx;
}
var itemWidth;
if(boxWidth <=250) {
itemWidth=boxWidth-10;
colCount=items.length+1;
} else {
itemWidth=((boxWidth-20) / Math.ceil(items.length/colCount));
}
var curCount=colCount;
for(i=0; i< items.length; i++) {
if(i >=curCount) {
curCount+=colCount;
tr.appendChild(td);
td = document.createElement('TD');
td.setAttribute('myDivId', element.id);
td.setAttribute('vAlign', 'top');
}
items[i].style.width= itemWidth + 'px';
td.appendChild(items[i]);
}
tr.appendChild(td);
tr.setAttribute("valign", "top");
tbody.appendChild(tr);
table.style.margin = "3px 6px";
table.appendChild(tbody);
element.appendChild(table);
element.style.width = (boxWidth + 30) + 'px';//'52ex'; link in col is 15ex
element.style.height = '450px';
}
function fillElementOld(dataNode,element,rootKey) {
var linksRoot=getLinksRoot(dataNode);
var maxWidth = dataNode.getAttribute('w');
maxWidth-=0;
if(! maxWidth) {
maxWidth=20;
}
var magicConst=getMagicConst(maxWidth);
var scrollDeny = dataNode.getAttribute('s');
var oneItem=dataNode.firstChild;
var linkContainer;
if(scrollDeny) {
linkContainer=element;
} else {
linkContainer = document.createElement('DIV');
}
var itemCount=0;
var linkCount=0;
var myId = element.getAttribute('id');
while(oneItem !=null && oneItem !=undefined) { 
if(oneItem.nodeType==1) {
itemCount++;
if(oneItem.nodeName == 'i') {//menu item (== link)
linkContainer.appendChild(createLink(oneItem,linksRoot,maxWidth,magicConst,myId));
linkCount++;
}
if(oneItem.nodeName == 's') {//submenu (== link && div)
lastMenu=false;
var subMenuName = escape(oneItem.getAttribute('i'));
var linkTarget = oneItem.getAttribute('l');
if(! linkTarget) {
linkTarget = '#';
} else {
if(! linkTarget.match(/^https?:\/\//)) {
linkTarget=linksRoot+linkTarget;
}}
var link = document.createElement('A');
link.linkSubMenuName=subMenuName;
link.linkMenuName=myId;
link.rootKey=rootKey;
link.setAttribute('href', linkTarget);
link.setAttribute('class', 'menuSubLink');
link.setAttribute('className', 'menuSubLink');
link.style.width = (maxWidth * magicConst) + "ex";
if(link.attachEvent) { 
link.attachEvent('onmouseover', function(e) {
show_menu(e.srcElement.linkSubMenuName, e.srcElement.linkMenuName, e.srcElement.rootKey, 'old');
});
} else if(link.addEventListener) { 
link.addEventListener('mouseover', function() {
show_menu(this.linkSubMenuName, this.linkMenuName, this.rootKey, 'old');
},false);
}
var liText = document.createTextNode('');
liText.nodeValue = oneItem.getAttribute('t');
link.appendChild(liText);
var div = document.createElement('DIV');
var zi=element.style.zIndex;
if(! zi) {
zi=100;
} else {
zi+=1;
}
div.style.zIndex=zi;
div.style.left = ((maxWidth - 3) * magicConst) + "ex";
div.myName=subMenuName;
div.id=subMenuName;
div.upperElementId = element.getAttribute('id');
div.setAttribute('id', subMenuName);
div.setAttribute('class', 'menuSubDiv');
div.setAttribute('className', 'menuSubDiv');
if(div.attachEvent) { //MICRO$OFT
div.attachEvent('onmouseout', function(e) {
var src=e.srcElement;
while(src.myName==undefined) {
src=src.parentNode;
}
leaving_element(src.myName);
});
div.attachEvent('onmouseover', function(e) {
var src=e.srcElement;
while(src.myName==undefined) {
src=src.parentNode;
}
show_element_by_id_recursive(src.myName);
});
} else if(div.addEventListener) { 
div.addEventListener('mouseout', function() {
leaving_element(this.myName);
},false);
div.addEventListener('mouseover', function() {
show_element_by_id(this.myName);
},false);
}
element.appendChild(div);
element.appendChild(link);
}}
oneItem=oneItem.nextSibling;
} 
if((!scrollDeny)&&(itemCount > 16 && linkCount > 10))  { 
linkContainer.style.height = "16em";
linkContainer.style.width = ((maxWidth + 1) * magicConst) + "ex";
linkContainer.style.overflow = "scroll";
linkContainer.style.overflowX = "hidden";
}
if(!scrollDeny) {
element.appendChild(linkContainer);
}
if(menuOptions['linux_flash']) {
var i=element.previousSibling;
if((i)&&(i.nodeName=='IFRAME')) {
i.style.width =element.offsetWidth +'px';;
i.style.height=element.offsetHeight+'px';;
}}}
function createLink(oneItem,linksRoot,maxWidth,magicConst,divId,linkClass) {
if(linkClass == undefined || linkClass == '') {
linkClass = 'menuItemLink';
}
var link = document.createElement('A');
var target = oneItem.getAttribute('l');
if(! target.match(/^https?:\/\//)) {
target=linksRoot+target;
}
link.setAttribute('href', target);
link.setAttribute('class',linkClass);
link.setAttribute('className',linkClass);
link.style.width = (maxWidth * magicConst) + 'ex';
var liText = document.createTextNode('');
liText.nodeValue = oneItem.getAttribute('t');
link.myDivId=divId;
if(link.attachEvent) { 
link.attachEvent('onmouseover', function(e) {
hideAllDeeper(e.srcElement.myDivId);
});
} else if(link.addEventListener) { 
link.addEventListener('mouseover', function() {
hideAllDeeper(this.myDivId);
},false);
}
link.appendChild(liText);
return link;
}
function hideAllDeeper(divId) {
var e=document.getElementById(divId);
for(i in shownMenus) { 
var m; 
if(i !=divId && shownMenus[i]) {
var m=document.getElementById(i);
if(m.menuDepth > e.menuDepth) {
if(closeMenu[i]) {
clearTimeout(closeMenu[i]);
}
hide_element_by_id(i);
}}}}
function load_menu(menuId,rootKey,type) {
if(nowLoading !=menuId) {
return;
}
var itemDiv=document.getElementById(menuId);
makeRequest(rootsAjax[rootKey]+menuId,itemDiv,rootKey,type);
loadedMenus[menuId]=true;
}
function show_element_by_id_recursive(id) {
var e=show_element_by_id(id);
while(euId=e.upperElementId) {
e=show_element_by_id(euId);
}}
var rootMenuOpen=null;
function show_menu_simple(menuId,mainMenuId) {
var e=show_element_by_id(menuId);
if(!e.firstChild) {
var f=document.getElementById(menuId+'_holder');
if(f) {
var a=new Array();
for(var g=f.firstChild;g;g=g.nextSibling) {
a.push(g);
}
for(var i=0;i<a.length;i++) {
e.appendChild(a[i]);
a[i]=0;
}}}
if(e.className.match('adShow')) { 
rootMenuOpen=e;
e.menuDepth=0;
}
for(i in shownMenus) { 
var m; 
if(i !=menuId && i !=mainMenuId && shownMenus[i]) {
var m=document.getElementById(i);
if(m.menuDepth >=e.menuDepth) {
if(closeMenu[i]) {
clearTimeout(closeMenu[i]);
}
hide_element_by_id(i);
}}}
if((menuOptions['linux_flash'])&&((!(e.previousSibling))||(e.previousSibling.nodeName!='IFRAME'))) {
var p=e.parentNode;
var i=document.createElement('IFRAME');
i.style.display='none';		
i.style.zIndex=9;
i.src='about:blank';
if(e.style.left) {
i.style.left=e.style.left;
} else {
i.style.left=e.offsetLeft;
}
if(e.style.top) {
i.style.top=e.style.top;
} else {
i.style.top=e.offsetTop;
}
if(nowLoading !=menuId) {	// important ! access to offset* dangerous !
i.style.width =e.offsetWidth  +'px';
i.style.height=e.offsetHeight +'px';
}
i.style.position='absolute';
i.frameBorder=0;
p.insertBefore(i,e);
i.style.display='block';
}}
function preload_menu(menu,alternateRoot,type) {
if(loadedMenus[menu] !=true) { //loaded?
if(nowLoading==menu) {
return;
}
var e=document.getElementById(menu);
if(e==undefined || e==null) {
return;
}
e.menuDepth=0; 
nowLoading=menu;
load_menu(menu,alternateRoot,type);
}}
function show_menu(menuId,mainMenuId,alternateRoot,type) {
var e; 
if(loadedMenus[menuId] !=true) {
if(nowLoading==menuId) {
return;
}
nowLoading=menuId;
if(! alternateRoot) {
alternateRoot = 'default';
}
setTimeout("load_menu('" + menuId + "', '" +
alternateRoot + "', '" +
type + "')",100);
}
e=show_element_by_id(menuId);
if(e.className.match('menuRootDiv')) { 
rootMenuOpen=e;
e.menuDepth=0;
var a=getAnchor(e);
var udname = e.getAttribute('upperDiv');
if(! udname) { 
udname = 'navig';
}
var n=document.getElementById(udname);
n.style.posititon = 'absolute';//"relative";
var dims=countPos(a); //0 left,1 top (a-anchor)
var dimsn=countPos(n); //(n-upper div)
dims[1]=dims[1]-dimsn[1]+a.offsetHeight;
dims[0]-=dimsn[0]; 
if(m_is_ie) {
if(n.currentStyle) {
dims[0]-=parseInt(n.currentStyle.paddingLeft,10);
if(n.getAttribute('IE_left')) {
dims[0] -= n.getAttribute('IE_left');
}
if(n.getAttribute('IE_top')) {
dims[1] -= n.getAttribute('IE_top');
}}}
var top=e.offsetTop;
e.style.left = dims[0] + "px";
e.style.top  = dims[1] + "px";
} else { 
e.menuDepth=document.getElementById(mainMenuId).menuDepth+1;
}
for(i in shownMenus) { 
var m; 
if(i !=menuId && i !=mainMenuId && shownMenus[i]) {
var m=document.getElementById(i);
if(m.menuDepth >=e.menuDepth) {
if(closeMenu[i]) {
clearTimeout(closeMenu[i]);
}
hide_element_by_id(i);
}}}
e.mainMenuId=mainMenuId;
if((menuOptions['linux_flash'])&&((!(e.previousSibling))||(e.previousSibling.nodeName!='IFRAME'))) {
var p=e.parentNode;
var i=document.createElement('IFRAME');
i.style.display='none';		
i.style.zIndex=9;
i.src='about:blank';
i.style.left=e.style.left;
i.style.top=e.style.top;
if(nowLoading !=menuId) {	// important ! access to offset* dangerous !
i.style.width =e.offsetWidth  +'px';
i.style.height=e.offsetHeight +'px';
}
i.style.position='absolute';
i.frameBorder=0;
p.insertBefore(i,e);
i.style.display='block';
}}
function countPos(element) {
var left=0;
var top=0;
if (element.offsetParent) {
left=element.offsetLeft;
top=element.offsetTop;
while (element=element.offsetParent) {
left+=element.offsetLeft;
top+=element.offsetTop;
}}
return new Array(left,top);
}
function getAnchor(obj) {
while(obj=obj.nextSibling) {
if(obj.tagName == 'A') {
return obj;
}}
return obj; 
}
function getInnerImg(obj) {
var cn=obj.childNodes;
for(var i=0; i < cn.length; i++) {
if(cn.item(i).tagName == 'IMG') {
return cn.item(i);
} else {
x=getInnerImg(cn.item(i));
}
if(x != null && x.tagName == 'IMG') {
return x;
}}
return null; 
}
function hideTriangle(m) {
var menu=document.getElementById(m);
if(! reallyHideTriangle[m]) {//don't blink
return;
}
var a=getAnchor(menu);
var img=getInnerImg(a);
if(img) {
var src = img.getAttribute('src');
img.setAttribute('src',src.replace(/triangleF/, 'triangleE'));
}}
function hide_element_by_id(id) {
var menu=document.getElementById(id);
if(menu.className.match('menuRootDiv')) {
setTimeout("hideTriangle('"+menu.id+"')", 160);
reallyHideTriangle[menu.id]=true;
}
menu.style.visibility="hidden";
if(menuOptions['linux_flash']) {
if((menu.previousSibling)&&(menu.previousSibling.nodeName=='IFRAME')) {
menu.previousSibling.style.display='none';
}}
shownMenus[id]=false;
return menu;
}
function show_element_by_id(id) {
var menu=document.getElementById(id);
if(! menu) {
return null;
}
if(closeMenu[id]) {
clearTimeout(closeMenu[id]);
closeMenu[id]=false;
}
reallyHideTriangle[id]=false; // dont hide triangle (cancel timeout)
menu.style.visibility="visible";
shownMenus[id]=true;
if(menu.className.match('menuRootDiv')) {
var a=getAnchor(menu);
var img=getInnerImg(a);
if(img !=null) { 
var src = img.getAttribute('src');
img.setAttribute('src',src.replace(/triangleE/, 'triangleF'));
}}
if(menuOptions['linux_flash']) {
if((menu.previousSibling)&&(menu.previousSibling.nodeName=='IFRAME')) menu.previousSibling.style.display='block';
}
return menu;
}
function leaving_element(id) {
if(closeMenu[id]) {
clearTimeout(closeMenu[id]);
}
var t = setTimeout("leavingElementTimed('"+id+"')", 300);
closeMenu[id]=t;
}
function leavingElementTimed(id) {
e=hide_element_by_id(id);
if(e.mainMenuId==id) { 
for(i in shownMenus) {
if(shownMenus[i]==true) {
hide_element_by_id(i);
}}}}
