function openWin(page,name,width,height,scroll,resize){
	window.open(page,name,"toolbar=0,location=0,status=0,menubar=0,scrollbars=" + scroll + ",resizable=" + resize + ",top=0,left=0,width=" + width + ",height=" + height)
}

function theData(folderName,imgLimit){
	this.folderName = folderName;
	this.imgLimit = imgLimit;
}

	imgMatrix = new Array();

		imgMatrix[1] = new theData("humanimages", 13);
		imgMatrix[2] = new theData("classicimages", 13);
		imgMatrix[3] = new theData("printimages", 27);
		imgMatrix[4] = new theData("filmshowimages", 12);
		imgMatrix[5] = new theData("pressimages", 13);
		
	filmTitle = new Array();

		filmTitle[1] = "Jesus Christ Superstar";
		filmTitle[2] = "Vinnie by Van GoGo";
		filmTitle[3] = "Title to Murder";
		filmTitle[4] = "The Taming of the Shrew";
		filmTitle[5] = "Messiah";
		filmTitle[6] = "Come Back, Little Sheba";

	url_str = location.href;
	thisPic = url_str.substring(url_str.length - 2, url_str.length);
	thisCat = url_str.substring(url_str.length - 5, url_str.length - 6);

outIMG = "";
outNEXT = "";
outTABLE = "";
outNAV = "";

function writeIMG(){
	outIMG += "<img src=\"images/" + imgMatrix[thisCat].folderName + "/hero/" + thisPic + ".jpg\">";
	document.write(outIMG);
}

function writeNext(){
	thisPic *= 1;	

	if( thisPic > 1 ){
		prevPic = thisPic - 1;
		if( prevPic < 10 ){
			prevPic = "0" + prevPic 
		}

		outNEXT += "<a href=\"showHero.html?m=" + thisCat + "&p=" + prevPic + "\"><img src=\"images/back.jpg\" width=52 height=21 border=0></a>";

	}else{
		outNEXT += "<img src=\"images/spacer.gif\" width=52 height=21>";
	}

	outNEXT += " &nbsp; "

	if( thisPic < imgMatrix[thisCat].imgLimit ){

		nextPic = thisPic + 1;

		if( nextPic < 10 ){

			nextPic = "0" + nextPic 

		}

		outNEXT += "<a href=\"showHero.html?m=" + thisCat + "&p=" + nextPic + "\"><img src=\"images/next.jpg\" width=52 height=21 border=0></a>";

	}else{

		outNEXT += "<img src=\"images/spacer.gif\" width=52 height=21>";

	}

	document.write(outNEXT);

}

function writeBigTable(thisCat){


	outTABLE += "<table cellpadding=5 cellspacing=0 border=0>"

		outTABLE += "<tr>"

		for( i = 1; i <= imgMatrix[thisCat].imgLimit; i ++ ){

			sendPic = i;

			if( sendPic < 10 ){

				sendPic = "0" + sendPic;

			}

			outTABLE += "<td valign=\"top\" width=\"108\"><a href=\"JavaScript:openWin('showHero.html?c=" + thisCat + "&p=" + sendPic + "','hero',520,540,0,0);\"><img src=\"images/" + imgMatrix[thisCat].folderName + "/thumbs/" + i + ".jpg\" border=\"0\">";
			
			if(thisCat == 4){
				outTABLE += "<br><font class=\"copy\">" + filmTitle[i] + "</font>";}

			outTABLE += "</a></td>";

			if( i % 4 == 0 ){

				outTABLE += "</tr><tr><td colspan=\"7\"><img src=\"images/spacer.gif\" width=\"1\" height=\"10\"></td></tr><tr>";

			}else{

				outTABLE += "<td valign=\"top\"><img src=\"images/spacer.gif\" width=\"10\" height=\"1\"></td>";

			}

		}

	outTABLE += "</table>"

	document.write(outTABLE);

}



function navItem(TXT,theURL){

	this.TXT = TXT;

	this.theURL = theURL;

}

	navELEs = new Array();
	navELEs[0] = new navItem("body images","human_images.html");
	navELEs[1] = new navItem("classic images","classic_images.html");
	navELEs[2] = new navItem("video gallery <img src='images/new.jpg' border=0>","video.html");
	navELEs[3] = new navItem("client images <img src='images/new.jpg' border=0>","print_images.html");
	navELEs[4] = new navItem("film & show images <img src='images/new.jpg' border=0>","filmshow_images.html");
	navELEs[5] = new navItem("stage","stage.html");
	navELEs[6] = new navItem("film & <BR> television","film_etc.html");
	navELEs[7] = new navItem("commercial,<BR>print, etc... <img src='images/new.jpg' border=0>","commercial_print.html");
	navELEs[8] = new navItem("training & talents","training.html");
	navELEs[9] = new navItem("printable comp card <img src='images/new.jpg' border=0>","pdf/card.pdf");
	navELEs[10] = new navItem("awards, etc...","awards.html");
	navELEs[11] = new navItem("dimensions","dimensions.html");
	navELEs[12] = new navItem("press","press.html");
	navELEs[13] = new navItem("contact","contact.html");
	navELEs[14] = new navItem("9 to 5 <img src='images/new.jpg' border=0>","ninetofive.html");

function writeNav(pID){	

	outNAV += "<table cellpadding=0 cellspacing=0 border=0>";
	outNAV += "<tr>";
	outNAV += "<td><img src=\"images/spacer.gif\" width=\"104\" height=\"1\"></td>";
	
		for( j = 0; j < navELEs.length; j ++ ){
			outNAV += "<tr><td class=\"nav\"><a href=\"" + navELEs[j].theURL + "\">" + navELEs[j].TXT + "</a></td></tr>";

			outNAV += "<tr><td><img src=\"images/spacer.gif\" width=\"1\" height=\"5\"></td></tr>";

			//if( j == 3 || j == 7 || j == 10 || j == 12 ){ 
			if( j == 3 || j == 7 || j == 11){ 
				//theHeight = 15;
				theHeight = 5;
			}else{
				theHeight = 5;
			}
			if( j == 10 || j == 12){ 
				theHeight = 0;
			}
			outNAV += "<tr><td><img src=\"images/spacer.gif\" width=\"1\" height=\"" + theHeight + "\"></td></tr>";
		}

		outNAV += "<tr><td><img src=\"images/spacer.gif\" width=\"1\" height=\"" + theHeight + "\"></td></tr>";
		outNAV += "<td><img src=\"images/spacer.gif\" width=1 height=20></td>";
		outNAV += "</tr><tr>";
		outNAV += "<td class=\"nav\"><img src=\"images/G4Elogo.jpg\" width=74 height=46 border=0>&nbsp;<img src='images/new.jpg' height=\"11\" border=0><br><a href=\"http://www.guys4eyes.org/index.html\" target=\"new\">View Calendar</a><p></td></tr>";
		//outNAV += "<tr><td height=\"35\" valign=\"middle\" class=\"nav\"><a href=\"http://guys4eyes.org/index.html\" target=\"_blank\">view calendar</a></td></tr>";
		outNAV += "<tr><td class=\"nav\" height=\"50\"><img src=\"images/indy.gif\" width=74 height=34 border=0></td>";
		outNAV += "</tr>";
		outNAV += "</table>";

	document.write(outNAV);
}