var xmlDoc=null;var holder_id=null;var fun_after=null;function getAbsPosition(e){x=0;y=0;do{with(e){x+=offsetLeft;y+=offsetTop}}while(e=e.offsetParent);return{x:x,y:y}}function load(c,a,b,d){fun_after=false;holder_id=b;dopisac=d;if(document.getElementById("ind")){var e=getAbsPosition(document.getElementById(b));document.getElementById("ind").style.left=e.x+"px";document.getElementById("ind").style.top=e.y+"px";document.getElementById("ind").style.width=document.getElementById(b).offsetWidth+"px";document.getElementById("ind").style.height=document.getElementById(b).offsetHeight+"px";document.getElementById("ind").style.display="block";document.getElementById("ind").innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle"><img src=http://z.nf.pl/i2/indicator.gif></td></tr></table>'}if(typeof window.ActiveXObject!="undefined"){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=process}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=process}xmlDoc.open("POST",c,true);xmlDoc.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlDoc.send(a)}function load2(c,a,b,d,f){fun_after=f;holder_id=b;dopisac=d;if(document.getElementById("ind")){var e=getAbsPosition(document.getElementById(b));document.getElementById("ind").style.left=e.x+"px";document.getElementById("ind").style.top=e.y+"px";document.getElementById("ind").style.width=document.getElementById(b).offsetWidth+"px";document.getElementById("ind").style.height=document.getElementById(b).offsetHeight+"px";document.getElementById("ind").style.display="block";document.getElementById("ind").innerHTML='<table width="100%" height="100%"><tr><td align="center" valign="middle"><img src=http://z.nf.pl/i2/indicator.gif></td></tr></table>'}if(typeof window.ActiveXObject!="undefined"){xmlDoc=new ActiveXObject("Microsoft.XMLHTTP");xmlDoc.onreadystatechange=process}else{xmlDoc=new XMLHttpRequest();xmlDoc.onload=process}xmlDoc.open("POST",c,true);xmlDoc.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlDoc.send(a)}function process(){if(xmlDoc.readyState==4){if(xmlDoc.status==200){if(document.getElementById("ind")){document.getElementById("ind").innerHTML="";document.getElementById("ind").style.display="none"}if(dopisac){if(holder_id){document.getElementById(holder_id).innerHTML+=xmlDoc.responseText}if(holder_id){document.getElementById(holder_id).value+=xmlDoc.responseText}}else{if(holder_id){document.getElementById(holder_id).innerHTML=xmlDoc.responseText}if(holder_id){document.getElementById(holder_id).value=xmlDoc.responseText}}if(fun_after){eval(fun_after+"()")}var response=xmlDoc.responseText;do{script=response.match(/<script[^>]+>[^<]+<\/script>/i).pop();if(script){var execScript="";response=response.replace(script,"");var pattern=/src="[^"]+/i;var pattern2=/src='[^']+/i;try{if(pattern.test(script)){var newScript=document.createElement("script");newScript.type="text/javascript";newScript.src=script.match(pattern).pop().substr(5);headId=document.getElementsByTagName("head")[0];headId.appendChild(newScript)}else{if(pattern2.test(script)){var newScript=document.createElement("script");newScript.type="text/javascript";newScript.src=script.match(pattern2).pop().substr(5);headId=document.getElementsByTagName("head")[0];headId.appendChild(newScript)}else{eval(script.match(/>[^<]+</i).pop().replace("<","").replace(">",""))}}}catch(e){}}}while(script)}}};
