/*
Copyright (c) 2009 Olaf Gramkow. All rights reserved.
These functions are NOT freeware.
*/

function InputFocus(obj, text)
{
	if (obj.value == text)
	{
		obj.value = '';
		obj.style.color = 'black'
	}
	
	obj.style.backgroundColor = '#ddffdd';
}

function InputBlur(obj, text)
{
	if (obj.value == '')
	{
		obj.value = text;
		obj.style.color = '#b7b7b7'
	}
	
	obj.style.backgroundColor = 'white';
}

function InputFocusPassword(obj, text)
{
	if (obj.value == text)
	{
		obj.value = '';
		obj.type = 'password';
		obj.style.color = 'black';
	}
	
	obj.style.backgroundColor = '#ddffdd';
}

function InputBlurPassword(obj, text)
{
	if (obj.value == '')
	{
		obj.type = 'text';
		obj.value = text;
		obj.style.color = '#b7b7b7';
	}
	
	obj.style.backgroundColor = 'white';
}