
var EE_listHeight = 204;
var EE_sliding = false;

var EE_current = 0;
function EE_displayMonth( id ) {
	if(!EE_sliding) {
	
		if( EE_current && EE_current != id ) {
			EE_slideOpenAndClose( id, EE_current );
		}
		else if( !EE_current ) {
			EE_slideOpen( id );
		}
		EE_current = id;
	}
	return false;
}
  


function EE_slideOpen( id ) {
	EE_sliding = 1;

	obj = document.getElementById(id);
	
	obj.style.display = "block";
	obj.style.borderTop = "solid 1px #c5c5c5"; 
	 
	obj.style.height = ( parseInt( obj.style.height )  + 17 ) + "px";
	if( parseInt( obj.style.height ) < EE_listHeight ) {
		setTimeout("EE_slideOpen('" + id + "')", 30 );
	}
	else {
		EE_sliding = 0;
		obj.style.overflow = "auto";
	}
}

function EE_slideOpenAndClose( idOpen, idClose ) {
	EE_sliding = 1;
	objOpen = document.getElementById( idOpen );
	objClose = document.getElementById( idClose );
		
	objOpen.style.display = "block";
		
	
	if( objClose.offsetTop > objOpen.offsetTop ) {
		if( parseInt( objOpen.style.height ) < 34 ) {
			objClose.style.borderTop = "0";
			objOpen.style.borderTop = "solid 1px #c5c5c5"; 
		}
	}
	if( objClose.offsetTop < objOpen.offsetTop ) {
		if( parseInt( objClose.style.height ) < 34 ) {
			objClose.style.borderTop = "0";
			objOpen.style.borderTop = "solid 1px #c5c5c5"; 
		}
	}
	
	if( parseInt( objClose.style.height ) > 0) {
		objClose.style.height = ( parseInt( objClose.style.height )  - 17 ) + "px";
		objClose.style.overflow = "hidden";
	}	
	else {
		objClose.style.display = "none";
	}
 
	
	if(parseInt( objOpen.style.height ) < EE_listHeight ) {
		objOpen.style.height = ( parseInt( objOpen.style.height )  + 17 ) + "px";
	}
	
	if( parseInt( objClose.style.height ) > 0  || parseInt( objOpen.style.height ) < EE_listHeight ) {
		setTimeout("EE_slideOpenAndClose('" + idOpen + "', '" + idClose + "')", 30);
	}
	else {
		objClose.style.display = "none";
		objOpen.style.overflow = "auto";
		EE_sliding = 0;
	}
}

