//--Opinie------------------------------

function SendOpinia(id, typ)
{


if($('#tresc').val()!='' && $('#ocena').val()!='' )
{

$('#KomunikatOpinia').text('proszę czekać...');

 $.post("inc/ajax_opinie.php", { tresc: $('#tresc').val(), ocena: $('#ocena').val(), podpis: $('#podpis').val(), typ: typ, id_www: id, action: 'add' },
    function(data)
    {
    $('#opiniaBox').html(data);
    }
  );
}else{
     alert('Proszę wypełnić formularz');
    }


}
//--------------------------------------------------




/*
function handleHttpResponse_O() {
obj =document.getElementById("opiniaBox");

  if (http.readyState == 4)
  {
  obj.innerHTML='<span class="powrot" style="text-align: center;">Dziękujemy Twoja opinia została wysłana</span>';
  }else{
       obj.innerHTML='<span class="powrot">Proszę czekać...</span>';
       }

}


function SendOpinia(id, typ) {
 var rand = Math.round(Math.random()*10000);


 //tytul_js=document.getElementById("tytul").value;
 tresc_js=document.getElementById("tresc").value;
 podpis_js=document.getElementById("podpis").value;
 ocena_js=document.getElementById("ocena").value;




 if(tresc_js=='' || ocena_js=='' )
 {
 alert('Proszę wypełnić formularz');
 }else{
       var dane='tresc='+tresc_js+'&ocena='+ocena_js+'&podpis='+podpis_js+'&typ='+typ+'&id_www='+id+'&cos='+rand;
       http.open("POST", url_O, true);
       http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
       http.setRequestHeader("Content-length", dane.length);
       http.setRequestHeader("Connection", "close");
       http.onreadystatechange = handleHttpResponse_O;
       http.send(dane);
      }

}
*/

//-----------------------------------------------

