var DivHeight =""
var size = 10
	
function togle(divId, buttonId)
{
		sourceDiv = document.getElementById(divId)
		if (sourceDiv.style.height=="auto")
		{   DivHeight=sourceDiv.offsetHeight 
		    closeDiv(sourceDiv)
			buttonId.src = "fileadmin/templates/img/expand.gif";
			buttonId.alt = "Udvid";
		}
		else
		{
			openDiv(sourceDiv)
			buttonId.src = "fileadmin/templates/img/close.gif";
			buttonId.alt = "Luk sammen";
		}
}

function openDiv(sourceDiv){
	if (sourceDiv.offsetHeight < (sourceDiv.scrollHeight-10))
	{
		sourceDiv.style.height=(size + "px")
		size+=15;
		setTimeout("openDiv(sourceDiv)","10")
	}
	else
	{
		sourceDiv.style.height="auto";
		sourceDiv.style.overflow="visible"
		size = 10;
	}
}
function closeDiv(sourceDiv){
	if ( DivHeight > 10)
	{
		sourceDiv.style.overflow="hidden"
		sourceDiv.style.height=(DivHeight + "px")
		DivHeight-=15;
	
		setTimeout("closeDiv(sourceDiv)","10")
	}
	else
	{
		sourceDiv.style.height=(size + "px");
		size = 10;
	}
}
/*<![CDATA[*/
	<!--
		browserName = navigator.appName;
		browserVer = parseInt(navigator.appVersion);
		var msie4 = (browserName == "Microsoft Internet Explorer" && browserVer >= 4);
		if ((browserName == "Netscape" && browserVer >= 3) || msie4 || browserName=="Konqueror") {version = "n3";} else {version = "n2";}
			// Blurring links:
		function blurLink(theObject)	{	//
			if (msie4)	{theObject.blur();}
		}
		
	// -->
		/*]]>*/

	/*<![CDATA[*/
<!--

  // JS function for uncrypting spam-protected emails:
function UnCryptMailto(s) {	//
	var n=0;
	var r="";
	for(var i=0; i < s.length; i++) {
		n=s.charCodeAt(i);
		if (n>=8364) {n = 128;}
		r += String.fromCharCode(n-(1));
	}
	return r;
}
  // JS function for uncrypting spam-protected emails:
function linkTo_UnCryptMailto(s)	{	//
	location.href=UnCryptMailto(s);
}
		

// -->
	/*]]>*/
 
