/* Functions to deal with input fields hints.

focusInput get control when the input field receives focus.
This function sets the value to the provided, if the current value equals to the check.
Function takes three parameters: 
input's id,  value to set and value to check.

blurInput takes control when the input field loses focus.
it takes only two parameters: input ID and the value to set, if the box is left blank.
*/ 

function focusInput(id, valu, chk) {
	fld = document.getElementById(id);
	if (fld.value == chk) {
		fld.value = valu;
	}
}
function blurInput(id, valu) {
	fld = document.getElementById(id);
	if(fld.value == '') {
		fld.value = valu;
	}
}

function STclear(el) {
	if (el.defaultValue==el.value) el.value = "";
}

function STdefault(el) {
	if (el.value=='' || el.value==null) el.value = el.defaultValue;
}
