<!--
var days = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
var months = ["Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"];
function printTime(day, month, year, name)
{	var lists = [];
	lists=initList(day, month, year, name);
	document.write(lists[0] + lists[1] + lists[2]);
}
 
function initList(day, month, year, name)
{	var thisDate = new Date();
	var dayList, monthList, yearList, thisDate;
	dayList = "<td><select name=\""+name+"_day\" size=\"1\">\n";
	dayList += generateList(1, days[thisDate.getMonth()], day);
	dayList += "</select></td>\n";
	monthList = "<td><select name=\""+name+"_month\" size=\"1\" onChange=\"formatDate(this.form, '"+name+"');\">\n";
	monthList += generateList(1, 12, month);
	monthList += "</select></td>\n";
	yearList = "<td><select name=\""+name+"_year\" size=\"1\" onChange=\"formatDate(this.form, '"+name+"');\">\n";
	tmpYear=navigator.appName=="Netscape"?thisDate.getYear()+1900:thisDate.getYear();
	yearList += generateList(thisDate.getYear()-3, tmpYear + 1, year);
	yearList += "</select></td>\n";
	return [dayList, monthList, yearList];
}

function generateList(start, stop, curVal)
{	var tmpVar = "";
	for(i = start; i <= stop; i++)
	{	if (stop == 12)
		{	tmpVar += "<option value=\""+ i +"\""+ (i == curVal?" selected=\"selected\"":"") +">"+ months[i-1] +"</option>\n";
		}
		else
		{	tmpVar += "<option value=\""+ i +"\""+ (i == curVal?" selected=\"selected\"":"") +">"+ i +"</option>\n";
		}
	}
	return tmpVar;
}

function formatDate(form, name)
{	var thisDate = new Date();
	dValue = form.elements[name+'_day'].options[form.elements[name+'_day'].selectedIndex].value;
	mValue = form.elements[name+'_month'].options[form.elements[name+'_month'].selectedIndex].value;
	yValue = form.elements[name+'_year'].options[form.elements[name+'_year'].selectedIndex].value;
	form.elements[name+'_day'].options.length = 0;
	days[1]=(yValue%4==0&&yValue%100!=0)||(yValue%400==0)?29:28;
			
	for (i = 0; i < days[mValue - 1]; i++)
	{	form.elements[name+'_day'].options[i] = new Option(i + 1, i + 1);
		if(i == dValue)
		{	form.elements[name+'_day'].selectedIndex = i - 1;
		}
	}
		    
	if(form.elements[name+'_day'].selectedIndex<=0&&dValue!=1)
	{	form.elements[name+'_day'].selectedIndex = thisDate.getDate() - 1;
	}
	else if (mValue==2&&form.elements[name+'_day'].selectedIndex>27)
	{	form.elements[name+'_day'].selectedIndex=27;
	}
}

function getRadioIndex(radioGroup)
{	var index = -1;
	for (var i=0; i<radioGroup.length; i++)
	{	if (radioGroup[i].checked)
		{	index=i;
		}
	}
	return index;
}

function getObjectIndexByValue(needle, haystack)
{	var index = -1;
	for (var i=0; i<haystack.length; i++)
	{	if (haystack[i].value == needle)
		{	index = i;
		}
	}
	return index;
}

function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {
// by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
// version 3.0.4  

	if (bgcolor=="") {
		bgcolor="#FFFFFF";
	}
	var adj=10
	var w = screen.width;
	var h = screen.height;
	var byFactor=1;

	if(w<740){
	  var lift=0.90;
	}
	if(w>=740 & w<835){
	  var lift=0.91;
	}
	if(w>=835){
	  var lift=0.93;
	}
	if (imageWidth>w){
	  byFactor = w / imageWidth;
	  imageWidth = w;
	  imageHeight = imageHeight * byFactor;
	}
	if (imageHeight>h-adj){
	  byFactor = h / imageHeight;
	  imageWidth = (imageWidth * byFactor);
	  imageHeight = h; 
	}
	   
	var scrWidth = w-adj;
	var scrHeight = (h*lift)-adj;

	if (imageHeight>scrHeight){
  	  imageHeight=imageHeight*lift;
	  imageWidth=imageWidth*lift;
	}

	var posLeft=0;
	var posTop=0;

	if (hugger == "hug image"){
	  if (hugMargin == ""){
	    hugMargin = 0;
	  }
	  var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
	  if (scrHeightTemp < scrHeight) {
		scrHeight = scrHeightTemp;
	  } 
	  var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
	  if (scrWidthTemp < scrWidth) {
		scrWidth = scrWidthTemp;
	  }
	  
	  if (scrHeight<100){scrHeight=100;}
	  if (scrWidth<100){scrWidth=100;}

	  posTop =  ((h-(scrHeight/lift)-adj)/2);
	  posLeft = ((w-(scrWidth)-adj)/2);
	}

	if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
		imageHeight=imageHeight-adj;
		imageWidth=imageWidth-adj;
	}
	posTop = parseInt(posTop);
	posLeft = parseInt(posLeft);		
	scrWidth = parseInt(scrWidth); 
	scrHeight = parseInt(scrHeight);
	
	var agt=navigator.userAgent.toLowerCase();
	if (agt.indexOf("opera") != -1){
	  var args= new Array();
	  args[0]='parent';
	  args[1]=imageName;
	  var i ; document.MM_returnValue = false;
	  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
	} else {
	newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');  
	newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
	newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Tryk p&aring; billedet for at lukke vinduet" >'); 
	newWindow.document.write('</td></tr></table></body></html>');
	newWindow.document.close();
	newWindow.focus();
	}
}
//-->