function showDiv(action,url) {

        

		if(action == 'show') {
			document.getElementById('1').style.display = 'block';
			document.getElementById('2').style.display = 'block';
			document.getElementById('4').style.display = 'block';
			
			var scrollposition = getScrollXY();
		    var scrollOben = scrollposition[1];
		    var scrollObenPix = scrollposition[1]+'px';
		    
		    
		    document.getElementById('2').style.top = scrollObenPix;
		    
		    //var heightDiv2 = document.getElementById('2').style.height;
		    var heightDiv2 = document.getElementById('2').offsetHeight+30;		    
		    var heightTotalPre = heightDiv2+scrollOben;
		    var outerHeight = window.outerHeight;
		    
		    //var Fensterhoehe = window.document.all.Fenster.offsetHeight;
		    //alert('Fensterhoehe :'+Fensterhoehe);
		    /*
		    if(outerHeight < heightTotalPre) {
		      var heightTotal = heightTotalPre;
		    } else {
		      var heightTotal = outerHeight;
		    }
		    alert('Div2Height + 30= '+heightDiv2);
		    alert('outerHeight: '+ outerHeight);
		    alert('TotalHeight: '+heightTotal);
		    
		    document.getElementById('1').style.height = heightTotal+'px';
			*/
		    
		    
		    sendRequestGet(url);
		}
		if(action == 'close') {
			document.getElementById('1').style.display = 'none';
			document.getElementById('2').style.display = 'none';
			document.getElementById('4').style.display = 'none';
		}
		   
}

function sendRequestGet(url) {  
		
		new Ajax.Request(url,
		{ method: 'get', 
		  onComplete: zeige_Inhalt 
		 }
		);
}

function zeige_Inhalt( originalRequest ) {	   
	   
	   $('output').innerHTML = originalRequest.responseText; 
	   
	   document.getElementById('loader').style.display = 'none';
	   document.getElementById('Inhalt').style.visibility = 'visible';		   
}

function getSize() {
	var myWidth = 0, myHeight = 0;

	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	return [ myHeight ];
}

function getScrollXY() {
	var scrOfX = 0, scrOfY = 0;

	if( typeof( window.pageYOffset ) == 'number' ) {
		//Netscape compliant
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		//DOM compliant
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	}
	return [ scrOfX, scrOfY ]; 
	/*
	getElememtById('div1').top = scrOfX;
	alert('test: '+scrOfX);
	getElememtById('div2').style.top = scrOfX;
	*/
}

function scrollToTop() {
/*
			var scrollposition = getScrollXY();
		    alert(scrollposition[1]);
		    this.div1.style.top = this.scrollposition[1];
		    this.div2.style.top = this.scrollposition[1];
		    */
}

