function showLogin(){
	$('loginform').fade();
	return false; 
	
} 

function manageCoupon(id, res, res2, res3){	 
	
	// 
	$('couponDetail' + id).setStyle('height', '0px');   
	$('couponTriger' + id).onclick = function(height){ 
		this.fade('out');   
		
		if(0 && height){
			$('couponDetail' + id).tween('height',height);     
		} else{ 
			if(res3){ 
				$('couponDetail' + id).tween('height', res3);           
			} else if(res2){ 
				$('couponDetail' + id).tween('height', '236');             
			} else if(res){ 
				$('couponDetail' + id).tween('height', '226');         
			} else {   
				$('couponDetail' + id).tween('height', '130'); 
			}
		}
		
		if(ids){
			ids.each(function(item, index){
				if(id == item){
					$('coupBox' + item).fade(1);   
				} else {
					$('coupBox' + item).fade(0);   
				} 
			});  
		} 
		xxx = $('couponClose' + id);
		xxx.fade(1); 
	
				
		return false; 
	};  
	
	xxx = $('couponClose' + id); 
	xxx.onclick = function(){ 
			ids.each(function(item, index){
				$('coupBox' + item).fade(1);   
				$('couponTriger' + item).fade(1);    
				$('couponClose' + item).fade(0);  
				$('couponDetail' + item).tween('height', '0');  
			});   
			 
	}  
		
	form = $('form' + id);
	form.onsubmit = function(){ 
		 
		return true; 
	};  
	
	
	
	// Zadejte datum rezervace
	
} 

var Favourites = new Class({
	//implements
	Implements: [Request.HTML],
	
	setIdentAndSend: function(ident, action){ 
		this.options.update = 'fav_' + ident;   
		this.ident = ident;    
		this.options.url = this.options.urlBase + this.ident + '&action=' + action;     
		this.send();  
	},
	setIdentAndSendEN: function(ident, action){ 
		this.options.update = 'fav_' + ident;   
		this.ident = ident;    
		this.options.url = this.options.urlBase + this.ident + '&lang=en&action=' + action;       
		this.send();  
	},
	removeFav: function(ident, action){ 
		this.options.update = 'fav_' + ident;      
		this.ident = ident;    
		this.options.url = this.options.urlBase + this.ident + '&action=remove&onlyRemove=1';     
		this.send();  
	} 
});   
 

var oFavourite = new Favourites({   
	ident: 0, 
	rating: 0,
	url: '/', 
	urlBase: '/?favourite=1&restaurant=', 
	method: 'get',
	update: '',
	evalScripts: true, /* this is the default */
	onComplete: function(text, respXML){
		/*
		console.log(text);
		console.log(respXML);
		$(this.update).html = text; 
		console.log($(this.update).html);  
		*/  
	} 	 
}); 

var Notices = new Class({
	//implements
	Implements: [Request.HTML],	
	remove: function(ident, action){ 
		this.options.update = 'notice_' + ident;      
		this.ident = ident;    
		this.options.url = this.options.urlBase + this.ident + '&action=remove';     
		this.send();  
	} 
});   
  

var oNotice = new Notices({   
	ident: 0, 
	rating: 0,
	url: '/', 
	urlBase: '/?notice=1&noticeId=', 
	method: 'get',
	update: ''	 
}); 
