function ToggleDiv($WhichDiv){if(document.getElementById($WhichDiv).style.display=="none"){setOpac($WhichDiv,100);document.getElementById($WhichDiv).style.display="block";}else{document.getElementById($WhichDiv).style.display="none";}}
function FadeToggleDiv($WhichDiv){if(document.getElementById($WhichDiv).style.display=="none"){FadeIn($WhichDiv);}else{FadeOut($WhichDiv);}}
function FadeIn($WhichDiv){setOpac($WhichDiv,0);document.getElementById($WhichDiv).style.display="block";for(var i=0;i<=100;i++){setTimeout('setOpac(\''+$WhichDiv+'\','+i+')',8*i);}}
function FadeOut($WhichDiv){for(var i=0;i<=100;i++){setTimeout('setOpac(\''+$WhichDiv+'\','+(100-i)+')',8*i);}
setTimeout('ToggleDiv(\''+$WhichDiv+'\')',8*i);setOpac($WhichDiv,100);}
function setOpac($WhichDiv,value){document.getElementById($WhichDiv).style.opacity=value/100;document.getElementById($WhichDiv).style.filter='alpha(opacity='+value+')';}
function ToggleVert($WhichDiv,$MinHeight,$MaxHeight){var $CurrHeight=parseInt(document.getElementById($WhichDiv).style.height);if($CurrHeight<($MaxHeight-10)){VertScale($WhichDiv,$MaxHeight);}else{VertScale($WhichDiv,$MinHeight);}}
function VertScale($WhichDiv,$EndHeight){var $StartHeight=parseInt(document.getElementById($WhichDiv).style.height);document.getElementById($WhichDiv).style.display="block";document.getElementById($WhichDiv).style.overflow='hidden';for(var i=0;i<=50;i++){$CurrHeight=($StartHeight-((($StartHeight-$EndHeight)/50)*(i-1)));setTimeout('setHeight(\''+$WhichDiv+'\','+$CurrHeight+')',8*i);}
if($EndHeight==0){setTimeout('ToggleDiv(\''+$WhichDiv+'\')',8*i);}}
function setHeight($WhichDiv,value){document.getElementById($WhichDiv).style.height=parseInt(value)+"px";}