var dbitems_settings = { verticalDragMinHeight: 43, verticalDragMaxHeight: 43, mouseWheelSpeed: 30, autoReinitialise: true, autoReinitialise: 3000 }; var content_settings = { verticalDragMinHeight: 38, verticalDragMaxHeight: 38, mouseWheelSpeed: 50, autoReinitialise: true, autoReinitialise: 3000 }; //----------------------------------------------------------------------------------------------- //POP UPS //----------------------------------------------------------------------------------------------- var icustomwindow; function newCustomWindow(file, width, height, resize) { window.open(file, "icustomwnd", "toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,height=" + height + ",width=" + width + ",resizable=" + resize + ",screenx=" + (screen.availWidth - width) / 2 + ",screeny=" + (screen.availHeight - height) / 2 + ",left=" + (screen.availWidth - width) / 2 + ",top=" + (screen.availHeight - height) / 2); } function newCustomWindowFrame(file, width, height, resize) { window.open(file, "icustomwnd", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,height=" + height + ",width=" + width + ",resizable=" + resize + ",screenx=" + (screen.availWidth - width) / 2 + ",screeny=" + (screen.availHeight - height) / 2 + ",left=" + (screen.availWidth - width) / 2 + ",top=" + (screen.availHeight - height) / 2); } function openPopup(url, name, width, height) { var oWindow; oWindow = window.open(url, name, 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=' + width + ',height=' + height); return oWindow; } function ValidDate(strDate) { if (strDate == '') return true; var datePat = /^(\d{1,2})(\/|-)(\d{1,2})\2(\d{2}|\d{4})$/; var matchArray = strDate.match(datePat); if (matchArray == null) return false; month = matchArray[1]; day = matchArray[3]; year = matchArray[4]; if (month < 1 || month > 12) return false; if (day < 1 || day > 31) return false; if ((month == 4 || month == 6 || month == 9 || month == 11) && day == 31) return false; if (month == 2) { var isleap = (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)); if (day > 29 || (day == 29 && !isleap)) return false; } return true; } function ValidInput(strItemCode, strValue) { var RE = ''; switch (strItemCode) { case 'company': { RE = /^[a-zA-Z]+((-|'|\s|.)[a-zA-Z0-9]+)*$/; break; } case 'email': { RE = /^[_a-zA-Z0-9-]+((\.|')[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$/; break; } case 'name': { RE = /^[a-zA-Z]+((-|'|\s)[a-zA-Z0-9]+)*$/; break; } } if (RE == '') return false; if (strValue.match(RE)) return true; else return false; }