function writeGalleryHead(s, h) {
	o = new Array(	"1", "From FemFlex 1 - www.femflex.com", "January 2007",
			"2", "From FemFlex 2 - www.femflex.com", "January 2007",
			"3", "Sample video captures - Purple Top", "28 July 2007");
	s = new Number(s);
	s = ((s == 0) ? -1 : s-1);
	document.write(h);
	for (i=parseInt(o.length/3-0.5);i>=0;i--) {
		document.write('<table border=0 cellpadding=0 cellspacing=2><tr><td><a href="gallery' + formatNumber(o[i*3]) + '.htm"><img src="img/icons/iArrRight.gif" width=19 height=19 alt="" border=0></a></td><td>&nbsp;</td><td><a href="gallery' + formatNumber(o[i*3]) + '.htm">' + o[i*3+1] + '</a> (' + o[i*3+2] + ')</tr></table>');
		if (i == s)
			t = '<br><b>&raquo; ' + o[i*3+1] + ' &laquo;</b>';
	}
	document.write(t);
}

function openpic(n, d, x, y) {
		n = new String(n);
		w = window.open("", "pw" + parseInt(Math.random(1)*1000000), "");
		w.document.open();
		w.document.write('<HTML><HEAD><TITLE>w w w . o a n a f b b . c o m</TITLE></HEAD>');
		w.document.write('<link rel="stylesheet" type="text/css" href="css/style.css">');
		w.document.write('<BODY BGCOLOR="#ffffff" 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();
}

function formatNumber(n) {
	return (n > 9) ? n : "0" + n;
}