function menuRollOver(elem){
	var fullSrc =  elem.src;
	var patt1=new RegExp(/menu\d/);
	var imgName = patt1.exec(fullSrc).toString();
	newstring = "menu" + imgName.substring(4, 5) + "-over";
	elem.src = fullSrc.replace(/menu\d/, newstring);
}
function menuRollOut(elem){
	elem.src = elem.src.replace("-over", "");
}
	
function showLightview(div){
		
	Lightview.show({
	href: div,
	rel: 'inline',
	options: {
	  autosize: true,
	  menubar: false
	  
	}
  });


}
	
var bottomBlockHeight = 0;
		
function resizeBottom() {
	var viewPortHeight = 0;
	var topOfBottom = 111 + document.getElementById('centralImage').offsetHeight;
	var bottomDiff = 60;
	var offset = 2;
	
	if(bottomBlockHeight==0){
		bottomBlockHeight = document.getElementById('bottomBlock').offsetHeight;
	}
	
	if( typeof( window.innerWidth ) == 'number' ) {
		//Non-IE
		viewPortHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		//IE 6+ in 'standards compliant mode'
		viewPortHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		//IE 4 compatible
		viewPortHeight = document.body.clientHeight;
	}
	var docHeight = document.getElementById('overallContainer').offsetHeight;
	if(viewPortHeight > docHeight){
		document.getElementById('bottomBlock').style.height = viewPortHeight - topOfBottom - offset + "px";
	}else{
		if(document.getElementById('bottomBlock').offsetHeight>bottomBlockHeight){
			if((topOfBottom + bottomBlockHeight) < viewPortHeight){
				document.getElementById('bottomBlock').style.height = viewPortHeight - topOfBottom - offset + "px";
			}else{
				document.getElementById('bottomBlock').style.height = bottomBlockHeight + "px";
			}
		}
	}

	
}

function openFullScreen(){
	window.open('index.html','newWin','height='+screen.height+' width='+screen.width+', toolbar=no, scrollbars=no, resizable=yes, status=no, copyhistory=no, location=no, menubar=no')
}

//window.onload = resizeBottom;
//window.onresize = resizeBottom;
