var regimg = 0; var whoimg = 1; var manimg = 2; var helimg = 3; var polimg = 4; var parimg = 5; var logimg = 6; var preimg = 7; var conimg = 8; var aboimg = 9; var mapimg = 10; var proimg = 11; var images = new Array(12); var currentSection = ""; function RollImage(name, low, high) { this.state = false; this.current = false; this.name = name; this.low = new Image(); this.low.src = low; this.high = new Image(); this.high.src = high return this; } var roll = (document.images); if(roll) { // Load all the images. // images[0] = new RollImage("img to roll", "static image", "active image"); images[0] = new RollImage("regimg", "/gfx/menubar/menu1-regi.gif", "/gfx/menubar/menu1-regi-on.gif"); images[1] = new RollImage("whoimg", "/gfx/menubar/menu2-whoi.gif", "/gfx/menubar/menu2-whoi-on.gif"); images[2] = new RollImage("manimg", "/gfx/menubar/menu3-mana.gif", "/gfx/menubar/menu3-mana-on.gif"); images[3] = new RollImage("helimg", "/gfx/menubar/menu4-help.gif", "/gfx/menubar/menu4-help-on.gif"); images[4] = new RollImage("polimg", "/gfx/menubar/menu5-poli.gif", "/gfx/menubar/menu5-poli-on.gif"); images[5] = new RollImage("parimg", "/gfx/menubar/menu6-join.gif", "/gfx/menubar/menu6-join-on.gif"); images[6] = new RollImage("logimg", "/gfx/menubar/menu7-logi.gif", "/gfx/menubar/menu7-logi-on.gif"); images[7] = new RollImage("preimg", "/gfx/menubar/menu8-pres.gif", "/gfx/menubar/menu8-pres-on.gif"); images[8] = new RollImage("conimg", "/gfx/menubar/menu9-cont.gif", "/gfx/menubar/menu9-cont-on.gif"); images[9] = new RollImage("aboimg", "/gfx/menubar/menuA-abou.gif", "/gfx/menubar/menuA-abou-on.gif"); images[10] = new RollImage("mapimg", "/gfx/menubar/menuC-site.gif", "/gfx/menubar/menuC-site-on.gif"); images[11] = new RollImage("proimg", "/gfx/menubar/menuD-prod.gif", "/gfx/menubar/menuD-prod-on.gif"); } function changeImage(section, message, newState) { // Make sure can actually do rolling images. if((section != null) && roll) { // Get the rollImage. var rollImage = eval("images[" + section + "]"); // If it isn't current, change it's state. if(!rollImage.current) { if(newState) document.images[rollImage.name].src = rollImage.high.src; else document.images[rollImage.name].src = rollImage.low.src; rollImage.state = newState; } } window.status = message; return true; } function popupWindow(url, winname, w, h, child, position, scrollbars, resize, status, toolbar, dependent, alwaysRaised, menubar) { // 20040324DC - name the parent window so it can be reused by the popup window. self.name = 'Parent_Window'; // Default settings - off/nothing var scrollbarsetting = 'no'; var statusbarsetting = 'no'; var toolbarsetting = 'no'; var dependentsetting = 'no'; var alwaysRaisedsetting = 'no'; var menubarsetting = 'no'; var positionsettings = ''; // If empty, won't be output var resizesetting = ''; // Specify width and height, make it 1/2 of screen var width = ((screen.width) / 2); var height = ((screen.width) / 2); // If w & h specified, override the default width and height... if (w != width) { width = w; } if (h != height) { height = h; } // Use these values to center the window on-screen var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; // If we want the window centered, use this. Could extend // in future to use some of kind of offest if (position == 'center') { positionsettings = 'top='+wint+',left='+winl+','; } //for the below statements, if 'yes' is sent through, change the default setting //from 'no' to 'yes' if (scrollbars == 'yes') { scrollbarsetting = 'yes'; } if (resize == 'yes') { resizesetting = ',resizable'; } if (status == 'yes') { statusbarsetting = 'yes'; } if (toolbar == 'yes') { toolbarsetting = 'yes'; } if (dependent == 'yes') { dependentsetting = 'yes'; } if (alwaysRaised == 'yes') { alwaysRaisedsetting = 'yes'; } if (menubar == 'yes') { menubarsetting = 'yes'; } // Define the window properties line winprops = 'height=' +height+ ',width=' +width+ ',' +positionsettings+ 'scrollbars=' +scrollbarsetting+ ',toolbar=' +toolbarsetting+ ',status=' +statusbarsetting+ ',dependent=' +dependentsetting+ ',alwaysRaised=' +alwaysRaisedsetting+ ',menubar=' +menubarsetting+ '' +resizesetting; // Decide whether we're opening a dependant or normal window if (child == 'yes') { // Dependant, closes when focus is moved away from its parent win = open(url, winname, winprops); } else { // Normal window, stays open until shut win = window.open(url, winname, winprops); } // Give the new window focus, if we can if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function updateParent(newURL) { opener.document.location = newURL; obgWindow.close(); } var submitcount=0; function checkFields() { if (submitcount == 0) { submitcount++; //alert(submitcount); return true; } else { alert("Thankyou, this form has already been submitted."); return false; } } var submitDone; submitDone = 0; function preventDoublePosts(form) { if (document.all && document.form.SubmitButton) { document.form.SubmitButton.disabled = true; document.form.SubmitButton.value = 'Please wait...'; } if (submitDone == 0) { submitDone = 1; return true; } //else //{ // if (!document.form.SubmitButton || !document.all) // { // alert("Please wait..."); // } // return false; //} }