<!--


var image1= new Image();
var image2= new Image();
var image3= new Image();
var image4= new Image();
var image5= new Image();
var image6= new Image();
image1.src = "/img/glosowanie/gw"+1+".png";
image2.src = "/img/glosowanie/gw"+2+".png";
image3.src = "/img/glosowanie/gw"+3+".png";
image4.src = "/img/glosowanie/gw"+4+".png";
image5.src = "/img/glosowanie/gw"+5+".png";
image6.src = "/img/glosowanie/gw"+0+".png";

function ZmienGwiazdki(id,type,ocena) {

            for (i=1;i<=5;i++) {
                        ii = i+1;
                        iipol = i+(1/2);
                        
                        if ( type == 'z' ) {
                                    if  ( ocena > i ) {
                                                            if ( ocena < iipol ) imgsrc = i;
                                                            else if ( ocena >= iipol ) imgsrc = ii;
                                    }
                        }
                        if ( type == 'na' ) {
                                    if ( i <= id ) imgsrc = i;
                        }
            }
            
                        document.getElementById("glosowanie").style.background = 'url(/img/glosowanie/gw'+imgsrc+'.png)'; 
            
}

function OddajGlos(glos, news_id) {
            params = 'ajax=tak&script=tekstypiosenek&' + 'f=glosowanie&glos=' + glos + '&id=' + news_id;
            
            idELEMENTU = 'OdpGlosowanie';
            
            document.getElementById(idELEMENTU).style.display = 'block';
            document.getElementById(idELEMENTU).innerHTML = 'Głosowanie...';
            
            setCookie('TestCookiesow', '1', 1);
            if ( ! getCookie('TestCookiesow') ) { alert('Głosowanie aktywne tylko jeśli dostępna obsługa COOKIE');
                        document.getElementById(idELEMENTU).innerHTML = 'Włącz COOKIE';
            }
            else
            makeRequest('/ajax.php', params, idELEMENTU);
}

function DodajKomentarz() {
            idELEMENTU = 'KomentujForm';
            stan = document.getElementById(idELEMENTU).style.display;
            
            if ( stan == 'block' ) document.getElementById(idELEMENTU).style.display = 'none';
            else document.getElementById(idELEMENTU).style.display = 'block';
}

//-->

