/*
* Setting height of the content to perfectly fit the page height
*/
function setHeight() {
	fullHeight = document.body.clientHeight - $('#footer').height() - $('#header').height();
	$('#content').height( fullHeight );
}

/*
* This is a function to correct Internet Explorer's bug on handling transparent PNG-files!
*/
function alphaImages() {
	if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Windows") != -1) {
		var els = document.getElementsByTagName("IMG");
		var s, w, h;
		for (var i=0; i<els.length; i++) {
			s = els[i].src;
			if (s.toLowerCase().indexOf(".png") != -1) {
				els[i].src = "images/spacer.gif";
				els[i].style.filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + s + "', sizingMethod=image);";
				}
			}
		}
	}


// Setting height after page fully load
$(document).ready(setHeight);

// Fixing IE's transparent PNG handling after page fully load
if (navigator.userAgent.indexOf("MSIE") != -1 && navigator.userAgent.indexOf("Windows") != -1) {
	$(document).ready(alphaImages);
}
