
window.onload = function() {
	
	try {

		var postsHeight = parseInt(document.getElementById('posts').offsetHeight);
		var sidebarHeight = parseInt(document.getElementById('sidebar').offsetHeight);
				
		if (postsHeight < sidebarHeight) {
			
			document.getElementById('posts').style.height = sidebarHeight + 'px';
			
		}
	} catch (e) {
		
		//relax, no problem here...
		
	}
	
}

function toggleMenuButton(button, toggle) {
	
	var buttonImagePathNeutral;
	
	if (toggle == true) {

		buttonImagePathNeutral = button.src.substring(0, button.src.length - 4);
		button.src = buttonImagePathNeutral + '_on.jpg';

		//document.getElementById(button.id + '-on').style.left = button.style.left;
		
	} else {


		buttonImagePathNeutral = button.src.substring(0, button.src.length - 7);
		button.src = buttonImagePathNeutral + '.jpg';

		//document.getElementById(button.id + '-on').style.left = '-5000px';
		
	}
	
}