var isIE=(window.navigator.appVersion.indexOf("MSIE")!="-1");var rootButtonArray=new Array();var childButtonArray=new Array();var tableDivArray=new Array();var flashingControlArray=new Array();var flashingControlNameArray=new Array();var itemSizeInPx=300;function OnLoad(){LoadButtons();document.getElementById("ctl00_TopMenu1").style.visibility="visible";for(var b=0;b<flashingControlNameArray.length;b++){var a=document.getElementById(flashingControlNameArray[b]);if(a!=null){if(a.parentNode.tagName.toLowerCase()=="li"){a=a.parentNode;}flashingControlArray.push(a);}}for(var b=0;b<flashingControlArray.length;b++){window.setTimeout("PerformFlash("+b+")",50);}}function PerformFlash(d){var c=flashingControlArray[d];var a=parseFloat(10);var b=c.getAttribute("f");if(b==undefined||b==""){c.setAttribute("f","0");c.style.visibility="hidden";window.setTimeout("PerformFlash("+d+")",300);}else{c.setAttribute("f","");c.style.visibility="visible";window.setTimeout("PerformFlash("+d+")",800);}}var width=0;var height=0;var iframedocument;var hasLoaded=false;function OnResize(){if(!isIE){if(window.innerWidth==width){return;}width=window.innerWidth;height=window.innerHeight;}else{if(document.documentElement.clientWidth==width){return;}width=document.documentElement.clientWidth;height=document.documentElement.clientHeight;}itemSizeInPx=width/rootButtonArray.length;itemSizeInPx-=10;if(childButtonArray!=null&&childButtonArray.length>0){for(var c=0;c<childButtonArray.length;c++){childButtonArray[c].style.width=itemSizeInPx+"px";var b=FindFirstElement("span",childButtonArray[c]);if(b){b.style.width=(itemSizeInPx-12)+"px";}}}if(tableDivArray!=null&&tableDivArray.length>0){for(var c=0;c<tableDivArray.length;c++){tableDivArray[c].style.width=(itemSizeInPx+8)+"px";}}var a=document.getElementById("externalurlframewindow");if(a){var e=300;if(!isIE&&!hasLoaded){e+=a.offsetTop+50;}else{e+=a.offsetTop;}a.style.height=(height-e)+"px";if(iframedocument==null){iframedocument=a.contentDocument||a.contentWindow.document||a.document;if(iframedocument&&iframedocument.location=="about:blank"){var d=document.getElementById("externalurlframewindowsrc");if(d){iframedocument.location.replace(d.value);hasLoaded=true;}}}}}function LoadButtons(){var e;for(var a=0;a<100;a++){e=document.getElementById("ctl00_TopMenu1n"+a);if(e){if(e.tagName.toLowerCase()=="td"){rootButtonArray.push(e);var d=FindFirstElement("td",e);var b=FindFirstElement("span",e);d.style.backgroundRepeat=b.style.backgroundRepeat;d.style.backgroundPosition=b.style.backgroundPosition;d.style.backgroundImage=b.style.backgroundImage;}}else{a=100;}}var c=100/rootButtonArray.length;for(var a=0;a<rootButtonArray.length;a++){rootButtonArray[a].style.width=c+"%";}FindItems();}function FindItems(){for(var a=0;a<rootButtonArray.length;a++){FindChildItems(rootButtonArray[a]);}OnResize();}function FindChildItems(k){var e=k.id+"Items";var d=document.getElementById(e);if(d!=null){tableDivArray.push(d);var h=FindFirstElement("table",d);if(h){for(var a=0;a<h.childNodes.length;a++){if(h.childNodes[a]!=undefined&&h.childNodes[a].tagName!=undefined){for(var b=0;b<h.childNodes[a].childNodes.length;b++){if(h.childNodes[a].childNodes[b]!=undefined&&h.childNodes[a].childNodes[b].tagName!=undefined){if(h.childNodes[a].childNodes[b].tagName.toLowerCase()=="tr"){var f=h.childNodes[a].childNodes[b];if(f){var g=FindFirstElement("td",f);if(g!=null){var c=FindFirstElement("table",g);childButtonArray.push(c);FindChildItems(g);}}}}}}}}}}function GetDynamicMenuItem(b){var a=FindFirstElement;}function FindFirstElement(b,a){var c=null;b=b.toLowerCase();for(var d=0;d<a.childNodes.length;d++){if(a.childNodes[d].tagName){if(a.childNodes[d].tagName.toLowerCase()==b){c=a.childNodes[d];}else{c=FindFirstElement(b,a.childNodes[d]);}if(c!=null){d=a.childNodes.length;}}}return c;}function Debug(a){document.getElementById("debug").value+=a+"\r\n";}