

<!--
 var flashPlayer = {}; 
 var cities = {};
 function pokazWojewodztwo(name,val) {
  $("#"+name+"cont dl.province select").val(val);
  refreshSelect($("#"+name+"cont dl.province select").eq(0).attr("id"));
  zmienWojewodztwo(name,val);
 }
 
 function pokazMiasto(name,val) {
  $("#"+name+"cont dl.city select").val(val);
  refreshSelect($("#"+name+"cont dl.city select").attr("id"));
  zmienMiasto(name,val);
 }
 
 function przelaczPos(name) {
  $("div.pos").not("#pos"+name).hide();
  $("#pos"+name).show();
  $("div.map dl.province select").not("#"+name+"cont dl.province select").val("-").change();
 }
 
 function zmienWojewodztwo(name,val) {
  przelaczPos(name);
  var id = $("#"+name+"cont dl.city select").eq(0).attr("id");
  $("#"+id).empty().append('<option value="-">Wybierz miasto</option>');
  if(val != '-') {
   var cit = cities[name];
   var arr = cit[val];
   for(i in arr) {
    $("#"+id).append('<option value="'+arr[i]+'">'+arr[i]+'</option>');
   }
   $("#"+id).removeAttr("disabled");
   refreshSelect(id);
   $("#pos"+name).ajaxSubmit({
    type: 'post',
    url: $("#"+name+"cont .selectcont").attr("rel")+toStrict(val)+".html",
    target: "#pos"+name,
    beforeSubmit: function() {
     $("#pos").empty();
    }, success: function() {
     if($("#"+name+"cont").attr("title") != null) {
      $("#pos"+name).prepend('<h2>'+$("#"+name+"cont").attr("title")+'</h2>');
     }
    }
   });
  } else {
   $("#"+id).attr("disabled","disabled");
   refreshSelect(id);
   $("#pos"+name).empty();
  }
 }
 
 function zmienMiasto(name,val) {
  przelaczPos(name);
  if(val != '-') {
   $("#pos"+name).children().hide();
   $("#pos"+name+" h2").show();
   $("#pos"+name+" strong").each(function() {
    if($(this).text() == val) {
     $(this).show();
     $(this).next("ul").show();
     return false;
    }
   });
  } else {
   $("#pos"+name).children().show();
  }
 }
 
 function getMovieName(movieName) {
  if (navigator.appName.indexOf("Microsoft") != -1) {
   return window[movieName];
  } else {
   return document[movieName];
  }
 }
 
 function flashReady(name) {
  if(flashPlayer[name] != null) return;
  flashPlayer[name] = getMovieName(name);
  if(cities[name] != null) {
   initSelect(name);
  }
 }
 
 function wyslijWojewodztwo(name,val) {
  if(flashPlayer[name] != null)
   flashPlayer[name].showProvince(val);
 }
 
 function initSelect(name) {
  var id = $("#"+name+"cont dl.province select").eq(0).attr("id");
  for(i in cities[name]) {
   $("#"+id).append('<option value="'+i+'">'+i+'</option>');
  }
  $("#"+id).removeAttr("disabled");
  refreshSelect(id);
  $("#poscont").append('<div id="pos'+name+'" class="pos"></div>');
 }
 
 function refreshSelect(id) {
  setTimeout(function() {
   $("#"+id).parent().hide();
   $("#"+id).selectbox();
   $("#"+id).parent().show();
  },1);
 }
 
 $(document).ready(function() {
  $("dl.province select").change(function() {
   wyslijWojewodztwo($(this).parents(".map").attr("rel"),$(this).val());
   zmienWojewodztwo($(this).parents(".map").attr("rel"),$(this).val());
   refreshSelect($(this).attr("id"));
  });
  $("dl.city select").change(function() {
   zmienMiasto($(this).parents(".map").attr("rel"),$(this).val());
   refreshSelect($(this).attr("id"));
  });
  $("div.selectcont").each(function() {
   var ps = this;
   var mp = $(this).parents(".map").eq(0);
   mp = $(mp).attr("rel");
   $(ps).ajaxSubmit({
    dataType: 'json',
    type: 'post',
    url: $(ps).attr("rel")+"cities.json",
    success: function(re,st) {
     cities[mp] = re;
     for(name in flashPlayer) {
      if(flashPlayer[name] != null) {
       initSelect(name);
      }
     }
    }
   });
 });
 });
 
 function toStrict(str) {
    var mapHash = {'ą': 'a', 'ć': 'c', 'ę': 'e', 'ł': 'l', 'ń': 'n', 'ś': 's', 'ł': 'l',
  'ń': 'n', 'ó': 'o', 'ś': 's', 'ź': 'z', 'ż': 'z', ' ': '_'};
    $.each(mapHash, function(ogonek, bezogonek) {
        str = str.replace(new RegExp(ogonek, 'g'), bezogonek);
    });
    return str;
}
//-->


