var ASSET_PATH_HEADER = "/portal/cms/ztel/assets/images/glnav/"; var ZTEL_PATH = "/portal/ztel/" function gn_rollover_preload(){ //preloads middle images for the navigation if (document.images){ var argLength = gn_rollover_preload.arguments.length; for (arg=0; arg < argLength; arg++){ eval(arguments[arg] + " = new Image()"); eval(arguments[arg] + "_on = new Image()"); eval(arguments[arg] + ".src = '" + ASSET_PATH_HEADER + arguments[arg] + ".gif'"); eval(arguments[arg] + "_on.src = '" + ASSET_PATH_HEADER + arguments[arg] + "_on.gif'"); } } } function rollover(imageName){ if (document.images){ eval("document." + imageName + ".src=" + imageName + "_on.src"); } } function restore(imageName){ if (document.images){ eval("document." + imageName + ".src=" + imageName + ".src"); } } /* function: newOpener - loads URL on the parent window newURL: */ function newOpener(newURL) { opener.document.location = newURL; } /* function: newWin - opens a new window newWin takes on 7 values: WinURL: the URL to be loaded into the new window WinNAME: the NAME of the popup window WinWIDTH: the WIDTH of the popup window (currently set at 700px) WinHEIGHT: the HEIGHT of the popup window (currently set at 480px) WinRESIZE: the "yes" or "no" value for the resize window property WinSCROLL: the "yes" or "no" value for the scrollbars window property WinTOOLBAR: the "yes" or "no" value for the toolbar property */ function newWin(WinURL, WinNAME, WinWIDTH, WinHEIGHT, WinRESIZE, WinSCROLL, WinTOOLBAR) { /* variables passed by the link calling the function */ var URL = WinURL; var WINDOW_NAME = WinNAME; var POPUP_WIDTH = WinWIDTH; var POPUP_HEIGHT = WinHEIGHT; var POPUP_RESIZE = WinRESIZE; var POPUP_SCROLL = WinSCROLL; var POPUP_TOOLBAR = WinTOOLBAR; /* window properties that determine the window attributes depending on what values are passed by the link calling the function */ var window_toolbar = POPUP_TOOLBAR; var window_resize = POPUP_RESIZE; var window_scroll = POPUP_SCROLL; var window_width = POPUP_WIDTH; var window_height = POPUP_HEIGHT; var screen_balance_w = ((screen.width)-(window_width))/2; var screen_balance_h = ((screen.height)-(window_height))/2; var set_top = screen_balance_h; var set_left = screen_balance_w; win = window.open(URL,WINDOW_NAME,'resizable=' + window_resize + ',toolbar=' + window_toolbar + ',scrollbars=' + window_scroll + ',width=' + window_width + ',height=' + window_height + ',top=' + set_top + ',left=' + set_left + ''); win.focus(); } function newWinAddress(WinURL, WinNAME, WinWIDTH, WinHEIGHT, WinRESIZE, WinSCROLL, WinTOOLBAR) { /* variables passed by the link calling the function */ var URL = WinURL; var WINDOW_NAME = WinNAME; var POPUP_WIDTH = WinWIDTH; var POPUP_HEIGHT = WinHEIGHT; var POPUP_RESIZE = WinRESIZE; var POPUP_SCROLL = WinSCROLL; var POPUP_TOOLBAR = WinTOOLBAR; /* window properties that determine the window attributes depending on what values are passed by the link calling the function */ var window_toolbar = POPUP_TOOLBAR; var window_resize = POPUP_RESIZE; var window_scroll = POPUP_SCROLL; var window_width = POPUP_WIDTH; var window_height = POPUP_HEIGHT; var screen_balance_w = ((screen.width)-(window_width))/2; var screen_balance_h = ((screen.height)-(window_height))/2; var set_top = screen_balance_h; var set_left = screen_balance_w; win = window.open(URL,WINDOW_NAME,'resizable=' + window_resize + ',toolbar=' + window_toolbar + ',scrollbars=' + window_scroll + ',width=' + window_width + ',height=' + window_height + ',top=' + set_top + ',left=' + set_left + ',location=yes'); win.focus(); } /* function: closeWin - closes the child window */ function closeWin() { top.window.close(); } /* THIS JAVASCRIPT ALLOWS FOR AUTOMATIC FIELD TABBING FOR PHONE NUMBERS AND STUFF */ var downStrokeField; function autojump(fieldName,nextFieldName,fakeMaxLength) { var myForm=document.forms[document.forms.length - 1]; var myField=myForm.elements[fieldName];myField.nextField=myForm.elements[nextFieldName]; if (myField.maxLength == null)myField.maxLength=fakeMaxLength;myField.onkeydown=autojump_keyDown;myField.onkeyup=autojump_keyUp; } function autojump_keyDown() { this.beforeLength=this.value.length; downStrokeField=this; } function autojump_keyUp() { if ( (this == downStrokeField) && (this.value.length > this.beforeLength) && (this.value.length >= this.maxLength) ) this.nextField.focus(); downStrokeField=null; } //-->