function showmsg(msg) {
	alert(msg);
}
popup.default_options = "sr";
popup.default_width = 500;
popup.default_height = 325;
function popup(url, width, height, options, name)
{
	if( options == null ) options = popup.default_options;
	if( width == null ) width = popup.default_width;
	if( height == null ) height = popup.default_height = 300;

	x = Math.floor((screen.availWidth-width)/2);
	y = Math.floor((screen.availHeight-height)/2);
	parm =  'width='        + width;
	parm += ',height='      + height;
	parm += ',screenX='     + x;
	parm += ',left='        + x;
	parm += ',screenY='     + y;
	parm += ',top='         + y;
	parm += ',resizable='   + ((options.indexOf('r')>-1)?'yes':'no');
	parm += ',scrollbars='  + ((options.indexOf('s')>-1)?'yes':'no');
	parm += ',menubar='     + ((options.indexOf('m')>-1)?'yes':'no');
	parm += ',directories=' + ((options.indexOf('d')>-1)?'yes':'no');
	parm += ',location='    + ((options.indexOf('l')>-1)?'yes':'no');
	parm += ',status='      + ((options.indexOf('t')>-1)?'yes':'no');
	popupwin = window.open(url,name,parm);

//    popupwin.moveTo(x, y);
//    popupwin.resizeTo(width, height);
    popupwin.focus();
}

function showpic(file){
      newWin=window.open("","ResizeBillede","width=150,height=100,status=no");
      txt='<ht'+'ml><he'+'ad><ti'+'tle>Billede i fuld størrelse<\57ti'+'tle><scri';
      txt+='pt language="javascript" type="text/javascript">';
      txt+='function resPic(){h=document.images[0].scrollHeight;';
      txt+='w=document.images[0].scrollWidth;window.resizeTo(w+6,h+52);}<\57scri';
      txt+='pt><\57he'+'ad><bo'+'dy style="overflow:hidden;';
      txt+='border:0px;margin:0px"><a href="JavaScript:window.close();" title="Luk vinduet"><i'+'mg src="'+file+'" style="top:0px;left:0px;border:0px;';
      txt+='" onload="resPic();"></a><\57bo'+'dy><\57ht'+'ml>';
      newWin.document.write(txt);
      newWin.document.close();
    }



function kontakt_check()
{
	var form = document.forms["form1"];
	if (!form.navn.value)
	{
		alert('Du har ikke skrevet dit navn. Prøv igen.');
		return false;
	} 
	else if (form.besked.value.length < 3)
	{
		alert('Du har ikke skrevet en besked. Prøv igen.');
		return false;
	} 
	else if (!form.email.value)
	{
		alert('Du har ikke skrevet din email. Prøv igen.');
		return false;
	} 
	else if (form.adresse.value)
	{
		if (!form.postnr.value)
		{
			alert('Du har ikke skrevet dit postnummer. Prøv igen.');
			return false;
		} 
		else if (!form.by.value)
		{
			alert('Du har ikke skrevet din by. Prøv igen.');
			return false;
		} 
	} 



	else
	{
		return true;
	}
}

function changeImg(elmID, elmValue) {
  document.getElementById(elmID).innerHTML = elmValue;
}