﻿
function srodkuj()
{
var szer=$(document).width(),szerb=100,windowWidth,windowHeight;
		
if (self.innerHeight) { // all except Explorer
			if(document.documentElement.clientWidth){
				windowWidth = document.documentElement.clientWidth;
			} else {
				windowWidth = self.innerWidth;
			}
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}
		szer=windowWidth;


		if(szer>1200)
		{$('#body').css({'width':szer+'px'});
		szerb=(szer-1200)/2+100;
		}
		else
		{$('#body').css({'width':'1200'+'px'});
		$("body").animate({scrollLeft:szerb-3+'px'}, "fast");
		
		}
		$('td.lewa').css({'width': szerb+'px'});
		
		$('#tresc').css({'left':szerb+'px'});
	$('td.prawa').css({'width': szerb+'px'});
	
	

}
$(document).ready(
	 
	function()
	{
	$('#olewy').hide();
	$('#body').hide(); 
	 $('#tresc').hide();
	
   	$('div.menu').click(function()
		{//$('#body').hide(); 
	 //$('#tresc').hide();
		});
	
	 $('#tresc').show();;
	  $('#body').show(); 
	
	$(document).pngFix();
	$('#olewy').fadeIn();
srodkuj();	}
		);