function HotelName(HotelDir)
{
  var i = 0;
  for (i=0; i < hotels.length; i++)
    if(HotelDir == hotels[i].dir)
      return hotels[i].name;

  return '';
}

function HotelUSD(HotelDir)
{
  var i = 0;
  for (i=0; i < hotels.length; i++)
    if(HotelDir == hotels[i].dir)
      return hotels[i].dollars;

  return '';
}

function HotelStars(HotelDir)
{
  var i = 0;
  for (i=0; i < hotels.length; i++)
    if(HotelDir == hotels[i].dir)
      return hotels[i].cat;

  return '';
}

function HotelDeal(HotelDir)
{
  var i = 0;
  for (i=0; i < hotels.length; i++)
    if(HotelDir == hotels[i].dir)
      return hotels[i].deal;

  return '';
}

function HotelDealPL(HotelDir)
{
  var i = 0;
  for (i=0; i < hotels.length; i++)
    if(HotelDir == hotels[i].dir)
      return hotels[i].deal_pl;

  return '';
}

function HotelDealGER(HotelDir)
{
  var i = 0;
  for (i=0; i < hotels.length; i++)
    if(HotelDir == hotels[i].dir)
      return hotels[i].deal_ger;

  return '';
}


function ConvToNonPL(str)
{
  var i = 0;
  ret = '';
  for (i=0; i < str.length; i++)
  {
    if (str.charAt(i) == '±') ret += 'a';
    else if (str.charAt(i) == 'æ') ret += 'c';
    else if (str.charAt(i) == 'ê') ret += 'e';
    else if (str.charAt(i) == '³') ret += 'l';
    else if (str.charAt(i) == 'ñ') ret += 'n';
    else if (str.charAt(i) == 'ó') ret += 'ó';
    else if (str.charAt(i) == '¶') ret += 's';
    else if (str.charAt(i) == '¼') ret += 'z';
    else if (str.charAt(i) == '¿') ret += 'z';
    else if (str.charAt(i) == '¡') ret += 'A';
    else if (str.charAt(i) == 'Æ') ret += 'C';
    else if (str.charAt(i) == 'Ê') ret += 'E';
    else if (str.charAt(i) == '£') ret += 'L';
    else if (str.charAt(i) == 'Ó') ret += 'Ó';
    else if (str.charAt(i) == 'Ñ') ret += 'N';
    else if (str.charAt(i) == '¦') ret += 'S';
    else if (str.charAt(i) == '¬') ret += 'Z';
    else if (str.charAt(i) == '¯') ret += 'Z';
    else ret += str.charAt(i);
  }
  return ret;
}


function hotel(ind, poltravel, german, dealp, castle, dist, cat, swim, business, present, dollars, dir, name, town, deal, deal_pl, deal_ger)
{
  this.ind = ind;
  this.poltravel = poltravel;
  this.german = german;
  this.dealp = dealp;
  this.castle = castle;  // czy to jest zamek
  this.dist = dist;
  this.cat = cat;
  this.swim = swim;
  this.business = business;
  this.present = present;
  this.dollars = dollars;
  this.dir = dir;
  this.name = name;
  this.town = town;
  this.deal = deal;
  this.deal_pl = deal_pl;
  this.deal_ger = deal_ger;
}

function hrefValueOf(name)
{
  var str = document.location.search.substr(1);   // name1=value1&name2=value2
  if(str == '') str = top.document.location.search.substr(1);   // name1=value1&name2=value2
  var pairs = str.split('&');
  for (var i in pairs)
  {
    var pair = pairs[i].split('=');
    if (pair.length == 2)  // name=value
      if (pair[0] == name) return unescape(pair[1]);
  }
  return '';
}


  var i = 0;
  var hotels = new Array();

