function PreLoadZ()
{
pic1= new Image(); pic1.src="http://www.lagiewnikimodlitwazycie.pl/gfx/loader.gif";
pic2= new Image(); pic2.src="http://www.lagiewnikimodlitwazycie.pl/flv/big_kongres_pl.jpg";
pic3= new Image(); pic3.src="http://www.lagiewnikimodlitwazycie.pl/flv/big_od_poczecia_pl.jpg";
pic4= new Image(); pic4.src="http://www.lagiewnikimodlitwazycie.pl/flv/big_wezwanie_pl.jpg";
pic5= new Image(); pic5.src="http://www.lagiewnikimodlitwazycie.pl/gfx/LoadKalendarz.gif";

}




//przela-----------
function LoadKalendarz(urlgo)
{
$('Kalendarz1').update('<img alt="" style="width:540px; height:480px;" src="gfx/LoadKalendarz.gif" />');
//document.getElementById("Kalendarz").innerHTML='<img alt="" style="width:540px; height:480px;" src="http://www.world-prayer-for-life.pl/lagiewnikimodlitwazycie/gfx/LoadKalendarz.gif" />';
top.location.href = urlgo;
}




//baner top layer-----------
function close_baner()
{
var theobj= eval ('document.getElementById("Reklama")');
theobj.innerHTML='';
theobj.style.display='none';
}

//close po x sec.
function CloseAfter(sec)
{
 var tgx=setTimeout("close_baner()",sec*1000);
}
//----------------------






function ChClass(divid,newclass)
{
 theobj= eval ('document.getElementById("'+divid+'")');
 theobj.className= newclass;
}












function register_submit() {
 if(document.getElementById('ok').checked)
 {
 document.getElementById('formularz').submit()
 }else{
        alert('proszę zapoznać się i zaznaczyć oświadczenie');

       }
}


function popup(url,w,h) {
		screenWidth =  w;
		screenHeight = h;
    	dx = 50 ;dy = 50;
       var Win = window.open(url,"displayWindow",'width='+screenWidth+',height='+(screenHeight+5)+',resizable=0,scrollbars=yes,menubar=no,left='+dx+',='+dy );
Win.focus();

}



function zmien(nazwa,plik) {
document.images.foto.src=plik;
document.images.foto.title=nazwa;
//warr(nazwa);
}


function warr(txt) { document.getElementById("opis_img").innerHTML = '&nbsp;&nbsp;<b>'+txt+'</b>'; }



function menu_over(co,plik)
{
var akcja=eval ('document.images.'+co);
akcja.src='gfx/menu/'+plik;
}



function getMouseXY(e) // works on IE6,FF,Moz,Opera7
{
  if (!e) e = window.event; // works on IE, but not NS (we rely on NS passing us the event)

  if (e)
  {
    if (e.pageX || e.pageY)
    { // this doesn't work on IE6!! (works on FF,Moz,Opera7)
      mousex = e.pageX;
      mousey = e.pageY;
     }
    else if (e.clientX || e.clientY)
    { // works on IE6,FF,Moz,Opera7
      mousex = e.clientX + document.body.scrollLeft;
      mousey = e.clientY + document.body.scrollTop;
    }
  }
}





function dymek(e,v){
  if(v.title){
    var t=document.createElement("div");
    t.className="dymek";
    t.innerHTML=v.title;v.title="";
    v.move=function(e){
      e=e||event;
      getMouseXY(e);

      t.style.left=mousex+20+"px";
      t.style.top=mousey+20+"px";
      //t.style.left=e.clientX+20+"px";
      //t.style.top=e.clientY+20+"px";


    }
    v.move(e);
    document.body.appendChild(t);
    v.onmousemove=function(e){v.move(e)}
    v.onmouseout=function(e){
      v.title=t.innerHTML;
      document.body.removeChild(t);
    }
  }
}





































//zaznacz do usuniecia
function MarkToDel(id)
{

//alert(id)
}















function getHTTPObject() {

  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");

    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");

      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();

    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}









var http = getHTTPObject(); // We create the HTTP Object







//zaznacz do usuniecia
function VideoPlay(flv,w,h)
{

 var rand = Math.round(Math.random()*10000);

displayUrl('modalDialog_contentDiv_video', 'popup.php?d=Video,video&v='+flv+'&w='+w+'&h='+h+'&r='+rand, 410, 335);
return false
}

























//wyslij
function SendEmail(data, divid)
{

if($F('imiePOP')!='' && $F('nazwiskoPOP')!='' && $F('liczbaosobPOP')>0 && $F('emailPOP')!='' && $F('telefonPOP')!='')
{
$('LogowanieKomunikat').update('<b>Proszę czekać, trwa wysyłanie danych...</b>');
//$('FormularzEmail').update('');
var ilosc, liczbaosobTmp, Clear;
liczbaosobTmp=parseInt($F('liczbaosobPOP'));

new Ajax.Request('/inc/ajax_zgloszenia.php', {
 parameters: { data: data, imie: $F('imiePOP'), nazwisko: $F('nazwiskoPOP'), liczbaosob: $F('liczbaosobPOP'), grupa: $F('grupaPOP'), email: $F('emailPOP'), telefon: $F('telefonPOP'), ulica: $F('ulicaPOP'), numerdomu: $F('numerdomuPOP'), numermieszkania: $F('numermieszkaniaPOP'), kodpocztowy: $F('kodpocztowyPOP'), miejscowosc: $F('miejscowoscPOP'), panstwo: $F('panstwoPOP'), action: 'addNew' },
 onLoading: function() {  if(Clear!=1) { $('FormularzEmail').update(''); }  },
 onComplete: function(transport)
             {
             Clear=1;
			 $('LogowanieKomunikat').update('');

			 if($('Num'+divid+data).innerHTML>0) { ilosc=parseInt($('Num'+divid+data).innerHTML)+liczbaosobTmp; }else{ ilosc=liczbaosobTmp; $('Id'+divid+data).className='boxDatyVIP';  }
			 $('Num'+divid+data).update(ilosc);
			 $('FormularzEmail').update(transport.responseText);
			 }
 } );
}else{
    alert('Prosimy o wypełnienie wszystkich pól oznaczonych *.');
     }


}
//-----------------------------------





//lista uczestnikow
function ShowList(IDK)
{

 var rand = Math.round(Math.random()*10000);
displayUrl('modalDialog_contentDiv_foto', 'popup.php?d=KalendarzLista,kalendarz&IDK='+IDK+'&r='+rand ,520,550)

return false
}




