
	function Arrows(ArrowName,ArrowType,LinkName) {
	theleft = LinkName.indexOf("-") + 1;
	theright = LinkName.indexOf(".");
	LinkType = LinkName.substring(0,2);
	LinkURL = LinkType + LinkName.substring(theleft,theright);
	LinkURL = LinkURL + "-" + LinkName.substring(theright+1,LinkName.indexOf(" "));
	LinkURL = LinkURL.toLowerCase();

	if (LinkType=="PC") {
	LinkType = LinkName.substring(0,LinkName.indexOf("."));
	izquierda = LinkType.substring(0,LinkType.indexOf("-"));
	derecha = LinkName.substring(LinkType.indexOf("-")+1,LinkType.length);
	LinkType = izquierda + derecha
	}

	GrayArrow = LinkType + '-' + ArrowType + '.jpg'
	BlueArrow = LinkType + '-' + ArrowType + '-Blue.jpg'
	if (Lang=="sp") {
	GrayArrow = LinkType + '-' + ArrowType + '-sp.jpg'
	BlueArrow = LinkType + '-' + ArrowType + '-Blue-sp.jpg'
	}

	ctext = "<a href='" + LinkURL + ".html?Size=" + Size + "' title='" + LinkName + "' class='noGold'";
	ctext2 = " onMouseOver='" + 'document.' + ArrowName + '.src="' + BlueArrow + '";' + "'";
	ctext3 = " onMouseOut='" + 'document.' + ArrowName + '.src="' + GrayArrow + '";' + "'>";
	ctext = ctext + ctext2 + ctext3;
	document.write(ctext);
	ctext = '<img name="' + ArrowName + '" src="' + GrayArrow + '" align="left" class="noborder" border="0" width="155" height="60"> </a>';
	document.write(ctext);
	}

	function NaviBar(CatBar,BarName) {
	Size = document.Scale.Size.value;
	var Lang = Size.substring(7,9);
	HomeRef = document.HiddenForm.HomeRef.value;
	CatalogPage = "";
	if (HomeRef.indexOf("-")==-1) {
	HomeDir = HomeRef;
	} else {
	HomeDir = HomeRef.substring(0,HomeRef.indexOf("-"));
	CatalogPage = HomeRef.substring(HomeRef.indexOf("-"),HomeRef.length);
	if (BarName=="group") {
	CatalogPage = "";
	}}
	var CatWidth = ' width="' + CatBar.substring(CatBar.indexOf("+")+6,CatBar.indexOf("|")) + '"';
	var CatName =  CatBar.substring(CatBar.indexOf("-")+1,CatBar.indexOf("/"));
	var CatHtml = HomeDir + CatName.toLowerCase() + CatalogPage + ".html";
	var CatButton = '"' + HomeDir + 'general/Bar-' + CatName + '.jpg"';
	var CatBlue = '"' + HomeDir + 'general/Bar-' + CatName + '-Blue.jpg"';
	var CatTitle = '"Link to ' + CatBar.substring(CatBar.indexOf("/")+1,CatBar.lastIndexOf("|")) + '"';
	if (Lang=="sp") {
	CatWidth = ' width="' + CatBar.substring(CatBar.indexOf("|")+1,CatBar.indexOf("-")) + '"';
	CatButton = '"' + HomeDir + 'general/Bar-' + CatName + '-sp.jpg"';
	CatBlue = '"' + HomeDir + 'general/Bar-' + CatName + '-Blue-sp.jpg"';
	CatTitle = '"' + CatBar.substring(CatBar.lastIndexOf("|")+1,CatBar.length) + '"';
	}

	ctext = '<a href="' + CatHtml + "?Size=" + Size + '" title=' + CatTitle + ' class="noGold"';
	ctext2 = "onMouseOver='document." + BarName + '.src = ' + CatBlue + '; '
	ctext3 = "'onMouseOut='document." + BarName + '.src = ' + CatButton + ";'>"
	ctext = ctext + ctext2 + ctext3
	document.write(ctext);
	ctext = '<img name="' + BarName + '" src=' + CatButton + CatWidth + ' height="30" class="noborder" border="0"></A>';
	document.write(ctext);
	}

	Size = document.Scale.Size.value;
	HomeRef = document.HiddenForm.HomeRef.value;
	if (HomeRef.indexOf("-")==-1) {
	HomeDir = HomeRef
	} else {
	HomeDir = HomeRef.substring(0,HomeRef.indexOf("-"))
	}
	PrevName = document.HiddenForm.PrevName.value;
	ThisName = document.HiddenForm.ThisName.value;
	NextName = document.HiddenForm.NextName.value;
	HaveImage = document.HiddenForm.HaveImage.value;

	var ThisType = ThisName.substring(0,2);
	if (ThisType=="PC") {
	ThisType = ThisName.substring(0,ThisName.indexOf("."));
	theleft = ThisType.substring(0,ThisType.indexOf("-"));
	theright = ThisName.substring(ThisType.indexOf("-")+1,ThisType.length);
	ThisType = theleft + theright
	}
	ThisNumber = ThisName.substring(0,ThisName.indexOf(" "));
	ThisTitle = ThisName.substring(ThisName.indexOf(" ")+1,ThisName.length);
	theleft = ThisNumber.indexOf("-") + 1;
	theright = ThisNumber.indexOf(".");
	ThisURL = ThisType.substring(0,2);
	ThisURL = ThisURL.toLowerCase() + ThisNumber.substring(theleft,theright);
	ThisURL = ThisURL + "-" + ThisNumber.substring(theright+1,ThisNumber.length);
	ThisURL = ThisURL.toLowerCase();

      	var TopBar=new Array();
        TopBar[1] = "AP+CO68A65|65-Cobs/Panama Mint Cobs|Panama Mint Cobs";
        TopBar[2] = "BG+OT46880|90-Badges/Badges|Insignias";
        TopBar[3] = "CM+MD68A65|65-CanalMedals/Canal Medals|Las Medallas del Canal";
        TopBar[4] = "CH+MD68A110|65-Challenge/Challenge Coins|Monedas Militares";
        TopBar[5] = "CK+OT46880|140-Checks/Metal Checks|Fichas De Identificación";
        TopBar[6] = "CT+OT68A55|65-Chits/Chits|Fichas de Papel";
        TopBar[7] = "FK+  46865|145-Fakes/Fakes|Falsificaciones y Artículos Sospechosos";
        TopBar[8] = "MT+TK68A75|75-Military/Military Tokens|Fichas Militares";
        TopBar[9] = "PC005+CN68A140|140-PC005/Medio Centésimo|Medio Centésimo";
        TopBar[10]= "PC012+CN68A155|155-PC012/Uno y Cuarto Centésimos|Uno y Cuarto Centésimos";
        TopBar[11]= "PC10+CN68A155|155-PC10/Diez Centésimos|Diez Centésimos";
        TopBar[12]= "PT+TK68A95|95-PanamaTokens/Panama Tokens|Fichas de Panamá";
        TopBar[13]= "VN+MD68A80|80-Vernon/Admiral Vernon Medals|Las Medallas del Almirante Vernon";
        TopBar[14]= "WN+OT46871|90-Wooden/Wooden Nickels|Fichas de Madera";
        TopBar[15]= "CN+  00065|100-Coins/Coins|Monedas";
        TopBar[16]= "CO+  00090|90-Colonial/Colonial|Colonial";
        TopBar[17]= "MD+  00075|100-Medals/Medals|Medallas";
        TopBar[18]= "OT+  00065|65-Other/Other Items|Otros Artículos";
        TopBar[19]= "TK+  00071|65-Tokens/Tokens|Fichas";
        TopBar[20]= "  +  0000|0-/";

	var CatType = "";
	var i = 0;
	do 
	{
   	i = i + 1;
	var CatBar = TopBar[i]
	CatType = TopBar[i].substring(0,TopBar[i].indexOf("+"));
	} 
	while (CatType != ThisType);

	var CatBar = TopBar[i]
	var GrpType = CatBar.substring(CatBar.indexOf("+")+1,CatBar.indexOf("+")+3);
	var Catsmall = HomeDir + 'general/Bar-Small-' + CatBar.substring(CatBar.indexOf("+")+3,CatBar.indexOf("+")+4) + 'Pixels';
	var Catlarge = HomeDir + 'general/Bar-Large-' + CatBar.substring(CatBar.indexOf("+")+4,CatBar.indexOf("+")+5) + 'Pixels';
	var Catxlarg = HomeDir + 'general/Bar-Middle-' + CatBar.substring(CatBar.indexOf("+")+5,CatBar.indexOf("+")+6) + 'Pixels';
	// alert(Catlarge);

	var TmpType = "";
	var i = 0;
	do 
	{
   	i = i + 1;
	TmpType = TopBar[i].substring(0,2);
	} 
	while (TmpType != GrpType);

	var GrpBar = TopBar[i]
	var GrpName =  GrpBar.substring(GrpBar.indexOf("-")+1,GrpBar.indexOf("/"));

	ctext = '<DIV STYLE="margin:0; margin-left:30; padding:0;">';
	document.write(ctext);
	ctext = '<TABLE cellspacing="0" cellpadding="0">';
	document.write(ctext);
	ctext = '<TR>';
	document.write(ctext);

	ctext = '<FORM METHOD="GET" name="PassData">';
	document.write(ctext);
	ctext = '<INPUT TYPE="hidden" name="BarData" value="' + CatBar + '">';
	document.write(ctext);
	ctext = '</FORM>';
	document.write(ctext);

	ctext = '<TD>';
	document.write(ctext);

	Arrows("Previous","Previous",PrevName);

	ctext = "</TD>";
	document.write(ctext);
	ctext = '<TD align="center" valign="middle" width="80%">';
	document.write(ctext);
	ctext = '<FONT size="+2" color="#000066"><I><B><CENTER>'
	document.write(ctext);
	ctext = '<DIV STYLE="margin: 0; padding: 0; margin-top: 7;">';
	document.write(ctext);

	ctext = '<TABLE cellspacing="0" cellpadding="0" border="0">';
	document.write(ctext);
	ctext = "<TR>";
	document.write(ctext);

	ctext = "<TD>";
	document.write(ctext);
	ctext = '<img src="' + HomeDir + 'general/Bar-Begin.jpg" width="16" height="30" class="noborder" border="0">';
	document.write(ctext);
	ctext = "</TD>";
	document.write(ctext);

	HomePage = 'index'
	HomeImage = 'general/Bar-Home.jpg';
	HomeBlue = 'general/Bar-Home-Blue.jpg'; 
	HomeTitle = 'Link to Home Page';
	HomeWidth = 65
	if (Lang=="sp") {
	HomePage = 'principal'
	HomeImage = 'general/Bar-Home-sp.jpg';
	HomeBlue = 'general/Bar-Home-Blue-sp.jpg'; 
	HomeTitle = 'Página Principal';
	HomeWidth = 95
	}

	ctext = "<TD>";
	document.write(ctext);
	ctext = '<a href="' + HomeDir + HomePage + '.html' + "?Size=" + Size + '" title="' + HomeTitle + '" class="noGold"';
	ctext2 = "onMouseOver='document.NaviHome.src = " + '"' + HomeDir + HomeBlue + '"; '
	ctext3 = "'onMouseOut='document.NaviHome.src = " + '"' + HomeDir + HomeImage + '";' + "'>"
	ctext = ctext + ctext2 + ctext3
	document.write(ctext);
	ctext = '<img name="NaviHome" src="' + HomeDir + HomeImage + '" width="' + HomeWidth + '" height="30" class="noborder" border="0"></A>';
	document.write(ctext);
	ctext = "</TD>";
	document.write(ctext);

	if (GrpName != "") {
	ctext = "<TD>";
	document.write(ctext);
	NaviBar(GrpBar,"group");
	ctext = "</TD>";
	document.write(ctext);
	}

	ctext = "<TD>";
	document.write(ctext);
	NaviBar(CatBar,"catalog");
	ctext = "</TD>";
	document.write(ctext);

	EntryImage = 'general/Bar-Entry.jpg';
	EntryBlue = 'general/Bar-Entry-Blue.jpg'; 
	EntryWidth = 65
	if (Lang=="sp") {
	EntryImage = 'general/Bar-Entry-sp.jpg';
	EntryBlue = 'general/Bar-Entry-Blue-sp.jpg'; 
	EntryWidth = 85
	}

	if (HomeDir=="../") {
	if (ThisName.indexOf("|")!=-1) {
	DisplayName = ThisName.substring(0,ThisName.indexOf("|")) + "/" + ThisName.substring(ThisName.indexOf("|")+1,ThisName.length);
	} else {
	DisplayName = ThisName
	}
	ctext = "<TD>";
	document.write(ctext);
	ctext = "<a href='" + ThisURL + ".html?Size=" + Size + "' title='" + DisplayName + "' class='noGold'";
	ctext2 = " onMouseOver=" + "'document.NaviEntry.src = "; 
	ctext3 = '"' + HomeDir + EntryBlue + '";' + "'onMouseOut='document.NaviEntry.src = ";
	ctext4 = '"' + HomeDir + EntryImage + '";' + "'>";
	ctext = ctext + ctext2 + ctext3 + ctext4;
	document.write(ctext);
	ctext = '<img name="NaviEntry" src="' + HomeDir + EntryImage + '" width="' + EntryWidth + '" height="30" class="noborder" border="0"></A>';
	document.write(ctext);
	ctext = "</TD>";
	document.write(ctext);
	}

	ctext = "<TD>";
	document.write(ctext);
	ctext = '<img src="' + HomeDir + 'general/Bar-End.jpg" width="16" height="30" class="noborder" border="0">';
	document.write(ctext);
	ctext = "</TD>";
	document.write(ctext);

	ctext = "</TR>";
	document.write(ctext);
	ctext = "</TABLE>";
	document.write(ctext);
	ctext = "</DIV>";
	document.write(ctext);
	ctext = "</CENTER></B></I></FONT>";
	document.write(ctext);

	ctext = "</TD>";
	document.write(ctext);

	ctext = "<TD>";
	document.write(ctext);

	Arrows("Next","Next",NextName);

	ctext = '</TD>';
	document.write(ctext);
	ctext = '</TR>';
	document.write(ctext);
	ctext = '<TR>';
	document.write(ctext);
	ctext = '<TD COLSPAN="3">';
	document.write(ctext);

	ctext = "<HR>";
	document.write(ctext);
	ctext = "<FONT size=+2 color=black><B><CENTER>";
	document.write(ctext);
	if (ThisTitle.indexOf("/")==-1) {
	ctext = ThisNumber + " <I>" + ThisTitle + "</I>";
	}
	else {
	ctext = ThisNumber + " <I>" + ThisTitle.substring(0,ThisTitle.indexOf("/")-1);
	ctext2 = "<BR>" + ThisTitle.substring(ThisTitle.indexOf("/"),ThisTitle.length) + "</I>";
	ctext = ctext + ctext2;
	}
	if (ctext.indexOf("|")!=-1) {
	ctext = ctext.substring(0,ctext.indexOf("|")) + "/" + ctext.substring(ctext.indexOf("|")+1,ctext.length);
	}
	document.write(ctext);
	ctext = "</CENTER></B></FONT>";
	document.write(ctext);
	ctext = "<HR>";
	document.write(ctext);

	// Display the desired Image

	if (HaveImage.substring(0,3)=="YES")
	{
	HaveLG = "YES"
	HaveXL = "NO"
	if (HaveImage.indexOf("/") > 0) {
	HaveXL = HaveImage.substring(HaveImage.indexOf("/")+1,HaveImage.length);
	if (HaveXL.indexOf("/") > 0) {
	HaveLG = HaveXL.substring(HaveXL.indexOf("/")+1,HaveXL.length);
	HaveXL = HaveXL.substring(0,HaveXL.indexOf("/"));
	}
	}
	if (!(Size.substring(5,7)=="ee")) {
	HaveXL = "NO";
	} 
	ctext = "<CENTER>";
	document.write(ctext);

	altXlarg = 'Extra Large Picture of a '
	altLarge = 'Large Picture of a '
	altSmall = 'Small Picture of a '
	if (Lang=="sp") {
	altXlarg = 'Foto muy grande de un '
	altLarge = 'Foto grande de un '
	altSmall = 'Foto pequeño de un '
	}

	RealSize = Size.substring(0,5)
	if ((RealSize=="XLarg")  && (HaveXL=="YES")) {
	ctext='<img src="' + ThisURL + '-xl.jpg" name="picture" class="noborder" border="0" alt="' + altXlarg + ThisNumber + '">';
	}
	else if ((RealSize=="Small") || (HaveLG=="NO")) {
	ctext='<img src="' + ThisURL + '.jpg" name="picture" class="noborder" border="0" alt="' + altSmall + ThisNumber + '">';
	}
	else {
	ctext='<img src="' + ThisURL + '-big.jpg" name="picture" class="noborder" border="0" alt="' + altLarge + ThisNumber + '">';
	}
	document.write(ctext);
	ctext="</CENTER>";
	document.write(ctext);

	ctext="<CENTER>";
	document.write(ctext);
	ctext='<TABLE cellspacing="0" cellpadding="0">';
	document.write(ctext);
	ctext="<TR>";
	document.write(ctext);
	ctext='<TD valign="middle">';
	document.write(ctext);

	SmallGray = Catsmall + '.jpg';
	SmallBlue = Catsmall + '-Blue.jpg'; 
	SmallYellow = Catsmall + '-Yellow.jpg';
	if (Lang=="sp") {
	SmallGray = Catsmall + '-sp.jpg';
	SmallBlue = Catsmall + '-Blue-sp.jpg'; 
	SmallYellow = Catsmall + '-Yellow-sp.jpg';
	}

	if ((RealSize=="Small") || (HaveLG=="NO")) {
		ctext='<IMG name="SmallButton" SRC="' + SmallBlue + '" HEIGHT="30" WIDTH="102" onClick="'+"SizePicture('Small')"+'">';
		}
	else {
		ctext='<IMG name="SmallButton" SRC="' + SmallGray + '" HEIGHT="30" WIDTH="102" onClick="'+"SizePicture('Small')"+'" ';
		ctext2="onMouseOver='document.SmallButton.src=" + '"' + SmallYellow + '";' + "' ";
		ctext3="onMouseOut='document.SmallButton.src=" + '"' + SmallGray + '";' + "' ";
		ctext = ctext + ctext2 + ctext3 + ">";
	}

	document.write(ctext);
	ctext="</TD>";
	document.write(ctext);

	XlargGray = Catxlarg + '.jpg';
	XlargBlue = Catxlarg + '-Blue.jpg'; 
	XlargYellow = Catxlarg + '-Yellow.jpg';
	if (Lang=="sp") {
	XlargGray = Catxlarg + '-sp.jpg';
	XlargBlue = Catxlarg + '-Blue-sp.jpg'; 
	XlargYellow = Catxlarg + '-Yellw-sp.jpg';
	}

	ctext='<TD valign="middle">';
	document.write(ctext);
	if (HaveXL=="YES") {
		if (RealSize=="XLarg") {
			ctext='<IMG name="MiddleButton" SRC="' + XlargBlue + '" HEIGHT="30" WIDTH="104" onClick="'+"SizePicture('XLarg')"+'">';
		} else {
			ctext='<IMG name="MiddleButton" SRC="' + XlargGray + '" HEIGHT="30" WIDTH="104" onClick="'+"SizePicture('XLarg')"+'" ';
			ctext2="onMouseOver='document.MiddleButton.src=" + '"' + XlargYellow + '";' + "' ";
			ctext3="onMouseOut='document.MiddleButton.src=" + '"' + XlargGray + '";' + "' ";
			ctext = ctext + ctext2 + ctext3 + ">";
		}}
	else {
		ctext = '<IMG SRC="' + HomeDir + 'general/Bar-Middle-Plain.jpg" HEIGHT="30" WIDTH="88">';
	}

	document.write(ctext);
	ctext="</TD>";
	document.write(ctext);

	LargeGray = Catlarge + '.jpg';
	LargeBlue = Catlarge + '-Blue.jpg';
	LargeYellow = Catlarge + '-Yellow.jpg';
	if (Lang=="sp") {
	LargeGray = Catlarge + '-sp.jpg';
	LargeBlue = Catlarge + '-Blue-sp.jpg';
	LargeYellow = Catlarge + '-Yellow-sp.jpg';
	}

	ctext='<TD valign="middle">';
	document.write(ctext);

	if (HaveLG=="NO") {
		ctext = '<IMG SRC="' + HomeRef + 'general/Bar-Middle-Plain.jpg" HEIGHT="30" WIDTH="88">';
		ctext += '<IMG SRC="' + HomeRef + 'general/Bar-End.jpg" HEIGHT="30" WIDTH="16">';
	}
	else {
	if ((RealSize=="Large") || ((RealSize=="XLarg") && (HaveXL=="NO"))) {
		ctext='<IMG name="LargeButton" SRC="' + LargeBlue + '" HEIGHT="30" WIDTH="104" onClick="'+"SizePicture('Large')"+'">';
	} else {
		ctext='<IMG name="LargeButton" SRC="' + LargeGray + '" HEIGHT="30" WIDTH="104" onClick="'+"SizePicture('Large')"+'" ';
		ctext2="onMouseOver='document.LargeButton.src=" + '"' + LargeYellow + '";' + "' ";
		ctext3="onMouseOut='document.LargeButton.src=" + '"' + LargeGray + '";' + "' ";
		ctext = ctext + ctext2 + ctext3 + ">";
	}}

	document.write(ctext);
	ctext="</TD>";
	document.write(ctext);
	ctext="</TABLE>";
	document.write(ctext);
	ctext="</CENTER>";
	document.write(ctext);
	}

