function dim(vis,sect){
	dimElem = document.getElementById('gray');
	visElem = document.getElementById(sect);
	if(vis){
		dimElem.style.display = 'block';
		visElem.style.display = 'block';
	}else{
		dimElem.style.display = 'none';
		visElem.style.display = 'none';
	}
	adjustWinSize();
}

function adjustWinSize(){
	if (window.innerHeight && window.scrollMaxY) {// Firefox
		y = window.innerHeight + window.scrollMaxY+'px';
		//x = window.innerWidth + window.scrollMaxX+'px';
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		y = document.body.scrollHeight+'px';
		//x = document.body.scrollWidth+'px';
	} else if (document.body.offsetHeight){ // works in Explorer 6 Strict, Mozilla (not FF) and Safari
		y = document.body.offsetHeight+'px';
		//x = document.body.offsetWidth+'px';
	} else { // Catch all
		y = '100%';
		//x = '100%';
	}

	document.getElementsByTagName('html')[0].style.height = y;
	document.getElementsByTagName('body')[0].style.height = y;
	document.getElementById('gray').style.height = y;
}
