/** Javascript file for js function. Requirements: -none Function list function rs_startProgress initiates the progress bar display function rs_endProgress finished and removes the progress bar function rs_startMenuProgressBar initiates the progress bar display for menu opctions function rs_endMenuProgressBar finished and removes the progress bar from menu function rs_waitProgress() function rs_waitMenuProgressBar() Main function No main function Global variables: top.ProgressIndicator = 0; **/ /************************************************************************ * * Progress bar section * */ //----------------------------------------------------------------------- // Indicates the startProgress method that some progress bar is currently // running top.ProgressIndicator = 0; //----------------------------------------------------------------------- // // Starts the progress bar. Each second, a new cell will be filled, until // rs_endProgress() function is called. // div "progressIndicator" MUST exist in the current document // table "tblProgress" MUST exist in the div "progressIndicator" // function rs_startProgress() { try { var objDiv = document.getElementById('progressIndicator'); var tblProg = document.getElementById('tblProgress'); try { w = document.body.clientWidth; h = document.body.clientHeight; objDiv.style.top = h/2 - 20; objDiv.style.left = w/2 - 100; objDiv.style.width= 60; } catch(ett) { objDiv.style.top = 240; objDiv.style.left = 320; objDiv.style.width= 60; } objDiv.style.display = 'inline'; if ( top.ProgressIndicator == 10 ){ for ( i=0;i<10;i++){ tblProg.rows[0].cells[i].className="empty"; } top.ProgressIndicator=0; } tblProg.rows[0].cells[top.ProgressIndicator].className='filled'; top.ProgressIndicator = eval(top.ProgressIndicator) + 1; clearTimeout(top.timeOut); top.timeOut = setTimeout("rs_startProgress()",1000); } catch(err) { clearTimeout(top.timeOut); } } function rs_startMenuProgressBar() { var tblProg = top.frames["Hide"].document.getElementById('TFtblProgress'); var progr = top.frames["Hide"].document.getElementById('TFProgress'); var title = top.frames["Hide"].document.getElementById('TFTitle'); title.style.display = 'none'; progr.style.display = 'inline'; if ( top.ProgressIndicator == 9 ){ for ( i=0;i<10;i++){ tblProg.rows[0].cells[i].className="empty"; } top.ProgressIndicator=0; } tblProg.rows[0].cells[top.ProgressIndicator].className='filled'; top.ProgressIndicator = eval(top.ProgressIndicator) + 1; clearTimeout(top.timeOut); top.timeOut = setTimeout("rs_startMenuProgressBar()",1000); } //----------------------------------------------------------------------- // // Removes the progress bar and fills the table with empty style values // function rs_endProgress() { try { clearTimeout(top.timeOut); top.ProgressIndicator = 0; var objDiv = document.getElementById('progressIndicator'); var tblProg = document.getElementById('tblProgress'); for ( i=0;i<10;i++){ tblProg.rows[0].cells[i].className="empty"; } objDiv.style.display = 'none'; } catch(err) { } } function rs_endMenuProgressBar() { clearTimeout(top.timeOut); top.ProgressIndicator = 0; var progr = top.frames["Hide"].document.getElementById('TFProgress'); var title = top.frames["Hide"].document.getElementById('TFTitle'); var tblProg = top.frames["Hide"].document.getElementById('TFtblProgress'); for ( i=0;i<10;i++){ tblProg.rows[0].cells[i].className="empty"; } progr.style.display = 'none'; title.style.display = 'inline'; } //----------------------------------------------------------------------- // // Waits for the process to end and notify to remove the progress bar // function rs_waitProgress() { var flag = document.getElementById("flag"); if (flag.value !="yes") { clearTimeout(top.timeOutResponse); top.timeOutResponse = setTimeout("rs_waitProgress()",1000); } else { clearTimeout(top.timeOutResponse); rs_endProgress(); } } function rs_waitMenuProgressBar() { var flag = document.getElementById("progressBarFlag"); if (flag.value !="yes") { clearTimeout(top.timeOutResponse); top.timeOutResponse = setTimeout("rs_waitMenuProgressBar()",1000); } else { clearTimeout(top.timeOutResponse); rs_endMenuProgressBar(); } }