<!-- <( UTILITIES.JS )>/* fncFindDom * ===================== * Returns the dom dependant on the browser type * * Return value: * none * * Parameters: * strId - string object id * blnStyle - boolean return with .style */ function fncFindDom(strId,blnStyle) {   if (blnStyle) {     if (objClient.ns) return (document.layers[strId]);     else if (objBrowser.ie) return (document.all[strId].style);	 else if (objBrowser.dom) return (document.getElementById(strId).style)   } else {     if (objClient.ns) return (document.layers[strId]);     else if (objBrowser.ie) return (document.all[strId].style);	 else if (objBrowser.dom) return (document.getElementById(strId));   } } /* fncOpenWindow * ===================== * Opens a new popup window with passed parameters, focus * * Return value: * none * * Parameters: * strURL - string URL in new window * strName - string window name * strFeatures - string window features */  function fncOpenWindow(strURL,strName,intWidth,intHeight,strFeatures) {   var intLeft = (screen.width/2)-(intWidth/2);   var intTop = (screen.height/2)-(intHeight/2);   var winPopup = window.open(strURL,strName,"width="+intWidth+",height="+intHeight+","+strFeatures+",left="+intLeft+",top="+intTop);   winPopup.focus(); } /* fncPreloadImg * ===================== * Preloads specified image (image object, image source) * * Return value: * none * * Parameters: * strImgObj - string image object * strImgSrc - string image source */  function fncPreloadImg(strImgObj,strImgSrc) {   if (document.images) {     eval(strImgObj+' = new Image();');     eval(strImgObj+'.src = "'+strImgSrc+'";');   } } /* fncPreloadImgs * ===================== * Preloads specified images (image array, pairs - image object, image source) * sets global gBlnPreloaded to true when complete * * Return value: * none * * Parameters: * array of images in pairs (image object, image source) */  // global var set to false until all images are loaded var gBlnPreloaded = false;  function fncPreloadImgs() {   if (document.images) {     var intImgLength = arguments.length;     for (var x=0; x<intImgLength; x+=2) {       var strImgObj = arguments[x];       var strImgSrc = arguments[x+1];       fncPreloadImg(strImgObj,strImgSrc);     }     gBlnPreloaded = true;   } } /* fncImgRoll * ===================== * Changes specified images (image over, image out) * * Return value: * none * * Parameters: * strImgName - string image over * strImgOut - string image out */  function fncImgRoll(strImgName,strImgOut) {   if (document.images && (gBlnPreloaded == true)) {     document[strImgName].src = strImgOut;   } } /* fncLoadStyles * ===================== * Loads style sheets based on platform/browser * * Return value: * none * * Parameters: * none */  function fncLoadStyles() {   if (objClient.css1) document.write("<link href='"+gstrCSSPath+"global.css' rel='stylesheet' type='text/css'>");   if (objClient.ns && objClient.win) document.write("<link href='"+gstrCSSPath+"nswin.css' rel='stylesheet' type='text/css'>");   return true; }/* fncHandleMouseEvents * ===================== * Function to capture mouse events and set functions * * Return value: * none * * Parameters: * none */ function fncHandleMouseEvents(){   if (objClient.ns4up) {     window.captureEvents(Event.MOUSEMOVE | Event.MOUSEDOWN | Event.MOUSEUP); 	 window.onmousemove = fncMousePosition;   }   if (objClient.ns4up) {     document.onmousemove = fncMousePosition;   } }/* fncMousePosition * ===================== * Function to capture mouse position * * Return value: * none * * Parameters: * eventNS - mouse event passed in ns */ var mouseX = ''; var mouseY = ''; function fncMousePosition(eventNS) {   if (objClient.ns4up) {     mouseX = eventNS.pageX;	 mouseY = eventNS.pageY;   } else {     mouseX = document.body.scrollLeft + eval(event.clientX);	 mouseY = document.body.scrollTop + eval(event.clientY);   } }/* fncScrollPosition * ===================== * Returns current scroll position of the window (top or left) * * Return value: * specified scroll position * * Parameters: * blnLeftTop - bool find window left or top scroll position (true = left/ false = top) */  function fncScrollPosition(blnLeftTop) {   if (objClient.ns4up) {     if (blnLeftTop) return window.pageXOffset;	 else return window.pageYOffset;   } else {     if (blnLeftTop) return document.body.scrollLeft;	 else return document.body.scrollTop;   } } /* fncElementPosition * ===================== * Returns elements position (including offset of scroll position of the window (top or left)) * * Return value: * specified elements position * * Parameters: * objElement - object element or layer * strLftTpRghtBttm - element left, top, right, bottom coordinates (enter as -> l,t,r,b) */ function fncElementPosition(objElement,strLftTpRghtBttm) {   // set scroll pos in vars, if main menu moves relative to scroll position (var menuRelAbs -> set in html) is true   var scrollPosX = (menuRelAbs)?fncScrollPosition(true):0;   var scrollPosY = (menuRelAbs)?fncScrollPosition(false):0;   if (objClient.ns4up) {	 if (strLftTpRghtBttm == 'l') return (objElement.left+scrollPosX);	 else if (strLftTpRghtBttm == 't') return (objElement.top+scrollPosY);	 // NOTE: ns returns value including borders for bottom coordinate, ie does not	 // NOTE: ns will not calculate width or height of dynamic layer (must add manually)	 else if (strLftTpRghtBttm == 'r') return (objElement.document.width+objElement.left+scrollPosX);	 else if (strLftTpRghtBttm == 'b') return (objElement.document.height+objElement.top+scrollPosY);   } else {     if (strLftTpRghtBttm == 'l') return (objElement.style.pixelLeft+scrollPosX);	 else if (strLftTpRghtBttm == 't') return (objElement.style.pixelTop+scrollPosY);	 else if (strLftTpRghtBttm == 'r') return (objElement.clientWidth+objElement.style.pixelLeft+scrollPosX);	 else if (strLftTpRghtBttm == 'b') return (objElement.clientHeight+objElement.style.pixelTop+scrollPosY);   } } /* fncElementPosition * ===================== * Returns elements position (including offset of scroll position of the window (top or left)) * * Return value: * specified elements position * * Parameters: * objElement - object element or layer */  //init global vars to find current element position var curElementLeft = 0, curElementTop = 0, curElementRight = 0, curElementBot = 0; function fncSetElementsPosition(objElement) {   curElementLeft = fncElementPosition(objElement,'l');   curElementTop = fncElementPosition(objElement,'t');   curElementRight = fncElementPosition(objElement,'r');   curElementBot = fncElementPosition(objElement,'b'); } /* ============================================ * String checking functions pre-RegEx browsers  * ============================================ *//* fncIsAlpha * ===================== * Checks if string is only alpha characters * * Return value: * true/false * * Parameters: * strString - string passed to test */  var straCode = new String('a').charCodeAt(0); var strACode = new String('A').charCodeAt(0); var strzCode = new String('z').charCodeAt(0); var strZCode = new String('Z').charCodeAt(0);  function fncIsAlpha(strString) {   var alpha = true;   for (x=0; x<strString.length; x++) {     var charStr = strString.charAt(x);	 var charCode = charStr.charCodeAt(0);	 if (charStr == "" || (charCode >= straCode && charCode <= strzCode) || (charCode >= strACode && strZCode)) {	 } else { alpha = false; }   }   return alpha; } /* fncIsNumeric * ===================== * Checks if string is only numeric characters * * Return value: * true/false * * Parameters: * strString - string passed to test */  function fncIsNumeric(strString) {   for (x=0; x<strString.length; x++) {     var charStr = strString.charAt(x);	 if (isNaN(parseInt(charStr))) return false;   }   return true; } /* fncIsAlphaNumeric * ===================== * Checks if string is only numeric characters * * Return value: * true/false * * Parameters: * strString - string passed to test */  function fncIsAlphaNumeric(strString) {   for (x=0; x<strString.length; x++) {     if (!fncIsAlpha(strString.charAt(x)) && !fncIsNumeric(strString.charAt(x)))	   return false;   }   return true; } /* fncIsBlank * ===================== * Checks if string is empty * * Return value: * true/false * * Parameters: * strString - string passed to test */  function fncIsBlank(strString) {   if (strString == '' || strString == ' ' || strString == '\t' || strString == '\n') return true;   return false; } // end hide -->