function writeGalleryHead(s, h) {
	o = new Array(	"1", "Fotograf Alexander Danielsson", "12 februari 2005",
			"2", "Modellbilder Offseason", "12 februari 2005",
			"3", "Fotograf Patrik Elfwing", "12 februari 2005",
			"4", "Tävlingsbilder - Lennart Bergström", "12 februari 2005",
			"5", "Luciapokalen 2002 - Privata bilder", "25 mars 2005",
			"6", "Offseason bilder", "2 april 2005",
			"7", "Talangjakten 2002 - Inför Luciapokalen", "10 april 2005",
			"8", "SM 2003 - Lennart Bergström", "10 september 2005",
			"9", "SM 2004 - Lennart Bergström", "10 september 2005",
			"10", "Reportage - BODY/B&K, Exhale, Foto", "10 januari 2006",
			"11", "SM 2007", "24 februari 2008",
			"12", "SM 2007 - Foto Alex Danielsson", "24 februari 2008",
			"13", "SM 2007 - Foto Jocke Bartoll", "24 februari 2008",
			"14", "SM 2007 - Foto Tobias Karlsson", "24 februari 2008",
			"15", "SM 2007 - Tack till Fairing", "24 februari 2008",
			"16", "SM 2007 - Fairing", "24 februari 2008");
	s = new Number(s);
	s = ((s == 0) ? -1 : s-1);
	document.write('<FORM NAME="fGlry" ACTION="" METHOD=post>');
	document.write(h);
	document.write('<SELECT NAME="glry" CLASS="t2" SIZE=1 onChange="window.location=\'gallery.asp?g=\'+document.fGlry.glry.options[document.fGlry.glry.selectedIndex].value+\'\'">');
	for (i=parseInt(o.length/3-0.5);i>=0;i--) {
		document.write('<OPTION VALUE="' + o[i*3] + '"' + ((i == s || (i == (o.length/3-0.5) && s == -1))?' SELECTED':'') + '>' + o[i*3+1] + ' (' + o[i*3+2] + ')');
		if (i == s)
			t = (i + 1) + ' - ' + o[i*3+1] + '<br><div class="t2">(ny ' + o[i*3+2] + ')</div>';
	}
	document.write('</SELECT>');
	document.write('</FORM>');
	document.write('Galleri ' + t);
}
function openpic(n, d, x, y) {
		n = new String(n);
		w = window.open("", "pw" + parseInt(Math.random(1)*1000000), "toolbars=no,scrollbars=yes,width=" + x + ",height=" + y);
		w.document.open();
		w.document.write('<HTML><HEAD><TITLE>Maria Eriksson - Galleri</TITLE></HEAD>');
		w.document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
		w.document.write('<BODY BGCOLOR="#bbccff" LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>');
		w.document.write('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD WIDTH=' + x + ' HEIGHT=' + y + ' ALIGN=center VALIGN=center><IMG SRc="gal' + d + '/' + n + '" WIDTH=' + x + ' HEIGHT='  +y + ' BORDER=0></TD></TR></TABLE>');
		w.document.write('</BODY></HTML>');
		w.document.close();
		w.focus();
}
