var win=null; function oHW(pageKey, sectionName, subSectionName) { } function ValidateInputLength(maxLength,strname) { var newStrName = ""; for (var i = 0; i") strVal = ">"; newStrName = newStrName + strVal; } if (newStrName.length > maxLength) return false; else return true; } function icDisplayStatusMsg(msgStr) { status=msgStr document.MM_returnValue = true; } var winFullScreen=null; function openWinFullScreen(mypage,myname,scrollbar,toolbar,pos,margin){ w=screen.width-125; h=screen.height-125; if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?((screen.height-h)-20)/2:100;TopPosition=TopPosition-10} settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbar+',location=no,directories=no,status=no,menubar=no,toolbar='+toolbar+',resizable=yes'; winFullScreen=window.open(mypage,myname,settings); if(winFullScreen.focus){winFullScreen.focus();} } var winMaxSize=null; function openWinMaxSize(mypage,myname,scrollbar,toolbar,pos){ w=screen.width-125; h=screen.height-125; if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?((screen.height-h)-20)/2:100;TopPosition=TopPosition-10} settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbar+',location=no,directories=no,status=no,menubar=no,toolbar='+toolbar+',resizable=yes'; winMaxSize=window.open(mypage,myname,settings); if(winMaxSize.focus){winMaxSize.focus();} } var helpWinFullScreen = null; function openHelpWinFullScreen(mypage,myname,scrollbar,toolbar,pos,margin) { w = screen.width-125; h = screen.height-125; if(pos == "center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?((screen.height-h)-20)/2:100;TopPosition=TopPosition-10} settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbar+',location=no,directories=no,status=no,menubar=no,toolbar='+toolbar+',resizable=yes'; helpWinFullScreen = window.open(mypage,myname,settings); if(helpWinFullScreen.focus){helpWinFullScreen.focus();} } var WinHS = null; function openHS(mypage, myname, scrollbar, toolbar, pos, w) { h = screen.height-125; LeftPosition = 65; TopPosition = (screen.height)?((screen.height-h)-20)/2:100; TopPosition = TopPosition - 10; settings = 'width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrollbar+',location=no,directories=no,status=no,menubar=no,toolbar='+toolbar+',resizable=yes'; WinHS = window.open(mypage,myname,settings); if(WinHS.focus) { WinHS.focus(); } } function LaunchTreeViewFile(idTree, preSelected) { var preselectedItems = document.getElementById("TreeAssignVal" + idTree).value; var URL = "/BIW/GenericTree/Admin/AssociateTree.aspx?idTree=" + idTree + "&preSelected=" + preselectedItems; var winHeight = screen.height - 125; var winDimensions = "status:no;dialogHeight:" + winHeight + "px;dialogWidth:460px;center:yes;help:no;"; var AssociatedItems = showModalDialogIfPossible(URL, "Associate Tree Nodes", winDimensions); if (AssociatedItems == null) return; var nodesArray = AssociatedItems.split(':'); var element = document.getElementById("txtAssigned" + idTree); var elementVal = document.getElementById("TreeAssignVal" + idTree); element.value = "[ " + nodesArray[0] + " Associated ]" ; elementVal.value = nodesArray[1]; } function LaunchTextTreeViewFile(idTree) { if (idTree != "0") { var preselectedItems = document.getElementById("comment").value; var URL = "/BIW/GenericTree/Admin/AssociateTree.aspx?action=text&idTree=" + idTree + "&preSelected=" + preselectedItems; var winHeight = screen.height - 125; var winDimensions = "status:no;dialogHeight:" + winHeight + "px;dialogWidth:460px;center:yes;help:no;"; var AssociatedItems = showModalDialogIfPossible(URL, "Associate Tree Nodes", winDimensions); if (AssociatedItems == null) return; var elementVal = document.getElementById("comment"); elementVal.value = elementVal.value + AssociatedItems; } } function ToggleDivVis(whichDiv, imageRef){ var OpenMenuSrc = "/skins//images/menuimages/menu/win/plusonlyraw.gif"; var CloseMenuSrc = "/skins//images/menuimages/menu/win/minusonlyraw.gif"; imageActual = eval('document.' + imageRef); theDiv=document.getElementById(whichDiv); if (theDiv.style.display == 'block') { theDiv.style.display = 'none'; imageActual.src = OpenMenuSrc; } else { theDiv.style.display = 'block'; imageActual.src = CloseMenuSrc; } //var cp = eval('cookieProcessor'); var cp = document.getElementById('cookieProcessor'); var qs = '/ic/project/headlines/includes/CookieProcessor.asp?t=' + new Date().getTime() + '&cookie=ic&key=Inbox_' + whichDiv + '&value=' + theDiv.style.display cp.src = qs; } function focusFirstFormElement(form) { var eachElement; for (var i = 0; i < form.elements.length; i++) { eachElement = form.elements[i]; if (eachElement.type == "text" && !eachElement.disabled) { eachElement.focus(); break; } } } //------------------------------------------------------------------- // isBlank(value) // Returns true if value only contains spaces //------------------------------------------------------------------- function biwValidateIsBlank(val){ if(val==null){return true;} for(var i=0;i1){return false;} var string="1234567890"; if (string.indexOf(num)!=-1){return true;} return false; } //------------------------------------------------------------------- // isInteger(value) // Returns true if value contains all digits //------------------------------------------------------------------- function biwValidateIsInteger(val){ if (biwValidateIsBlank(val)){return false;} for(var i=0;i 1000){ LeftPosition = 100; TopPosition = 100; } else { LeftPosition = 100; TopPosition = 100; } settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=auto,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes'; packageChangeWin=window.open('/BIW/Costings/NPCAdmin/ChangeAddEdit.aspx?IDChange='+IDChange+'&view=1','PackageChange',settings); if(packageChangeWin.focus) { packageChangeWin.focus(); } } function showModalDialogIfPossible(theurl, thestring, thedimensions) { strAppVersion = navigator.appVersion; if (strAppVersion.indexOf('MSIE') == -1 && strAppVersion.indexOf('Safari') == -1 ) { return window.open(theurl,thestring,thedimensions,true); } else { return window.showModalDialog (theurl,thestring,thedimensions); } } function IsNumeric(strString) // check for valid numeric strings { var strValidChars = "0123456789.-"; var strChar; var blnResult = true; if (strString.length == 0) return false; decimalCount = 0; // test strString consists of valid characters listed above for (i = 0; i < strString.length && blnResult == true; i++) { strChar = strString.charAt(i); if (strChar == "."){ decimalCount++; } if (strValidChars.indexOf(strChar) == -1) { blnResult = false; } } if (decimalCount > 1){blnResult = false;} return blnResult; } function RemoveNonNumericChars(str) { return str = str.replace(/[,%\£]/g,""); }