//////////////////////////////////////////////
// login page

// find out if JavaScript and DOM are enabled

addEventFunction(window, 'onload',
	function()
	{
		if(document.forms[0])
		{
			// select the email field if appropriate

			if(document.forms[0].email && document.forms[0].email.value != '')
			{
				document.forms[0].password.value = '';
				document.forms[0].email.select();
			}

			// Add form elements if this browser will let us.
			// KHTML borks createElement so use the non-standard standard of innerHTML if possible.

			if(document.forms[0].elements['jsEnabled'])
			{
				document.forms[0].elements['jsEnabled'].value = 1;
			}
			if(document.forms[0].elements['screenWidth'] && screen.width)
			{
				document.forms[0].elements['screenWidth'].value = screen.width;
			}
			if(document.getElementById && document.getElementById('jsInnerHTMLContainer') && document.body.innerHTML)
			{
				document.getElementById('jsInnerHTMLContainer').innerHTML = '<input type="hidden" name="jsInnerHTML" value="1" />';
			}
		}
	}
);