function select_innerHTML(c,d){c.innerHTML="";var f=document.createElement("micoxselect");var b;f.id="micoxselect1";document.body.appendChild(f);f=document.getElementById("micoxselect1");f.style.display="none";if(d.toLowerCase().indexOf("<option")<0){d="<option>"+d+"</option>"}d=d.replace(/<option/g,"<span").replace(/<\/option/g,"</span");d=d.replace(/<optgroup/g,"<p").replace(/<\/optgroup/g,"</p");f.innerHTML=d;for(var a=0;a<f.childNodes.length;a++){var e=f.childNodes[a];if(e.tagName){if(e.tagName=="P"){b=document.createElement("OPTGROUP")}else{b=document.createElement("OPTION")}if(document.all){c.add(b)}else{c.appendChild(b)}if(e.tagName=="P"){b.label=e.getAttribute("label")}else{b.value=e.getAttribute("value");b.text=e.innerHTML}}}document.body.removeChild(f);f=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(b,c){if(document.getElementById("login_block").innerHTML.length>2){return}var d=getAjaxRequest();d.onreadystatechange=function(){if(d.readyState==4){var e=d.responseText;document.getElementById("login_block").innerHTML=e}};var a="?activationinfo="+urlencode(b)+"&logininfo="+urlencode(c);d.open("GET","/admin/retrievers/getloginblock"+a,true);d.send(null)}function getRelevantItems(a,c,d){var b=getAjaxRequest();b.onreadystatechange=function(){if(b.readyState==4){var f=b.responseText;select_innerHTML(document.getElementById(a),f)}};var e="?id="+c.value;b.open("GET","/admin/"+d+e,true);b.send(null)};
