        function $( id )
        {
            return document.getElementById( id );
        }

            advAJAX.setDefaultParameters({
                onSuccess : function(obj)
                {
                    $("contents").innerHTML = obj.responseText;
                },
                onLoading : function(obj)
                {
                      $("ajax-process").style.display = "block";
                },
                onComplete : function(obj)
                {
                      $("ajax-process").style.display = "none";
		      $("contents").style.display = "block";
                }
	        
            });

        function ulubione(id)
        {
	advAJAX.get({
                url: "http://www.dojarka.pl/ulubione.php?mode=dodaj&id="+id
            });

    
        }

	 function vote(id,ocena,typ)
        {
	    advAJAX.post({
                url: "http://www.dojarka.pl/glosowanie.php",
		parameters : {
   		   "id" : id,
		   "ocena" : ocena,
		   "typ" : typ
  		  }
		
            });
    
        }

 	 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_kom) { if(mode == 'usun' && !confirm('Jestes pewny ze chcesz usunac komentarz ?')) return false; var nw = window.open( 'http://www.dojarka.pl/mod_panel.php?mod='+mode+'&idK='+id+'&idF='+id_kom, null, 'width=450,height=240,top=400,left=400,scrollbars=1,resizable=1' ); }
