//<!--
	var script = '';

	function GetCheckBox (strObj)  {
        if(strObj) {
            if(strObj.checked)
                strObj.value = 1 ; 
            else
                strObj.value = 0 ; 
        }
    }
	
	function ChangeOption(selBox) {
//		alert(selBox.name);
		document.form0.action = "./recalc.php" ;
		document.form0.target = "recalc" ;
		document.form0.CHANGE.value = selBox.name ;
		
		document.form0.submit();
		
		document.form0.action = script;
		document.form0.target = "Liste" ;
	}

	function GetBoxValue (selBox)  {
		if(selBox) {
//			alert(selBox.name+"\n"+selBox.type);
			
			if(selBox.options) {
				if( (selBox.options[selBox.selectedIndex].value) && 
					(selBox.options[selBox.selectedIndex].value != "egal"))
				{
					return selBox.options[selBox.selectedIndex].value ;
				}
			} else {
//				alert(selBox.type);
				return selBox.value ;	
			}	
		}
		return 0;
	}	
    function _GetKriterien (bHaus) {
       	var	str4 = "" ;
       	var val ;
       	
       	GetBoxValue(document.form0.NAECHTE);
       	if((val = GetBoxValue(document.form0.PERSONEN)) > 0)
       		str4 += "fob_maxpersonen:>=:" + GetBoxValue(document.form0.PERSONEN);
       	if((val = GetBoxValue(document.form0.KINDER)) > 0) {
       		var pers = GetBoxValue(document.form0.PERSONEN);1
	        str4 += ",fob_kinder:>=:("+val+" - (fob_maxpersonen-"+pers+"))" ;
       	}
       	str4 = GetUserKrit(str4);

		if(val = GetBoxValue(document.form0.GRUPPE)) {
   			str4 += ",fob_f_stm_gruppe:=:" + val;
	    }	
	    if(val = GetBoxValue(document.form0.REGION)) {
   			str4 += ",fob_f_stm_region:=:" + val;
	    }
    	if(val = GetBoxValue(document.form0.LAGE)) {
   			str4 += ",fob_f_stm_lage:=:" + val;
	    }	
		if(val = GetBoxValue(document.form0.ORT)) {
   			str4 += ",fob_f_stm_ort:=:" + val ;
	    }	
		if(val = GetBoxValue(document.form0.ORTSLAGE)) {
   			str4 += ",fob_f_stm_ortslage:=:" + val ;
	    }	
    	if(val = GetBoxValue(document.form0.WOHNLAGE)) {
   			str4 += ",fob_f_stm_wohnlage:=:" + val;
	    }	
    	if(val = GetBoxValue(document.form0.AUSSTATTUNG)) {
   			str4 += ",fob_f_stm_ausstattung:=:" + val;
	    }	
    	if(val = GetBoxValue(document.form0.STERNE)) {
   			str4 += ",fob_quality:=:" + val;
	    }	
    	if(val = GetBoxValue(document.form0.TYP)) {
   			str4 += ",fob_f_stm_typ:=:" + val;
	    }	
    	if(val = GetBoxValue(document.form0.OBJNR)) {
    		if(bHaus)
    			str4 += ",fob_hausname:like:" + val + "%";
	    	else	
		  		str4 += ",fob_objnr:like:" + val + "%" ;
	  	}	
    	if(val = GetBoxValue(document.form0.HAUS)) {
	   		str4 += ",fob_f_haus:=:" + val;
	  	}	
    	if(val = GetBoxValue(document.form0.ANLAGE)) {
   			str4 += ",fob_f_anlage:=:" + val;
	    }	
    	if(val = GetBoxValue(document.form0.LAND)) {
   			str4 += ",fob_land:like:" + val;
	    }	
		if(document.form0.RAUCHER0) {
	        if(document.form0.RAUCHER0.value == 'J') {
	            str4 += ",fob_raucher:eq:J" ;
	        }
	        else if(document.form0.RAUCHER0.value == 'N') {
	            str4 += ",fob_raucher:eq:N" ;
	        }
	    }
	    if(document.form0.TIERE0) {    
	        if(document.form0.TIERE0.value == 'J') {
	            str4 += ",fob_tiere:eq:J" ;
	        }
	        else if(document.form0.TIERE0.value == 'N') {
	            str4 += ",fob_tiere:eq:N" ;
	        }
	    }    
	    if(document.form0.ALLERGIKER0) {    
	        if(document.form0.ALLERGIKER0.value == 'J') {
	            str4 += ",fob_allergiker:eq:J" ;
	        }
	        else if(document.form0.ALLERGIKER0.value == 'N') {
	            str4 += ",fob_allergiker:eq:N" ;
	        }
	    }    
	    
		if(document.form0.ZIMMER && document.form0.ZIMMER.value) {
			// alert(typeof (document.form0.ZIMMER.value-0));
			document.form0.ZIMMER.value = document.form0.ZIMMER.value-0;
			if(document.form0.ZIMMER.value > 0)
	        	str4 += ",fob_zimmer:>=:" + document.form0.ZIMMER.value;
		}		        
	    
   	    document.form0.SEARCH4.value = str4 ;
   	    document.form0.submit ();
//   	    alert (str4);
	}
	function SetTiere (val) {
		document.form0.TIERE0.value = val ;
	}
	function SetRaucher (val) {
		document.form0.RAUCHER0.value = val ;
	}
	function SetAllergiker (val) {
		if(document.form0.ALLERGIKER0)
			document.form0.ALLERGIKER0.value = val ;
	}
	
	function AddOption (name, val, text, selected) {
		var box = document.form0.elements[name];
		
		if(box) {
			box.options.length++ ;
			box.options[box.options.length-1] = new Option (text, val);
			if(selected) {
				box.selectedIndex = box.options.length-1 ;
			}	
		}		
	}
	function ClearBox(name) {
		var i ;
		var box = document.form0.elements[name];
		
		if(box) {
			do {
				for(i = 0 ; i < box.options.length ; i++) {
					box.options[i] = null ;
				}
			}	
			while (box.options.length);	
		}	
	}
-->