<!--
	// Show close button/link
	var showClose = true;

	// Array of additional navigation buttons/links
	var navigationLinks = new Array();

	function setWindowTitle(title) {
		var windowTitle = document.getElementById('windowTitle');
		
		windowTitle.innerHTML = title;
	}

	function setWindowContent(content) {
		var windowContent = document.getElementById('windowContent');
		
		windowContent.innerHTML = content;
	}

	function clearNavigationLinks() {
		navigationLinks.length = 0;

		updateWindowControl();
	}

	function addNavigationLink(href, title) {
		navigationLinks.push(new Array(href,title));

		updateWindowControl();
	}

	function updateWindowControl() {
		var windowControl = document.getElementById('windowControl');
		
		if(windowControl) {
			var newControl = '';

			for(var i = 0; i < navigationLinks.length; i++) {
				newControl += '<a href="' + navigationLinks[i][0] + '" target="windowFrame">' + navigationLinks[i][1] + '</a>';
			}
			
			if(showClose) {
				newControl += '<a href="#" onclick="printWindow();">Skriv ut</a>';
				newControl += '<a href="#" onclick="closeWindow();">Lukk vindu</a>';
			}

			windowControl.innerHTML = newControl; 
		}
	}

	function printWindow() {
		var frame = document.getElementById('windowFrame');
		
		if(frame) {
			var innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
	
			hWnd = window.open(
				innerDoc.location+'&print=1',
				'printWindow',
				'left=50,top=50,width=520,height=500,toolbar=1,resizable=1');
			
			hWnd.print();
		} else {
			var windowContent = document.getElementById('windowContent');

			hWnd = window.open(
				'',
				'printWindow',
				'left=50,top=50,width=520,height=500,toolbar=1,resizable=1');
			hWnd.document.open('text/html','replace');
			hWnd.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">');
			hWnd.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">');
			hWnd.document.write('<title>Seterlandet AS</title>');
			hWnd.document.write('<link href="styles/default.css" rel="stylesheet" type="text/css">');
			hWnd.document.write('<link href="styles/popup.css" rel="stylesheet" type="text/css">');
			hWnd.document.write('<link href="styles/print.css" rel="stylesheet" media="screen,print">');
			hWnd.document.write('</head><body><div class="window">');
			hWnd.document.write(windowContent.innerHTML);
			hWnd.document.write('</div></body></html>');
			hWnd.document.close();
			hWnd.print();
		}
	}

	function openWindow() {
		updateWindowControl();

		var windowArea = document.getElementById('windowArea');
		
		windowArea.style.display = 'block';
	}

	function closeWindow() {
		var windowArea = document.getElementById('windowArea');
		
		windowArea.style.display = 'none';
	}

	function resizeIframe(id) {
		try {
			var frame = document.getElementById(id);

			// Get the document within the frame. This is where you will fail with 'permission denied'
			// if the document within the frame is not from the same domain as this document.
			// Note: IE uses 'contentWindow', Opera uses 'contentDocument', Netscape uses either.
			var innerDoc = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;

			if (frame.contentDocument && innerDoc.body.offsetHeight) {
				// NS6 syntax
				frame.height = innerDoc.body.offsetHeight + 5;
			} else if (frame.document && innerDoc.body.scrollHeight) {
				// IE5+ syntax
				frame.style.height = innerDoc.body.scrollHeight + 5;
			}
		}

		catch (e) {
			window.status = e.message;
		}
	}
-->