////includering af prototype.js
//	document.write('<' + 'script');
//    document.write(' language="javascript"');
//    document.write(' type="text/javascript"');
//    document.write(' src="' + 'http://www.ask.dk/graphics/Design/Includes/beregnSelvAjax/prototype.js' + '">');
//    document.write('</' + 'script' + '>');

////includering af Beregn.js
//	document.write('<' + 'script');
//    document.write(' language="javascript"');
//    document.write(' type="text/javascript"');
//    document.write(' src="' + 'http://www.ask.dk/graphics/Design/Includes/beregnSelvAjax/Beregn.js' + '">');
//    document.write('</' + 'script' + '>');

function SyncDivHeights()
	{
	var iHeight;

	iHeight = document.getElementById('content').offsetHeight;
	bSync = false;

	if(document.getElementById('leftcolumn')) {
		if (document.getElementById('leftcolumn').offsetHeight>iHeight) {
				iHeight = document.getElementById('leftcolumn').offsetHeight;
				bSync = true;
				}
	}
	if(document.getElementById('rightcolumn')) {
		if (document.getElementById('rightcolumn').offsetHeight>iHeight) {
				iHeight = document.getElementById('rightcolumn').offsetHeight;
				bSync = true;
				}
	}

	if(bSync = true) {
		document.getElementById('content').style.height = iHeight + 'px';

		if(document.getElementById('leftcolumn')) {
			document.getElementById('leftcolumn').style.height = iHeight + 'px';
		}
		if(document.getElementById('rightcolumn')) {
			document.getElementById('rightcolumn').style.height = iHeight + 'px';
		}
	}
}

/*
	New window
*/
function NytVindue(URL)  {
	window.open(URL);
}

/*
	Drop down script
*/
var focusElem = null;
function dropdown( obj )
{
	if( focusElem != null )
	{
		focusElem.className = focusElem.className.replace(" over", "");
	}
	focusElem = obj.parentElement;
	focusElem.className += ' over';
}


/*
	PopUp window
*/
function PopWin(url,h,w) {
	popupWin = window.open(url+'?sendlink='+escape(document.location.href), 'popup', 'height=' + h + ',width=' + w + ',top=50,left=25')
}

/*
	Combobox selector
*/
function LinkSelect(form, sel) {
        c = sel.selectedIndex;
        adrs = sel.options[c].value;
        if (adrs != "-" )
        {
		        parent.location.href = adrs;
        }
}

swDropMenu = function() {
	if (document.getElementById) {
		navRoot = document.getElementById("swDropMenu");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.className == "swDrop") 
				node.firstChild.onfocus = function() {dropdown(this)}; // JWJ
			{
				node.onmouseover = function() 
				{
					this.className += " over";
					this.firstChild.className += " expanded";
				}
				node.onmouseout = function()
				{
					this.className = this.className.replace(" over", "");
					if (this.firstChild.className == "selected expanded") this.firstChild.className = "selected";
					if (this.firstChild.className == " expanded" || this.firstChild.className == "expanded") this.firstChild.className = "";
				}
			}
		}
	}
}
/* window.onload = swDropMenu; */

