// Funktionen für Suche
var trigger;
trigger = 0;

function showDropdown() {
	document.getElementById("tooltip").style.display="inline";
	if(trigger < 2)
		trigger = 1;
}

function hideDropdown() {
	if(trigger < 2) {
		document.getElementById('sucheinput').focus();
		document.getElementById("tooltip").style.display="none";
		trigger = 0;
	}
}

function resetTrigger() {
	trigger = 0;
}

function lockDropdown() {
	trigger = 2;
}
// Funktionen für Suche Ende

function showdetail(){
	var menu = document.getElementById("details");
	if(menu.style.display == "none"){
		menu.style.display = "block";
	}else {
		menu.style.display = "none";
	}
}

function openEmpfWindow(url,width,height,props){

	//if(isPopupAllowed()) {
	var props = props+',directories=no,status=no,menubar=no,copyhistory=yes,width='+width+',height='+height;
	var popup = window.open(url,'popup',props);
	if (popup) {
		popup.focus();
		return true;
	} else {
		alert('Bitte deaktivieren Sie Ihren Popup-Blocker für diese Seite.');
		return false;
	}
}


function openPushWindow(name,url,width,height,props){

	//if(isPopupAllowed()) {
	var props = props+',directories=no,status=no,menubar=no,copyhistory=yes,width='+width+',height='+height;
	var popup = window.open(url,name,props);
	if (popup) {
		popup.focus();
		return true;
	} else {
		alert('Bitte deaktivieren Sie Ihren Popup-Blocker für diese Seite.');
		return false;
	}
}


var ullstPopupWin;
var ullstPopupWinProps;
var ullstIsPopupAllowed;

function isPopupAllowed() {

	ullstPopupWinProps = 'width=1,height=1';
	ullstPopupWin = window.open(null, 'ullstPopupWin', ullstPopupWinProps);
	//window.focus();
	
	if (ullstPopupWin) {
		//window.focus();
		ullstPopupWin.close();
		ullstIsPopupAllowed = true;
		return true;
	} else {
		ullstIsPopupAllowed = false;
		alert('Bitte deaktivieren Sie Ihren Popup-Blocker für diese Seite.');
		return false;
	}
}

