function newpage(image,title) {
	document.write('<body background="../images/smokey.jpg">');
	document.write('<center><table width="80%"><tr><td align="center">');
	document.write('<a href="javascript:history.go(-1)"><img src="../images/' + image + '" alt="' + title);
	document.write(' - click on the photo to return" ALIGN="CENTER"></a></td></tr><tr><td align="center"><br>');
	document.write('<font face="Arial,sans-serif" size="2" color="#003300">');
	document.write('Click on the photo to return</font></td></tr></table></body>');
}

function photo(image,code,title) {
	document.write('<table cellspacing=0 cellpadding=3><tr><td colspan=3 class="title">' + title + '</td></tr>');
	document.write('<tr><td width=120 rowspan=3 align=center><a href="javascript:newpage(');
	document.write("'" + image + ".jpg','" + title + "')");
	document.write(';"><img src="../thumbs/' + image + '.jpg" alt="' + title +'" ');
	document.write('border="2" align="left" width="100" height="75"></a></td>');
   document.write('<td class="desc">Code: ' + code + '</td></tr>');
   document.write('<tr><td class="desc">');
}

function nophoto(dummy,code,title) {
	document.write('<br><table cellspacing=0 cellpadding=3><tr><td colspan=3 class="title">' + title + '</td></tr>');
	document.write('<tr><td width=120 rowspan=3 align=center>');
	document.write('<img src="../thumbs/nopix.jpg" width="100" height="75" border="0" align="left"></td>');
   document.write('<td class="desc">Code: ' + code + '</td></tr>');
   document.write('<tr><td class="desc">');
}

function gif(code,title) {
	document.write('<br><table cellspacing=0 cellpadding=3><tr><td colspan=3><font size="4" color="#333333">' + title + '</font></td></tr>');
	document.write('<tr><td width=120 rowspan=3 align=center>');
	document.write('<img src="../images/' + code + '.gif" width="100" border="0" align="left"></td>');
   document.write('<td class="desc">Code: ' + code + '</td></tr>');
   document.write('<tr><td class="desc">');
}

function set(code,title) {
	document.write('<br><table cellspacing=0 cellpadding=3><tr><td colspan=3><font size="4" color="#333333">' + title + '</font></td></tr>');
	document.write('<tr><td width=120 rowspan=3 align=center>');
	document.write('<img src="../images/set.gif" width="53" border="0"></td>');
   document.write('<td class="desc">Code: ' + code + '</td></tr>');
   document.write('<tr><td class="desc">');
}

function pack3(code,title) {
	document.write('<table width="95%" bordercolor="#ff0000" border="1"><tr><td>');
	document.write('<table cellspacing=0 cellpadding=3><tr><td width=120 rowspan=3 align=center>');
	document.write('<img src="../images/3pack.gif" width="87" height="33" border="0"></td>');
   document.write('<td width=100 class="desc">Code:</td><td class="code">' + code + '</td></tr>');
   document.write('<tr><td width=100 class="desc">Description:</td><td class="desc">Three of the above castings');
}

function cart(code,title,price,opt) {
	document.write('</td></tr>');
	document.write('<tr><td class="desc">No. required: ');
	document.write('<INPUT TYPE="TEXT" NAME="' + code + 'quant" VALUE="1" SIZE="3">');
	document.write('<font size=2> @ $' + price + ' ea.</font> ');
	document.write('<INPUT NAME="' + code + 'option" TYPE="HIDDEN" VALUE="' + opt + '">');
	document.write('<INPUT TYPE="BUTTON" NAME="' + code + 'add" VALUE="Add" ONCLICK="top.menu.buyItem(');
	document.write("'" + code + ": " + title + "','" + price + "',document.itemsform." + code);
	document.write("quant.value,document.itemsform." + code + "option.value)");
	document.write('"></td></tr></table><br><br>');
}

function cartopt(code,title,price,opt) {
	document.write('<br>Choose: <INPUT NAME="' + code + 'option" TYPE="TEXT" WIDTH="30" SIZE="30" VALUE="Enter your choice here">');
	document.write('</td></tr>');
	document.write('<tr><td width=100 class="desc">No. required:</td><td class="desc">');
	document.write('<INPUT TYPE="TEXT" NAME="' + code + 'quant" VALUE="1" SIZE="3">');
	document.write('<font size=2> @ $' + price + ' ea.</font> ');
	document.write('<INPUT TYPE="BUTTON" NAME="' + code + 'add" VALUE="Add" ONCLICK="top.menu.buyItem(');
	document.write("'" + code + ": " + title + "','" + price + "',document.itemsform." + code);
	document.write("quant.value,document.itemsform." + code + "option.value)");
	document.write('"></td></tr></table><br><br>');
}

function navmenu(no,last) {
	document.write('<font size="1">');
	if(no==1) {
	document.write(' [<a href="index.htm">Scale index</a>] ');
	}
	if(no>1) {
	document.write(' [<a href="index',no-1,'.htm">Previous category</a>]');
	}
	if(last>0) {
	document.write(' [<a href="index',no+1,'.htm">Next category</a>]');
	}
	document.write('</font>');
}

function home() {
	document.write('<div align=right><font size="1">');
	document.write(' [<a href="index.htm">Home</a>] ');
	document.write('</font></div>');
}
