ok.....here is my code
<script language="JavaScript" type = "text/javascript">
var whitespace = " \t\n\r";
function fieldValidate(fld, typ, desc)
{
var checkToMake = typ;
var field = fld;
var d = desc;
switch (checkToMake)
{
case 'notblank': if (isEmpty(field.value))
{
alert(d + " may not be empty"

;
field.focus();
}
break;
case 'isnumber': if(!isInteger(field, desc))
break;
}
}
function isEmpty(s)
{
var i;
if ((s==null) || (s.length ==0))
return true;
// Search string looking for characters that are not whitespace
for (i=0; i < s.length; i++)
{
var c = s.charAt(i);
if (whitespace.indexOf(c) == -1)
return false;
}
// All characters are whitespace.
return true;
}
function isDigit(c)
{
return ((c >= "0"

&& (c <= "9"

|| (c == "."

)
}
function isInteger(field, desc)
{
var i, c;
var s = field.value;
var d = desc
if (isEmpty(s))
{
alert(d + " cannot be empty"

;
field.focus();
return false;
}
for (i=0; i<s.length; i++)
{
//Check if all caharacters are numbers
c = s.charAt(i);
if (!isDigit(c))
{
alert(d + " must contain only digits"

;
field.focus();
return false;
}
}
return true;
}
</script>
example call of fieldValidate:
Login: <input type="text" name="txtBox" id="txtBox" size="30" onblur="fieldValidate(txtBox, 'isnumber', 'Login')"><br>
now if the following field was defined with the same use of onblur i get stuck in an endless loop of alert boxes....
....thanks in advance for any suggestions!