function dropdown_menu_hack(d){if(d.runtimeStyle.behavior.toLowerCase()=="none"){return}d.runtimeStyle.behavior="none";var b=(document.namespaces==null);d.ondblclick=function(g){window.event.returnValue=false;return false};if(window.createPopup==null){var f="dropdown_menu_hack_"+Date.parse(new Date());window.createPopup=function(){if(window.createPopup.frameWindow==null){d.insertAdjacentHTML("AfterEnd","<iframe   id='"+f+"' name='"+f+"' src='about:blank'  frameborder='1' scrolling='no'></></iframe>");var g=document.frames[f];g.document.open();g.document.write("<html><body></body></html>");g.document.close();g.fid=f;var h=document.getElementById(f);h.style.cssText="position:absolute;top:0;left:0;display:none;z-index:99999;";g.show=function(k,i,l,m,j){i=i+j.getBoundingClientRect().top+Math.max(document.body.scrollTop,document.documentElement.scrollTop);k=k+j.getBoundingClientRect().left+Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);h.style.width=l+"px";h.style.height=m+"px";h.style.posLeft=k;h.style.posTop=i;h.style.display="block"};f_hide=function(i){if(window.event&&window.event.srcElement&&window.event.srcElement.tagName&&window.event.srcElement.tagName.toLowerCase()=="select"){return true}h.style.display="none"};g.hide=f_hide;document.attachEvent("onclick",f_hide);document.attachEvent("onkeydown",f_hide)}return g}}function a(){function h(i){var r=document.createElement("option");r.value=i.value==1&&i.selectedIndex==0?"org.jboss.seam.ui.NoSelectionConverter.noSelectionValue":i.value;r.innerHTML=i.innerHTML;while(d.options.length>0){d.options[0].removeNode(true)}d.appendChild(r);d.title=r.innerHTML;d.contentIndex=i.selectedIndex;d.menu.hide()}d.menu.show(0,d.offsetHeight,10,10,d);var m=d.menu.document.body;m.style.cssText="border:solid 1px black;margin:0;padding:0;overflow-y:auto;overflow-x:auto;background:white;text-aligbn:center;font-family:Verdana;font-size:12px;";var q=d.contentHTML;q=q.replace(/<select/gi,"<ul");q=q.replace(/<option/gi,"<li");q=q.replace(/<\/option/gi,"</li");q=q.replace(/<\/select/gi,"</ul");m.innerHTML=q;d.select=m.all.tags("ul")[0];d.select.style.cssText="list-style:none;margin:0;padding:0;";m.options=d.select.getElementsByTagName("li");for(var j=0;j<m.options.length;j++){m.options[j].selectedIndex=j;m.options[j].style.cssText="list-style:none;margin:0;padding:1px 2px;width/**/:100%;cursor:hand;cursor:pointer;white-space:nowrap;";m.options[j].title=m.options[j].innerHTML;m.options[j].innerHTML="<nobr>"+m.options[j].innerHTML+"</nobr>";m.options[j].onmouseover=function(){if(m.options.selected){m.options.selected.style.background="white";m.options.selected.style.color="black"}m.options.selected=this;this.style.background="#333366";this.style.color="white"};m.options[j].onmouseout=function(){this.style.background="white";this.style.color="black"};m.options[j].onmousedown=function(){h(this)};m.options[j].onkeydown=function(){h(this)};if(j==d.contentIndex){m.options[j].style.background="#333366";m.options[j].style.color="white";m.options.selected=m.options[j]}}var p=Math.max((d.select.offsetWidth+22),d.offsetWidth+22);p=Math.max(p,(m.scrollWidth+22));var l=m.options.length*15+8;var o=(b)?-3:0;var n=d.offsetHeight-2;var k=document.documentElement.offsetHeight;var g=k-d.getBoundingClientRect().bottom;l=Math.min(l,Math.max((k-d.getBoundingClientRect().top-50),100));if((g<l)){l=Math.max((g-12),10);if(l<100){n=-100}l=Math.max(l,100)}self.focus();d.menu.show(o,n,p,l,d);sync=null;if(m.options.selected){m.scrollTop=m.options.selected.offsetTop}window.onresize=function(){d.menu.hide()}}function e(){if(event.keyCode){if(event.keyCode==40){d.contentIndex++}else{if(event.keyCode==38){d.contentIndex--}}}else{if(event.wheelDelta){if(event.wheelDelta>=120){d.contentIndex++}else{if(event.wheelDelta<=-120){d.contentIndex--}}}else{return true}}if(d.contentIndex>(d.contentOptions.length-1)){d.contentIndex=0}else{if(d.contentIndex<0){d.contentIndex=d.contentOptions.length-1}}var g=document.createElement("option");g.value=d.contentOptions[d.contentIndex].value;g.innerHTML=d.contentOptions[d.contentIndex].text;while(d.options.length>0){d.options[0].removeNode(true)}d.appendChild(g);d.title=g.innerHTML}if(dropdown_menu_hack.menu==null){dropdown_menu_hack.menu=window.createPopup();document.attachEvent("onkeydown",dropdown_menu_hack.menu.hide)}d.menu=dropdown_menu_hack.menu;d.contentOptions=new Array();d.contentIndex=d.selectedIndex;d.contentHTML=d.outerHTML;for(var c=0;c<d.options.length;c++){d.contentOptions[d.contentOptions.length]={value:d.options[c].value,text:d.options[c].innerHTML};if(!d.options[c].selected){d.options[c].removeNode(true);c--}}d.onkeydown=e;d.onclick=a;d.onmousewheel=e};
