function getTableSize(){
	tableSize = document.getElementById('MainBody').offsetHeight;
	tableSize = tableSize - "150";
	document.getElementById('left_shadow').height = tableSize;
	document.getElementById('right_shadow').height = tableSize;
}
function openNewWindow(url)
{
	newWindow = window.open(url,'name','height=760, width=500');
	if (window.focus){
		newWindow.focus();
	}
}
function getLoginDetails()
{
	userName = getCookie("loggedusername");
	userPassword = getCookie("loggedpassword");
	if (userName == null){
		document.getElementById('usernameinput').value = "";
		document.getElementById('passwordinput').value = "";
	} else {
		if (document.getElementById('usernameinput') != null){
			document.getElementById('usernameinput').value = userName;
			document.getElementById('passwordinput').value = userPassword;
		}
	}
}
function getCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}