/**
 * common functions for Helvetia.at
 */

function popup(pfad, breite, hoehe, scroll, windowName) {

	if (screen.width <= 800) {
		if ((breite + 10) > screen.availWidth) {
			breite = screen.availWidth - 10;
		}
		if ((hoehe + 29) > screen.availHeight) {
			hoehe = screen.availHeight - 29;
		}
		screen_width = (screen.availWidth - breite - 10) / 2;
		screen_height = (screen.availHeight - hoehe - 29) / 2;
		var F2 = window.open(pfad, windowName, "width=" + breite + ",height="
				+ hoehe + ", top=" + screen_height + ", left=" + screen_width
				+ ",scrollbars=" + scroll);
		F2.focus();
	}

	if (screen.width > 800) {
		screen_width = (screen.availWidth - breite - 10) / 2;
		screen_height = (screen.availHeight - hoehe - 29) / 2;
		var F2 = window.open(pfad, windowName, "width=" + breite + ",height="
				+ hoehe + ", top=" + screen_height + ", left=" + screen_width
				+ ",scrollbars=" + scroll);
		F2.focus();
	}
}

function openCalendar(url) {
	popup(url, 770,
			530, 'no', 'adventszauberCalender');
}
