function dispersion_search(obj_name)
{
	var obj = document.getElementById(obj_name);
	if (obj)
	{
		var prompt_text = 'Search';
		var labels = document.getElementsByTagName('label');
		for (var j = 0; j < labels.length; j = j + 1)
		{
			if (labels[j].htmlFor === obj_name)
			{
				prompt_text = labels[j].innerHTML;
				labels[j].style.display = 'none';
			}
		}
		if( obj.value == '' )
		{
			obj.className += ' empty';
			obj.value = prompt_text;
		}
			obj.onfocus = function(e)
		{
			if (obj.value == prompt_text)
			{
				obj.value = '';
				obj.className = obj.className.replace('empty','');
			}
		};
		obj.onblur = function(e)
		{
			if (obj.value == '')
			{
				obj.value = prompt_text;
				obj.className += ' empty';
			}
		};

		var parent = obj;
		while( parent.nodeName != 'BODY' && parent.nodeName != 'FORM' )
		{
			parent = parent.parentNode;
		}
		if( parent.nodeName == 'FORM' )
		{
			parent.onsubmit = function()
			{
				if (obj.value == prompt_text)
				{
					obj.value = '';
					obj.className = obj.className.replace('empty','');
				}
			};
		}
	}
}

