// alert("dbxFormCheck 34");
function dbxFormCheck(objForm,csvFields)
{
   var errorMessage = "Es sind nicht alle Pflichtfelder ausgefüllt!";
   var errorCount   = 0;
   var arrFields    = csvFields.split(",");
   var thisType     = "";
   var colOK        = "#EEEEEE";
   var colError     = "#FF0000";
   
   /*
   if(objForm.name=="prozessoptimierung")
   {
   var colError     = "#1A00B7";
   }
   */

   for(var act in arrFields)
   {
   

   thisElem = arrFields[act];
   
   if(thisElem != "frmThemen"
   && thisElem != "frmStandort")
   {
   
   thisType = objForm.elements[thisElem].type;

   
   switch(thisType)
   {
      case "select":
      case "select-one":      
        thisVal = objForm.elements[thisElem].options[objForm.elements[thisElem].selectedIndex].value;
        if(thisVal == "")
        { objForm.elements[thisElem].style.backgroundColor = colError; errorCount++; }
        else
        { objForm.elements[thisElem].style.backgroundColor = colOK; }
      break;        
      default:  
        if(objForm.elements[thisElem].value=="")
        { objForm.elements[thisElem].style.backgroundColor = colError; errorCount++; }
        else
        { objForm.elements[thisElem].style.backgroundColor = colOK; }
      break;
   } // sw

   }
   
   if(thisElem=="frmFirma")
   {
   if(objForm.frmFirma.value=="")
   {
   errorMessage = errorMessage + "\n\nWenn Sie eine Anfrage als Privatperson stellen, schreiben Sie bitte 'Privat' in das Feld Firma.";
   }
   }
   
   if(thisElem=="frmCheckAGB")
   {
   if(objForm.elements[thisElem].checked!=true)
   {
   errorCount++;
   errorMessage = errorMessage + "\n\nBitte bestätigen Sie die Allgemeinen Geschäftsbedingungen.";
   }
   }   

   if(thisElem=="frmThemen")
   {
       if(objForm.frmThemen_1.checked != true
       && objForm.frmThemen_2.checked != true
       && objForm.frmThemen_3.checked != true
       && objForm.frmThemen_4.checked != true
       && objForm.frmThemen_5.checked != true
       && objForm.frmThemen_6.checked != true
       && objForm.frmThemen_7.checked != true   
       && objForm.frmThemen_8.checked != true
	   && objForm.frmThemen_9.checked != true
       )
       {
       errorCount++;
       errorMessage = errorMessage + "\n\nBitte wählen Sie mind. 1 Bereich.";
       }
   }  
   
   if(thisElem=="frmStandort")
   {
       if(objForm.frmStandort_1.checked != true
       && objForm.frmStandort_2.checked != true
       && objForm.frmStandort_3.checked != true
       && objForm.frmStandort_4.checked != true
       && objForm.frmStandort_5.checked != true
       && objForm.frmStandort_6.checked != true
       )
       {
       errorCount++;
       errorMessage = errorMessage + "\n\nBitte wählen Sie mind. 1 Standort.";
       }
   }        
   
   } // sw
   
   // .........................................

   if(errorCount > 0)
   { alert(errorMessage); return false; }
   else
   { objForm.dbxform_jschk.value = 1; return true; }
}