

var ioa = 0, ido, cco, inne, info, trzy, szczegoly;

function wola(cco, inne, trzy)
{


if (cco=="preload" && ioa=='1'){
  document.getElementById('elowohydro').innerHTML = "<div onclick=\"wola('deletekoment', '','');\" style=\"z-index: 10000;position:fixed;left:20%;top:300px;width:60%;border:dashed 1px #b4c9e0;background-color:#eef3f8;background-image: url('http://www.hydromel.pl/immage/x.gif');background-repeat: no-repeat;color:#c84b4b;\"><span style=\"float:left;width:100%;text-align:center;padding:20px 0 20px 0;\"><img border=\"0\" src=\"http://www.hydromel.pl/immage/inicjalizacja.gif\"></span></div>";
				  }




if (cco=="komentarze"){
  document.getElementById('elowohydro').innerHTML = "<div onclick=\"wola('deletekoment', '','');\" style=\"z-index: 10000;position:fixed;left:20%;top:300px;width:60%;border:dashed 1px #b4c9e0;background-color:#eef3f8;background-image: url('http://www.hydromel.pl/immage/x.gif');background-repeat: no-repeat;color:#c84b4b;\"><span style=\"float:left;width:100%;text-align:center;padding:20px 0 20px 0;\">"+inne+"</span></div>";
				  }
  

if (cco=="komunikat_user" || cco=="powiadomienie_systemowe"){
  document.getElementById('elowohydro').innerHTML = inne;
							    }





if ( cco=="deletekoment" || ioa>100){clearInterval(ido); ioa='-1'; document.getElementById('elowohydro').innerHTML = "<div style=\"z-index: -1;position:fixed;left:0;top:0;width:99%;height:99%;background-color:transparent;\"></div>";


		}

ioa++;


if (trzy == 'nie_chowaj'){ ioa='3'; }


}








function get(info, szczegoly) {

				http_request = ''; post=''; poststr='';








if (info=='komentarz'){


post=encodeURIComponent( document.getElementById("a11").value ); 
   var poststr = "&info=" + info + "&dane=" + post + "&szczegoly=" + encodeURIComponent( szczegoly ); 

  var url = "http://www.hydromel.pl/ajax_komentarz.php";
		      }








if (info=='ocena_film'){

   var poststr = "&info=" + info + "&szczegoly=" + encodeURIComponent( szczegoly ); 

  var url = "http://www.hydromel.pl/ajax_ocena.php";
		      }








if (info=='komentarz' || info=='ocena_film'){
if (ioa=='0'){ioa='1'; ido = setInterval("wola('preload','', '');", 200);}
					    }





      if (window.XMLHttpRequest) { 
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	
            
            http_request.overrideMimeType('text/html');
         }
      }





else if (window.ActiveXObject) { 
         try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
         } catch (e) {
            try {
               http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
         }
      }



      if (!http_request) {

         return false; }



function alertt() {
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {


if (info=='komentarz'){ document.getElementById("a11").value=''; }


inne=http_request.responseText;





if (info=='komentarz' || info=='ocena_film'){
if (ioa>'0'){wola('komentarze',inne,'');}
					    }






         }  }
			 }


      http_request.onreadystatechange = alertt;
      http_request.open('POST', url, true);
      http_request.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      http_request.setRequestHeader("Content-length", poststr.length);
      http_request.setRequestHeader("Connection", "close");
      http_request.send(poststr);



            }





