var HowManyOnInRow = 2;
var HowManyOnInRow = 3;
var ColumnWidth = "33.3%";
var HowManyOnPage = HowManyOnInRow*3;

// Figures out what page you are on
var stringloc4 = unescape(document.location.toString());
var stringloc=stringloc4.toLowerCase();

var NameLink = new Array(
	 
	 "9. Juanita Kinnard", "http://www.mastersofthearts.com/poet_juanitakinnard.html"
	,"8. J-9", "http://www.mastersofthearts.com/poet_j9.html"
	,"7. Nicole Maney - Dreams &amp; Goals", "http://www.mastersofthearts.com/poet_nicolemaney.html"
	,"6. Claretta Webb - Alone", "http://www.mastersofthearts.com/poet_clarettawebb.html"
	,"5. Jarrette Atkins - True Passion", "http://www.mastersofthearts.com/poet_jatkins.html"
	,"4. Mentalmasseuse - Her", "http://www.mastersofthearts.com/poet_mentalmasseuse.html"
	,"3. Darla R. - As I look into the Mirror", "http://www.mastersofthearts.com/poet_darlarose.html"
	,"2. Cece - An Open Letter", "http://www.mastersofthearts.com/poet_cece.html"
	,"1. Poetress Queen - She Walks", "http://www.mastersofthearts.com/poet_poetressqueen.html"
	
	);

if (stringloc.lastIndexOf(".html?page=") == -1) {
	var ThisPageNumber=1;
	var RealPageNumber = 0;
	}
else {
	var URLcutUP = stringloc.split(".html?page=");
	var RealPageNumber = parseInt(URLcutUP[1]);
	var ThisPageNumber = ((parseInt(URLcutUP[1]))+1);
	if (ThisPageNumber=="") { ThisPageNumber = 1; }
	}
var StartAt = (((ThisPageNumber*HowManyOnPage)-HowManyOnPage));
var NextPageCnt = ThisPageNumber;
     NextPageCnt = NextPageCnt+1;

if (stringloc.lastIndexOf(".html") == -1) {
	PlaceMainURL = stringloc+"gallery.html";
	AllURLCutURL ="gallery.html?page=0";
	}
else if (stringloc.lastIndexOf("?page=") != -1) {
	AllininURLCut = stringloc.split("?page=");
	PlaceMainURL = AllininURLCut[0]+"?page="+NextPageCnt;
	AllURLCutURL = AllininURLCut[0]+"?page=0";
	}
else {
	PlaceMainURL = stringloc+"?page="+NextPageCnt;
	AllURLCutURL = stringloc+"?page=0";
	}
//document.write('<img src="images/gallery/gallery_head.gif" alt="all types of artists" width="350" height="30">');
document.write('<h1>SELECT A POET</h1>');
document.write('<table width="100%"><tr><td valign="top" width="'+ColumnWidth+'">');

GenCounter=1; Counter=1; CounterCells=1;
//StartAt = StartAt-1;
if (StartAt == -1) { StartAt = 0; }
for (var loop = StartAt; loop < NameLink.length; loop++) {
	PersonsName = NameLink[loop]; loop++; PersonsLink = NameLink[loop];
	PersonsLink = PersonsLink+"?page="+RealPageNumber;
	document.write('<a href="'+PersonsLink+'">'+PersonsName+'</a><br>');
	if (CounterCells == HowManyOnInRow && Counter != HowManyOnPage) {
	document.write('</td><td valign="top" width="'+ColumnWidth+'">');
		CounterCells=1;
		}
	else { CounterCells++; }
	GenCounter=loop+1;
	if (Counter == HowManyOnPage) { loop = 99999999999; } else { Counter++; }
	}

	document.write('</td></tr></table>');

	document.write('<table width="93%" border="0" height="35"><tr><td align="right" valign="middle" width="'+ColumnWidth+'">');
if (GenCounter == NameLink.length) { loop = NameLink.length; }
else { }

if (loop == 100000000000) {
	document.write('<a href="'+PlaceMainURL+'">MORE ARTISTS &raquo;</a>');
	}
else {
	document.write('<a href="'+AllURLCutURL+'">BACK TO THE BEGINNING &raquo;</a>');
	}
	document.write('</td></tr></table>');
