var dropDown=new Object;dropDown.initialize=function(a){var h=$("dropDownElHood_"+a);if(h.getAttribute("fillType")=="missingParams"){alert(h.getAttribute("fillType")+"\nDropDown id: "+h.id)}else{var j=document.createElement("div");j.className="dropDownListContainer";j.id="dropDownList_"+a;j.style.display="none";j.setAttribute("ownerDropDown",h.id);h.setAttribute("dropDownListID",j.id);var d=document.createElement("ul");d.className="dropDownList";if(h.getAttribute("fillType")=="stringSplit"){var e=h.getAttribute("stringToSplit").toString().split(h.getAttribute("pattern"));h.setAttribute("stringToSplit","");var g=h.getAttribute("stringValuesToSplit").toString().split(h.getAttribute("pattern"));h.setAttribute("stringValuesToSplit","");var b=null;for(var c=0;c<e.length;c++){var f=dropDown.createNewItem(h,g[c],e[c]);if(h.getAttribute("selectedValue")==g[c]){b=f}d.appendChild(f);f=null}g=e=null}else{if(h.getAttribute("fillType")=="lookup"){}}j.appendChild(d);if(b){dropDown.itemClick(b.firstChild)}document.body.insertBefore(j,document.body.firstChild);d=j=null}h=null};dropDown.createNewItem=function(c,e,f){var b=document.createElement("li");var d=document.createElement("a");d.href="#";d.innerHTML=f;d.onclick=new Function("dropDown.itemClick(this); "+c.getAttribute("functionOnChange")+"; return false;");d.setAttribute("itemValue",e);d.style.color="#FFFFFF";b.appendChild(d);return b};dropDown.click=function(b){var a=$(b.getAttribute("dropDownListID"));if(a.style.display=="none"){var c=Position.cumulativeOffset(b);a.style.top=(c[1]+Element.getDimensions(b).height)+"px";a.style.left=c[0]+"px";c=null;a.style.display="block"}else{a.style.display="none"}a=b=null};dropDown.itemClick=function(d){var c=d.parentNode.parentNode.parentNode;var b=$(c.getAttribute("ownerDropDown"));c.style.display="none";var a=b.getElementsByTagName("input")[0];var e=b.getElementsByTagName("div")[0];a.value=d.getAttribute("itemValue");e.innerHTML=d.innerHTML;e=b=a=c=null};dropDown.getSelectedValue=function(a){return $("dropDownElHood_"+a).getElementsByTagName("input")[0].value};