window.onload = init; function init() { msgStatusAllLinks(); } window.onerror = function() { window.status = 'Error on page.'; } function attachFocus() { if (this.className.indexOf(" focus")<0) { this.className+=" focus"; } } function attachBlur() { if (this.className.indexOf(" focus")>0) { this.className = this.className.substring(0,this.className.indexOf(" focus")); } else { this.className.replace(" focus",""); } if (this.tempOnBlur) { // call existing onBlur event. this.tempOnBlur(); } } function msgStatus() { if (this.tagName=="INPUT") { switch(this.type) { case 'image': // form button is an (graphic); if (this.getAttribute('src').indexOf('_a.')!=-1) { this.src = this.getAttribute('src').replace('_a.','_b.'); txtStatus=this.getAttribute('alt'); } if (this.getAttribute('src').indexOf('-a.')!=-1) { this.src = this.getAttribute('src').replace('-a.','-b.'); txtStatus=this.getAttribute('alt'); } break; case 'button': // form button is an (webtext); case 'submit': // form button is an (webtext); case 'reset': // form button is an (webtext); case 'file': // form button is an (webtext); this.className="bnover"; txtStatus=this.getAttribute('value'); break; default: break; } } else { if (this.name) { for (i=0;i (graphic); if (this.getAttribute('src').indexOf('_b.')!=-1) { this.src = this.getAttribute('src').replace('_b.','_a.'); } if (this.getAttribute('src').indexOf('-b.')!=-1) { this.src = this.getAttribute('src').replace('-b.','-a.'); } break; case 'button': // form button is an (webtext); case 'submit': // form button is an (webtext); case 'reset': // form button is an (webtext); this.className="bnout"; break; default: break; } } else { if (this.name) { for (i=0;i (graphic); case 'button': // form button is an (webtext); case 'submit': // form button is an (webtext); case 'reset': // form button is an (webtext); document.getElementsByTagName('input')[i].onmouseover=msgStatus; document.getElementsByTagName('input')[i].onmouseout=msgStatusOff; break; case 'text': case 'password': document.getElementsByTagName('input')[i].onfocus=attachFocus; // Add element's existing onblur event (if it has one) before adding a new onBlur event 'attachBlur' // This ensures that any existing onBlur event the element has is still executed, as well as the 'attachBlur' event. // Check if IE or Netscape and use appropriate syntax accordingly. if (navigator.appName == 'Microsoft Internet Explorer') { if (document.getElementsByTagName('input')[i].onblur) { // Assign existing onBlur to a temp event 'tempOnBlur' - Later executed in attachBlur function. document.getElementsByTagName('input')[i].tempOnBlur = document.getElementsByTagName('input')[i].onblur; } // attach new onblur event. This will cause the input field colour to change. document.getElementsByTagName('input')[i].onblur=attachBlur; } else { // attach existing onblur event. document.getElementsByTagName('input')[i].addEventListener('blur',attachBlur,false); } break; default: break; } } for(i=0; i -1) strString=strString.substring(0,firstSpace+1) + toTitleCase(strString.substring(firstSpace+1,strString.length)); return strString; } // setTab for pages with Menu of Services tabs function setTab(oLink, tabHeight) { var oSpans, oBody = document.getElementById('contentbox'); if (oBody) { oSpans = oBody.getElementsByTagName('span'); for (var i = 0; i < oSpans.length; i++) { if (oSpans[i].className == 'tabcontent') { oSpans[i].style.display = (oLink.innerHTML.replace(new RegExp('&', 'g'), '').replace(new RegExp(' ', 'g'), '') == oSpans[i].getAttribute('id')) ? 'block' : 'none'; if (tabHeight > 0 && oSpans[i].style.display == 'block') { oSpans[i].display.height = tabHeight + 'px'; } } } } return false; } var jumpScroll = function(objId, posX, posY) { var obj = document.getElementById(objId); if (document.all) { obj.scrollLeft = posX; obj.scrollTop = posY; } else { window.scrollBy(posX, posY); } return false; }; function addFlash() { document.write(''); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(''); }