function loadURL(connection, destinationURL, arguments, triggerFunction) { connection.onreadystatechange = triggerFunction; //Browsers will cache text documents even if they've changed so we append a timestamp to get the latest file if (arguments == '') { stamp = '?' + Math.round(new Date().getTime()/1000.0); } else { stamp = '&' + Math.round(new Date().getTime()/1000.0); } connection.open("GET", destinationURL + arguments + stamp); connection.send(null); } function reportError(errMsg, errScript, errLine) { errorConnection = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP"); loadURL(errorConnection, 'javascriptError.php', '?errMsg=' + errMsg + '&errScript=' + errScript + '&errLine=' + errLine, errorLog); return true; } function errorLog() { return true; } function openWindow(url, width, height) { ref = window.open(url, 'window', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width='+width+',height='+height+',left=400,top=200'); } function callDelete(url, name) { if (confirm('Are you sure you want to delete "' + name + '"?')) { document.location.href = url; } else { return false; } } function validateForm(formArray) { returnValue = true; for (i=0; i 0 && element.length < formArray[i][4]) || (formArray[i][2] == 'EMAIL' && isEmail(element.value) && element.value != formArray[i][5]) || (formArray[i][2] == 'TEL' && isTel(element.value) && element.value != formArray[i][5]) || (formArray[i][2] == 'DATE' && element.value != '' && element.value != formArray[i][5])) { highlightElement(formArray[i][0], false); } else { alert(formArray[i][3]); highlightElement(formArray[i][0], true); focusElement(element); returnValue = false; } break; case 'radio': var element = eval('document.forms[0].' + formArray[i][0]); foundItem = false; for (j=0; j