var dom = document.getElementById?1:0
if (!dom) 
{
  alert('Din browser understøtter ikke web-standarder...\nDu vil nu blive sendt til en side der vil fortælle dig hvorfor du skal opgradere din browser.');
  window.open( 'http://www.webstandards.org/', null, '');
}

function generate_pageinfo()
{ 
	document.write("last updated "+document.lastModified+"<br /><a href=\"/about.html\">by Jan</a>");
}
function jumpmenu(selObj)
{
	var sUrl = selObj.options[selObj.selectedIndex].value;
	if (sUrl.length > 0) {document.location = sUrl;}
}
function generate_jumpmenu()
{
	document.write("<select onChange=\"jumpmenu(this);\" name=\"jumpmenu\" id=\"jumpmenu\" >");
	document.write("<option value=\"\" selected>site sections</option>");
	document.write("<option value=\"/dump/\" style=\"background-color:#2a2a2a;\">/dump</option>");
	document.write("<option value=\"/fotoalbum/\" style=\"background-color:#2a2a2a;\">/foto album</option>");
	document.write("<option value=\"/games/\" style=\"background-color:#2a2a2a;\">/games</option>");
	document.write("<option value=\"/games/tribes2/\">&nbsp;&nbsp;Tribes2</option>");
	document.write("<option value=\"/stories\" style=\"background-color:#2a2a2a;\">/stories</option>");
	document.write("<option value=\"/stories/2002.rene.bolig/\">&nbsp;&nbsp;Rene's hus</option>");
	document.write("<option value=\"/stories/2002.værnepligt/\">&nbsp;&nbsp;Værnepligt</option>");
	document.write("<option value=\"/projects/\" style=\"background-color:#2a2a2a;\">/projects</option>");
	document.write("<option value=\"/projects/soaring/\">&nbsp;&nbsp;soaring</option>");
	document.write("<option value=\"/projects/peugeot.206/\">&nbsp;&nbsp;peugeot.206</option>");
	document.write("<option value=\"/spectra/official/\">&nbsp;&nbsp;hardball</option>");
	document.write("</select>");
}
function ShowEulaDialog(sUrl,iheight,iwidth)
{
  var sAgent = navigator.userAgent.toLowerCase()
  var isIE = sAgent.indexOf("msie")>-1 && !window.opera 
  if (isIE&&dom) 
  {  
    window.showModalDialog( sUrl, null, 'dialogHeight: '+iheight+'px;dialogWidth: '+iwidth+'px; center: Yes; help: No; resizable: No; status: No;');
  }else{
    window.open( sUrl, null, 'height: '+iheight+'px;width: '+iwidth+'px; resizable: No; status: No;');
  }
}
function generate_pagelogo(szUrl)
{
	// if szUrl is specified, use that image, else use a random of the 3 default images
	var logoUrl = "";
	basiclogo = new Array('gfx/skull.png','gfx/anime_01.png','gfx/anime_02.png') 
	if(szUrl.length > 0)
	{
		logoUrl = szUrl;
	}else{
		iItem = (Math.round(basiclogo.length * Math.random()));
		if(iItem == 3){iItem = 0;}
		logoUrl  = basiclogo[iItem];
	}
	document.write("<div style=\"position:relative;top:10px;left:18px;z-index:2;\"><img src=\""+logoUrl+"\" alt=\""+logoUrl+"\"></div>");
}
