// JavaScript Document

function vulkassabon() {
	kassabon=document.getElementById('idout');
//	alert(kassabon.className);
	if (kassabon.className == "Slider"){
		kassabon.className = 'SliderOpen';
		kassabon.style.height = 1 + "px";
		height = getElementHeight('idform');
		foldout('idout', 1, height);
		return true;
	} else {
		height = getElementHeight('idout');
		foldin('idout', height);
		return false;
	}
}		


function getElementHeight(Elem) {
 
  if(document.getElementById) {
   var elem = document.getElementById(Elem);
  } else if (document.all){
   var elem = document.all[Elem];
  }
  //alert(elem.id);
  //if (op5) { 
  // xPos = elem.style.pixelHeight;
  //} else {
   xPos = elem.offsetHeight;
  //}
  return xPos;
 }


function foldout(divid, curheight, maxheight, step) {
	if (!step) { 
		step = 20;
	}

	var divobj = document.getElementById(divid);
	
	curheight = curheight + step;
	
	if (curheight >= maxheight) {
		divobj.style.height = maxheight + 'px';
	}else{
		divobj.style.height = curheight + 'px';
		setTimeout('foldout("' + divid + '", ' + curheight + ',' + maxheight + ',' + step + ')', 100);
	}
}




function foldin(divid, curheight, step) {
	if (!step) { 
		step = 20;
	}

	var divobj = document.getElementById(divid);
	
	curheight = curheight - step;
	
	if (curheight < 0) {
		divobj.style.height = "1px";
		divobj.className = "Slider";
	
	}else{
		divobj.style.height = curheight + 'px';
		setTimeout('foldin("' + divid + '", ' + curheight + ', ' + step + ')', 100);
	}
}



