function trim(str){
	str = str.replace(/^\s*/, '');//left
	str = str.replace(/\s*$/, '');//right
	return str;
}
function clearText(field,txt){
	var field = document.getElementById(field);
	if(field.value == txt){
		field.value = "";
	}
}
function checkText(field,txt){
	var field = document.getElementById(field);
	if(trim(field.value) == ""){
		field.value = txt;
	}
}

