

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".toggle_container").hide(); 

	//Switch the "Open" and "Close" state per click
	$("h2.trigger1").toggle(function(){
		$(this).addClass("active_right");
		}, function () {
		$(this).removeClass("active_right");
	});

	//Slide up and down on click
	$("h2.trigger1").click(function(){
		$(this).next(".toggle_container").slideToggle("slow");
	});
});

$(document).ready(function(){
	
  //Hide (Collapse) the toggle containers on load
	$(".toggle_containerPremieren").show(); 

	//Switch the "Open" and "Close" state per click
	$("h2.trigger").toggle(function(){
		$(this).addClass("active");
		}, function () {
		$(this).removeClass("active");
	});

	//Slide up and down on click
	$("h2.trigger").click(function(){
		$(this).next(".toggle_containerPremieren").slideToggle("slow");
	});
	

});

$(document).ready(function(){

	//Hide (Collapse) the toggle containers on load
	$(".toggle_container2").show(); 

	//Switch the "Open" and "Close" state per click
	$("h2.trigger2").toggle(function(){
		$(this).addClass("active_suche");
		}, function () {
		$(this).removeClass("active_suche");
	});

	//Slide up and down on click
	$("h2.trigger2").click(function(){
		$(this).next(".toggle_container2").slideToggle("slow");
	});
});


function inhaltleeren() {
	
	var inhalt = document.suchmaske.search_text.value;
	
	if (inhalt == ""){
		document.suchmaske.search_text.value = "";
	}
	else {
		document.suchmaske.search_text.value = "";
	}
}

function inhaltnichtleer() {
	
	var inhalt = document.suchmaske.search_text.value;
	
	if (inhalt != ""){
		
	}
	else {
		document.suchmaske.search_text.value = "";
	}
}

function startSearch(){
    // 12
    //alert(document.searchAdditionalContainer.style.display);
    var params = '';
    if(document.suchmaske.search_text.value != ''){
        params += '&tx_tbproductions_pi1[search_text]=' + document.suchmaske.search_text.value;
    }
    
    if(document.suchmaske.search_worksteps.value != ''){
        params += '&tx_tbproductions_pi1[search_worksteps]=' + document.suchmaske.search_worksteps.value;
    }
    if(document.suchmaske.search_regie.value != ''){
        params += '&tx_tbproductions_pi1[search_regie]=' + document.suchmaske.search_regie.value;
    }
    if(document.suchmaske.search_date.value != ''){
        params += '&tx_tbproductions_pi1[search_date]=' + document.suchmaske.search_date.value;
    }
    
    window.location.href = 'index.php?id=12' + params;
}

