function sendForm() {
  var form_dom = MM_findObj('form1');
  if (form_dom != null) {
   form_dom.submit();
  }
}//end of function


function submitForm(form_name) {
  var form_dom = MM_findObj(form_name);
  if (form_dom != null) {
   form_dom.submit();
  }
}//end of function


function sendBusinessForm() {
    var all_ok = true;
    // HL: Remove for Quick-Fix chkBusinessFormular();
    all_ok = chkBusinessFormular();  
    //if all fields are right then send the form. 
    if(all_ok){
      var form_dom = MM_findObj('form1');
      if (form_dom != null) {
       form_dom.submit();
      }
    }
}//end of function



//*******************************************************************************************
// MM functions *****************************************************************************
//*******************************************************************************************

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//called here: onclick="MM_toggleImage('Image10','','bilder/caps/q03.jpg',1)"
function MM_toggleImage() { //v3.0
  var i,j=0,x,a=MM_toggleImage.arguments; 
  document.MM_sr=new Array;
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null) {
           // document.MM_sr[j++]=x; 
        if(!x.isSet) {
            x.oSrc=x.src; 
            x.src=a[i+2];
            x.isSet = true;
        } else {
            x.src = x.oSrc;
            x.oSrc = false;    
            x.isSet = false;        
        }
    }
}

    

// called here:
// <a href="#" onclick="MM_toggleImage(0,'Image1','Image2,Image3,Image4','section_1,'1','bilder/caps/q01.jpg')">
// <img src="bilder/caps/01.jpg" name="Image1" width="33" height="33" border="0" id="Image1"/></a>
// should set values for
// <input type="hidden" name="section_1" value="unset" /> 
// Note that the question_id is already set. we only need to adapt the value for the sections
// ------------------------------------------------------------------------------------------------------------------------------
function MM_grades(current_grade_pos, current_grade, all_grades, hidden_field_to_set, value_for_hidden_field, toggle_image) {
   //to make inquires on the state of an object we first need to find the DOM object
   var x=MM_findObj(current_grade);
   
   if (x != null) {
          if(!x.isSet) { //-------------------------------------------------------------------------------------
                //set own state
                x.oSrc=x.src; 
                x.src=toggle_image;
                x.isSet = true;
                //unset all others
                var array_all_grades = all_grades.split(",");
                
                for(i=0; i<(array_all_grades.length); i++) {
                    var grade_name = array_all_grades[i];
                    if (i != current_grade_pos) {
                       //Find elelent in DOM
                       var grade=MM_findObj(grade_name);
                       if (grade.isSet) {
                            grade.src = grade.oSrc;
                            grade.oSrc = false;    
                            grade.isSet = false;
                       }
                    }//end of if
                }//end of for
                
                //set hidden field for post
                //we overwrite whatever it was set to before (may it be another value or nothing)
                var hidden_field=MM_findObj(hidden_field_to_set); 
                if (hidden_field != null) {
                   hidden_field.value =  value_for_hidden_field;
                }
                
                //And for php number 10, we need to activate the text are if an option is chosen
                var text_field=MM_findObj('textarea'); 
                if (text_field != null) {
                   text_field.disabled  =  false;
                   text_field.style.backgroundColor = "white"; 
                }
                
              } //end of x is set
            
            else { // if it is not set --------------------------------------------------------------------------
                x.src = x.oSrc;
                x.oSrc = false;    
                x.isSet = false;   
                
                //we need to set the hidden field back to nothing, or else the
                //form check will not detect that a section might be unanswered
                var hidden_field=MM_findObj(hidden_field_to_set); 
                if (hidden_field != null) {
                   hidden_field.value =  "";
                }
                
                
                //And for php number 10, we need to activate the text are if an option is chosen
                var text_field=MM_findObj('textarea'); 
                if (text_field != null) { 
                   //if he unsets (not changes) the cat. then the textfield should be erased
                   text_field.value = "";
                   text_field.disabled  =  true;
                   text_field.style.backgroundColor  = "#e4d9ca";
                }
     
            }//end of x is unset   ------------------------------------------------------------------------------
   }       
}//end of function MM_grades 


//*******************************************************************************************
// My functions *****************************************************************************
//*******************************************************************************************
/*
    function setSectionOne (value) {
        alert("exec javascript");
        var section_one=MM_findObj('section_1');
        if (value == 'ja') {
            section_one.value = 'yes';
        }
        else {
            if (value == 'nein') {
                section_one.value = 'no';
            }
            else {
                section_one.value = '';
            }
        }
        sendForm();
    }//End of function setSectionOne
 */    

   
   //controls if the user set a value for every section
   function chkFormular(list_of_sections) {
         var all_answered = "yes";
         var array_sections = list_of_sections.split(",");

         var i = 0;
         while (all_answered == "yes" && i < (array_sections.length)) {
             var section_name = array_sections[i];
             //Find elelent in DOM 
             //section_1 etc are the hidden parameters whose values should have been set
             var section=MM_findObj(section_name);
             //if the object was found
             if (section != null ) {
                 //if the value is empty, then the user didn't give a grade to that question
                 if (section.value == "") {
                    all_answered = "no";
                                        
                    //FOCUS ---------------------------------------------------------------
                    var section_table = document.getElementById('T_' + section_name);
                    //var section_table = MM_findObj('T_section_1');
                    if (section_table != null ) { 
                        section_table.focus();
                    }//end if the object to focus on was found ----------------------------
                    
                 }//end if the section had no value
             }//end if section is not null
             
            i++;
            
         }//end of for (or while)
         
         //return value
         //if it is false, then the HTML where this javascript is called will not go to the page 
         //described in the action attribute of the form
         if  (all_answered == 'yes')  {
            return true;
         }
         else {
            return false
         }
         //------------------------------------------------------------------------------
   }//end of function  
   
   
   //controls if the user set the values right in the umfrage_10
   function chkFormularTen(list_of_sections) {
         //should return true if
         // cat = category
         // No cat is selected and no text is written
         // A cat is selected AND a text is written
         
         //should return false if
         // A cat is selected and no text is written
         // -> then we unset the categorie and avoid writing anything into the DB   
         // No cat is selected an a text is written (cannot happen)
         
         var section_name = "section_1";
         //Find elelent in DOM 
         //section_1 etc are the hidden parameters whose values should have been set
         var section=MM_findObj(section_name);
             //if the object was found
             if (section != null ) {
                 //if the value is empty, then the user didn't select any cat.
                 //if no cat is selected then no text can have been written
                 //so the user just wants to skip quetion 10 and we let him do so. 
                 
                 if (section.value != "") {
                    //if a cat. was selected, then we chekc if a text was written
                    var text_field=MM_findObj('textarea'); 
                    if (text_field != null) { 
                        //if no text was written, then we unset the cat
                        if (text_field.value == "") {
                            section.value = "";
                        }
                    }//end if the textarea is an object
                 }//end if section is not null

         //we treat all cases and whatever the user does we handle. So it's always true.
          return true
         } //if the section (hidden field in HTML) is an object
         //------------------------------------------------------------------------------
   }//end of function   


   
/*
This fucntions checks that there are min 10 characters 
(including the + and once the whitespaces are trimmed away) 
and that the number starts with a +
*/   
function checkPhoneNumber(text_field_1) {
   var all_ok = true;
   var trim_tel_num =  "";  //initialise the trimmed telephone number
   var initial_length = text_field_1.value.length;
   //erase whitespaces from the telephone number
   //and check if all characters (which are not whitespaces) are either numbers or a +
    var i =0;
    while ((i<initial_length) && (all_ok == true)) {
          var current_car = text_field_1.value.charAt(i);
          //alert("inside the loop. time: " + i + ". Current char is: " + current_car);
          //if it is not an empty char, then add it to the trimmed phone number
           if (current_car != " ") {
               if (((current_car=="0") || (current_car=="1") ||(current_car=="2") ||
                    (current_car=="3") || (current_car=="4") ||(current_car=="5") ||
                    (current_car=="6") || (current_car=="7") ||(current_car=="8") ||
                    (current_car=="9"))    && (i != 0))  {
                     trim_tel_num = trim_tel_num + current_car; 
               }
               else {
                   if ((current_car=="+") && (i == 0)) {
                        trim_tel_num = trim_tel_num + current_car;
                   }
                   else {
                        all_ok = false;
                   }
               }
           }//end of it is not a whitepsace (if it is we ignore it)
           i++;
    }//end of while
    //if it still seems like an acceptable telephone number we need to keep checking
    if (all_ok == true) {
       //if the phone number doesn't have the right length
       if (trim_tel_num.length < 10) {
            all_ok = false;
       }
       //if it has the right length we check the first character
       else {
             var first_car = trim_tel_num.charAt(0);
             //if the first character is not a  + the data is wrong
              if (first_car != "+") {
                  all_ok = false; 
              }
       }//has the right length
   }//all numbers or (deleted) whitespaces
   return all_ok;
}//end of function checkPhoneNumber




function chkBusinessFormular() {
     var all_ok = true;

     //private telefonnummer ---------------------------------------------------------------------- 
     var text_field_1=MM_findObj('textfield1'); 
     var text_field_2=MM_findObj('textfield2');
     
     if ((((text_field_1 != null) && ((text_field_1.value == ""))) &&
         (text_field_2 != null) && ((text_field_2.value == ""))))  {  
         all_ok = false;
     }
     else {
         if ((text_field_1 != null) && ((text_field_1.value != ""))) {
             all_ok =  checkPhoneNumber(text_field_1);
         }//end of private telefonnummer check  
         
         if (all_ok == true) {
            if ((text_field_2 != null) && ((text_field_2.value != ""))) {
             all_ok =  checkPhoneNumber(text_field_2);
             }//
         }
     }
     
     if (all_ok == false) {
        //make the error message visible
        var error_message = document.getElementById('error_message');
        if (error_message != null) {
            error_message.style.display = ""; //"" instead of "none" sets it visible
        }
     }
     return all_ok;
   }//end of function  
   
 
 
function businessSolutionsSetPrivateTel() {
   //to make inquires on the state of an object we first need to find the DOM object
   var private_tel = MM_findObj('textfield1');
   
   if (private_tel != null) {
      if ((!private_tel.isSet) && (private_tel.value != "")){ 
        //activate private tel checkbox
         var checkbox_one=MM_findObj('checkbox1'); //private
         if (checkbox_one != null) {
             checkbox_one.disabled  =  false; //sets color automatically to background
         }      
      } 
      else { // if it is not set   or empty
             //deactivate private tel checkbox
             //and erase the value
             var checkbox_one=MM_findObj('checkbox1'); //private
             if (checkbox_one != null) {
                 checkbox_one.checked = false;
                 checkbox_one.disabled  =  true;  //sets color automaticall to white
             }
      }
    }//end of private_tel is unset   
}//end of function businessSolutionsSetPrivateTel



function businessSolutionsSetWorkTel() {
   //to make inquires on the state of an object we first need to find the DOM object
   var private_tel = MM_findObj('textfield2');
   
   if (private_tel != null) {
      if ((!private_tel.isSet) && (private_tel.value != "")){ 
        //activate private tel checkbox
         var checkbox_one=MM_findObj('checkbox2'); //private
         if (checkbox_one != null) {
             checkbox_one.disabled  =  false; //sets color automatically to background
         }      
      } 
      else { // if it is not set   or empty
             //deactivate private tel checkbox
             //and erase the value
             var checkbox_one=MM_findObj('checkbox2'); //private
             if (checkbox_one != null) {
                 checkbox_one.checked = false;
                 checkbox_one.disabled  =  true;  //sets color automaticall to white
             }
      }
    }//end of private_tel is unset   
}//end of function businessSolutionsSetPrivateTel



function setCheckboxValue(checkbox){
   var checkbox_name = MM_findObj(checkbox);
   if (checkbox_name != null) { 
       if(checkbox_name.checked == "true") {
    
       }
       else {
    
       }
   }//found DOM object  
}//end of function setCheckboxValue




//*******************************************************************************************
// MM functions *****************************************************************************
//*******************************************************************************************

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//called here: onclick="MM_toggleImage('Image10','','bilder/caps/q03.jpg',1)"
function MM_toggleImage() { //v3.0
  var i,j=0,x,a=MM_toggleImage.arguments; 
  document.MM_sr=new Array;
  for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null) {
           // document.MM_sr[j++]=x; 
        if(!x.isSet) {
            x.oSrc=x.src; 
            x.src=a[i+2];
            x.isSet = true;
        } else {
            x.src = x.oSrc;
            x.oSrc = false;    
            x.isSet = false;        
        }
    }
}

// called here:
// <a href="#" onclick="MM_toggleImage(0,'Image1','Image2,Image3,Image4','section_1,'1','bilder/caps/q01.jpg')">
// <img src="bilder/caps/01.jpg" name="Image1" width="33" height="33" border="0" id="Image1"/></a>
// should set values for
// <input type="hidden" name="section_1" value="unset" /> 
// Note that the question_id is already set. we only need to adapt the value for the sections
// ------------------------------------------------------------------------------------------------------------------------------
function MM_grades(current_grade_pos, current_grade, all_grades, hidden_field_to_set, value_for_hidden_field, toggle_image) {
    // MM_grades(0,'Image0','Image0,Image1,Image2,Image3,Image4','section_1','0','bilder/caps/q06.jpg')
   //to make inquires on the state of an object we first need to find the DOM object
   var x=MM_findObj(current_grade);
   
   if (x != null) {
          if(!x.isSet) { //-------------------------------------------------------------------------------------
                //set own state
                x.oSrc=x.src; 
                x.src=toggle_image;
                x.isSet = true;
                //unset all others
                var array_all_grades = all_grades.split(",");
                
                for(i=0; i<(array_all_grades.length); i++) {
                    var grade_name = array_all_grades[i];
                    if (i != current_grade_pos) {
                       //Find elelent in DOM
                       var grade=MM_findObj(grade_name);
                       if ((grade != null) && grade.isSet) {
                            grade.src = grade.oSrc;
                            grade.oSrc = false;    
                            grade.isSet = false;
                       }
                    }//end of if
                }//end of for
                
                //set hidden field for post
                //we overwrite whatever it was set to before (may it be another value or nothing)
                var hidden_field=MM_findObj(hidden_field_to_set); 
                if (hidden_field != null) {
                   hidden_field.value =  value_for_hidden_field;
                }
                
                //And for php number 10, we need to activate the text are if an option is chosen
                var text_field=MM_findObj('textarea'); 
                if (text_field != null) {
                   text_field.disabled  =  false;
                   text_field.style.backgroundColor = "white"; 
                }
                
              } //end of x is set
            
            else { // if it is not set --------------------------------------------------------------------------
                x.src = x.oSrc;
                x.oSrc = false;    
                x.isSet = false;   
                
                //we need to set the hidden field back to nothing, or else the
                //form check will not detect that a section might be unanswered
                var hidden_field=MM_findObj(hidden_field_to_set); 
                if (hidden_field != null) {
                   hidden_field.value =  "";
                }
                
                
                //And for php number 10, we need to activate the text are if an option is chosen
                var text_field=MM_findObj('textarea'); 
                if (text_field != null) { 
                   //if he unsets (not changes) the cat. then the textfield should be erased
                   text_field.value = "";
                   text_field.disabled  =  true;
                   text_field.style.backgroundColor  = "#e4d9ca";
                }
     
            }//end of x is unset   ------------------------------------------------------------------------------
   }       
}//end of function MM_grades 


//*******************************************************************************************
// My functions *****************************************************************************
//*******************************************************************************************

    function setSectionOne (value) {
        var section_one=MM_findObj('section_1');
        if (value == 'ja') {
            section_one.value = 'yes';
        }
        else {
            if (value == 'nein') {
                section_one.value = 'no';
            }
            else {
                section_one.value = '';
            }
        }
    }//End of function setSectionOneS
     

   
   //controls if the user set a value for every section
   function chkFormular(list_of_sections) {
         var all_answered = "yes";
         var array_sections = list_of_sections.split(",");

         var i = 0;
         while (all_answered == "yes" && i < (array_sections.length)) {
             var section_name = array_sections[i];
             //Find elelent in DOM 
             //section_1 etc are the hidden parameters whose values should have been set
             var section=MM_findObj(section_name);
             //if the object was found
             if (section != null ) {
                 //if the value is empty, then the user didn't give a grade to that question
                 if (section.value == "") {
                    all_answered = "no";
                                        
                    //FOCUS ---------------------------------------------------------------
                    var section_table = document.getElementById('T_' + section_name);
                    //var section_table = MM_findObj('T_section_1');
                    if (section_table != null ) { 
                        section_table.focus();
                    }//end if the object to focus on was found ----------------------------
                    
                 }//end if the section had no value
             }//end if section is not null
             
            i++;
            
         }//end of for (or while)
         
         //return value
         //if it is false, then the HTML where this javascript is called will not go to the page 
         //described in the action attribute of the form
         if  (all_answered == 'yes')  {
            return true;
         }
         else {
            return false
         }
         //------------------------------------------------------------------------------
   }//end of function  
   
   
   //controls if the user set the values right in the umfrage_10
   function chkFormularTen(list_of_sections) {
         //should return true if
         // No cat is selected and no text is written
         // A cat is selected AND a text is written
         
         //should return false if
         // A cat is selected and no text is written
         // -> then we unset the categorie and avoid writing anything into the DB   
         // No cat is selected an a text is written (cannot happen)
         
         var section_name = "section_1";
         //Find elelent in DOM 
         //section_1 etc are the hidden parameters whose values should have been set
         var section=MM_findObj(section_name);
             //if the object was found
             if (section != null ) {
                 //if the value is empty, then the user didn't select any cat.
                 //if no cat is selected then no text can have been written
                 //so the user just wants to skip quetion 10 and we let him do so. 
                 
                 if (section.value != "") {
                    //if a cat. was selected, then we chekc if a text was written
                    var text_field=MM_findObj('textarea'); 
                    if (text_field != null) { 
                        //if no text was written, then we unset the cat
                        if (text_field.value == "") {
                            section.value = "";
                        }
                    }//end if the textarea is an object
                 }//end if section is not null

         //we treat all cases and whatever the user does we handle. So it's always true.
          return true
         } //if the section (hidden field in HTML) is an object
         //------------------------------------------------------------------------------
   }//end of function   


/*
//12 charactere: +49 --- --- ---     
function checkPhoneNumber(text_field_1) {
   var all_ok = true;
   var trim_tel_num =  "";  //initialise the trimmed telephone number
   var initial_length = text_field_1.value.length;
   //alert("Its initial length is " + initial_length);
   //erase whitespaces from the telephone number
   //and check if all characters (which are not whitespaces) are either numbers or a +
    var i =0;
    while ((i<initial_length) && (all_ok == true)) {
          var current_car = text_field_1.value.charAt(i);
          //alert("inside the loop. time: " + i + ". Current char is: " + current_car);
          //if it is not an empty char, then add it to the trimmed phone number
           if (current_car != " ") {
               if ((current_car=="0") || (current_car=="1") ||(current_car=="2") ||
                   (current_car=="3") || (current_car=="4") ||(current_car=="5") ||
                   (current_car=="6") || (current_car=="7") ||(current_car=="8") ||
                   (current_car=="9") || (current_car=="+"))  {
                     trim_tel_num = trim_tel_num + current_car; 
               }
               else {
                    all_ok = false;
               }
           }//end of it is not a whitepsace (if it is we ignore it)
              i++;
    }//end of while
    //alert("end of loop reached. The tirmmed version conains " + trim_tel_num);
    //if it still seems like an acceptable telephone number we need to keep checking
    if (all_ok == true) {
       //if the phone number doesn't have the right length
       if (trim_tel_num.length != 12) {
            all_ok = false;
       }
       //if it has the right length we check the first three characters
       else {
             //alert("The trimmed phone number has twelve characters");
             var first_car = trim_tel_num.charAt(0);
             //if the first character is not a  + the data is wrong
              if (first_car != "+") {
                  all_ok = false; 
              }
              else {
                    //if the first character is a + we need to keep checking
                    //alert("The fist caracter is: " + first_car);
                    var second_car = trim_tel_num.charAt(1);
                    if (second_car != "4") {
                        all_ok = false;    
                    }
                    else {
                          //alert ("The second caracter is: " + second_car);
                          var third_car = trim_tel_num.charAt(2);
                          //alert("The third caracter is: " + third_car);
                          if (third_car != "9") {
                              all_ok = false;    
                          }
                    } //second character is a 4
              }//first char is a +
       }//has the right length
   }//all numbers or (deleted) whitespaces
   return all_ok;
}//end of function checkPhoneNumber
*/



/*
function chkBusinessFormular() {
     var all_ok = true;

     //private telefonnummer ---------------------------------------------------------------------- 
     var text_field_1=MM_findObj('textfield1'); 
     if ((text_field_1 != null) && ((text_field_1.value != ""))) {
         all_ok =  checkPhoneNumber(text_field_1);
     }//end of private telefonnummer check
         

     //geshaeftliche telefonnummer ----------------------------------------------------------------
     if (all_ok == true) {          //keep checking
         var text_field_2=MM_findObj('textfield2'); 
         if ((text_field_2 != null) && (text_field_2.value != "")){
             all_ok =  checkPhoneNumber(text_field_2);
         }//found      

         if ((text_field_1.value=="")&&(text_field_2.value=="")) {
             all_ok = false;
         }
         //checkboxen ---------------------------------------------------------------------------------
         if (all_ok == true) {          //keep checking  
            //check the checkboxes (at least one has to be checked!)
            //first the private telephone one
             var checkbox_1=MM_findObj('checkbox1'); 
             if (checkbox_1 != null) {
                //if it is checked, then there's no problem
                //if it is not checked, then we need to check the work tel one
                if (checkbox_1.checked == false) {
                    var checkbox_2=MM_findObj('checkbox2');                
                    if (checkbox_1 != null) {
                        //if it isn't checked either, then we signal an error
                        if(checkbox_2.checked == false) {
                          all_ok = false;
                        }
                    }
                }//private tel checkbox was not checked
             }//Found object private tel
         }//if after public tel number is still ok
     }//if after public tel number still all ok    
     if (all_ok == false) {
        //make the error message visible
        var error_message = document.getElementById('error_message');
        if (error_message != null) {
            error_message.style.display = ""; //"" instead of "none" sets it visible
        }
     }
     return all_ok;
   }//end of function  
*/   
 
 
function businessSolutionsSetPrivateTel() {
   //to make inquires on the state of an object we first need to find the DOM object
   var private_tel = MM_findObj('textfield1');
   
   if (private_tel != null) {
      if ((!private_tel.isSet) && (private_tel.value != "")){ 
        //activate private tel checkbox
         var checkbox_one=MM_findObj('checkbox1'); //private
         if (checkbox_one != null) {
             checkbox_one.disabled  =  false; //sets color automatically to background
         }      
      } 
      else { // if it is not set   or empty
             //deactivate private tel checkbox
             //and erase the value
             var checkbox_one=MM_findObj('checkbox1'); //private
             if (checkbox_one != null) {
                 checkbox_one.checked = false;
                 checkbox_one.disabled  =  true;  //sets color automaticall to white
             }
      }
    }//end of private_tel is unset   
}//end of function businessSolutionsSetPrivateTel



function businessSolutionsSetWorkTel() {
   //to make inquires on the state of an object we first need to find the DOM object
   var private_tel = MM_findObj('textfield2');
   
   if (private_tel != null) {
      if ((!private_tel.isSet) && (private_tel.value != "")){ 
        //activate private tel checkbox
         var checkbox_one=MM_findObj('checkbox2'); //private
         if (checkbox_one != null) {
             checkbox_one.disabled  =  false; //sets color automatically to background
         }      
      } 
      else { // if it is not set   or empty
             //deactivate private tel checkbox
             //and erase the value
             var checkbox_one=MM_findObj('checkbox2'); //private
             if (checkbox_one != null) {
                 checkbox_one.checked = false;
                 checkbox_one.disabled  =  true;  //sets color automaticall to white
             }
      }
    }//end of private_tel is unset   
}//end of function businessSolutionsSetPrivateTel



function setCheckboxValue(checkbox){
   var checkbox_name = MM_findObj(checkbox);
   if (checkbox_name != null) { 
       if(checkbox_name.checked == "true") {
    
       }
       else {
    
       }
   }//found DOM object  
}//end of function setCheckboxValue





