var base = (document.getElementsByTagName ('BASE')[0] && document.getElementsByTagName( 'BASE')[0].href) || location.href

function depsize(gr){
	var dep = document.getElementById('departaments');
	var size = getPageSizeWithScroll();
	var height = (parseInt(size[1]) - 378);
	dep.style.height = height+'px';
	dep.style.display = 'block';

	height -= 60;
	var ban = height+5;
	if(gr == 1)
		height -= 30;
	document.getElementById('owflw').style.height = height +'px';
	document.getElementById('banner').style.height = ban +'px';
	}

function getPageSizeWithScroll(){
     if (window.innerHeight && window.scrollMaxY){
		yWithScroll = window.innerHeight + window.scrollMaxY;
		xWithScroll = window.innerWidth + window.scrollMaxX;
		}
	else{
		if (document.body.scrollHeight > document.body.offsetHeight){
			yWithScroll = document.body.scrollHeight;
			xWithScroll = document.body.scrollWidth;
			}
			else {
			yWithScroll = document.body.offsetHeight;
			xWithScroll = document.body.offsetWidth;
			}
		}
	 arrayPageSizeWithScroll = new Array(xWithScroll,yWithScroll);
	 return arrayPageSizeWithScroll;
	 }
