

function initDropdown(dropdown, input)
{
	$('input', dropdown).click(function() {
		$('ul', dropdown).toggle();
	});
	
	$('li', dropdown).click(function() {
	    $('input', dropdown).val($(this).text());
	});

	$('input', dropdown).focus(function() {
		this.blur();
	});
	
	$(document).click(function(e){
		if (!$(e.target).is('input, img', dropdown)) {
			$('ul', dropdown).hide();	
		}
	});
	
	var textInput = $('input', dropdown)[0];
	
	if (typeof textInput.onselectstart!="undefined")
		textInput.onselectstart=function(){return false}
}
