jQuery.extend({createUploadIframe:function(a,d){var c="jUploadFrame"+a;if(window.ActiveXObject)if("9.0"==jQuery.browser.version||"10.0"==jQuery.browser.version){var b=document.createElement("iframe");b.id=c;b.name=c}else{if("6.0"==jQuery.browser.version||"7.0"==jQuery.browser.version||"8.0"==jQuery.browser.version)b=document.createElement('\x3ciframe id\x3d"'+c+'" name\x3d"'+c+'" /\x3e'),"boolean"==typeof d?b.src="javascript:false":"string"==typeof d&&(b.src=d)}else b=document.createElement("iframe"),b.id=c,b.name=c;b.style.position="absolute";b.style.top="-1000px";b.style.left="-1000px";document.body.appendChild(b);return b},createUploadForm:function(a,d,c){var b="jUploadForm"+a;a="jUploadFile"+a;b=$('\x3cform action\x3d"" method\x3d"POST" name\x3d"'+b+'" id\x3d"'+b+'" enctype\x3d"multipart/form-data"\x3e\x3c/form\x3e');d=$("#"+d);var g=$(d).clone(!0);$(d).attr("id",a);$(d).before(g);$(d).appendTo(b);if(c)for(var e in c)$('\x3cinput type\x3d"hidden" name\x3d"'+e+'" value\x3d"'+c[e]+'" /\x3e').appendTo(b);$(b).css("position","absolute");$(b).css("top","-1200px");$(b).css("left","-1200px");$(b).appendTo("body");return b},ajaxFileUpload:function(a){a=jQuery.extend({},jQuery.ajaxSettings,a);var d=(new Date).getTime(),c=jQuery.createUploadForm(d,a.fileElementId,a.data);jQuery.createUploadIframe(d,a.secureuri);var b="jUploadFrame"+d,d="jUploadForm"+d;a.global&&!jQuery.active++&&jQuery.event.trigger("ajaxStart");var g=!1,e={};a.global&&jQuery.event.trigger("ajaxSend",[e,a]);var k=function(d){var f=document.getElementById(b);try{f.contentWindow?(e.responseText=f.contentWindow.document.body?f.contentWindow.document.body.innerHTML:null,e.responseXML=f.contentWindow.document.XMLDocument?f.contentWindow.document.XMLDocument:f.contentWindow.document):f.contentDocument&&(e.responseText=f.contentDocument.document.body?f.contentDocument.document.body.innerHTML:null,e.responseXML=f.contentDocument.document.XMLDocument?f.contentDocument.document.XMLDocument:f.contentDocument.document)}catch(l){jQuery.handleError(a,e,null,l)}if(e||"timeout"==d){g=!0;var h;try{if(h="timeout"!=d?"success":"error","error"!=h){var k=jQuery.uploadHttpData(e,a.dataType);a.success&&a.success(k,h);a.global&&jQuery.event.trigger("ajaxSuccess",[e,a])}else jQuery.handleError(a,e,h)}catch(l){h="error",jQuery.handleError(a,e,h,l)}a.global&&jQuery.event.trigger("ajaxComplete",[e,a]);a.global&&!--jQuery.active&&jQuery.event.trigger("ajaxStop");a.complete&&a.complete(e,h);jQuery(f).unbind();setTimeout(function(){try{$(f).remove(),$(c).remove()}catch(b){jQuery.handleError(a,e,null,b)}},100);e=null}};0