function rbIsIE()
{
	if (navigator.appName == 'Microsoft Internet Explorer') {
		return true;
	}
	return false;
}

function rbIsOpera()
{
	if (navigator.appName == 'Opera') {
		return true;
	}
	return false;
}

function getH() {
	var height;
	if (rbIsIE()) {	
		height = parseInt(document.documentElement.clientHeight);
		$("#pre-content").css('padding-top','0px');
	} else if (rbIsOpera()) {
		height = parseInt(window.innerHeight);
		$("#pre-content").css('padding-top','27px');		
	} else {
		height = parseInt(window.innerHeight);
		$("#pre-content").css('padding-top','27px');				
	}
	return height;
}

function Timer() {
	var d = new Date();
	var curr_hour = d.getHours();
	if (curr_hour<10) curr_hour = '0'+curr_hour;
	var curr_min = d.getMinutes();
	if (curr_min<10) curr_min = '0'+curr_min;
	var curr_sec = d.getSeconds();
	if (curr_sec<10) curr_sec = '0'+curr_sec;
	$("#clock").text(curr_hour+':'+curr_min+':'+curr_sec);
	setTimeout("Timer()",500);
}

function resize() {
	var gh = (document.getElementById("pre-content")) ? $("#pre-content").height() : 0;
	$("#main-content").height(getH()-$("#header-td").height()-gh-50);
	setTimeout("resize()",500);
}

$(document).ready( function() {

	resize();	
	setTimeout("Timer()",500);
});

