
// specific validationd ONLY for pre-download forms:


function verify_pre_download_for( product_code ){


  var error='';
  
  switch( product_code ){
  
      case 'USBTester'      :    error += notEmpty( document.pre_download.download_freetext1_field );
                                 break;
                                    
      case 'USBAnalyzer'    :    error += notEmpty( document.pre_download.download_freetext1_field );
                                 break;
                                    
                                                                        
      case 'DriverCore'     :    error += notEmpty( document.pre_download.download_freetext1_field );
                                 break;
                               
                               
      case 'WinDriver'         :    error += mustSelect( document.pre_download.download_timeframe_field );
                                    error += mustSelect( document.pre_download.download_typeofdriver_field );
                                    error += mustSelect( document.pre_download.download_bus_field );
                                    error += mustSelect( document.pre_download.download_cpu_field );
                                    error += mustSelect( document.pre_download.download_chipset_field );
                                    error += mustSelect( document.pre_download.download_os_field );
                                    error += mustSelect( document.pre_download.download_devenv_field );
                                    
                                    break;                                                        
  
        case 'USBware'       : 
                                  error += notEmpty(        document.pre_download.download_freetext1_field, false );     
                                  error += mustSelect(      document.pre_download.download_chipset_field );
                                  error += mustSelect(      document.pre_download.download_cpu_field );
                                  error += mustSelect(      document.pre_download.download_custom1_field );
                                  error += mustSelect(      document.pre_download.download_os_field );
                                  error += mustSelect(      document.pre_download.download_timeframe_field );
                                  
                                  break;      
    
         
         case 'OpenRG'       : 
                                  error += mustSelect(      document.pre_download.download_industry_field );
                  break;
          
  }
  
  
  
  if( error!='' )  
  {
   
   form_error_msg( 'form-download-comments');
   return false;
  }  
  
  else
  {
    form_ok_msg( 'form-download-comments', 'Please wait while processing information...');
    
    document.pre_download.submit();
    return true;
  
  }

  

}





