function validate() {
   
            var Poutput = document.mainform.Poutput.value;

            // Poutput
            if (Poutput == "") {
               alert('Please enter a value for Poutput.');
               return false;
            }

         
               if (isNaN(Poutput)) {
                  alert('Please enter a numeric value for Poutput.');
                  return false;
               }

            
                  if ((Poutput < 0.001) || (Poutput > 50)) {
                     alert('Please enter a value between 0.001 W and 50 W for Poutput.');
                     return false;
                  }
               
            var VsupplyMin = document.mainform.VsupplyMin.value;

            // VsupplyMin
            if (VsupplyMin == "") {
               alert('Please enter a value for VsupplyMin.');
               return false;
            }

         
               if (isNaN(VsupplyMin)) {
                  alert('Please enter a numeric value for VsupplyMin.');
                  return false;
               }

            
                  if ((VsupplyMin < 0) || (VsupplyMin > 200)) {
                     alert('Please enter a value between 0 V and 200 V for VsupplyMin.');
                     return false;
                  }
               
            var VsupplyMax = document.mainform.VsupplyMax.value;

            // VsupplyMax
            if (VsupplyMax == "") {
               alert('Please enter a value for VsupplyMax.');
               return false;
            }

         
               if (isNaN(VsupplyMax)) {
                  alert('Please enter a numeric value for VsupplyMax.');
                  return false;
               }

            
                  if ((VsupplyMax < 0) || (VsupplyMax > 200)) {
                     alert('Please enter a value between 0 V and 200 V for VsupplyMax.');
                     return false;
                  }
               
            var VsupplyNom = document.mainform.VsupplyNom.value;

            // VsupplyNom
            if (VsupplyNom == "") {
               alert('Please enter a value for VsupplyNom.');
               return false;
            }

         
               if (isNaN(VsupplyNom)) {
                  alert('Please enter a numeric value for VsupplyNom.');
                  return false;
               }

            
                  if ((VsupplyNom < 0) || (VsupplyNom > 200)) {
                     alert('Please enter a value between 0 V and 200 V for VsupplyNom.');
                     return false;
                  }
               
          
               // VsupplyMin - Upper Boundary
               
               var SupplyType;
               for (i = 0; i < document.mainform.SupplyType.length; i++) {
                  if (document.mainform.SupplyType[i].selected) {
                     SupplyType = document.mainform.SupplyType[i].value;
                  }
               }
            
               
               var VsupplyMin = document.mainform.VsupplyMin.value;
            
               if (!(parseFloat(VsupplyMin) <= parseFloat(document.mainform.VsupplyNom.value) )  && (( SupplyType == "Single Supply (+Vs)" ) )) {
                  alert('For a valid design, the following condition must be met: VsupplyMin <= VsupplyNom');
                  return false;
               }
            
          
               // VsupplyMax - Lower Boundary
               
               var SupplyType;
               for (i = 0; i < document.mainform.SupplyType.length; i++) {
                  if (document.mainform.SupplyType[i].selected) {
                     SupplyType = document.mainform.SupplyType[i].value;
                  }
               }
            
               
               var VsupplyMax = document.mainform.VsupplyMax.value;
            
               if (!(parseFloat(VsupplyMax) >= parseFloat(document.mainform.VsupplyNom.value) )  && (( SupplyType == "Single Supply (+Vs)" ) )) {
                  alert('For a valid design, the following condition must be met: VsupplyNom <= VsupplyMax');
                  return false;
               }
            
   return true;
} // validate()

function reload(displaymode) {
   var URL = 'http://webench.national.com/appinfo/webench/audio/design_requirements.cgi';
   if (displaymode == 'advanced') {
      URL += '?displaymode=advanced';
   } else {
      URL += '?displaymode=basic';
   }
   
         var Poutput = document.mainform.Poutput.value;
      
   URL += '&Poutput=' + Poutput;
   
         var Rload;
         for (i = 0; i < document.mainform.Rload.length; i++) {
            if (document.mainform.Rload[i].selected) {
               Rload = document.mainform.Rload[i].value;
            }
         }
      
   URL += '&Rload=' + Rload;
   
         var THD;
         for (i = 0; i < document.mainform.THD.length; i++) {
            if (document.mainform.THD[i].checked) {
               THD = document.mainform.THD[i].value;
            }
         }
      
   URL += '&THD=' + THD;
   
         var VsupplyMax = document.mainform.VsupplyMax.value;
      
   URL += '&VsupplyMax=' + VsupplyMax;
   
         var VsupplyMin = document.mainform.VsupplyMin.value;
      
   URL += '&VsupplyMin=' + VsupplyMin;
   
         var VsupplyNom = document.mainform.VsupplyNom.value;
      
   URL += '&VsupplyNom=' + VsupplyNom;
   
   window.location = URL;
} // reload()
