function xhr_loadANDexpand(a,b){var c=a+"_feedback";xmlhttpGet(b,c);var c=c+"_targetResult";document.getElementById(c).style.display="block"}function xhr_expand(a,b){var c=a+"_element_targetResult";var d=document.getElementById(c).scrollHeight;var e=document.getElementById(c).clientHeight;if(e<d)document.getElementById(c).style.height=d+"px";var f=b+"?element_id="+a;xmlhttpGet(f,"0")}function updatepage(str,id){var newid=id+"_targetResult";if(str.substring(0,11)=="JavaScript:")document.getElementById(newid).innerHTML=eval(str.substring(11,str.length));else document.getElementById(newid).innerHTML=str}function getquerystring(a){var b="";var c=document.forms[a].elements;for(var d=0;d<c.length;d++){b+=c[d].name+"="+encodeURIComponent(c[d].value)+"&"}return b}function xmlhttpGet(a,b){var c=false;var d=this;if(window.XMLHttpRequest){d.xmlHttpReq=new XMLHttpRequest}else if(window.ActiveXObject){d.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}d.xmlHttpReq.open("GET",a,true);d.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");d.xmlHttpReq.onreadystatechange=function(){if(d.xmlHttpReq.readyState==4&&d.xmlHttpReq.status==200){if(b!="0")updatepage(d.xmlHttpReq.responseText,b)}};d.xmlHttpReq.send(b)}function xmlhttpPost(a,b,c){var d=false;var e=this;if(window.XMLHttpRequest){e.xmlHttpReq=new XMLHttpRequest}else if(window.ActiveXObject){e.xmlHttpReq=new ActiveXObject("Microsoft.XMLHTTP")}e.xmlHttpReq.open("POST",a,true);if(c!="update"&&c!="failed_update"){document.forms[b].style.opacity="0.5";document.forms[b].style.filter="alpha(opacity=50)"}e.xmlHttpReq.setRequestHeader("Content-Type","application/x-www-form-urlencoded");e.xmlHttpReq.onreadystatechange=function(){if(e.xmlHttpReq.readyState==4&&e.xmlHttpReq.status==200){updatepage(e.xmlHttpReq.responseText,b)}};e.xmlHttpReq.send(getquerystring(b))}function addasset(textbox,asseturl) {document.getElementById(textbox).value += asseturl;}
