<!-- 
      function isWhitespace (s)
      {
           var i;

           // Is s empty?
           if (isEmpty(s)) return true;

           // Search through string's characters one by one
           // until we find a non-whitespace character.
           // When we do, return false; if we don't, return true.

           for (i = 0; i < s.length; i++)
           {
                // Check that current character isn't whitespace.
                var c = s.charAt(i);

                if (whitespace.indexOf(c) == -1) return false;
           }

           // All characters are whitespace.
           return true;
      }

      /****************************************************************/
      

      // Check whether string s is empty.
      function isEmpty(s)
      { return ((s == null) || (s.length == 0)) }

      /****************************************************************/
      
// whitespace characters
      var whitespace = " \t\n\r";

// isEmail (STRING s [, BOOLEAN emptyOK])
// 
// Email address must be of form a@b.c ... in other words:
// * there must be at least one character before the @
// * there must be at least one character before and after the .
// * the characters @ and . are both required
//
// For explanation of optional argument emptyOK,
// see comments of function isInteger.

function isEmail (str,strWarning)
{   
var strinput = new String(str.value)
/*    if (isEmpty(str)) 
       if (isEmail.arguments.length == 1) {
        alert("1");
        return false;
        }
       else 
        return (isEmail.arguments[1] == true);
*/

    // is s whitespace?
if (isWhitespace(strinput))    { 
        alert(strWarning);
        return false;
        }

        
    // there must be >= 1 character before @, so we
    // start looking at character position 1 
    // (i.e. second character)
    var i = 1;
    var sLength = strinput.length;

    // look for @
    while ((i < sLength) && (strinput.charAt(i) != "@"))
    { i++
    }

    if ((i >= sLength) || (strinput.charAt(i) != "@")) {
        alert(strWarning);
        return false;
        }
    else 
        i += 2;

    // look for .
    while ((i < sLength) && (strinput.charAt(i) != "."))
    { i++
    }

    // there must be at least one character after the .
    if ((i >= sLength - 1) || (strinput.charAt(i) != ".")) {
        alert(strWarning);
        return false;
        }
    else 
        return true;
}

/****************************************************************/
      function ForceEntry(val, str) {
           var strInput = new String(val.value);

           if (isWhitespace(strInput)) {
                alert(str);
                return false;
           } else
                return true;

      }

      /****************************************************************/

// This function ensures that a field is less than or equal to the
// Length passed in.  You must call this function with the element
// name in your form (for example: "ForceLength(document.forms[0].txtElement)"
// as opposed to "ForceLength(document.forms[0].txtElement.value)"
// If the field's value is too large, an error message is displayed
// and false is returned, else true is returned.

function ForceLength(val, nLength, str)
{
	var strInput = new String(val.value);

	if (strInput.length < nLength) {
		alert(str);
		return false;
	} else
		return true;
}

/****************************************************************/
function ForceWordCount(objField, nLength, strWarning)	{
	var strField = new String(objField.value);
	
	strField=strField.split(" ")
    if (strField.length > nLength) {
		alert(strWarning + "\nCurrent word count: " + strField.length);
		return false;
	} else
		return true;
}

/****************************************************************/

    function ForcePassword()
    {	
      if (document.frmUser.Password.value == "")
      {
        alert ("Please enter your password");
        return false;
      }
      else
	  return true;
    }
	
/****************************************************************/	
	
	function VerifyPassword()
    {	
      if (document.frmUser.Password.value != document.frmUser.VerifyPassword.value)
      {
        alert ("Your passwords do not match - please try again");
        return false;
      }
      else
	  return true;
    }

/****************************************************************/


function VerifyPrice(val, str) 
{ 
   var strInput = val.value; 

   if ((strInput == "") || (strInput == "$"))
   { 
     val.value = "$0.00"; 
     return; 
   } 
   var Chars = "0123456789.,$"; 
   for (var i = 0; i < strInput.length; i++) 
   { 
       if (Chars.indexOf(strInput.charAt(i)) == -1) 
       { 
           alert(str); 
           return false;
       } 
	   else
	   return true;
   } 
} 
	 
	 
/****************************************************************/


function VerifyPhone(val, str) 
{ 
   var strInput = val.value; 

   var Chars = "0123456789()-"; 
   for (var i = 0; i < strInput.length; i++) 
   { 
       if (Chars.indexOf(strInput.charAt(i)) == -1)
       { 
           alert(str); 
           return false;
       } 
	   else
	   return true;
   } 
   
   if (isWhitespace(strInput))
       { 
           alert(str); 
           return false;
       } 
	   else
	   return true;
} 
 
// --> 