var dhtmlgoodies_slideSpeed = 10; // Higher value = faster
var dhtmlgoodies_timer = 10; // Lower value = faster
var objectIdToSlideDown = false;
var ttbar_overlay_activeId = false;
var dhtmlgoodies_slideInProgress = false;
function ttbar_showHideContent(e,inputId)
{
if(dhtmlgoodies_slideInProgress)return;
dhtmlgoodies_slideInProgress = true;
if(!inputId)inputId = this.id;
inputId = inputId + '';
var numericId = inputId.replace(/[^0-9]/g,'');
var answerDiv = document.getElementById('ttbar_overlay_a' + numericId);
objectIdToSlideDown = false;
if(!answerDiv.style.display || answerDiv.style.display=='none'){
if(ttbar_overlay_activeId && ttbar_overlay_activeId!=numericId){
objectIdToSlideDown = numericId;
ttbar_slideContent(ttbar_overlay_activeId,(dhtmlgoodies_slideSpeed*-1));
}else{
answerDiv.style.display='block';
answerDiv.style.visibility = 'visible';
ttbar_slideContent(numericId,dhtmlgoodies_slideSpeed);
}
}else{
ttbar_slideContent(numericId,(dhtmlgoodies_slideSpeed*-1));
ttbar_overlay_activeId = false;
}
}
function ttbar_slideContent(inputId,direction)
{
var obj =document.getElementById('ttbar_overlay_a' + inputId);
var contentObj = document.getElementById('ttbar_overlay_ac' + inputId);
height = obj.clientHeight;
if(height==0)height = obj.offsetHeight;
height = height + direction;
rerunFunction = true;
if(height>contentObj.offsetHeight){
height = contentObj.offsetHeight;
rerunFunction = false;
}
if(height<=1){
height = 1;
rerunFunction = false;
}
obj.style.height = height + 'px';
var topPos = height - contentObj.offsetHeight;
if(topPos>0)topPos=0;
contentObj.style.top = topPos + 'px';
if(rerunFunction){
setTimeout('ttbar_slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer);
}else{
if(height<=1){
obj.style.display='none';
if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
document.getElementById('ttbar_overlay_a' + objectIdToSlideDown).style.display='block';
document.getElementById('ttbar_overlay_a' + objectIdToSlideDown).style.visibility='visible';
ttbar_slideContent(objectIdToSlideDown,dhtmlgoodies_slideSpeed);
}else{
dhtmlgoodies_slideInProgress = false;
}
}else{
ttbar_overlay_activeId = inputId;
dhtmlgoodies_slideInProgress = false;
}
}
}
function ttbar_initShowHideDivs()
{
var divs = document.getElementsByTagName('SPAN');
var divCounter = 1;
for(var no=0;no