function getajax(zapytanie,Id){
$("#"+Id).empty().html('<div style="margin: 10px auto;"><img src="gfx/loader_silver.gif" /></div>');
setTimeout(function() { $("#"+Id).load("_info.php?"+ zapytanie).slideDown("fast"); }, 100);
}

function post_form(Id){
$("#resp_"+Id).load("_info.php",$("#form_"+Id).serializeArray()).slideDown("fast");
}

function getajax2(zapytanie,Id){
$(document).ready(function(){
$("#"+Id).load("_info.php?"+ zapytanie).slideDown("fast");
});	
}

function pokazDiva(Id){
setTimeout(function() { $("#" +Id).fadeIn("slow"); }, 300);
}

function hide_div(Id){
$("#hres_"+Id).slideUp("slow");
$("#hbut_"+Id).fadeOut("slow");
}

function show_div(Id,wii){

    for(ii = 1; ii < wii+1; ii++)
    {
	 if(ii == Id){}
	 else{
	 $("#hres_"+ii).slideUp("slow");
	 $("#hbut_"+ii).fadeOut("slow");
	 }
    }

$("#form_plus").fadeOut("fast");
$("#hres_"+Id).slideDown("slow");
$("#hbut_"+Id).fadeIn("slow");
}


function animacja_schowaj(Id){
$(document).ready(function(){
$("#"+Id).hide("fast");
});	
}

function zmien_class(nazwa_nowej_klasy, element) {
	var el = document.getElementById(element);
	el.className = nazwa_nowej_klasy;
}

    function zmienrozmiar() {
    document.getElementById('ukryte_komentarze').className = 'pokaz_komentarze';
    }
	 
function ajaxFunction(action,name,rediv){
 var ajaxRequest;

try{
 ajaxRequest = new XMLHttpRequest();
 } catch (e){
 try{
 ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
 try{
 ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
 } catch (e){
 alert("Your browser broke!");
 return false;
 }
 }
 }

ajaxRequest.onreadystatechange = function(name,rediv){
 if(ajaxRequest.readyState == 4){
 var myDiv = rediv;
 var ajaxDisplay = document.getElementById(action);
 ajaxDisplay.innerHTML = ajaxRequest.responseText;
 }
 }
 var mid = document.getElementById(name).value;
 var queryString = "&id=" + mid;
 ajaxRequest.open("GET", "_info.php?a=" + action + queryString, true);
 ajaxRequest.send(null);
 }
 
 
 
