sHeight = 0;
Speed = 0;
active="";
function Majax(){
	var a = document.getElementsByTagName('a'), i = 0, iCount = a.length;
	for (i; i<iCount; i++) {
		if (a[i].id.indexOf("+open") != -1) {
			a[i].onclick = function() {
				ShowId = document.getElementById(this.id.replace("+", ""));
				var TableId=document.getElementById("case_"+this.id.replace("+", ""));
				if(TableId){
					if(TableId.className=="case_hover") TableId.className="case_active";
					else  TableId.className="case_hover";					
				}			
				Size = ShowId.firstChild.offsetHeight;
				f = Size/100;
				g = (f*15);
				d = new Date().getTime();
				if(ShowId.offsetHeight < Size){
				  sHeight = ShowId.offsetHeight;
				  setTimeout(SmoothShow, 80);
				}
				else{
				  sHeight = ShowId.offsetHeight;
				  setTimeout(SmoothHide, 80);
				}
				if(active!=this.id && active!=""){
					document.getElementById(active.replace("+", "")).style.height = "0px";
					var TableId=document.getElementById("case_"+active.replace("+", ""));
					if(TableId) TableId.className="case";		
				}
  				active = this.id;				
				return false;
			}
			a[i].onmouseover = function() {
				var TableId=document.getElementById("case_"+this.id.replace("+", ""));
				if(TableId && TableId.className=="case") TableId.className="case_hover";
			}
			a[i].onmouseout = function() {
				var TableId=document.getElementById("case_"+this.id.replace("+", ""));
				if(TableId && TableId.className=="case_hover") TableId.className="case";
			}
		}
	}
}
function SmoothShow(){
  Rectif();
  sHeight += (g+Speed);
  SetStyle(ShowId);
  if(sHeight > Size) ShowId.style.height = "100%";
  else setTimeout(SmoothShow, 80);
}
function SmoothHide(){
  Rectif();
  sHeight -= (g+Speed);
  SetStyle(ShowId);
  if(sHeight <= 0) ShowId.style.height = "0px";
  else setTimeout(SmoothHide, 80);
}
function SetStyle(obj){
  if(sHeight < 0)sHeight=0;
  obj.style.filter = 'alpha(opacity = '+(sHeight/f)+')';
  obj.style.opacity = sHeight/Size;
  obj.style.height = sHeight+'px';
}
function Rectif(){
  d2 = new Date().getTime();
  Speed = 0-((d+=80) - d2);if (Speed<0)Speed=0;
  Speed = Speed/2;
}