// Function to activate a link in the toolbar function linkOnSidebar(currentLink, cell) { currentLink.style.color = "#3366FF"; currentLink.style.fontWeight = "none"; currentLink.style.textDecoration = "none"; var currentCell = document.getElementById(cell); } // Function to deactivate a link in the toolbar function linkOffSidebar(currentLink, cell) { currentLink.style.color = "#FFFFFF"; currentLink.style.fontWeight = "none"; currentLink.style.textDecoration = "none"; var currentCell = document.getElementById(cell); } function linkOnTopbar(currentLink, cell) { currentLink.style.color = "#FFFF00"; currentLink.style.fontWeight = "none"; currentLink.style.textDecoration = "none"; var currentCell = document.getElementById(cell); } function linkOffTopbar(currentLink, cell) { currentLink.style.color = "#FFFFFF"; currentLink.style.fontWeight = "none"; currentLink.style.textDecoration = "none"; var currentCell = document.getElementById(cell); } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i maxLen)){ if( minLen != maxLen){ errmsgText.txt = errmsgText.txt + "Field \'" + newFieldName + "\' must be between " + minLen + " and " + maxLen + " characters.\r"; }else{ errmsgText.txt = errmsgText.txt + "Field \'" + newFieldName + "\' must be " + minLen + " characters.\r"; } ItemOK = false; } } var badChars = "\`\^\[\]\{\}<>"; var search; for(var i = 0; i != newLength; i++){ aChar = newValue.substring(i,i+1); search = badChars.indexOf(aChar); if(search != -1){ errmsgText.txt = errmsgText.txt + "Invalid character \"" + aChar + "\" in field \'" + newFieldName + "\'.\r"; ItemOK = false; } } if(!ItemOK){ alert(errmsgText.txt); return false; } return true; } function validateInt(textObj, field_Name, min_Length, max_Length){ var ItemOK = true; var errmsgText = new messageObj(); errmsgText.txt = ''; var newFieldName = field_Name; if(newFieldName == nul || newFieldName == ''){ newFieldName=textObj.name; newFieldLength = newFieldName.length; newFieldName = newFieldName.substring(2,newFieldLength); } var newValue = textObj.value; var newLength = newValue.length; var minLen = min_Length; var maxLen = max_Length; if( typeof minLen == 'number' && typeof maxLen == 'number' && minLen <= maxLen){ if( (newLength < minLen) || (newLength > maxLen)){ if( minLen != maxLen){ errmsgText.txt = errmsgText.txt + "Field \'" + newFieldName + "\' must be between " + minLen + " and " + maxLen + " characters.\r"; }else{ errmsgText.txt = errmsgText.txt + "Field \'" + newFieldName + "\' must be " + minLen + " characters.\r"; } ItemOK = false; } } for(var i = 0; i != newLength; i++){ aChar = newValue.substring(i,i+1) if(aChar < "0" || aChar > "9"){ errmsgText.txt = errmsgText.txt + "Invalid character \"" + aChar + "\" in field \'" + newFieldName + "\'.\r" ; ItemOK = false; } } if(!ItemOK){ alert(errmsgText.txt); return false; } return true; } function checkFieldFilled(field_Obj, field_Name, message_Obj){ if(field_Obj.value == null || field_Obj.value == ''){ message_Obj.txt = message_Obj.txt + "Please enter a value for \'" + field_Name + "\'.\r"; return false; } return true; }