          navigator.hasxmlProgress= (function(){  
				 //Detect if a browser supports XMLHTTPRequest  
				 var r= window.XMLHttpRequest && new window.XMLHttpRequest() || '';  
				 return 'onprogress' in r;  
			 })() 
		
			 function IsHtml5() {
				 //if (typeof (Worker) !== "undefined"  &&  navigator.hasxmlProgress && window.File && window.FileList && window.FileReader && window.Blob ) {return true; } else {return false;} 
				 if (typeof (Worker) !== "undefined"  &&  navigator.hasxmlProgress ) {return true; } else {return false;} 
			 }	
		     function uploadProgress(evt) {
				if (evt.lengthComputable) {
				  var percentComplete = Math.round(evt.loaded * 100 / evt.total);
				  document.getElementById('progressNumber').innerHTML = percentComplete.toString() + '%';
				}
				else {
				  document.getElementById('progressNumber').innerHTML = 'unable to compute';
				}
			  }
			  function uploadComplete(evt) {
				/* 服务器端返回响应时候触发event事件*/
			      //alert(evt.target.responseText);
				 console.log(evt.target.responseText);
			     eval(evt.target.responseText);
				try{
				//window.parent.document.getElementById('zoomtueditor').style.display="none";
				//window.parent.document.getElementById('wrapeditor').style.display = "none";
				//alert(evt.target.responseText);
				}
				catch (Error){
				}
			  }
			  function uploadFailed(evt) {
				   alert("\u9047\u5230\u7db2\u7d61\u932f\u8aa4\uff0c\u4e0a\u50b3\u7d42\u6b62\uff01");
				  // window.parent.document.getElementById('zoomtueditor').style.display="none";
				  // window.parent.document.getElementById('wrapeditor').style.display="none";
			  }
			  function uploadCanceled(evt) {
				alert("The upload has been canceled by the user or the browser dropped the connection.");
			  }
              /* 负责ajax发送数据 */
			  function up(fd, file,len,i) {
				   if (i>1)
					 {
						var h=window.parent.document.getElementById('zoomtueditor').offsetHeight;
						//h = h + 32;
						//var h2=window.parent.frames["ifr_editor_upload"].document.body.scrollHeight;					
						var ifm = window.parent.document.getElementById("ifr_editor_upload");
						var subWeb = window.parent.document.frames ? window.parent.document.frames["ifr_editor_upload"].document :ifm.contentDocument;
						var h2=0;
						if (ifm != null && subWeb != null) {
							h2 = subWeb.body.scrollHeight;
						}	
						h2=h2+32;
						window.parent.document.getElementById('zoomtueditor').style.height =  h+"px"; 
						ifm.style.height =  h2+"px"; 
					}
				   var einfo = document.createElement('div');
				   var eid=file.name+"oneinfo";
				   einfo.setAttribute("id", eid);
				   einfo.setAttribute("class", "oneinfo");
				   var info=document.getElementById('info');
				   info.appendChild(einfo);
				   var $eid=document.getElementById(eid);
				   $eid.innerHTML='<div>\u6587\u4ef6\u540d\uff1a<span class="filename"></span> <span class="filesize"></span> (<span class="fileupinfo"></span>)</div><div class="progress"><div class="bar"></div></div>';	
			      var fileName = file.name;
			      var fileSize = 0;
			      if (file.size > 1024 * 1024)
			          fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';
			      else
			          fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';
			
				  var fname=document.getElementById(eid).getElementsByClassName('filename')[0].innerHTML;				  
				  if (fname!="")
				  {
					fname=fname+";"+fileName;
				    document.getElementById(eid).getElementsByClassName('filename')[0].innerHTML = fname;
				  }
				  else		      
				  {
					  fname= fileName;
			        document.getElementById(eid).getElementsByClassName('filename')[0].innerHTML = fname;
				  }
				  var fsize=document.getElementById(eid).getElementsByClassName('filesize')[0].innerHTML;
				  if (fsize!="")
				  {
					fsize=fsize+";"+fileSize;
				    document.getElementById(eid).getElementsByClassName('filesize')[0].innerHTML = fsize;
				  }
				  else		      
				  {
					  fsize= fileSize;
			          document.getElementById(eid).getElementsByClassName('filesize')[0].innerHTML = fsize;
				  }
                    var xhr = new XMLHttpRequest();
		            //xhr.upload.addEventListener("progress", uploadProgress, false);
		            xhr.addEventListener("load", uploadComplete, true);
		            xhr.addEventListener("error", uploadFailed, true);
		            xhr.addEventListener("abort", uploadCanceled, true);
		            xhr.upload.onprogress = function (ev) {
		                var percent = 0;
		                if (ev.lengthComputable) {
		                    percent = parseInt((100 * ev.loaded / ev.total), 10);
		                    document.getElementById(eid).getElementsByClassName('fileupinfo')[0].innerHTML = percent + '%';
		                    document.getElementById(eid).getElementsByClassName('bar')[0].style.width = percent + '%';
							if (percent==100)
							{    var  upnumber=parseInt(document.getElementById("upnumber").innerHTML);
							     upnumber=upnumber+1;
								 document.getElementById("upnumber").innerHTML=upnumber;
								 if (upnumber==len)
								 {
									try{
									 window.parent.document.getElementById('zoomtueditor').style.display="none";
									 window.parent.document.getElementById('wrapeditor').style.display = "none";
									}
									catch (Error){
									}
								 }
							}
		                }
		                else {
		                    document.getElementById(eid).getElementsByClassName('fileupinfo')[0].innerHTML = '\u672a\u80fd\u6210\u529f\u4e0a\u50b3';
		                }
		            }   
                    xhr.open('POST',savefile,true); /* 异步传输 */
					/*
	            // xhr.open('POST',savefile,false); // 同步传输
                // xhr.upload 这是html5新增的api,储存了上传过程中的信息
	            //alert(fd.get(fname)); ie不支持FormDat.get()	
				*/
                    xhr.send(fd);
             }

		 /*
		 var formobj =  document.getElementById("form"); 
          var formdata = new FormData(formobj); 
		  */