var buchungfenster;
var aktiv;

function showBuchung(dateID) {
	w2 = window.open ("buchung.jsp?dateID="+dateID, "", "location=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,width=1024,height=700,screenX=1,screenY=1");
	w2.moveTo(0, 0);
}


function loadForm(leoevent_leoticket_address, dateID, online_session) {

	if(buchungfenster == null) {
		buchungfenster = window.open (leoevent_leoticket_address + "/login.jsp?entry=online_buchung&param0="+dateID+"&param1="+online_session, "", "scrollbars=yes,resizable=yes,width=968,height=684,screenX=1,screenY=1");
		buchungfenster.moveTo(0, 0);
		aktiv = window.setInterval("CheckWindow("+dateID+")", 1000);
	}
}

function CheckWindow(dateID) {
	if(buchungfenster.closed == true) {
		window.clearInterval(aktiv);
		buchungfenster = null;
		window.open("buchung.jsp?dateID="+dateID, '_self');
	}
}

function showJSP(jsp) {
	w2 = window.open (jsp, "", "scrollbars=yes,resizable=no,width=600,height=300,screenX=1,screenY=1");
	w2.moveTo(200, 200);
}

function showURLSelf(url) {
	w2 = window.open(url, '_self');
}

function showURLBlank(url) {
	w2 = window.open(url, '_blank');
}

function dropdownValueChanged (page, select) {
	var value = select.options[select.options.selectedIndex].value;
	window.open(page+value, '_self');
}

function selectValueChanged (page, select) {
	var listlength = select.length;
	
	var value = "";
	var zaehler = 0;
	for (var i = 0; i < listlength; i++) {
		if(select.options[i].selected == true) {
			if(zaehler > 0) {
				value = value.concat(",");
			}
			value = value.concat(select.options[i].value);
			zaehler++;
		}
	}
	window.open(page+value, '_self');
}

function closeWindow() {
  window.close();
}
