var LabelToInput = {
	init: function() {
	
		$$('.labelvalue').each( function(elmt) {
			$(elmt).hide();
			var txt = $(elmt).innerHTML;
			var chpsTxt = $(elmt).next("input");
			if(chpsTxt.readAttribute('type') == "text")
			{
				chpsTxt.setValue(txt);
				$(chpsTxt).observe('focus', function(event) {
					if(chpsTxt.getValue() == txt)
					{
						chpsTxt.setValue('');
					}
				});
				
				$(chpsTxt).observe('blur', function(event) {
					if(chpsTxt.getValue() == '')
					{
						chpsTxt.setValue(txt);
					}
				});
			}
		});
		
	}
}

Event.observe(window, "load", function() {
	LabelToInput.init();
});
