var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); /******************************************************************************************************************************* The following code was added for the UN Global Compact Corporate Examples validation. This script displays all error using hidden divisions on the forms. All errors are displayed at one time on the page. When the erroneous data is corrected, the error message reverts to the hidden state ******************************************************************************************************************************/ //First check to see if the browser supports images. Some early browsers do not, so this servers as a security check. //This code will be executed when the page loads. var agentType; var domDoc; var cnstShow = "0"; var cnstHide = "1"; var nMenus = 7; /********************************************************************************* End Menu manipulating scripts *********************************************************************************/ var agent = navigator.userAgent.toLowerCase(); if(agent.indexOf("msie") != -1) { agentType = 0 domDoc = "document.all"; sty = ".style"; domSidebarImageBase = "document." showStyle = "visible" hideStyle = "hidden" } else { agentType = 1 domDoc = "document"; sty = ""; htm = ".document" showStyle = "show" hideStyle = "hide" domSidebarImageBase = "document.layers['SideBar'].document." } //Defineadditional constants used in input validation functions var cnstFieldArrayElement = 1; var cnstDivSuffix = '_div'; /************************************************************************************************************* function ShowErrorOrSave(form, sFieldType, retValue, imagename, imageurl, errors, nMaxLength ) takes arguments from the fieldsToValidate() function and it displays an error image alerting user to complete the field if the field fails validation, or if the required fields are filled out correctly it saves the document in the database. **************************************************************************************************************/ function ShowErrorOrSave(arrValues) { var blnFlag = false; var blnNoErrors = true; for (z=0; z *************************************************************************/ function trim(str){ var re= " "; re = /^\s+/; str = str.replace(re, ""); re = /\s+$/; str = str.replace(re, ""); return str; } function validateFields(arrFields) { //account for string values being passed in from single fields if(arrFields[0] == null) var arrFields = new Array(arrFields) var arrCurElement; var sFieldType; var blnIsRequired; var blnDataTest; var blnLengthTest; var nMaxLength; var sFieldLabel; var oCurElement; var form = window.document.forms[0].name; var sErrorText = ""; var sRequiredError = ""; var sMaxLenError = ""; var sErrorEnd = "\nPlease check your entry."; var retValue=true; for(i=0; i 0) { vCurValue = oField.value if(vCurValue.length > nMaxLength) { retValue = false; } } return retValue; } /*******************************************************************************/ function validateList(objField, allowFirstValue) { var tmpPos = -1; var retValue = true; for(j=0; j