Event.observe(window,'load',function(){
new Ajax.Autocompleter('where','autocomplete_choices' , '/lib/function.ajax.php?lang=it',{ tokens: ',' });
new Ajax.Autocompleter('what','autocomplete_choices' , '/lib/function.ajax.php?lang=it',{ tokens: ',' });

Event.observe('where','click',function(){
$('where').value='';
});

Event.observe('what','click',function(){
$('what').value='';
});

Event.observe('search_form','submit',function(){
if($('what').value == 'Type of accomodation') $('what').value='appartments';
if($('where').value == 'City or Region in Croatia') $('where').value='Croazia';

});



});

function positionMenu(source,target){

if ($(source).offsetParent) {
   		curleft = $(source).offsetLeft;
   		curtop = $(source).offsetTop;
  	while (source = $(source).offsetParent) {
			curleft += $(source).offsetLeft;
			curtop += $(source).offsetTop+20;
  }
}
  	
var noPx = document.childNodes ? 'px' : 0;
$(target).style.left = curleft + noPx;
$(target).style.top = curtop + noPx;	
}

function addItem(what,where){

}

