function upSlide(id){
	timeToSlide = 50; // in milliseconds
	obj = document.getElementById(id);
	height = 100;
	if(obj.style.display == "none"){ // if it's hidden we slide it UP
		obj.style.visibility = "hidden";
		obj.style.display = "block";
		obj.style.height="0px";
		pxPerLoop = height/timeToSlide;
		slideUp(obj,0,height,pxPerLoop);
	} else {

	}
}

function downSlide(id){
	timeToSlide = 50; // in milliseconds
	obj = document.getElementById(id);
	height=93;
	if(obj.style.display != "none"){ // if it's not hidden we slide it DOWN
		pxPerLoop = height/timeToSlide;
		slideDown(obj,height,0,pxPerLoop);
	} else {

	}
}

function slideUp(obj,offset,full,px){
	if(offset < full){
		obj.style.height = offset+"px";
		offset=offset+px;
		setTimeout((function(){slideUp(obj,offset,full,px);}),1);
		obj.style.visibility = "visible";
	} else {
		obj.style.height = full+"px";
	}
}

function slideDown(obj,offset,full,px){
	if(offset > full){
		obj.style.height = offset+"px";
		offset=offset-px;
		setTimeout((function(){slideDown(obj,offset,full,px);}),1);
		obj.style.visibility = "visible";
	} else {
		obj.style.height="0px";
		obj.style.display="none"
	}
}
