function select_innerHTML(a,b){a.innerHTML="";var d=document.createElement("micoxselect");var f;d.id="micoxselect1";document.body.appendChild(d);d=document.getElementById("micoxselect1");d.style.display="none";if(b.toLowerCase().indexOf("<option")<0){b="<option>"+b+"</option>"}b=b.replace(/<option/g,"<span").replace(/<\/option/g,"</span");b=b.replace(/<optgroup/g,"<p").replace(/<\/optgroup/g,"</p");d.innerHTML=b;for(var e=0;e<d.childNodes.length;e++){var c=d.childNodes[e];if(c.tagName){if(c.tagName=="P"){f=document.createElement("OPTGROUP")}else{f=document.createElement("OPTION")}if(document.all){a.add(f)}else{a.appendChild(f)}if(c.tagName=="P"){f.label=c.getAttribute("label")}else{f.value=c.getAttribute("value");f.text=c.innerHTML}}}document.body.removeChild(d);d=null}function getAjaxRequest(){var a;try{a=new XMLHttpRequest()}catch(b){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){window.alert("Your browser broke!");return false}}}return a}function urlencode(a){a=(a+"").toString();return encodeURIComponent(a).replace(/!/g,"%21").replace(/'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/\*/g,"%2A").replace(/%20/g,"+")}function getLogin(d,a){if(document.getElementById("login_block").innerHTML.length>2){return}var b=getAjaxRequest();b.onreadystatechange=function(){if(b.readyState==4){var e=b.responseText;document.getElementById("login_block").innerHTML=e}};var c="?activationinfo="+urlencode(d)+"&logininfo="+urlencode(a);b.open("GET","/admin/retrievers/getloginblock"+c,true);b.send(null)}function getRelevantItems(d,a,b){var e=getAjaxRequest();e.onreadystatechange=function(){if(e.readyState==4){var f=e.responseText;select_innerHTML(document.getElementById(d),f)}};var c="?id="+a.value;e.open("GET","/admin/"+b+c,true);e.send(null)};
