var shAnimatingIncrement = 10; // percentage of total to grow height of control each iteration
var shAnimatingTimeoutSpan = 100; // number of milliseconds between animating grow/shrink
var shAnimatingTimeout = null; // global timeout that controls animation


function shShowHide(divElementID)
{
if (shAnimatingTimeout)
return;
clearTimeout(shAnimatingTimeout);
shAnimatingTimeout = null;
var targetDiv = document.getElementById(divElementID);
if (targetDiv)
{
if (targetDiv.style.display == 'block') 
{
targetDiv.style.height = "100%";
shClose(divElementID);
targetDiv.style.display = "none";

}
else
{
targetDiv.style.height = "0%";
targetDiv.style.display = "block";
shOpen(divElementID);

}
}
}
function shOpen(divElementID)
{
var targetDiv = document.getElementById(divElementID);
var targetHeight = parseInt(targetDiv.style.height);
targetHeight += shAnimatingIncrement;
if (targetHeight > 100)
targeHeight = 100;
targetDiv.style.height = targetHeight + '%';
if (targetHeight < 100)
shAnimatingTimeout = setTimeout('shOpen("' + divElementID + '")', shAnimatingTimeoutSpan); 
else
shAnimatingTimeout = null;
}
function shClose(divElementID)
{
var targetDiv = document.getElementById(divElementID);
var targetHeight = parseInt(targetDiv.style.height);
targetHeight -= shAnimatingIncrement;
if (targetHeight < 0)
targeHeight = 0;
targetDiv.style.height = targetHeight + '%';
if (targetHeight > 0)
shAnimatingTimeout = setTimeout('shClose("' + divElementID + '")', shAnimatingTimeoutSpan); 
else
 shAnimatingTimeout = null;
}
function shShowHideByTradingSpace(thisObj,thatObj,clickTargetElementID, otherElementID)
{
var targetDiv = document.getElementById(clickTargetElementID);
var otherDiv = document.getElementById(otherElementID);
var thisDiv = document.getElementById(thisObj);
var otherOtherDiv = document.getElementById(thisObj);
// If the click target is visible, then we're just going to make it invisible
if (targetDiv)
{
if (targetDiv.style.display == 'block')
{
targetDiv.style.display = "none";
thisDiv.className="picSHOW"
otherOtherDiv.className="picSHOW"
}
else
{
// If the click target is invisible, then we're going to make it visible while at the same time making sure the other one isn't
if (otherDiv)
otherDiv.style.display = "none";
targetDiv.style.display = "block";
thisDiv.className="on"
//otherOtherDiv.className="picSHOW"
}
}
}
window.onload = function(){
	try {
  			document.execCommand("BackgroundImageCache", false, true);
		} 
			catch(e) 
		{
		}

var pods=document.getElementById("sidebar").getElementsByTagName ("dl");
if (document.all)
{    
for (i=0;i<pods.length;i++)
{ 
setFunction(pods[i],'onmouseover','this.style.backgroundColor="#DBF5FB"');
setFunction(pods[i],'onmouseout','this.style.backgroundColor="#ECFAFD"');
}
}
}
function setFunction(theObj,theEventHandler,theFunction)
{
if (typeof theObj == "string")
{
theObj = document.getElementById(theObj);
}
theObj.setAttribute(theEventHandler,theFunction);
if (theObj[theEventHandler])
{
theObj[theEventHandler]=new Function(theFunction);
}
}

