// Kookaburra Page Load javascript


function addLoadListener(fn)
{
	if(typeof window.addEventListener != 'undefined')
	{
		window.addEventListener('load',fn,false);
	}
	else if (typeof document.addEventListener != 'undefined')
	{
		document.addEventListener('load',fnn, false);
	}
	else if (typeof window.attachEvent != 'undefined')
	{
		window.attachEvent('onload', fn);
	}
	else
	{
		var oldfn = window.onload;
		if(typeof window.onload != 'function')
		{
			window.onload = fn;
		}
		else
		{
			window.onload = function()
			{
				oldfn();
				fn();
			};
		}
	}
}

addLoadListener(function() { AltAccDisplay();});
addLoadListener(function() { RC();});


function RC()
{
	/*if(document.getElementById('Form1'))
	{
		if(document.getElementById('Form1').getAttribute('action') == 'home.aspx')
		{
			var email = readCookie('email');
			if(!email)
				email = '';*/
			if(document.getElementById('postuserid'))
			{
				var email = readCookie('email');
				if(!email)
					email = '';
				document.getElementById('postuserid').setAttribute("value",email);
				document.getElementById('postuserid').focus();
				document.getElementById('postuserid').select() 
			}
	//	}
	//}
}
function AltAccDisplay()
{
	if(document.getElementById("AltTable"))
	{
		if(!document.getElementById("AltD").firstChild)
		{
			document.getElementById("AltTable").style.visibility = "hidden";
		}
		else
		{
			document.getElementById("AltTable").style.visibility = "visible";
			document.getElementById("AltsAccTables").style.display = "block";
		}
	}
	if(document.getElementById("AccTable"))
	{
		if(!document.getElementById("AccD").firstChild)
		{
			document.getElementById("AccTable").style.visibility = "hidden";
		}
		else
		{
			document.getElementById("AccTable").style.visibility = "visible";
			document.getElementById("AltsAccTables").style.display = "block";
		}
	}
}
