function ortsauswahlOeffnen() {
    var sichtfenster_breite = window.getWidth();
    var neuesMarginLeft = (sichtfenster_breite - 968) / 2;
    $('header_content').setStyle('margin', '0 0 0 ' + neuesMarginLeft + 'px');
    $('container_content').setStyle('margin', '0 0 0 ' + neuesMarginLeft + 'px');
    $('footer').setStyle('margin', '0 0 0 ' + neuesMarginLeft + 'px');
    document.body.style.backgroundImage = "none";

    document.getElementsByTagName("html")[0].style.overflow = "hidden";

    positionOrtsauswahl();
    var schleier = $('ortsauswahl_schleier').setStyles({
		display:'block',
		opacity: 0.9
	});
    var ortsauswahl = $('ortsauswahl').setStyles({
		display:'block',
		opacity: 0
	});
	new Fx.Style(ortsauswahl, 'opacity', {transition: Fx.Transitions.Cubic.easeInOut, duration: 500} ).start(1);
	//new Fx.Style(schleier, 'opacity', {transition: Fx.Transitions.Cubic.easeInOut, duration: 1400} ).start(0.9);
    window.onresize = positionOrtsauswahl;
}

function getInnerWindowWidth()
{
    var window_width = 0;
    if ( typeof( window.innerWidth ) == 'number' )
       window_width = window.innerWidth;
    else
    if (
         document.documentElement
      && document.documentElement.clientWidth
       )
       window_width = document.documentElement.clientWidth;
    else
    if (
         document.body
      && document.body.clientWidth
       )
       window_width = document.body.clientWidth;

    return window_width;
}
function getInnerWindowHeight() {
    var window_Height = 0;
    if (typeof window.innerHeight == "number") {
        window_Height = window.innerHeight;
    } else if (document.documentElement && document.documentElement.clientHeight) {
        window_Height = document.documentElement.clientHeight;
    } else if (document.body && document.body.clientHeight) {
        window_Height = document.body.clientHeight;
    }
    return window_Height;
}
function positionOrtsauswahl() {
    var sichtfenster_breite = getInnerWindowWidth();
    var sichtfenster_hoehe = getInnerWindowHeight();

    var ortsauswahl = $('ortsauswahl');
    var ortsauswahl_breite = 572;
    var ortsauswahl_hoehe = 382;
    var ortsauswahl_x = sichtfenster_breite/2 - ortsauswahl_breite/2;
    var ortsauswahl_y = sichtfenster_hoehe/2 - ortsauswahl_hoehe/2;

    var schleier = $('ortsauswahl_schleier');

    ortsauswahl.setStyles({
    	left:ortsauswahl_x+'px',
		top:ortsauswahl_y+'px'
	});
    schleier.style.width = sichtfenster_breite + "px";
    schleier.style.height = sichtfenster_hoehe + "px";
}


function OpenBrWindow(theURL,winName,w,h,features) {
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    window.open(theURL,winName,'height='+h+',width='+w+',top='+wint+',left='+winl+','+features);
}