rtoss - Rev 64

Subversion Repositories:
Rev:
function gID(a){return document.getElementById(a)}function toFixed(a,c){var b=Math.pow(10,c||0);return String(Math.round(a*b)/b)}function JSONXMLHttpReq(){var a=false;/*@cc_on @*/ /*@if(@_jscript_version>=5)try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{a=new ActiveXObject("Microsoft.XMLHTTP")}catch(e2){a=false}}@end @*/if(!a&&typeof XMLHttpRequest!='undefined'){a=new XMLHttpRequest();if(a.overrideMimeType)a.overrideMimeType('text/plain')}return a}var xhttpjson=JSONXMLHttpReq();var lasttime=0,lastcurrent=0;function ParseProgress(){if(xhttpjson.readyState==4){var a=eval('('+xhttpjson.responseText+')');var c='',b=0;if(a.current>0){if(!lasttime){lasttime=(new Date).getTime();lastcurrent=a.current}else{c=" ("+(toFixed(((a.current-lastcurrent)/((new Date).getTime()-lasttime)),2))+" KB/s)"}b=toFixed((a.current*100/a.total),2);gID("progressbarborder").style.display="block";gID("progressbartext").innerHTML=b+"%"+c;gID("progressbar").style.width=b+"%"}if(a.current<a.total){setTimeout("getProgress()",200)}}}function getProgress(){if(xhttpjson){xhttpjson.open('GET','progress.php?progress_key='+up_uid,true);xhttpjson.onreadystatechange=ParseProgress;xhttpjson.send(null)}}function startProgress(){gID("up_progress").style.display="block";setTimeout("getProgress()",1000)}function getCookie(a){var c,b,d=0,f=0,g;c=' '+document.cookie+';';var h=c.length;while(d<h){f=c.indexOf(';',d);b=c.substring(d+1,f);g=b.indexOf('=');if(b.substring(0,g)==a){return unescape(b.substring(g+1,f-d-1))}d=f+1}return''}function setCookie(a,c){var b=new Date();b.setTime(b.getTime()+86400000*7);document.cookie=a+'='+escape(c)+'; expires='+b.toGMTString()}