



function mapa(numer,idk) {
	
	
	
	if (document.getElementById('koment_' +numer).style.display != 'none') {
Effect.BlindUp('koment_' +numer);	
}
if (document.getElementById('ocen_' +numer).style.display != 'none') {
Effect.BlindUp('ocen_' +numer);
}
	

	     if (document.getElementById('map_' +numer).style.display == 'none') {

	var url = "ajax.php?mod=weterynarz&action=mapax&id=" + numer +'&foto='+ idk  ;
	new Ajax.Request(url, {
	  method: 'get',
	 

	  onSuccess: function(transport) {
	  	

	  	
 	//Effect.Appear('det_' +numer);
 	
 	
 		Effect.BlindDown('map_' +numer);

		new Ajax.Updater('map_' +numer, 'ajax.php?mod=weterynarz&action=mapax&ledit=' + numer, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
		   
		   
		}
	
	});
 
 }else{
 		Effect.BlindUp('map_' +numer);
 	
 }
 
}


function oceny(numer,idk) {
	


if (document.getElementById('ocen_' +numer).style.display != 'none') {
Effect.BlindUp('ocen_' +numer);	
}
if (document.getElementById('map_' +numer).style.display != 'none') {
Effect.BlindUp('map_' +numer);
}

	     if (document.getElementById('koment_' +numer).style.display == 'none') {

	var url = "ajax.php?mod=weterynarz&action=ocenyx&id=" + numer +'&foto='+ idk  ;
	new Ajax.Request(url, {
	  method: 'get',
	 

	  onSuccess: function(transport) {
	  	

	  	
 	//Effect.Appear('det_' +numer);
 	
 	
 		Effect.BlindDown('koment_' +numer);

		new Ajax.Updater('koment_' +numer, 'ajax.php?mod=weterynarz&action=ocenyx&ledit=' + numer, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
		   
		   
		}
	
	});
 
 }else{
 		Effect.BlindUp('koment_' +numer);
 	
 }
 
}


function ocena(numer,idk) {
	
//alert("trwa modyfikacja strony \n komentowanie lecznic jest w tej chwili niemozliwe \n zapraszamy do komentowania po godz 14")


if (document.getElementById('koment_' +numer).style.display != 'none') {
Effect.BlindUp('koment_' +numer);	
}
if (document.getElementById('map_' +numer).style.display != 'none') {
Effect.BlindUp('map_' +numer);
}
	
	

	     if (document.getElementById('ocen_' +numer).style.display == 'none') {

	var url = "ajax.php?mod=weterynarz&action=ocenax&id=" + numer +'&foto='+ idk  ;
	new Ajax.Request(url, {
	  method: 'get',
	 

	  onSuccess: function(transport) {
	  	

	  	
 	//Effect.Appear('det_' +numer);
 	
 	
 		Effect.BlindDown('ocen_' +numer);

		new Ajax.Updater('ocen_' +numer, 'ajax.php?mod=weterynarz&action=ocenax&ledit=' + numer, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
		   
		   
		}
	
	});
 
 }else{
 		Effect.BlindUp('ocen_' +numer);
 	
 }
 
}


function nieglosuj(numer,idk) {
  	Effect.Fade('det_' +numer);
  	}
  	
  	
  	
  	
  	
  function nowa_ocena(numer,idk,wet) {

 
  		var url = "ajax.php?mod=weterynarz&action=nowa_ocena&id=" + numer +'&foto='+ idk  ;
	new Ajax.Request(url, {
	  method: 'get',
	 
//ocd_+$wet.innerHTML="AA";


	  onSuccess: function(transport) {
//Effect.Appear('glosowano_' +wet+'_'+idk);
  	new Ajax.Updater('glosowano_' +wet+'_'+idk, 'ajax.php?mod=weterynarz&action=nowa_ocena&ocena=' + numer +'&pytanie='+ idk+'&wet='+ wet, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
		
		//if(numer!=0){
	
		document.form_a.ocen.value=((document.form_a.ocen.value*1)+1);
		
		
		document.form_a.ocena.value=((document.form_a.ocena.value*1)+numer);
		//}
			},
			
			
			
				onLoading: function(transport) {
			
			$('glosowano_' +wet+'_'+idk).innerHTML = "<div class='loading' align='center'></div>";
		}	
			
			
	
	});
  	}	
  	
  	
  
  	
  	
  	
	function zapisz_ocene(numer,idk) {
	

	var url = "ajax.php?mod=weterynarz&action=nowa_ocena&wet=" + numer;
	new Ajax.Request(url, {
	  method: 'post',
	  parameters: { ocen: $F('ocen'), ocena: $F('ocena'), wet: $F('wet') },
	 
      //parameters: { ocena: $F('ocena') },
       /*
      parameters: { wet: $F('wet') },
      */
      
      
      
      
	  onSuccess: function(transport) {
	  	
  $('ocen_' +numer).innerHTML = transport.responseText;
  
  
		}
		
	/*	onLoading: function(transport) {
			
			alert("loading");
			
		}*/
		
	});
 
}
  	
  	
  	
  	function resetuj_ocene(numer, idk){
  		
  			var url = "ajax.php?mod=weterynarz&action=ocenax&id=" + numer +'&foto='+ idk  ;
	new Ajax.Request(url, {
	  method: 'get',
	 

	  onSuccess: function(transport) {
	  	

	  	
 	//Effect.Appear('det_' +numer);
 	
 	
 	//	Effect.BlindDown('ocen_' +numer);

		new Ajax.Updater('ocen_' +numer, 'ajax.php?mod=weterynarz&action=ocenax&ledit=' + numer, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
		   
		   
		}
	
	});
  	}
  	
  	
  	
  	function mapam(numer) {
	
	
	

	

	     if (document.getElementById('mapka').style.display == 'none') {




	var url = "ajax.php?mod=weterynarz&action=mapam&ledit=" + numer;
	new Ajax.Request(url, {
	  method: 'get',
	 

	  onSuccess: function(transport) {
	  	

	  	
 	//Effect.Appear('det_' +numer);
 	
 	
 		Effect.BlindDown('mapka');

		new Ajax.Updater('mapka', 'ajax.php?mod=weterynarz&action=mapam&ledit=' + numer, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
		   
		   
		}
	
	});
 
 }else{
 		Effect.BlindUp('mapka');
 	
 }
 
}



  	function zapal(numer, idk){
  		
var url = "ajax.php?mod=weterynarz&action=akcje&idx=" + numer +'&uslx='+ idk  ;


	new Ajax.Request(url, {
	  method: 'get',
	 

	  onSuccess: function(transport) {
	 
       
		new Ajax.Updater('lsd_div_' +numer, 'ajax.php?mod=weterynarz&action=akcje&id=' + numer+'&usl='+ idk, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
        
        
		   		new Ajax.Updater('lsd_count', 'ajax.php?mod=weterynarz&action=count&id=' + numer+'&usl='+ idk, {asynchronous:true, evalScripts:true, encoding:'iso-8852-2'});	
		   
		}
	
	});
  	}