function resize(rootId, parId, wdt){
	if(!wdt)
		wdt = 0;
	var root = document.getElementById(rootId);
	var par = document.getElementById(parId);
	if(root.offsetHeight > par.offsetHeight-wdt){
		par.style.minHeight = root.offsetHeight-par.offsetHeight+par.offsetHeight+wdt+'px';
		par.style.height = root.offsetHeight-par.offsetHeight+par.offsetHeight+wdt+'px';
	}
}

function resize02(el){
	var el_obj;
	var el_objlist = new Array();
	var el_contentheight;
	
	var max_height = 0;
	
	function getRelStylesForObject(obj){
		var ret_obj;
		
		if(typeof obj == 'object'){
			if(window.getComputedStyle){	// Fx
				ret_obj = {
							'paddingtop':window.getComputedStyle(obj,null).paddingTop,
							'paddingbottom':window.getComputedStyle(obj,null).paddingBottom,
							'margintop':window.getComputedStyle(obj,null).marginTop,
							'marginbottom':window.getComputedStyle(obj,null).marginBottom,
							'bordertop':window.getComputedStyle(obj,null).borderTopWidth,
							'borderbottom':window.getComputedStyle(obj,null).borderBottomWidth
						};
			}else if(el_obj.currentStyle){	// IE
				ret_obj = {
							'paddingtop':obj.currentStyle.paddingTop,
							'paddingbottom':obj.currentStyle.paddingBottom,
							'margintop':obj.currentStyle.marginTop,
							'marginbottom':obj.currentStyle.marginBottom,
							'bordertop':obj.currentStyle.borderTopWidth,
							'borderbottom':obj.currentStyle.borderBottomWidth
						};
			}
		}
		
		for(i in ret_obj){
			ret_obj[i] = Number(ret_obj[i].replace('px',''));
			if(!ret_obj[i])
				ret_obj[i] = Number(0);
		}
		ret_obj['allsize'] = obj.offsetTop + obj.clientHeight + ret_obj['bordertop'] + ret_obj['borderbottom'];
		
		if(max_height < ret_obj['allsize'])
			max_height = ret_obj['allsize'];
		
		ret_obj['obj'] = obj;
		
		if(typeof ret_obj == 'object'){
			return ret_obj;
		}
		return false;
	}
	
	
	
	if(!el){
		console.log('ERORR - funkcja "resize02", musisz podac odpowiednie parametry, pierwszy id warstwy do ktorej rozciagamy, a drugi id warstwy rozciaganej, badz tablica warstw rozciaganych');
	}else{
		if(typeof el != 'object')
			el = new Array(el);
			
//\\ Oblicznia wysokosci do ktorej mamy rozciagac warstwy //\\
		for(i in el){
			el_obj = document.getElementById(el[i]);
			
			el_objlist[el_objlist.length] = getRelStylesForObject(el_obj);
		}

//\\ rozciaganie warstw //\\		
		for(i in el_objlist){
			if(el_objlist[i]['allsize'] < max_height){
				el_contentheight = el_objlist[i]['obj'].clientHeight - el_objlist[i]['paddingtop'] - el_objlist[i]['paddingbottom'];
				el_objlist[i]['obj'].style.height = el_contentheight + (max_height - el_objlist[i]['allsize']) - el_objlist[i]['borderbottom'] + 'px';
				el_objlist[i]['obj'].style.minHeight = el_contentheight + (max_height - el_objlist[i]['allsize']) + 'px';
			}
		}
	}
}
