
var nToons = 21;
var firstToon = 1;
var lToon = firstToon;


function get_param(name)
{ 
	name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); 
	var regexS = "[\\?&]"+name+"=([^&#]*)"; 
	var regex = new RegExp( regexS ); 
	var results = regex.exec( window.location.href ); 

	if ( results == null )
		return ""; 
	return results[1];
}


function navFirst(cToon)
{
	if (cToon > firstToon)
	{
		document.write('<a href="c' + firstToon + '.html" title="First">First</a>');
	} else
	{
		document.write('First');
	}
}
function navPrev(cToon)
{
	if (cToon > firstToon)
	{
		cToon = cToon - 1;
		document.write('<a href="c' + cToon + '.html" title="Previous">Prev</a>');
	} else
	{
		document.write('Prev');
	}
}
function navNext(cToon)
{
	if (cToon < nToons)
	{
		cToon = cToon + 1;
		document.write('<a href="c' + cToon + '.html" title="Next">Next</a>');
	} else
	{
		document.write('Next');
	}
}
function navLast(cToon)
{
	if (cToon < nToons)
	{
		document.write('<a href="c' + nToons + '.html" title="Last">Last</a>');
	} else
	{
		document.write('Last');
	}
}
function navBlock(cToon)
{
	lToon = cToon;

	navFirst(cToon);
	document.write('&nbsp;&nbsp;');
	navPrev(cToon);
	document.write('&nbsp;&nbsp;');
	navNext(cToon);
	document.write('&nbsp;&nbsp;');
	navLast(cToon);

	document.write('&nbsp;&nbsp;[' + lToon + '&nbsp;of&nbsp;' + nToons + ']');
}
function localT(crdate, wid, hig)
{
	if (wid != "")
	{
		document.write('Space Warp #' + lToon + ' - ' + crdate + '<br><img src="toons/Spacewarp' + lToon + '.png" border=0 width="' + wid + '" >');
	} else
	if (hig != "")
	{
		document.write('Space Warp #' + lToon + ' - ' + crdate + '<br><img src="toons/Spacewarp' + lToon + '.png" border=0 height="' + hig + '" >');
	} else
	{
		document.write('Space Warp #' + lToon + ' - ' + crdate + '<br><img src="toons/Spacewarp' + lToon + '.png" border=0  >');
	}
}
