// displays hint text on any input element with the 'title' attribute set
function ghostTextboxes(query) {
	var el = $(query);
	// show the display text
	el.each(function(i) {
		$(this).attr('value', $(this).attr('title'));
	});
	
	// hook up the blur & focus
	el.focus(function() {
		if ($(this).attr('value') == $(this).attr('title'))
		$(this).attr('value', '');
	}).blur(function() {
		if ($(this).attr('value') == '')
		$(this).attr('value', $(this).attr('title'));  
	});
}

function ghostPasswordTextboxes(query) { 
var el = $(query);
var fakeTitle;
var fakeEl;
el.each(function(i) { 
	fakeTitle = "fake" + el.attr('name').substring(3);
	fakeEl = $("input[name=" + fakeTitle + "]");

	fakeEl.attr('value', fakeEl.attr('title'));
	
	fakeEl.focus(function() {
		fakeEl.hide();
		el.show();
		el.focus();
		});
		el.blur(function() {
			if(el.attr('value') == $(this).attr('title') || el.attr('value') == '')  
			{								
				el.hide();
				fakeEl.attr('value', fakeEl.attr('title')); 
				fakeEl.show();
			}
		});
	});
}