        function $( id )
        {
            return document.getElementById( id );
        }

            advAJAX.setDefaultParameters({
                onSuccess : function(obj)
                {
                    $("ajax-return").innerHTML = obj.responseText;
                },
                onLoading : function(obj)
                {
                    $("ajax-process").style.display = "block";
                },
                onComplete : function(obj)
                {
                    $("ajax-process").style.display = "none";
					$("ajax-return").style.display = "block";
                }
	        
            });

        function ulubione(id)
        {
	advAJAX.get({
                url: "http://www.luzior.pl/ulubione.php?mode=dodaj&id="+id
            });    
        }
		function ulubionelista(id)
        {
	advAJAX.get({
                url: "http://www.luzior.pl/ajax.ulubione.php?id="+id
            });    
        }
	 function zglos(id)
        {
	    advAJAX.post({
                url: "http://www.luzior.pl/zgloszenie.php",
		parameters : {
   		   "id" : id
  		  }
		
            });
	}

	 function vote(id,ocena)
        {
	    advAJAX.post({
                url: "http://www.luzior.pl/glosowanie.php",
		parameters : {
   		   "id" : id,
		   "ocena" : ocena
  		  }
	
            });
    
        }
	function blog(id,co)
        {
	advAJAX.post({
                url: "http://www.luzior.pl/profil.blog.php",
			parameters : {
				"id" : id,
				"co" : co
			}
            });    
        }
 	 function pokaz(id)
  {
    current=(document.getElementById(id).style.display == 'none') ? 'block' : 'none';
    document.getElementById(id).style.display = current;
  }

	function bbenjoy(text) {
        text = ' ' + text + ' ';
        document.form.wiadomosc.value += text;
        document.form.wiadomosc.focus();
	}
	

	function sprawdz_dlugosc(Object, MaxLen)
	{
 	 if(Object.value.length > MaxLen)
 	 {     
 	   Object.value = Object.value.substring(0, MaxLen);
 	 }
	}

function panel(id, mode, id_filmu) { if(mode == 'usun' && !confirm('Jestes pewny ze chcesz usunac komentarz ?')) return false; var nw = window.open( 'http://www.luzior.pl/mod_panel.php?mod='+mode+'&idK='+id+'&idF='+id_filmu, null, 'width=450,height=240,top=400,left=400,scrollbars=1,resizable=1' ); }