
var count = new Object();
for (var i = 1; i <= 50; i++){
	count['_'+i] = 0;
}

var blub = 0; 
function showEntree(curr_id) { 
	if(count[curr_id] > 425){
		count[curr_id] = 425;
	}
	var attributes = { 
		height: { to: count[curr_id] },
		opacity: { to: 1 }
	}
	
	//alert(document.getElementById(curr_id+'_details').style.display);
	document.getElementById(curr_id+'_details').style.display = 'block';
	//alert(document.getElementById(curr_id+'_details').style.display);
	document.getElementById(curr_id).style.color = '#E62E98';	
	document.getElementById('tour_details').style.display = 'none';	
	document.getElementById('tour_details').style.opacity = 0; 
	var anim = new YAHOO.util.Anim(curr_id+'_details', attributes, 1, YAHOO.util.Easing.easeIn);
		anim.animate();
		
	lastDivId = curr_id;
	
}
	
function hideEntree(curr_id, closeAll) { 
	if(typeof closeAll == 'undefined'){
		closeAll = false;
	}
	var attributes = { 
		height: { to: 0 },
		opacity: { to: 0 }
	}
	setDivToNone = function(){
		document.getElementById(curr_id+'_details').style.display = 'none';
		if(closeAll == true){
			document.getElementById('tour_details').style.display = 'block';
			var attr_Details = { 
				opacity: { from: 0, to: 1 }
			};
			var animTourDetails = new YAHOO.util.Anim('tour_details', attr_Details, 1, YAHOO.util.Easing.easeIn);
				animTourDetails.animate();
		}
	}
	var anim = new YAHOO.util.Anim(curr_id+'_details', attributes, 1, YAHOO.util.Easing.easeIn);
	
		anim.onComplete.subscribe(setDivToNone);
		anim.animate();
	document.getElementById(curr_id).style.color = '#282828';	
}


var lastDivId='';

function showHide(divid){
	var month = document.getElementById(divid+'_details');
	if(month.style.display == 'none' || month.style.display == ''){
		if(lastDivId != divid && lastDivId != ''){
			hideEntree(lastDivId);
		}
		showEntree(divid);
	}else{
		hideEntree(lastDivId);
	}
}
function closeAll(){
	hideEntree(lastDivId, true);
}
	



