today = new Date();
thisYear = today.getFullYear();

document.write("<BASE href='http://imsauthentics.com/imsc/index.html'>");
document.write("<LINK rel='stylesheet' href='shared/retail.css'>");

function head(site){
	if(site == "") site = "ims";
	if(site == "ims"){
		bgclr1 = "#D5CCBB";
		bgclr2 = "#BAAB8F";
		}
	else if(site == "irl"){
		bgclr1 = "#999966";
		bgclr2 = "#B9B997";
		}
	else if(site == "500"){
		bgclr1 = "#CDB865";
		bgclr2 = "#E2D7A7";
		}
	else if(site == "usgp"){
		bgclr1 = "#A9D8E9";
		bgclr2 = "#7CC4DE";
		}
	else if(site == "400"){
		bgclr1 = "#FFFF99";
		bgclr2 = "#FFFFCC";
		}
	else if(site == "byc"){
		bgclr1 = "#007448";
		bgclr2 = "#7DA887";
		}
	else{
		bgclr1 = "#D5CCBB";
		bgclr2 = "#BAAB8F";
		}
		
	path = location.pathname;
	if(path.indexOf("caps") > 0) store_location = "caps/";
	else if(path.indexOf("apparel") > 0) store_location = "apparel/";
	else if(path.indexOf("collectibles") > 0) store_location = "collectibles/";
	else if(path.indexOf("diecast") > 0) store_location = "diecast/";
	else store_location = "";
		
	imgmap = 	'<MAP name="' + site + 'tabs">';
	if(site != "ims") imgmap += '<AREA shape="rect" coords="11,0,108,29" href="ims/' + store_location + 'index.html">';
	else imgmap += '<AREA shape="rect" coords="11,0,108,29" href="ims/index.html">';
	if(site != "irl") imgmap += '<AREA shape="rect" coords="117,0,214,29" href="irl/' + store_location + 'index.html">';
	else imgmap += '<AREA shape="rect" coords="117,0,214,29" href="irl/index.html">';
	if(site != "500") imgmap += '<AREA shape="rect" coords="222,0,319,29" href="500/' + store_location + 'index.html">';
	else imgmap += '<AREA shape="rect" coords="222,0,319,29" href="500/index.html">';
	if(site != "usgp") imgmap += '<AREA shape="rect" coords="328,0,425,29" href="usgp/' + store_location + 'index.html">';
	else imgmap += '<AREA shape="rect" coords="328,0,425,29" href="usgp/index.html">';
	if(site != "400") imgmap += '<AREA shape="rect" coords="434,0,530,29" href="400/' + store_location + 'index.html">';
	else imgmap += '<AREA shape="rect" coords="434,0,530,29" href="400/index.html">';
	if(site != "byc") imgmap += '<AREA shape="rect" coords="539,0,635,29" href="byc/index.html">';
	else imgmap += '<AREA shape="rect" coords="539,0,635,29" href="byc/index.html">';
	imgmap += '</MAP>';
	
	nav =		'<TABLE width="125" cellspacing="0" cellpadding="5" class="nav" style="background: ' + bgclr2 + '">' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle" class="navcelltop">' +
				'STORES<BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="index.html">Home</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="ims/index.html">Indianapolis Motor Speedway</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="irl/index.html">Indy Racing League</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="500/index.html">Indianapolis 500</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="usgp/index.html">U.S. Grand Prix</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="400/index.html">Brickyard 400</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="byc/index.html">Brickyard Crossing</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="ims/photos/">Photographs</A><BR>' +
				'</TD>' +
				'</TR>' +
				'</TABLE>' +
				'<IMG src="images/shim.gif" width="1" height="7" border="0"><BR>' +
				'<TABLE width="125" cellspacing="0" cellpadding="5" class="nav" style="background: ' + bgclr2 + '">' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle" class="navcelltop">' +
				'INFORMATION<BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="http://order.store.yahoo.com/cgi-bin/wg-order?brickyard">Show Order</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="privacypolicy.html">Privacy Policy</A><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="100%" align="center" valign="middle">' +
				'<A href="contactus.html">Contact Us</A><BR>' +
				'</TD>' +
				'</TR>' +
				'</TABLE>';
				
	content = 	'<TABLE border="0" cellpadding="0" cellspacing="0" width="800">' +
				'<TR>' +
				'<TD align="left" valign="top" width="134">' +
				'<A href="index.html"><img name="header_toplft" src="images/header_toplft.jpg" width="134" height="56" border="0" alt="Brickyard Authentics"></A><BR>' +
				'</TD>' +
				'<TD align="left" valign="top" width="666">' +
				'<img name="header_top" src="images/header_top2.jpg" width="666" height="27" border="0" alt="1-800-955-INDY"><BR>' +
				'<img name="header_tab1" src="images/header' + site + '_tabs2.jpg" width="666" height="29" border="0" alt="" usemap="#' + site + 'tabs"><BR>' +
				'</TD>' +
				'</TR>' +
				'</TABLE>' + 
				'<TABLE border="0" cellpadding="0" cellspacing="0" width="800">' +
				'<TR>' +
				'<TD colspan="4" width="800" align="left" valign="top" style="background: ' + bgclr1 + '">' +
				'<IMG src="images/shim.gif" width="800" height="6" border="0"><BR>' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="134" height="1" align="left" valign="top" style="background: ' + bgclr1 + '">' +
				'<IMG src="images/shim.gif" width="134" height="1" border="0"><BR>' +
				'</TD>' +
				'<TD colspan="2" width="656" height="1" align="left" valign="top" style="background: ' + bgclr2 + '">' +
				'<IMG src="images/shim.gif" width="656" height="1" border="0"><BR>' +
				'</TD>' +
				'<TD style="background: ' + bgclr1 + '">' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD width="134" align="center" valign="top" style="padding-left: 2px; background: ' + bgclr1 + '">' + nav +
				'</TD>' +
				'<TD width="1" style="background: ' + bgclr2 + '">' +
				'<IMG src="images/shim.gif" width="1" border="0"><BR>' +
				'</TD>' +
				'<TD width="655" valign="top" style="background: #FFFFFF">' + 
				'<TABLE width="655" cellspacing="0" cellpadding="0" border="0">' +
				'<TR>' +
				'<TD width="9" height="9" align="left" valign="top">' +
				'<IMG src="images/shadow_corner.gif" width="9" height="9" border="0"><BR>' +
				'</TD>' +
				'<TD width="646" height="9" style="background: url(\'images/shadow_top.gif\') repeat-x">' +
				'</TD>' +
				'</TR>' +
				'<TR>' + 
				'<TD width="9" height="235" style="background: url(\'images/shadow_left.gif\') repeat-y">' +
				'</TD>' +
				'<TD align="left" valign="top" style="padding-bottom: 7px">';
	document.write(imgmap);
	document.write(content);
	}
	
function alt_nav(store, section){
	if(section == "caps"){
		nav_code = '<A href="' + store + '/apparel/">Apparel</A> &middot; <A href="' + store + '/collectibles/">Collectibles</A> &middot; <A href="' + store + '/diecast/">Die-Cast</A>';
		}
	if(section == "apparel"){
		nav_code = '<A href="' + store + '/caps/">Caps</A> &middot; <A href="' + store + '/collectibles/">Collectibles</A> &middot; <A href="' + store + '/diecast/">Die-Cast</A>';
		}
	if(section == "collectibles"){
		nav_code = '<A href="' + store + '/caps/">Caps</A> &middot; <A href="' + store + '/apparel/">Apparel</A> &middot; <A href="' + store + '/diecast/">Die-Cast</A>';
		}
	if(section == "diecast"){
		nav_code = '<A href="' + store + '/caps/">Caps</A> &middot; <A href="' + store + '/apparel/">Apparel</A> &middot; <A href="' + store + '/collectibles/">Collectibles</A>';
		}
	document.write(nav_code);
	}
	
function foot(site){
	if(site == "ims"){
		bgclr = "#D5CCBB";
		fclr = "#000000";
		}
	else if(site == "irl"){
		bgclr = "#999966";
		fclr = "#FFFFFF";
		}
	else if(site == "500"){
		bgclr = "#CDB865";
		fclr = "#000000";
		}
	else if(site == "usgp"){
		bgclr = "#A9D8E9";
		fclr = "#000000";
		}
	else if(site == "400"){
		bgclr = "#FFFF99";
		fclr = "#000000";
		}
	else if(site == "byc"){
		bgclr = "#007448";
		fclr = "#FFFFFF";
		}
	else{
		bgclr = "#D5CCBB";
		fclr = "#000000";
		}
	content =	'</TD>' +
				'</TR>' +
				'</TABLE>' +	
				'</TD>' +
				'<TD width="10" style="background: ' + bgclr + '">' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD colspan="4" style="background: ' + bgclr + '; height: 30px">' +
				'<DIV align="center" class="style2" style="color: ' + fclr + '">' +
				'&copy;' + thisYear + ' IMSC LLC' +
				'</DIV>' +
				'</TD>' +
				'</TR>' +
				'</TABLE>';
	document.write(content);
	}

function foot_cart(){
	content =	'</TD>' +
				'</TR>' +
				'</TABLE>' +	
				'</TD>' +
				'<TD width="10">' +
				'</TD>' +
				'</TR>' +
				'<TR>' +
				'<TD colspan="4" valign="bottom" style="height: 30px">' +
				'<DIV align="center" class="style2" style="color: #000000">' +
				'&copy;' + thisYear + ' IMSC LLC' +
				'</DIV>' +
				'</TD>' +
				'</TR>' +
				'</TABLE>';
	document.write(content);
}
	
divider = 	'<TR>' +
			'<TD colspan="3" align="center" valign="middle">' +
			'<IMG src="images/divider.gif" width="196" height="6" border="0"><IMG src="images/divider.gif" width="196" height="6" border="0"><IMG src="images/divider.gif" width="196" height="6" border="0"><BR>' +
			'<!--<HR noshade color="#CCCCCC" size="1px" width="600px" style="border: dotted">-->' +
			'</TD>' +
			'</TR>';
			
topDivider = '<TR height="20" style="background: url(\'images/top_divider\') repeat-x center left"><TD style="font-size: 20px" colspan="2"></TD></TR>';
			
function viewitem(thisStore,thisType,thisItem){
	picture = "http://imsauthentics.com/imsc/" + thisStore + "/" + thisType + "/large/" + thisItem + ".jpg";
	windowName = thisItem + "";
	photoWin = window.open("",windowName,"width=670,height=570,menubar=no,location=no,resizable=no,scrollbars=yes");
	photoWin.document.write('<HTML><HEAD><TITLE>' + thisStore + ' - ' + thisType + ' - ' + thisItem + '</title></head>');	
	photoWin.document.write('<BODY leftmargin="0" topmargin="0">');
	photoWin.document.write('<TABLE cellSpacing="0" cellPadding="0" width="650" height="650" border="0"><TR><TD width="100% height="100%" align="center" valign="middle">');
	photoWin.document.write('<IMG src="' + picture + '" border="0"><BR>');
	photoWin.document.write('<!--<SPAN style="font-family: verdana; font-size: 10px; font-weight: bold; color: #000000">--><!--#ystore_catalog id="laloslsh" field="caption" --><!--</SPAN><BR>-->');
	photoWin.document.write('</TD></TR><TD align="center" valign="top"><A href="JavaScript: window.close()" style="font-family: verdana; font-size: 11px; font-weight: bold; text-decoration: none">&laquo Close Window &raquo</A><BR>');
	photoWin.document.write('</TD></TR><TABLE></BODY></HTML>');
	photoWin.document.close();
	}

sml_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>S</OPTION><OPTION>M</OPTION><OPTION>L</OPTION></SELECT>';

sm_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>S</OPTION><OPTION>M</OPTION></SELECT>';

smlx_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>S</OPTION><OPTION>M</OPTION><OPTION>L</OPTION><OPTION>XL</OPTION></SELECT>';

mlx_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>M</OPTION><OPTION>L</OPTION><OPTION>XL</OPTION></SELECT>';

lx_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>L</OPTION><OPTION>XL</OPTION></SELECT>';

smx_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>S</OPTION><OPTION>M</OPTION><OPTION>X</OPTION></SELECT>';

xl_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 40px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>2XL</OPTION><OPTION>3XL</OPTION></SELECT>';

youth_dropdown = '<SPAN style="font-weight: bold; color: #666666">Youth Sizes: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>S</OPTION><OPTION>M</OPTION><OPTION>L</OPTION></SELECT>';

infant_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 75px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>3-6mo.</OPTION><OPTION>9-12mo.</OPTION><OPTION>18-24mo.</OPTION></SELECT>';

infant_dropdownb = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 75px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>12mo.</OPTION><OPTION>18mo.</OPTION><OPTION>24mo.</OPTION></SELECT>';

toddler_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 75px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>18-24mo.</OPTION><OPTION>2T-3T</OPTION><OPTION>4T-5T</OPTION></SELECT>';

toddler_dropdownb = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 75px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>2T</OPTION><OPTION>4T</OPTION><OPTION>5T-56T</OPTION></SELECT>';

smlx2x_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 40px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>S</OPTION><OPTION>M</OPTION><OPTION>L</OPTION><OPTION>XL</OPTION><OPTION>2XL</OPTION></SELECT>';

xxl = '<SPAN style="font-weight: bold; color: #666666">Size: 2XL</SPAN><INPUT type="hidden" name="size" value="2XL">';

xxxl = '<SPAN style="font-weight: bold; color: #666666">Size: 3XL</SPAN><INPUT type="hidden" name="size" value="3XL">';

youth = '<SPAN style="font-weight: bold; color: #666666">Size: youth</SPAN><INPUT type="hidden" name="size" value="youth">';

s_dropdown = '<SPAN style="font-weight: bold; color: #666666">Size: </SPAN><SELECT name="size" style="width: 33px; font-size: 10px; font-family: verdana; color: #666666; font-weight: bold"><OPTION>S</OPTION></SELECT>';

sm = '<SPAN style="font-weight: bold; color: #666666">Size: Small</SPAN><INPUT type="hidden" name="size" value="Small">';