var imbedded_progress_bar = false; // Change to true to use an imbedded progress bar. function createHiddenInput(name,value) { var el = document.createElement('input'); el.type="hidden"; el.name=name; el.value=value; return(el); } ////////////////////////////////////////////////////// // Check files, submit upload and pop up progress bar ////////////////////////////////////////////////////// function uploadFiles(frm_id,imbedded,div_imbedded,max){ var progress_link='uber/php/uber_uploader_progress.php'; var upload_link='uber/cgi-bin/uber_uploader.cgi'; var tmp_sid='1b8ad30dbf64ab62180b110a778f097f'; imbedded_progress_bar = imbedded; if(window.opera){ imbedded_progress_bar = false; } var frm=document.getElementById(frm_id); upload_link += '?tmp_sid='+tmp_sid; if (max!=null) upload_link += '&max='+max; progress_link += '?tmp_sid='+tmp_sid; if(imbedded_progress_bar) progress_link += '&imbedded_progress_bar=1'; else progress_link += '&imbedded_progress_bar=0'; var redirect_link = frm.action; if (redirect_link.indexOf("?")==-1) redirect_link += '?tmp_sid='+tmp_sid; else redirect_link += '&tmp_sid='+tmp_sid; if(!imbedded_progress_bar) redirect_link += '&close_pop=1'; frm.appendChild(createHiddenInput('redirect_url',redirect_link)); frm.appendChild(createHiddenInput('progress_url',progress_link)); frm.action = upload_link; frm.submit(); if(imbedded_progress_bar){ document.getElementById(div_imbedded).innerHTML = ""; } else{ var upWin = window.open(progress_link,'uploadWin','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=420,height=300,left=350,top=250'); if(window.focus){ upWin.focus(); } } return false; } //////////////////////////// // Stop the current upload //////////////////////////// function stop_upload(msg){ if(imbedded_progress_bar){ document.getElementById('progress_div').innerHTML = "
" + msg + "
"; } try{ document.execCommand('Stop'); } catch(e){ window.stop(); } }