// JavaScript Document
$(document).ready(function(){
	repoFooter();
	$(window).bind("resize",repoFooter)
})

function repoFooter(){
	var view = viewWindow();
	if($("#index_mainBody")!=null){
		if($("#index_mainBody").height()+155 < view.height){
			$("#index_mainBody").height(view.height-155);
		}
	}
	
	if($("#mainContent")!=null){
		var footerHeight = $("#footer").height();
		var view = viewWindow();
		
		if($("#mainContent").height()+footerHeight < view.height){
			$("#mainContent").height(view.height-footerHeight);
		}
	}
}

function viewWindow(){
	return{
		width: $(window).width(),
		height: $(window).height()
	}
}
