function handleFieldValue(fieldID, defaultValue) {
	this.fieldID		= fieldID;
	this.defaultValue	= defaultValue;
	
	this.field			= document.getElementById(this.fieldID);
	
	if(this.field) {
		this.field.onfocus	= new Function("", "handleFocus(this, '"+this.defaultValue+"')");
		this.field.onblur	= new Function("", "handleBlur(this, '"+this.defaultValue+"')");
	}
}

function handleFocus(obj, defaultValue) {
	if(obj.value == defaultValue) {
		obj.value = '';
	}
}

function handleBlur(obj, defaultValue) {
	if(obj.value == '') {
		obj.value = defaultValue;
	}
}

window.onload = function() {
	new handleFieldValue('Login', 'E-mail');
	new handleFieldValue('Password', 'Password');
}