//#FLASH //
function showFlash(strFilnavn, sWidth, sHeight)
{
var flash = strFilnavn.replace('%2E','.')
	document.write('<object type="application/x-shockwave-flash" data="'+flash+'" width="'+sWidth+'" height="'+sHeight+'">');
        document.write('<param name="wmode" value="opaque">');
	document.write('<param name="movie" wmode="opaque" value="'+flash+'" />No Flash? - <a href="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank" title="Click here to download the SWF-plugin">Click here to download</a>');
	document.write('</object>');
}

//#PRINTAREA //
function udskriv() {

try 

{

var txt = document.getElementById("printarea").innerHTML;

var ifrm = document.getElementById('iframenavn');

ifrm = (ifrm.contentWindow) ? ifrm.contentWindow : (ifrm.contentDocument.document) ? ifrm.contentDocument.document : ifrm.contentDocument;

ifrm.document.write(txt);

ifrm.document.close();

ifrm.focus();

ifrm.print();

}

catch(e)

{

                 alert('Kunne ikke udskrive')

}

}

//#NYHEDSBREV, KUN ATHENA //
function validateFormnyhedsbrev()
{
	if ('val_1621')
	{
		if (validate_email(document.getElementById('val_1621'),document.getElementById('val_1621').value+ " er ikke en gyldig e-mail adresse!")==false)
  		{
			document.getElementById('val_1621').focus();
			return false
		}
	}
}
function validate_email(field,alerttxt)
{
	with (field)
	{
		apos=value.indexOf("@")
		dotpos=value.lastIndexOf(".")
		if (apos<1||dotpos-apos<2) 
  		{
			alert(alerttxt);return false
		}
		else 
		{
			return true
		}
	}
}
function showHide(divID)
{
if(document.getElementById('hideblock'+divID).style.display=='block')
{
	document.getElementById('hideblock'+divID).style.display='none'
}
else
{
	document.getElementById('hideblock'+divID).style.display='block'
}
}
