
currCal = 0;

function eventDesc(t){

	if(currCal != 0 && currCal != t){
	
		currCal.parentNode.parentNode.id = "";
		clCalEvent();
		
	
	}


	if(t.parentNode.parentNode.id == ""){

		t.parentNode.parentNode.id = "calOpen";
		currCal = t;
		opCalEvent(t);
		chCl = 2;
	
	}
	
	else {
	
		t.parentNode.parentNode.id = ""	
		clCalEvent();
	
	
	}

}

function opCalEvent(t){

	h1 = t.parentNode.getElementsByTagName('div')[1].offsetHeight
	h2 = t.parentNode.getElementsByTagName('div')[0].offsetHeight
	
	h = 0;
	
	if(h1 >= (h2 + t.parentNode.offsetHeight )){ 
	
		h = h1 + 20
	
	}
	else { 

		h = h2 + t.parentNode.offsetHeight + 20;
		
	
	}

	

	h = h / 10
	h += 1.2
	//h+=3
	

	
	sp = Builder.node('div',{id:'calVw',style:'height:'+h+'em'});
	t.parentNode.parentNode.appendChild(sp)

	if(t.parentNode.id=="chaumont"){
	
		$('calVw').className = "chaum"
	
	}


	h3 = t.parentNode.getElementsByTagName('h6')[0].offsetHeight
	if(h3 > 15){ t.parentNode.getElementsByTagName('div')[0].style.marginTop = "-1em" }


}

function clCalEvent(){

if(currCal != 3){

	Element.remove('calVw');
	chCl = 0;
	currCal = 0;

}


}


function lnkCal(){

	
}

function lnkCal2(){

	chCl = 3;

}

function lnkCal3(){

	chCl = 1;

}

