window.addEvent('domready', function(){

	var defaultPass = 'Password';
	var defaultUser = 'Username';
	
	
	$('passWord').addEvent('focus', function(event) {
		if ($(this).getProperty('value') == defaultPass) {
			$(this).setProperty('value','');
		} 
	});
	
	$('passWord').addEvent('blur', function(event) {
		if ($(this).getProperty('value') == '') {
			$(this).setProperty('value', defaultPass);	
		}									
	});
	
	$('userName').addEvent('focus', function(event) {
		if ($(this).getProperty('value') == defaultUser) {
			$(this).setProperty('value','');
		}										 
	});
	
	$('userName').addEvent('blur', function(event) {
		if ($(this).getProperty('value') == '') {
			$(this).setProperty('value', defaultUser);	
		}									
	});

	//$('password').addEvent('click', function(){alert('clicked!')});
	$('loginformExpand').onkeydown = function(event) {
		var event = new Event(event);
		
		if (event.key == 'enter') {
			loginformExpand.submit();
		}
	}
	
});