function checkWholeForm(extranetlogin) 
{
	var why = "";
	if (isEmpty(extranetlogin.username.value) == "The field has not been filled in.\n") 
	{
		why += 'Username: '+isEmpty(extranetlogin.username.value);
	}
	
	if (isEmpty(extranetlogin.password.value) == "The field has not been filled in.\n") 
	{
		why += 'Password: '+isEmpty(extranetlogin.password.value);
	}

	if (why != "") 
	{
		alert(why);
		return false;
	}
	else 
	{
		document.extranetlogin.submit();
		return false;
	}
}


function checkKeystroke(e)
{
    var keyPressed;
	
	//Browser compatibility check
	if (document.all) 
	{
		//Browser used: Internet Explorer 6
		keyPressed = e.keyCode;
	}
	else 
	{
		//Browser used: Firefox
		keyPressed = e.which;
		//alert('handleKeystroke: FF property: which');
	}

	//alert('handleKeystroke: key=' + keyPressed);
	
	//13 = ASCII code for Enter key
	if (keyPressed == 13) 
	{ 
		//alert('handleKeystroke: pressed Enter');
	    checkWholeForm(document.extranetlogin);
    } 
    else 
    {
        //alert('handleKeystroke: pressed another key');
    }
}

