
var imname, iquan, iar, imnum = 1;

function alert_me(msg) {alert(msg);}

function show_gallery()
{
	var index = document.frm_gallery.sel_gallery.selectedIndex;
	var selection = document.frm_gallery.sel_gallery.options[index].value;
	if(selection != "selection") {
	   document.location.href = selection;
	}
}


function create_gallery()
{

	document.write("<form name='frm_gallery'>\n");
	document.write("<select name='sel_gallery' onChange='show_gallery()'>\n");
	document.write("<option selected value='selection'>Select a Destination\n");
	document.write("<option value='../../index.html'>Home Page\n");	
	document.write("<option value='../articles/body.html'>The Remarkable Body of Luke Halpin\n");	
	document.write("<option value='galleries.html'>Gallery Index\n");
	document.write("<option value='../articles/bio.html'>Biography\n");		
	document.write("<option value='../articles/tv_series.html'>TV Series\n");
	document.write("</select>\n");
	document.write("</form>\n");

}


function create_header()
{
	
	document.write ("<table border=0>\n<tr>\n<td width='100%' align=left>");
	document.write ("<a href='../../index.html'><img src='../../images/common/index_a.gif' border=0></a></td>\n");
	document.write ("<td align=right width='100%'>");
	create_gallery();
	document.write ("</td>\n</tr>\n</table>\n<hr>");

        if(parseInt((sur=""+window.location).substr(gnp=sur.lastIndexOf("luke")+4))) document.title+="- gallery"+sur.substring(gnp,sur.indexOf(".htm",gnp));

}

function search(URL)
{
 opener.location = URL;
}


function create_newsheader()
{
	
	document.write ("<table border=0 width='100\%' bgcolor=black cellpadding=0 cellspacing=0>\n<tr>\n<td width='100%' align=left>");
	document.write ("<a href='../../index.html'><img src='../../images/common/index_a.gif' border=0></a><br><br></td>\n");
	document.write ("<td align=right width='100%'>");
	//create_newsgallery();
	document.write ("</td>\n</tr>\n</table>");

}

function create_links(cap1,cap2,endpage,startpagearg)
{

	var noTommy = startpagearg == null;
	var startpage = noTommy ? 1 : startpagearg;
	var uhead = "html/galleries/"; // "http://www.cpps90.com/luke/html/galleries/";

	document.writeln('<p><br><font color="gold" face="arial,sans-serif" size="2">'+cap1+'<br>'+cap2+'</p>\n<p>');

	for(var i=startpage,j=0; i<=endpage; i++)
	{
		if(!noTommy || i<67 || i>70)
		{
			j++;
			document.write('<a href="'+uhead+'luke'+i+'.html">'+i+'</a>');
			document.writeln(i<9 || ((i<100)+j+2) % (i>99 ? 4 : 6) ? '&nbsp;' : '<br>')
		}
	};

	document.writeln("</font></p>")

}

function animate(imnarg,quarg)
{

	iar = new Array();
	imname = imnarg;
	iquan = ++quarg;

	for(var k = 0; ++k < iquan; )
	{
		iar[k] = new Image();
		iar[k].src = imname + k + ".jpg"
	};
	window.setTimeout("nexim()",300)

}

function nexim()
{

	document.images[1].src = imname + imnum + ".jpg";
	imnum = ++imnum % iquan;
	window.setTimeout("nexim()",imnum ? 200 : 1100)

}

