/** * * AJAX IFRAME METHOD (AIM)* http:* **/ AIM={frame : function(c) {var n='f'+Math.floor(Math.random() * 99999);var div_tmp=document.createElement('DIV');div_tmp.innerHTML='';document.body.appendChild(div_tmp);var i=document.getElementById(n);if (c && typeof(c.onComplete)== 'function') {i.onComplete=c.onComplete;};return n;},form : function(f,name) {/* alert(typeof(name));*/ f.setAttribute('target',name);},submit : function(f,c) {if (c && typeof(c.onStart)== 'function') {var rez_onStart=c.onStart();if(rez_onStart) {AIM.form(f,AIM.frame(c));}return rez_onStart;} else {AIM.form(f,AIM.frame(c));return true;}},loaded : function(id) {var i=document.getElementById(id);if (i.contentDocument) {var d=i.contentDocument;} else if (i.contentWindow) {var d=i.contentWindow.document;} else {var d=window.frames[id].document;};if (d.location.href== "about:blank") {return;};if (typeof(i.onComplete)== 'function') {i.onComplete(d.body.innerHTML,id);}}};function delete_iframe(ifr_id){var ifr=document.getElementById(ifr_id);var ifr_wind=ifr.contentWindow || ifr.contentDocument;window.frames[ifr_id].close();var ifr_parent=ifr.parentNode;var ifr_parent2=ifr_parent.parentNode;ifr_parent.removeChild(ifr);if(ifr_parent2.tagName== "DIV"){ifr_parent2.removeChild(ifr_parent);};if(ifr) ifr=null;if(ifr) delete ifr;};function startCallback() {return true;};function completeCallback(response,id_iframe) {if(document.getElementById('nr') && document.getElementById('r')){document.getElementById('nr').innerHTML=parseInt(document.getElementById('nr').innerHTML)+1;document.getElementById('r').innerHTML=response+"

 

"+id_iframe;}var ifr_parent=document.getElementById(id_iframe).parentNode;setTimeout("delete_iframe('"+id_iframe+"')",200);};