<!--
         function isEmpty(str) {
            // Check whether string is empty.
            for (var intLoop = 0; intLoop < str.length; intLoop++)
               if (" " != str.charAt(intLoop))
                  return false;
            return true;
         }
		 function isInvalid(str) {
            // Check for SQL injection chars
            for (var intLoop = 0; intLoop < str.length; intLoop++){
               if ("'" == str.charAt(intLoop))
                  return true;
               
               if ("*" == str.charAt(intLoop))
                  return true;
                  
               if ("=" == str.charAt(intLoop))
                  return true;
                  
               if ('"' == str.charAt(intLoop))
                  return true;
                  
               if ('>' == str.charAt(intLoop))
                  return true;
               if ('<' == str.charAt(intLoop))
                  return true;
               if ('&' == str.charAt(intLoop))
                  return true;
               if ('/' == str.charAt(intLoop))
                  return true;
               if ('?' == str.charAt(intLoop))
                  return true;
                  
                  }
          }

         function checkRequired(f) {
            var strError = "";
            for (var intLoop = 0; intLoop<f.elements.length; intLoop++)
               if (null!=f.elements[intLoop].getAttribute("Required")) 
                  if (isEmpty(f.elements[intLoop].value))
                     strError += "  " + f.elements[intLoop].name + "\n";
                    
            if ("" != strError) {
               alert("Required data is missing:\n" + strError);
               return false;
            }
            for (var intLoop = 0; intLoop<f.elements.length; intLoop++)
              
                  if (isInvalid(f.elements[intLoop].value))
                     strError += "  " + f.elements[intLoop].name + "\n";
                    
            if ("" != strError) {
               alert("Data entered is invalid:\nPlease check these entries:\n"+ strError);
               return false;
            }
         }
      
//-->