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 [myWidth,myHeight];
}


function resizeIframe(frame) {
  try {
	if(frame.contentDocument) 	frame.height = frame.contentDocument.body.scrollHeight;
	else 	frame.style.height = frame.contentWindow.document.body.scrollHeight;
  }
  catch (e) {
     window.status = e.message;
  }
}
var rozmiar=0;
function fix_sizeMain(dodaj) {	
	obj=strona.document.getElementById("tabglowna");	
	//alert(obj.id);
	if (obj) {
		if (isNaN(dodaj)) dodaj=0;
		//alert(size);
		if (rozmiar>obj.clientHeight) 
			document.getElementById("strona").style.height = dodaj + rozmiar;//obj.clientHeight;
		else 
			document.getElementById("strona").style.height = dodaj + obj.clientHeight;
	}
	else resizeIframe(parent.document.getElementById('strona'));
	
	var wysokosc_framea = document.getElementById("strona").style.height;
	wysokosc_framea = parseInt(wysokosc_framea);
	try {
		var menu_fl = document.getElementById("menu_boczne");
		menu_fl.SetVariable ("wysokosc_iframe", wysokosc_framea);

	} catch(err) {
		var menu_fl_ff = document.getElementById("menu_boczne_ff");
		menu_fl_ff.SetVariable ("wysokosc_iframe", wysokosc_framea);
	}
	
	var window_size = getSize();
	var window_height = window_size[1];
	
	if (window_height < document.getElementById("tabela_glowna1").clientHeight) {
		wysokosc_framea = 2000;
		document.getElementById("tabela_glowna1").style.height = wysokosc_framea+250;
		document.getElementById("tabela_glowna2").style.height = wysokosc_framea;
	
		fix_menu_boczne();
	};
	
	
	
}

function resize_tabele () {
	document.getElementById("tabela_glowna1").style.height = '100%';
	document.getElementById("tabela_glowna2").style.height = '100%';
}

function fix_menu_boczne () {
	wyw = "resize_tabele()";
	setTimeout (wyw,120);
}