All pastes #978529 Raw Edit

Mine

public text v1 · immutable
·published 2008-04-09 17:03 UTC
rendered paste body
<script type="text/javascript">
			
{foreach name="collapsabledivs" from=$pressroomList item="collapsabledivs"}
	var _Collapse_{$smarty.foreach.collapsabledivs.iteration}=new animatedcollapse("div_{$smarty.foreach.collapsabledivs.iteration}", 800, true);			
{/foreach}            
            
{literal}
function doCollapse(val)
	{
{/literal}
	
// hide all images
{foreach name="hideimages" from=$pressroomList item="hideimages"}										
	document.getElementById('ss{$smarty.foreach.hideimages.iteration}').style.display = 'none';
	document.getElementById('ss{$smarty.foreach.hideimages.iteration}_image').style.display = 'none';				
{/foreach}
				
{literal}	
	switch(val)
	{
{/literal}

{foreach name="switchcasepr" from=$pressroomList item="switchcasepr"}			
	case '{$smarty.foreach.switchcasepr.iteration}': 
	
	{foreach name="switchcasesections" from=$pressroomList item="switchcasesections"}
		{if $smarty.foreach.switchcasepr.iteration == $smarty.foreach.switchcasesections.iteration}
			_Collapse_{$smarty.foreach.switchcasesections.iteration}.slidedown();
		{else}
			_Collapse_{$smarty.foreach.switchcasesections.iteration}.slideup();
		{/if}
	{/foreach}
	
	document.getElementById('ss{$smarty.foreach.switchcasepr.iteration}_image').style.display = 'block';
	break;
{/foreach}

{literal}						  
	}

}
{/literal}
</script>
    
<script>
{literal}
	window.onload= function() {	doCollapse('1') }
{/literal}
</script>