var slash;
var i;
var x;

function makeform(x) {
	for (i=1;i<=9;i++) {
		document.foldud.elements[i].value="0";
	}
	if (x>0) {
		document.foldud.elements[x].value="1";
	}
}

function makeslash() {
if (document.sideparam.niveau.value=='rod') {
slash = '';
}
if (document.sideparam.niveau.value=='foerste') {
slash = '../';
}
if (document.sideparam.niveau.value=='andet') {
slash = '../../';
}
if (document.sideparam.niveau.value=='tredie') {
slash = '../../../';
}
return slash;
}

function handson(x) {
	document.getElementById(x).style.cursor = "hand";
	document.getElementById(x).style.color = "black";
	document.getElementById(x).style.background = "#CCCCCC";
}

function handsoff(x,color) {
	document.getElementById(x).style.color = color;
	document.getElementById(x).style.background = "#FFFFFF";
}

/*
function menu(i,x) {
	if (document.foldud.elements[i].value == "0") {
		document.foldud.elements[i].value = "1";
		document.getElementById(x).style.display = "inline";
	}
	else {
		document.getElementById(x).style.display = "none";
		document.foldud.elements[i].value = "0";
	}
}
*/

function UKmessage() {
	window.alert("This site is entirely in Danish")
}



function popupxl(popurl, popup)
{
	window.open(popurl,popup,"width=950,height=850,directories=no,toolbar=no,resizable=yes,menubar=no,scrollbars=yes");
}

function popuplang(popurl, popup)
{
	window.open(popurl,popup,"width=700,height=650,directories=no,toolbar=no,resizable=yes,menubar=no,scrollbars=yes");
}

function popupfunk(popurl, popup)
{
window.open(popurl,popup,"width=550,height=650,directories=no,toolbar=no,resizable=yes,menubar=no,scrollbars=yes");
}

function popupgif(popurl, popup)
{
window.open(popurl,popup,"width=750,height=770,directories=no,toolbar=no,resizable=yes,menubar=no,scrollbars=yes");
}

function popupkort(popurl, popup)
{
window.open(popurl,popup,"width=650,height=650,directories=no,toolbar=no,resizable=yes,menubar=no,scrollbars=yes");
}

function hopinfo() {
	for (i = 0; i < document.news.emner.length; i++) {
		if (document.news.emner[i].checked)
		{
		opener.location.href=document.news.emner[i].value;
		window.close();
		}
	}
}

function hop(side) {
	opener.location.href=side;
	window.close();
}

function email(navn,adresse,ext) {
	document.writeln("<a href=mailto:" +navn+ "@[antispam-sletdette]"  +adresse+ "\." +ext+ " class=blaa>");
	return "";
}

function showpic(picture, wide, high, hvad) {
var wider  = 700;
var higher = 650;
var streng = "status=no,toolbar=no,menu=no,scrollbars=yes,width=700,height650,top=0"
myWin=open('','myWin',streng);
myWin.document.open();
myWin.document.writeln("<html><head><title>Se billede</title>");
myWin.document.writeln("<style>body {font-family: Verdana, Arial, Sans Serif; font-size: 12px}\;");
myWin.document.writeln("A {font-family: Verdana, Arial, Sans Serif; font-size: 12px}\;");
myWin.document.writeln("</style>");
myWin.document.writeln("</head><body bgcolor=#FFFFFF>");
myWin.document.writeln('<center><A HREF="javascript:window.close()";><img src=',picture,' border=0 width=', wide, ' height=', high,'></A>');
myWin.document.writeln("<BR>");
myWin.document.writeln(hvad,"<br><br><A HREF=javascript:window.close(); style=\"text-decoration: none\">Klik her eller på billedet for at afslutte</A>");
myWin.document.writeln("<BR><B><BR>",wide,"x",high,"</B></center>");
myWin.document.writeln("</body></html>");
myWin.document.close();
}

function showpicXL(picture, wide, high, hvad) {
var wider  = 900;
var higher = 650;
var streng = "status=no,toolbar=no,menu=no,scrollbars=yes,width=900,height650,top=0"
myWin=open('','myWin',streng);
myWin.document.open();
myWin.document.writeln("<html><head><title>Se billede</title>");
myWin.document.writeln("<style>body {font-family: Verdana, Arial, Sans Serif; font-size: 12px}\;");
myWin.document.writeln("A {font-family: Verdana, Arial, Sans Serif; font-size: 12px}\;");
myWin.document.writeln("</style>");
myWin.document.writeln("</head><body bgcolor=#FFFFFF>");
myWin.document.writeln('<center><A HREF="javascript:window.close()";><img src=',picture,' border=0 width=', wide, ' height=', high,'></A>');
myWin.document.writeln("<BR>");
myWin.document.writeln(hvad,"<br><br><A HREF=javascript:window.close(); style=\"text-decoration: none\">Klik her eller på billedet for at afslutte</A>");
myWin.document.writeln("<BR><B><BR>",wide,"x",high,"</B></center>");
myWin.document.writeln("</body></html>");
myWin.document.close();
}

//function vis_skjul(id) - det hedder den ikke mere

function menu(dummy,id) {
	var id = document.getElementById(id).style;
	if(id.visibility == 'visible') {
		id.display = 'none';
		id.visibility = 'hidden';
		id.position = 'absolute';
	} else {
		id.display = 'block';
		id.visibility = 'visible';
		id.position = 'relative';
	}
}

function blur(id) {
	document.getElementById(id).blur();
}
