function m_over(o) 
{
	o.style.backgroundColor="f0f0c0";
}

function m_out(o) 
{
	o.style.backgroundColor="transparent";
}

function m_showLink(o, strCaption, strTarget)
{
	var strText="<p onmouseover='m_over(this)' onmouseout='m_out(this)' style='margin-top: 0; margin-bottom: 0; color:#202020;font-size:11px;font-family:Verdana'>";
	strText+="<a href='"+strTarget+"' style='text-decoration: none'>";
	strText+="<font face='Verdana'>"+strCaption+"</font></a></p>";
	o.document.write(strText);
}

function m_showLinkImage(o, strImage, strCaption, strTarget)
{
	var strText = "<p style='margin-top: 0; margin-bottom: 0; color:#202020;font-size:11px;font-family:Verdana'><a href='"+strTarget+"'><img border='0' src='"+strImage+"' width='200'></p>";
	if (strCaption.length > 0)
	{
		strText+="<p style='margin-top: 0; margin-bottom: 0' onmouseover='m_over(this)' onmouseout='m_out(this)' style='margin-top: 0; margin-bottom: 0'>";
		strText+="<a href='"+strTarget+"' style='text-decoration: none; font-size:11px'>";
		strText+="<font face='Verdana'>"+strCaption+"</font></a></p>";
	}
	o.document.write(strText);
}

function m_showHeader(o, strCaption)
{
	var strText="<div style='border-bottom: 1px solid #004080; padding-top:9'><p style='margin-top: 0; margin-bottom: 0; color:#FF0000;font-size:11px;font-family:Verdana'><b>";
	strText+=strCaption+"</b></p></div>";
	o.document.write(strText);
}

function m_loadContents(o)
{
	strArticle=o.location.search;
	if (strArticle.length==0)
	{
		o.document.open();
		o.document.write('<script type="text/javascript" src="news.js"><\/scr'+'ipt>');
		o.document.close();
	}
	else
	{
		if (strArticle.charAt(1) == 'f' || strArticle.charAt(1) == 'F')
		{
			strArticle=strArticle.substring(7, strArticle.length);
			o.document.open();
			o.document.write('<iframe id="frame1" width="540" height="697" frameBorder="0" src="' + strArticle + '"></iframe>');	
			o.document.close();
		}
		else
		{		
			if (strArticle.charAt(1) == 'g' || strArticle.charAt(1) == 'G')
			{
				strArticle=strArticle.substring(9, strArticle.length);
				o.document.open();
				o.document.write('<script type="text/javascript" src="news.js"><\/scr'+'ipt>');
				o.document.close();
				o.window.open(strArticle);
			}
			else
			{		
				if (strArticle.charAt(strArticle.length-4) == '.' || strArticle.charAt(strArticle.length-5) == '.')
				{
					strArticle=strArticle.substring(9, strArticle.length);
					o.window.open(strArticle);
				}
				else
				{
					strArticle=strArticle.substring(9, strArticle.length) + ".js";
					o.document.open();
					o.document.write('<script type="text/javascript" src="' + strArticle + '"><\/scr'+'ipt>');
					o.document.close();
				}
			}
		}
	}
}

function m_writeHeader(strText)
{
	document.write('<p style="margin-top: 12; margin-bottom: 0"><font face="Verdana" size="4" color="#404040"><b>'+strText+'</b></font></p>');
}

function m_writeSubHeader(strText)
{
	document.write('<p style="margin-top: 10; margin-bottom: 0"><font face="Verdana" size="3" color="#404040"><b>'+strText+'</b></font></p>');
}

function m_writeParagraph(strText, strTop)
{
	document.write('<p style="margin-top: '+strTop+'; margin-bottom: 0; color:#202020;font-size:11px;font-family:Verdana">'+strText+'</p>');
}

function m_writeParagraphSmall(strText, strTop)
{
	document.write('<p style="margin-top: '+strTop+'; margin-bottom: 0"><span style="color:#606060;font-size:11px;font-family:Verdana">'+strText+'</span></p>');
}

function m_writeLineBreak(m_nCount)
{
	var strText='';
	var m_n;
	for (m_n = 0; m_n < m_nCount; m_n++)
	{
		strText+='<p style="margin-top: 0; margin-bottom: 0">&nbsp;</p>';
	}
	document.write(strText);
}

function m_writeHyperLink(strText, strLink)
{
	document.write('<p style="margin-top: 0; margin-bottom: 0; color:#202020;font-size:11px"><font face="Verdana"><a href="'+strLink+'">'+strText+'</a></font></p>');
}

function m_writeImage(strImage, strLink)
{
	document.write('<p><a href="'+strLink+'"><img border="0" src="'+strImage+'" width="540"></a></p>');
}

function m_writeImageLeft(strImage, strLink)
{
	if (strLink.length > 0)
		document.write('<p><a href="'+strLink+'"><img border="0" src="'+strImage+'" align="left"></a></p>');
	else
		document.write('<p><img border="0" src="'+strImage+'" align="left"></p>');
}

function m_writeImageRight(strImage, strLink)
{
	if (strLink.length > 0)
		document.write('<p><a href="'+strLink+'"><img border="0" src="'+strImage+'" align="right"></a></p>');
	else
		document.write('<p><img border="0" src="'+strImage+'" align="right"></p>');
}

function m_launchSite(strLink)
{
	window.open(strLink, "_self");
}

function m_writeButtonRow(strBtn1, strLink1, strBtn2, strLink2, strBtn3, strLink3)
{
	var strFnutt = "'";
	var strText = '<form method="POST" action="--WEBBOT-SELF--">';
	strText+='<!--webbot bot="SaveResults" u-file="fpweb:///_private/form_results.csv" s-format="TEXT/CSV" s-label-fields="TRUE" -->';
	strText+='<p>';
	if (strBtn1 != "")
	{
		strText+='<input type="button" value="'+strBtn1+'" name="B1" onclick="javascript:m_launchSite('+strFnutt+strLink1+strFnutt+')">';
	}
	if (strBtn2 != "")
	{
		strText+='<input type="button" value="'+strBtn2+'" name="B2" onclick="javascript:m_launchSite('+strFnutt+strLink2+strFnutt+')">';
	}
	if (strBtn3 != "")
	{
		strText+='<input type="button" value="'+strBtn3+'" name="B3" onclick="javascript:m_launchSite('+strFnutt+strLink3+strFnutt+')">';
	}
	strText+='</p></form>'
	document.write(strText);
}

function getdocument2(doclink, doctitle) {
	thiswin=window.open("documents/Frem-31Info.pdf", "Informasjonsskriv_2005");
	thiswin.document.close();
}

function getdocument(doclink, doctitle) {
	thiswin=window.open("documents/" + doclink, doctitle);
	thiswin.document.close();
}
