<!--
// Funtion used to expand collapse menu items in IMP
// this file related to listentry.asp

function collapse()
		{
// check if DOM is available, return if not
			if(!document.createTextNode){return;}
// create new paragraph explaining that the headlines
// are clickable
			var p=document.createElement('p');
			p.appendChild(document.createTextNode('Click on the headlines to collapse and expand the section'));
			
			//document.getElementById('clickable').nextSibling.appendChild(p);
			//var parent = document.getElementById('cmsHeading').parentNode ;
			//var part = document.getElementById('clickable').nextSibling. ;
			//if part.
			//var part = document.getElementByTagName('h3');
			//if (part.ClassName == 'cmsHeading')
			
	
// loop over all headlines of the third level (h3)
  var heads=document.getElementsByTagName('h3');
if (heads.length > 4)
{
			for(var i=0;i<heads.length;i++)		
// if h3 has a class of cmsHeading then loop through			
				if (heads[i].className == 'cmsHeading')		
			{
// grab the next sibling (the loop is needed because
// of whitespace issues
 					
					var tohide=heads[i].nextSibling;
					
					
					// Find the correct one to hide
					while (tohide.className != 'category')
	  				{
		  				tohide=tohide.nextSibling;
	  				}
					
					
					while(tohide.nodeType!=1)
					{
						tohide=tohide.nextSibling;
					}
// hide the sibling by applying the class 'hidden' and 
// show that the headline is clickable by applying 
// the class 'trigger'
					cssjs('add',tohide,'hidden')
					cssjs('add',heads[i],'trigger')
// store the element to be hidden in an attribute
					heads[i].tohide=tohide;
// add the class 'hover' when the mouse touches the headline
					heads[i].onmouseover=function()
					{
						cssjs('add',this,'hover');
					}
// remove the class 'hover' when the mouse leaves the headline
					heads[i].onmouseout=function()
					{
						cssjs('remove',this,'hover');
					}
// if the user activates the headline
					heads[i].onclick=function()
					{
// test if the class 'hidden' is already applied to the 
// next sibling
						if(cssjs('check',this.tohide,'hidden'))
						{
// if that is the case, replace it with shown and 
// the headline class with open
							cssjs('swap',this,'trigger','open');			
							cssjs('swap',this.tohide,'hidden','shown');			
						} else {
// and vice versa

							cssjs('swap',this,'open','trigger');			
							cssjs('swap',this.tohide,'shown','hidden');			
						}
					}
	  }
}
// insert the new paragraph before the first h2.
//document.body.insertBefore(p,document.getElementsByTagName('h1')[0]);
  //}
			
			
			
			function cssjs(a,o,c1,c2)
			{
				switch (a){
					case 'swap':
						o.className=!cssjs('check',o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
					break;
					case 'add':
						if(!cssjs('check',o,c1)){o.className+=o.className?' '+c1:c1;}
					break;
					case 'remove':
						var rep=o.className.match(' '+c1)?' '+c1:c1;
						o.className=o.className.replace(rep,'');
					break;
					case 'check':
						return new RegExp('\\b'+c1+'\\b').test(o.className)
					break;
				}
			}
		}
window.onload=collapse;

 //-->