/ *ValidateNumber This functions accepts a number string and checks if it's a positive integer. Parameters: tcNumber - The number string you want to verify toControl - The control object that is assosiated with the number tcUserMsg - Massage to display if validation fails. Leave blank if you don't want to notify the user. tlStayOnF - Stay (don't loose focus) on control if validation fails tlAllowBlank - Allow blank tcNumber passed tlBlankOnF - Blank control value if validation fails Return: true or false Author: Date: 4/30/2009 */ function ValidateNumber (tcNumber,toControl,tcUserMsg,tlStayOnF,tlAllowBlank,tlBlankOnF) { focusField=toControl; // Global variable to fix a bug with focus in Firefox when called after an alert. if (tlAllowBlank && tcNumber.length==0) { return true } if (tcUserMsg == 'default') { tcUserMsg = 'Invalid Input. Please enter valid number'; } if(parseInt(tcNumber) > 0) return true else { if (!(toControl==undefined || toControl=='') && tlBlankOnF){toControl.value = "0"} if (!(tcUserMsg==undefined || tcUserMsg=='')){alert(tcUserMsg)} if (!(toControl==undefined || toControl=='') && tlStayOnF){setTimeout("focusField.focus();",1);} return false } }Do you see something wrong here?