function ByttBakgrunnsbilde(sender, bilde, byId)
{		
	if(sender != null && bilde != null)
	{
		if(byId)						
			document.getElementById(sender).style.backgroundImage = 'url(' + bilde + ')';
		else
			sender.style.backgroundImage = 'url(' + bilde + ')';
	}	
}

function LastUrl(url)
{
	if(url != null)
		document.location.href = url;
}

function VisBilde(webdokumentID)
{	
	var url = "Bilde.aspx?ID=" + webdokumentID;
	window.open(url, 'VisBilde', 'height=200, width=200, status=no, toolbars=no, menubar=no, scrollbars=no, resizable=yes');	
}

function VisMediefil(webdokumentID)
{
	var url = 'WebPlayer.aspx?ID=' + webdokumentID + '&Modul=5';
	window.open(url, 'WebPlayer', 'height=450, width=356, status=no, toolbars=no, menubar=no, scrollbars=no, resizable=no');	
	return false;
}

function VisPoengBeregning()
{
	var url = 'Poengberegning/Poengberegning.html';
	window.open(url, 'Poengberegning', 'height=395, width=602, status=no, toolbars=no, menubar=no, scrollbars=no, resizable=yes');
}

function VisForum()
{
	var url = 'http://www.home.no/medlem/gjestebok.cgi?user=klatrer';
	window.open(url, 'Forum', 'height=700, width=680, status=yes, toolbars=no, menubar=yes, scrollbars=yes, resizable=yes');
}

if (document.images) 
{ 
	Fotoalbumon = new Image();
	Fotoalbumon.src = "Grafikk/FotoalbumOver.jpg"; 
	Fotoalbumoff = new Image(); 
	Fotoalbumoff.src = "Grafikk/Fotoalbum.jpg"; 
	
	Aapentforumon = new Image();
	Aapentforumon.src = "Grafikk/aapentforumOver.jpg";
	Aapentforumoff = new Image();
	Aapentforumoff.src = "Grafikk/aapentforum.jpg";
	
	Tromsobyon = new Image();
	Tromsobyon.src = "Grafikk/tromsobyover.jpg";
	Tromsobyoff = new Image();
	Tromsobyoff.src = "Grafikk/tromsoby.jpg";
	
	Beregnlaanon = new Image();
	Beregnlaanon.src = "Grafikk/beregnlaanOver.jpg";
	Beregnlaanoff = new Image();
	Beregnlaanoff.src = "Grafikk/beregnlaan.jpg";
	
	Poengon = new Image();
	Poengon.src = "Grafikk/poengberegningOver.jpg";
	Poengoff = new Image();
	Poengoff.src = "Grafikk/poengberegning.jpg";
	
	Sjekkpoengon = new Image();
	Sjekkpoengon.src = "Grafikk/SjekkpoengOver.jpg";
	Sjekkpoengoff = new Image();
	Sjekkpoengoff.src = "Grafikk/Sjekkpoeng.jpg";
	
	Veiledningon = new Image();
	Veiledningon.src = "Grafikk/VeiledningOver.jpg";
	Veiledningoff = new Image();
	Veiledningoff.src = "Grafikk/Veiledning.jpg";
	
}
function imgOn(imgName) 
{
	if (document.images) 
	{
		document[imgName].src = eval(imgName + "on.src");
	}
}
function imgOff(imgName) 
{
	if (document.images) 
	{
		document[imgName].src = eval(imgName + "off.src");
	}
}

