 /**
 * @author Radek Mackowiak
 */
 

						
 
		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				
				if (windowHeight < 710) 
				{
					$('page_margins').addClass('klein');	
				
				
					if (windowHeight > 610) 
					{
					
						var contentHeight = document.getElementById('page').offsetHeight;
						var menuHeight = document.getElementById('col3_content');
						var rightContent = $('page_margins').getElement('div[class=subcr]');
						
					
					
							rightContent.style.height = (windowHeight - 390) + 'px';
						
	
						 function firefox() 
						 {
							 menuHeight.style.height = (windowHeight - 113) + 'px';
						 }
						 
						 function safari() 
						 {
							 
							 if (windowHeight > 629) 
							 {
								 menuHeight.style.height = (windowHeight - 114) + 'px';
							 	 //alert(windowHeight)
							 }
							 
							
							 else 
							 {
								 menuHeight.setStyle('height', 110);
							 	 rightContent.setStyle('height', 238);
							 }
							 
						 }	
						 
						 function opera() 
						 {
							menuHeight.setStyle('height', windowHeight - 123);	 
							rightContent.setStyle('height', windowHeight - 385);
							
						 }
						 
						 function explorer6() 
						 {
							 menuHeight.style.height = (windowHeight - 97) + 'px';
		
							 test = $('col3_content').getStyle('height').toInt();
							 
							 rightContent.setStyle('padding-bottom', test - 502);	 
						 }
						 
						 function explorer7() 
						 {
							 menuHeight.style.height = (windowHeight - 205) + 'px';
						 }
						 
						 
						 
									 
							 if (navigator.appName == "Microsoft Internet Explorer") 
							 {
								if (window.XMLHttpRequest) 
								{
									explorer7(); 
								}
								else
								{
									explorer6();
								}
							 }
							 
							 else if (window.devicePixelRatio)
								 {
									 safari();
								 }
								 
							 else if(navigator.userAgent.indexOf("Opera")!=-1)
							 	{
								 	var versionindex=navigator.userAgent.indexOf("Opera")+6
								 	if (parseInt(navigator.userAgent.charAt(versionindex))>=8)
									 opera();
							 	}
							 
							 else 
								{
									firefox();
								}
					}
				}
				else {$('page_margins').removeClass('klein');}
			}
		}
		
		

			

window.addEvent('domready', function(){
		
		{setFooter();}
		

	
		var tooltips = new Tips($$('.tips'), 
		{
	
			initialize:function()
			{
				this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
			},
			onShow: function(toolTip) 
			{
				this.fx.start(0.9);
			},
			onHide: function(toolTip) 
			{
				this.fx.start(0);
			}
	
		});	
		

});



