function ajaxRequest(url, id, up_id){
   document.getElementById(up_id).innerHTML="Request gestartet";  
   
   new Ajax.Request(url, {
     method: 'get',     
     onSuccess: function(transport){
      var response = transport.responseText || "no response text";      
      document.getElementById(up_id).innerHTML="HTML geladen";
      document.getElementById(id).innerHTML=response;
      
      var complete_counter=0;
      
			$$('.ziclass').each(function(toto, i){        												
				if (navigator.appName=="Microsoft Internet Explorer"){
				  toto.onload=function(){
				    complete_counter++;
				    document.getElementById(up_id).innerHTML="Lade Bild "+(complete_counter+1)+"von "+$$('.ziclass').length;
				    if (complete_counter+1==$$('.ziclass').length) {			      
			        document.getElementById(id).style.display='block';	
			        alert('fertig');		      
			      }
				  }
			  } else {
				  toto.addEvent('load',function(){
				  	complete_counter++;
				  	document.getElementById(up_id).innerHTML="Lade Bild "+(complete_counter+1)+"von "+$$('.ziclass').length;
				  	//alert(complete_counter);
			      if ((complete_counter+1)==$$('.ziclass').length) {			      
			        document.getElementById(id).style.display='block';	
			        alert('fertig');		      
			      }
			    })
			  }
			});
      
     },
     onFailure: function(){ alert('Something went wrong...') }     
   }); 
   
}


      function site_init(){
      

window.addEvent('load', function() {
	new Fx.Style('container','opacity','opacity', {duration: 4000} ).start(1);
	var menuy = new Fx.Slide('menux');
	
	menuy.hide();
	menuy.slideIn();
	new Fx.Style('menuy','opacity','opacity', {duration: 6000} ).start(1);
});
}
function out(){
  new Fx.Style('container','opacity','opacity', {duration: 2000} ).start(1);
  
}


