
var ID_HOTEL_RESULTS_CONTAINER = 'hotelResultSContainer';

function changeLanguage(language)
{
  document.location.href = URL__CHANGE_LANGUAGE + '?language=' + language;
}


function changeContent(elem, box, tagMenu, idMenu, classBoxContent)
{
  tabContainer = $(idMenu);
  menuItem = tabContainer.getElementsByTagName(tagMenu);
  boxItem = document.getElementsByTagName('div');
  boxToShow = document.getElementById(box);
  
  for(var i=0; i < menuItem.length; i++)
  {
    menuItem[i].className=""
  }
  for(var i=0; i < boxItem.length; i++)
  {
    if(boxItem[i].className.match(classBoxContent))
    {
      boxItem[i].style.display="none"
    }
  }
  document.getElementById(elem).className="active";
  
  boxToShow.style.display="block";
  
}

function showHideBox(title, body)
{
  titleObj = $(title);
  bodyObj = $(body);
  if(titleObj == null || bodyObj == null )
    return;
  titleObj.toggleClassName("active");
  Effect.toggle(bodyObj,'blind',{duration:0.8});
}

function openPopup(url, width, height, scrollbar) 
{
  if(scrollbar == null)
    scrollbar = 'no';
  popup=window.open( url,'','toolbar=no,scrollbars=' + scrollbar + ',location=no,directories=no,width=' + width + ',height=' + height ); 
  popup.focus();
}

function resizeImg(imageElementId, width, height)
{
	var imgObj = document.getElementsById(imageElementId);

        imgObj.style.width = width + 'px';
	imgObj.style.height = height + 'px';
}