var errorMessages = new Array(); errorMessages[0] = 'Unfortunately, your browser does not support this function. Please select Print from the File menu.'; errorMessages[1] = ''; errorMessages[2] = ''; errorMessages[3] = ''; errorMessages[4] = ''; errorMessages[5] = ''; errorMessages[6] = ''; errorMessages[7] = ''; errorMessages[8] = ''; errorMessages[9] = ''; errorMessages[10] = ''; errorMessages[11] = ''; errorMessages[12] = ''; errorMessages[13] = ''; errorMessages[14] = ''; errorMessages[-7] = 'You have not completed all of the required fields. Please check the information you have provided and enter all required fields.'; errorMessages[-8] = 'The following errors were found in the form data:'; errorMessages[-29] = 'You do not have permission to perform this action.'; var texts = new Array(); texts[0] = 'Sunday'; texts[1] = 'Monday'; texts[2] = 'Tuesday'; texts[3] = 'Wednesday'; texts[4] = 'Thursday'; texts[5] = 'Friday'; texts[6] = 'Saturday'; texts[7] = 'Sun'; texts[8] = 'Mon'; texts[9] = 'Tue'; texts[10] = 'Wed'; texts[11] = 'Thu'; texts[12] = 'Fri'; texts[13] = 'Sat'; texts[14] = 'January'; texts[15] = 'February'; texts[16] = 'March'; texts[17] = 'April'; texts[18] = 'May'; texts[19] = 'June'; texts[20] = 'July'; texts[21] = 'August'; texts[22] = 'September'; texts[23] = 'October'; texts[24] = 'November'; texts[25] = 'December'; texts[26] = 'Jan'; texts[27] = 'Feb'; texts[28] = 'Mar'; texts[29] = 'Apr'; texts[30] = 'May'; texts[31] = 'Jun'; texts[32] = 'Jul'; texts[33] = 'Aug'; texts[34] = 'Sep'; texts[35] = 'Oct'; texts[36] = 'Nov'; texts[37] = 'Dec'; texts[38] = 'Loading'; texts[39] = 'Establishing connection ...'; texts[40] = 'Reading data ...'; texts[41] = 'Closing connection ...'; texts[42] = 'Done'; texts[45] = 'Missing'; texts[46] = 'Must Be Numeric'; texts[47] = 'Must Be Unsigned'; texts[48] = 'You must supply either a valid Email Address or Mobile Telephone Number'; function get_error_message(errorNo) { return errorMessages[errorNo]; } function get_text(textNo) { return texts[textNo]; } var time = new Date(); var popupcount = time.getTime(); function newpopup(url, w, h, scroll) { if ("" + scroll == "undefined") { scroll = "no"; } var options = "width=" + w + ",height=" + h +","; options += "resizable=no,scrollbars=" + scroll + ",status=no,"; options += "menubar=no,toolbar=no,location=no,directories=no"; var newWin = window.open(url, 'newWin'+popupcount, options); newWin.focus(); popupcount++; // return false; } function toggleVisibility(pTarget, pDirection) { var targetObject = document.getElementById(pTarget); if ((targetObject.style.visibility!="visible") && (pDirection!=0)) { // targetObject.style.position="fixed"; targetObject.style.visibility="visible"; } else if (pDirection!=1) { // targetObject.style.position="absolute"; targetObject.style.visibility="hidden"; } } function MM_swapImgRestore() { var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i= 4) { isNav4 = (navigator.appName == "Netscape") ? 1 : 0; isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0; } if (isNav4) { winw = window.innerWidth; winh = window.innerHeight; } if (isIE4) { winw = document.body.clientWidth; winh = document.body.clientHeight; } swidth = (screen.width / 2) - (winw / 2); sheight = (screen.height / 2) - (winh / 2); self.moveTo(swidth,sheight); } function redirect(url) { if (url != null) { location.href = url; } return false; } function DateSuffix(dt){ switch(dt){ case "1": return "1st"; break; case "2": return "2nd"; break; case "3": return "3rd"; break; case "01": return "1st"; break; case "02": return "2nd"; break; case "03": return "3rd"; break; case "21": return "21st"; break; case "22": return "22nd"; break; case "23": return "23rd"; break; case "31": return "31st"; break; default: return dt + "th"; break; } } function statusSet(newStat){ window.status = newStat; return true; } // These variables are used to determine which DOM is available to us var isDOM = (typeof(document.getElementsByTagName) != 'undefined' && typeof(document.createElement) != 'undefined') ? 1 : 0; var isIE4 = (typeof(document.all) != 'undefined' && parseInt(navigator.appVersion) >= 4 && !typeof(window.opera)) ? 1 : 0; var capable = (isDOM || isIE4) ? 1 : 0; // Calculates the location of the object we are after, based on the DOM // supported by this user agent. Works out the object based on the user agent function getObj(el) { var whichEl = false; if (isDOM) { var whichEl = document.getElementById(el); } else if (isIE4) { var whichEl = document.all(el); } return whichEl; }// Expands an element, given an element name. If the second parameter is true, it will // collapse all other open of this prefix elements first. function _expand(elNo) { if (!capable) return; if (!this.multiple) this.collapseAll(); var whichEl = getObj(this.prefix + elNo + 'Child'); whichEl.style.display = 'block'; return false; } // Collapse an element, given an element name. function _collapse(elNo) { if (!capable) return; var whichEl = getObj(this.prefix + elNo + 'Child'); whichEl.style.display = 'none'; return false; } // Toggles the display mode. Probably the most useful method here - this // will open a closed element, or close an opened one, given the element name function _toggle(elNo) { if (!capable) return; var whichEl = getObj(this.prefix + elNo + 'Child'); if (whichEl.style.display == 'block'){ this.collapse(elNo); } else { this.expand(elNo); } return false; } // Find out the number of elements in this prefix. // IMPORTANT: Only works if element numbers are sequential integers with no gaps. function _getNumElements() { var i=0; while (++i){ var obj = getObj(this.prefix + i + 'Parent'); if (!obj) return i-1; } } // Collapses all elements of this prefix function _collapseAll() { var numElements = this.getNumElements(); for(i = 1; i <= numElements; i++) this.collapse(i); return; } // Master object - allows multiple versions of this code to run on the same page function hiddenContent(prefix, multiple) { // Properties this.prefix = prefix; // (string) the prefix used for page object controlled from this object this.multiple = multiple; // (bool) allow several
tags of the same prefix to be open at once? // Methods this.getNumElements = _getNumElements; this.collapseAll = _collapseAll; this.expand = _expand; this.collapse = _collapse; this.toggle = _toggle; }