IE = document.all&&!window.opera?true:false;
//var loc=window.location+"";
//var path=loc.match( /http:\/\/([^\/\\]*)\/([^\/\\]*)\/([^\/\\]*)\// )?"../../../":"";
//if(loc.match( /noclegiw\.pl/ ))
//document.domain = "noclegiw.pl";
//////////////
function aEL(o,t,f){var a=Array.prototype.slice.call(arguments,3);
o[t+f]=function(e){return !1===f.apply(o,[e||window.event].concat(a))?e.preventDefault?e.preventDefault():!1:1};
return(o.x=o.addEventListener)?o.x(t,o[t+f],!1):(o.x=o.attachEvent)?o.x('on'+t,o[t+f]):!1}
////////
[].indexOf || (Array.prototype.indexOf = function(v){
       for(var i = 0; i<this.length && this[i] !== v;i++);
       return i>=this.length?-1:i;
});
////** Podpinamy eventy
//function pe(){
$(document).ready(function(){ //ROTACJA ZMIANY MAP na podpisie;

 obj=document.getElementById("map_ch");
 if(obj)
   aEL(obj,'click',rotacja_nazwy);//document.getElementById("map_ch").onclick=function(e){ };
 //KONIEC

//Przypis zdarzen do hrefow z image_maps
 a2e = new Array();  // Tablica Aareasow na Eeventy onMouseOver i MouseOut
 if(typeof(daj_area)=='function')
   a2e = daj_area();
 a2e_l=a2e.length;
 while(a2e_l--){
    switch(a2e[a2e_l].parentNode.name){
      case 'Map':
        aEL(a2e[a2e_l],'mouseover',a_ovr,/^Noclegi w (.*)m$/gim,"$1e");
       break;
      case 'Map4':
        aEL(a2e[a2e_l],'mouseover',a_ovr,/^Konferencje w (.*)m$/gim,"$1e");
       break;
      case 'Map2':
        aEL(a2e[a2e_l],'mouseover',a_ovr,/^(.*) - (.*)$/gim,"$2");
       break;
      case 'Map3':
        aEL(a2e[a2e_l],'mouseover',a_ovr1);
        aEL(a2e[a2e_l],'mouseout',ukryj_all);
       break;
    }
    aEL(a2e[a2e_l],'mouseout',a_out);//a2e[a2e_l].onmouseout=function(e){}
 }
//Koniec Przypis


 obj=document.getElementById("noclegi-szukanie");
 if(!obj)  obj=document.getElementById("noclegi-szukanie-kryteria");

 if(obj){
   goAutocompleteMiasto(); 
   aEL(obj,'submit',send_f); //document.getElementById("map_ch").onclick=function(e){ };
 }
 if(obj && typeof(hash_listen_f)=='function'){
   var hash_listen;
    hash_listen=window.setTimeout("hash_listen_f()",200);
 }

 obj=document.getElementById("ajaxnav");
 if(obj && typeof(hash_listen_f)=='function'){
   var hash_iframe_listen;
    hash_iframe_listen=window.setTimeout("hash_iframe_listen_f()",200);
 }

 obj=document.getElementById("b_l");
 if(obj){
    obj.onmouseover=function(e){l_p=-1;window.setTimeout("lewo_prawo()",200); };
    obj.onmouseout=function(e){l_p=0; };
    obj=document.getElementById("b_r");
    obj.onmouseover=function(e){l_p=1;window.setTimeout("lewo_prawo()",200); };
    obj.onmouseout=function(e){l_p=0; };
 }
 obj=document.getElementById("miniatury");
 if(obj){
    img=obj.getElementsByTagName('div');
    len=img.length;
    while(len-->0)
      img[len].onmouseover=zd;
 }
 obj=document.getElementById("duzy");
 if(obj)
      obj.onload=function(e){document.getElementById("uload").style.display="none";};




 obj=document.getElementById("mapa_img");
 if(obj){
 // obj.onclick=function(e){alert('a');}
  //obj.style.border="10px solid green"
     //aEL(obj,'click',img_clik);

 okr = new jsGraphics("myCanvas");
 mapa = document.getElementById('mapa-polski-a');
 glowne= document.getElementById('myCanvas');//GetObject('mapa-polski');//GetObject('mapy-kontener');// GetObject('menu1');
glowne.scrollTop=scrolll;
 mnoznik=5.0555;


      //obj.style.visibility='visible';
      rysOkr(posX_old,posY_old,12);
 }

  obj=document.getElementById("ur");
 if(obj && typeof(u_ur)=='function')//boxik na malej mapce - ten z alpha
      u_ur();
 if(typeof(nowyEvent)=='function')
  nowyEvent();



 //obj=document.getElementById("i_n");
 //if(obj)
//      obj.onclick=function(e){ zaswiecRamke('','inst','P'); };
// obj=document.getElementById("i_p");
// if(obj)
//      obj.onclick=function(e){ zaswiecRamke('','inst','SPAN');};

// obj=document.getElementById("nawigacja");
// if(obj && window.name=='odg'){
//   window.focus();
//   wez_obiekty();
// }

//  obj=document.getElementById("noclegi-wyniki");
// if(obj && typeof(ramka)=='function')
//    setTimeout("ramka('noclegi-wyniki')" ,510);


 obj=document.getElementById("fly");
 if(false && obj && typeof(up)=='function'){
    obj.scrollTop=10000;
    max=obj.scrollTop;
    obj.scrollTop=0;
    setTimeout("stt()" ,510);
    obj.onmouseover=stp;
    obj.onmouseout=stt;
 }

 obj=document.getElementById("plany-miast");
 if(obj)
      obj.onclick=p_miasta;

 //obj=document.getElementById("gory-morza-jeziora-noclegi");
 //if(obj && typeof(p_gmj)=='function')
  //    p_gmj(); //funkcja


 obj=document.getElementById("reklamy");
 if(obj && typeof(wezReklame)=='function')
      setTimeout("wezReklame(30)",3); //funkcja

//  obj=document.getElementById("fly");
//    if(obj)
//    jQuery("#fly").jcarousel({
//         orientation: "vertical",
//         itemVisible: 1,
//         itemScroll: 1,
//         scrollAnimation: "slow",
//         autoScroll:4,
//         wrap:true,
//         noButtons:true,
//         itemHeight:80,
//         autoScrollStopOnMouseover:true,
//         autoScrollResumeOnMouseout:true
//     });

  $("fieldset").find("button").each(function (){
                                        $(this).click(function(){
                                                        nr=$(this).attr("id");
                                                        nr1=nr.replace(/m([0-9])/,"$1");
                                                        $(this).parent().find("ul").hide();
                                                        $(this).parent().find("blockquote").hide();
                                                        if(nr!=nr1){
                                                           pokaz_mape(parseInt(nr1));
                                                        }else if (nr='blizej') {
                                                           a=$(this).parent().find("ul.natura");
                                                           a.slideDown("fast");
                                                        }
                                                        $(this)[0].blur();
                                                      });
                                        $(this).mouseover(function(){$(this).css("text-decoration","none")});
                                        $(this).mouseout(function(){$(this).css("text-decoration","underline")})
  }).end().find("ul.trasa > li > a").each(function(){
                                        $(this).mouseover(function(){
                                               id=$(this).html();
                                               id=id.replace(/(.*)E\-([0-9]*)(.*)/ , "$2" );
                                               ukryj_all();
                                               t=$(this).attr("title");
                                               t=t.replace(/(.*) Trasa E-(.*)/,"$1");
                                               $("#label").html(t).show();
                                               $("#e"+id).show();
                                        });
                                        $(this).mouseout(function(){ukryj_all();$("#label").hide();});
  });
  /*  WSZYSTKO OK ALE IE :(
  .end().find("ol > li").each(function(){

                                        a=$(this).children("a").eq(0).attr("href");
                                        a=a.replace(/eko-(.*)\.html/,"$1");
                                        $(this).prepend('<img src="graf/'+a+'.jpg">');
  });
  */
/* ZMIENIA OBRAZKI W OL BACKGROUNDZIE
  .end().find("ol > li > a").each(function(){
                                        $(this).mouseover(function(){
                                               a=$(this).attr("href");
                                               a=a.replace(/eko-(.*)\.html/,"$1");
                                               $(this).parent().parent().attr("class",a);
                                        });
                                        $(this).mouseout(function(){$(this).parent().parent().attr("class","");});
  });
*/
$("#srodek_opis > div > em").click(function() {
     if(  $(this).next().is(':visible') ){ $(this).next().hide(); $(this).html("+ Bliżej natury");}
     else { $(this).next().show(); $(this).html("- Bliżej natury");}});


//obiekt - mapa

if(typeof(mapa)=='function') mapa();

if(typeof(followmouse)=='function'){
    $("body").append("<img id='wait' style='display:block;visibility:hidden;position:absolute;top:0;left:0px;z-index:500' src='graf/ajax-loader.gif'>");
     document.onmousemove=followmouse;
}


	
	
	
});//jquery
//}window.onload=pe;

var ob_arr_id,o_id;
ob_arr_id=0;




/*
google_ad_client = "pub-2723831730891480";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
//2007-01-17: noclegiw
google_ad_channel = "2694989673";
google_color_border = "F8F8F1";
google_color_bg = "F8F8F1";
google_color_link = "898977";
google_color_text = "9D9D8C";
google_color_url = "97B242";
*/
