// javascript document // popup function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=1,statusbar=0,menubar=1,resizable=1,width=400,height=500,left = 312,top = 134');"); } // validate radio function validate(frm, btnName, start, total) { var valid; isvalid=start-1; // loop from the first to the last question for(i=start; i<=total; i++) { // capture just the F_SUS_ part btnName=btnName.substring(0,6); // add to it the number, for example F_SUS_1 btnName=btnName+i; // grab that radio group from the form var btn = frm[btnName]; // loop through each radio button in the radio group for (var x = 0;x < btn.length; x++) { // valid if its checked valid = btn[x].checked if (valid) { // add 1 to the valid count isvalid++; } } } // if the number of questions answered does not equal the total if(isvalid!=total) { // not valid // alert('total questions on page = '+total); // alert('total questions answered = '+isvalid); alert("Please answer every question on this page."); return false; } else { // valid // alert('total questions on page = '+total); // alert('total questions answered = '+isvalid); // alert('FORM VALIDATED'); return true; } } // some dreamweaver function function SymError() { return true; } window.onerror = SymError; var SymRealWinOpen = window.open; function SymWinOpen(url, name, attributes) { return (new Object()); } window.open = SymWinOpen; function MM_reloadPage(init) { //reloads the window if Nav4 resized if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) { document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }} else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload(); } MM_reloadPage(true); // dennis highlight code function toggleCell(rowNum,rowLbl) { var leftSideValue = 0; var rightSideValue = 0; var el = document.getElementById('row'+rowNum+'Title'); // get the value on the left side for(i=0, n=document['theForm']['P_'+rowLbl+'_'+rowNum].length; i= 4, highlight the row, else, turn it back. if((leftSideValue | rightSideValue) >= 4) { el.style.backgroundColor = '#aef9ae'; } else { el.style.backgroundColor = ''; } } // highlight stressful questions on refresh function initializeRowColors(rowStart,rowEnd,rowName) { for(j=rowStart; j<=rowEnd; j++) { toggleCell(j,rowName); } } // suceptibility section function toggleCellSus(rowNum,rowLbl) { var rightSideValue = 0; var el = document.getElementById('row'+rowNum+'Title'); // get the value on the right side for(i=0, n=document['theForm']['F_'+rowLbl+'_'+rowNum].length; i= 4, highlight the row, else, turn it back. if((rightSideValue) >= 4) { el.style.backgroundColor = '#aef9ae'; } else { el.style.backgroundColor = ''; } } // SUS highlight stressful questions on refresh function initializeRowColorsSus(rowStart,rowEnd,rowName) { for(j=rowStart; j<=rowEnd; j++) { toggleCellSus(j,rowName); } } // display system date in header function getCalendarDate() { var months = new Array(13); months[0] = "January"; months[1] = "February"; months[2] = "March"; months[3] = "April"; months[4] = "May"; months[5] = "June"; months[6] = "July"; months[7] = "August"; months[8] = "September"; months[9] = "October"; months[10] = "November"; months[11] = "December"; var now = new Date(); var monthnumber = now.getMonth(); var monthname = months[monthnumber]; var monthday = now.getDate(); var year = now.getYear(); if(year < 2000) { year = year + 1900; } var dateString = monthname + ' ' + monthday + ', ' + year; return dateString; } // layer code var SymRealOnLoad; var SymRealOnUnload; function SymOnUnload() { window.open = SymWinOpen; if(SymRealOnUnload != null) SymRealOnUnload(); } function SymOnLoad() { if(SymRealOnLoad != null) SymRealOnLoad(); window.open = SymRealWinOpen; SymRealOnUnload = window.onunload; window.onunload = SymOnUnload; } SymRealOnLoad = window.onload; window.onload = SymOnLoad;