/*JS.JS*/ function AddCssNode(url) {var headID=document.getElementsByTagName("head")[0];var cssNode=document.createElement('link');cssNode.type='text/css';cssNode.rel='stylesheet';cssNode.href=url;cssNode.media='screen';headID.appendChild(cssNode);} function startsWith(orig,needle){if(orig.length0){return bodies[0];}}return null;} function send_through_proxy(data){if(!proxy)return;var id="proxyframe";var proxyframe=document.getElementById(id)||(document.frames?document.frames[id]: null);var firstchar=proxy.indexOf('?')!=-1?'&':'?';var url=proxy+firstchar+"upload_ee_data="+data+"&rnd="+(new Date()).getTime();if(proxyframe){document.body.removeChild(proxyframe);}var iframe = document.createElement("iframe");iframe.id=id;iframe.name=id;iframe.src=url;iframe.style.width="1px";iframe.style.height="1px";iframe.frameborder=0;iframe.scrolling="no";iframe.style.border="0";document.body.appendChild(iframe);} var asked = false; function askInstallJava(){if(asked)return false;asked=true;if(confirm('You do not seem to have Java installed or enabled, do you want to install it now ?'))window.open('http://www.java.com/en/download/manual.jsp', 'java_download', '');} function checkApplet(){var _appl=document.getElementById('upapp');var hasjava=false; return true; //check if applet element exists and applet.toString contains applet class name or if it exposes the required public function try{hasjava=_appl&&((''+_appl).indexOf('UploadApplet')!=-1||_appl.dragEnter)?true:false;}catch(ex){}return hasjava;} function checkUncheckAll(cb, namestart) { if(!cb) return; var f = cb.form; var state = cb.checked; for(var i = 0; i < f.elements.length; i++) { var elem = f.elements[i]; if(elem.type.toLowerCase() == 'checkbox' && elem.name.toLowerCase().indexOf(namestart.toLowerCase()) == 0) { elem.checked = state; } } } /*FILE_UPLOAD.JS*/ var upload_range=1;var get_status_url;var seconds=0;var minutes=0;var hours=0;var total_upload_size=0;var total_Kbytes=0;var CPB_loop=false;var CPB_width=0;var CPB_bytes=0;var CPB_time_width=500;var CPB_time_bytes=15;var CPB_hold=true;var CPB_byte_timer;var CPB_status_timer;var BPB_width_inc=0;var BPB_width_new=0;var BPB_width_old=0;var BPB_timer;var UP_timer; function checkFileNameFormat(){if(!check_file_name_format)return false;for(var i=0;i1){duplicate_msg+='Korduv fail "'+file_name_array[i]+'" lahtris number '+(i+1)+".\n";duplicate_flag=true;}file_count=0;}if(duplicate_flag)return confirm(duplicate_msg);else return false;} function resetForm(){location.href=self.location;} function hideProgressBar(){tryLog('hideProgressBar');document.getElementById('progress_bar').style.display="none";} function showDebugMessage(message){document.getElementById('ubr_debug').innerHTML+=message+'
';}function clearDebugMessage(){document.getElementById('ubr_debug').innerHTML='';} var javaupload=false; var in_iframe=false; function showAlertMessage(message){if(javaupload&&in_iframe)return;document.getElementById('ubr_alert').innerHTML=message;}function clearAlertMessage(){document.getElementById('ubr_alert').innerHTML='';}function stopDataLoop(){clearInterval(UP_timer);clearInterval(BPB_timer);CPB_loop=false;uploadDone();} function iniFilePage(){ tryLog('iniFilePage'); var d=document; resetProgressBar();clearAlertMessage();for(var i=0;i=0;i--){removeUploadSlot(i,true);} addUploadSlot(0); var jsel=d.createElement('SCRIPT'); var day=new Date; var dom; if(d.getElementById('ajax_div')){dom=d.getElementById('ajax_div');}else{dom=d.body;} jsel.type='text/javascript'; jsel.src=appendParam(appendParam(path_to_link_script,'rnd_id='+day.getTime()), 'linkmode=1'); dom.appendChild(jsel); dom=null; jsel=null; day=null; } function startUpload(upload_id,debug_upload,fromjava){ var d=document; if(fromjava){ javaupload=true; d.getElementById('upload_button').disabled=true; d.body.onbeforeunload=function(e){return js_upload_onbeforeunload;}; }else{ d.uu_upload.action=appendParam(appendParam(path_to_upload_script,'X-Progress-ID='+upload_id),'upload_id='+upload_id); d.uu_upload.submit(); } for(var i=0;i
"+js_upload_inprogress+"

"); if(show_current_position){document.getElementById('total_kbytes').innerHTML=total_Kbytes+" ";} if(show_elapsed_time){UP_timer=setInterval("getElapsedTime()",1000);} if (path_to_nginx_progress == '') getProgressStatus(); if(cedric_progress_bar==1){if(show_current_position){smoothCedricBytes();}smoothCedricStatus();} } function setProgressStatus(total_bytes_read,files_uploaded,current_filename,bytes_read,lapsed_time){ var byte_speed=0; var time_remaining=0; var dom; var d=document; if(lapsed_time>0){byte_speed=total_bytes_read/lapsed_time;} if(byte_speed>0){time_remaining=Math.round((total_upload_size-total_bytes_read)/byte_speed);} if(cedric_progress_bar==1){ if(byte_speed!=0){ var temp_CPB_time_width=Math.round(total_upload_size*1000/(byte_speed*progress_bar_width)); var temp_CPB_time_bytes=Math.round(1024000/byte_speed); if(temp_CPB_time_width<5001){CPB_time_width=temp_CPB_time_width;} if(temp_CPB_time_bytes<5001){CPB_time_bytes=temp_CPB_time_bytes;} }else{ CPB_time_width=500; CPB_time_bytes=15; } } var percent_float=total_bytes_read/total_upload_size; var percent=Math.round(percent_float*100); var progress_bar_status=Math.round(percent_float*progress_bar_width); var remaining_sec=(time_remaining%60); var remaining_min=(((time_remaining-remaining_sec)%3600)/60); var remaining_hours=((((time_remaining-remaining_sec)-(remaining_min*60))%86400)/3600); if(remaining_sec<10){remaining_sec='0'+remaining_sec;} if(remaining_min<10){remaining_min='0'+remaining_min;} if(remaining_hours<10){remaining_hours='0'+remaining_hours;} var time_remaining_f=remaining_hours+':'+remaining_min+':'+remaining_sec; var Kbyte_speed=Math.round(byte_speed/1024); var Kbytes_read=Math.round(total_bytes_read/1024); if(cedric_progress_bar==1){ if(cedric_hold_to_sync){ if(progress_bar_statusBPB_width_old)){BPB_width_inc=BPB_width_old;} clearInterval(BPB_timer); BPB_timer=setInterval("incrementProgressBar()",10); }else{ dom=d.getElementById('upload_status'); dom.style.width=progress_bar_status+'px'; } if(show_current_position){dom=d.getElementById('current_position');dom.innerHTML=Kbytes_read;} if(show_current_file){dom=d.getElementById('current_file');dom.innerHTML=current_filename;} if(show_percent_complete){dom=d.getElementById('percent_complete');dom.innerHTML=percent+'%';} if(show_files_uploaded){dom=d.getElementById('files_uploaded');dom.innerHTML=files_uploaded;} if(show_est_time_left){dom=d.getElementById('est_time_left');dom.innerHTML=time_remaining_f;} if(show_est_speed){dom=d.getElementById('est_speed');dom.innerHTML=Kbyte_speed;} dom=null; } function incrementProgressBar(){var PB_dom=document.getElementById('upload_status');if(BPB_width_inc -';dv.id='upfile_'+upload_range+'_div';up.appendChild(dv);upload_range++;up=null;dv=null;}}return false;} function addUploadSlot2(slot){} function removeUploadSlot(slot,force){if(!slot&&!force)return;var d=document;var up=d.getElementById('upload_slots');var dv=d.getElementById('upfile_'+slot+'_div');if(!dv)return;try{up.removeChild(dv);}catch(Ex){}if(slot