function createRequest () {

   	//not checked search whole site
    if(document.searchForm.searchCategory.checked == false){
    	document.getElementsByName("tx_indexedsearch[_sections]")[0].value = 0;
    }
	//checked - search just this category - use the values preset 
	// for tx_indexedsearch[_sections] by modified class.tx_macinasearchbox_pi1.php
    else {    }


	// !!!caution!!! if macina-searcbox and indexed search are placed on the same site
	//there are two Elements with the name "tx_indexedsearch[sword]"
	// so check for two Elements with the name "tx_indexedsearch[sword]"
	// -> depending on the template -> in our case the second one is the modified macina searchbox
	// add the selectbox-values to the searchterm of the inputfield of macina searchbox
    if(document.getElementsByName("tx_indexedsearch[sword]")[1]){
        //original searchstring from input-field
        searchString = document.getElementsByName("tx_indexedsearch[sword]")[1].value;

        var val1 = 0;
        var val2 = 0;
        var val3 = 0;

        //add values from selectboxes to searchstring
        
          for (i = 0; i < document.searchForm.part1.length; ++i){
            if (document.searchForm.part1.options[i].selected == true){
             val1 = document.searchForm.part1.options[i].value;
             searchString = searchString + ' ' + val1;
            }
          }

          for (j = 0; j < document.searchForm.part2.length; ++j){
            if (document.searchForm.part2.options[j].selected == true){
             val2 = document.searchForm.part2.options[j].value;
             searchString = searchString + ' ' + val2;
            }
          }

          for (i = 0; i < document.searchForm.part3.length; ++i){
            if (document.searchForm.part3.options[i].selected == true){
             val3 = document.searchForm.part3.options[i].value;
             searchString = searchString + ' ' + val3;
            }
          }
     
        // write joined searchstring back to form  
        document.getElementsByName("tx_indexedsearch[sword]")[1].value = searchString;	
	}
	
	// if there is one Element with the name "tx_indexedsearch[sword]"
	// just macina searchbox on this site
	// add the selectbox-values to the searchterm of the inputfield of macina searchbox	
	else{
        //original searchstring from input-field
        searchString = document.getElementsByName("tx_indexedsearch[sword]")[0].value;

        var val1 = 0;
        var val2 = 0;
        var val3 = 0;

        //add values from selectboxes to searchstring
        
          for (i = 0; i < document.searchForm.part1.length; ++i){
            if (document.searchForm.part1.options[i].selected == true){
             val1 = document.searchForm.part1.options[i].value;
             searchString = searchString + ' ' + val1;
            }
          }

          for (j = 0; j < document.searchForm.part2.length; ++j){
            if (document.searchForm.part2.options[j].selected == true){
             val2 = document.searchForm.part2.options[j].value;
             searchString = searchString + ' ' + val2;
            }
          }

          for (i = 0; i < document.searchForm.part3.length; ++i){
            if (document.searchForm.part3.options[i].selected == true){
             val3 = document.searchForm.part3.options[i].value;
             searchString = searchString + ' ' + val3;
            }
          }
     
        // write joined searchstring back to form  
        document.getElementsByName("tx_indexedsearch[sword]")[0].value = searchString;
	}
}
