	                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 checkRequired() {
	                   f = frm;
	                   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;
	                   } else {
	                   //f.submit();
	                   return true;
	                   }
	                }
	                
	                function enableButton(o) {
	                  if(o.checked) {
	                    document.getElementById("submitbutton").disabled = false;
	                  } else {
	                    document.getElementById("submitbutton").disabled = true;
	                  }
         }
