// JavaScript Document

function sprawdzJS()
{
	document.getElementsByTagName('body')[0].setAttribute('id','body');
}

function przeskalujElementy()
{
	var stopka = document.getElementById('stopka');
	var maska = document.getElementById('maska');
	var zawartosc = document.getElementById('zawartosc');

	maska.style.width = getWindowWidth() + "px";
	maska.style.left = -zawartosc.offsetLeft + "px";
	maska.style.height = (stopka.offsetTop + stopka.offsetHeight) + "px";
	//	maska.style.display = 'block';
	//	maska.style.zIndex = 100;
}

function getWindowWidth() {
	var windowWidth = 0;

	if(typeof(window.innerWidth) == 'number'){
   	//Non-IE
		windowWidth = window.innerWidth;
	} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		//IE 6+ in 'standards compliant mode'
		windowWidth = document.documentElement.clientWidth;
	} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
		//IE 4 compatible
		windowWidth = document.body.clientWidth;
	}

	return windowWidth;
}

