//auto generates by the storecreator and templates
var storeName='<font size="-1" face="arial, verdana">Medallions Unlimited';
var mainPage='intro.html';
var totalItems=75;
var ir = new Array(totalItems);
var mAlignStr='<Center>';
A(0, 'BY01', '1 Year', 1.00, 'Years 1 - 55&nbsp;');
A(1, 'BY02', '2 Year', 1.00, 'Years 1 - 55&nbsp;');
A(2, 'AD24', '24 Hour Desire Chip', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(3, 'BD24', '24 Hours Desire Chip', 1.00, 'Bronze Desire, Month Chips&nbsp;');
A(4, 'BY03', '3 Year', 1.00, 'Years 1 - 55&nbsp;');
A(5, 'BY04', '4 Year', 1.00, 'Years 1 - 55&nbsp;');
A(6, 'BY05', '5 Year', 1.00, 'Years 1 - 55&nbsp;');
A(7, 'BY06', '6 Year', 1.00, 'Years 1 - 55&nbsp;');
A(8, 'BY07', '7 Year', 1.00, 'Years 1 - 55&nbsp;');
A(9, 'BY08', '8 Year', 1.00, 'Years 1 - 55&nbsp;');
A(10, 'BY09', '9 Year', 1.00, 'Years 1 - 55&nbsp;');
A(11, 'AD1D', '1 Day At A Time Desire Chip', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(12, 'BY10', '10 Year', 1.00, 'Years 1 - 55&nbsp;');
A(13, 'BM01', 'One Month', 1.00, 'Bronze Desire, Month Chips&nbsp;');
A(14, 'AM01', '1 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(15, 'BY11', '11 Year', 1.00, 'Years 1 - 55&nbsp;');
A(16, 'BM02', 'Two Month', 1.00, 'Bronze Desire, Month Chips&nbsp;');
A(17, 'AM02', '2 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(18, 'BM03', 'Three Month', 1.00, 'Bronze Desire, Month Chips&nbsp;');
A(19, 'AM03', '3 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(20, 'BM06', 'Six Month', 1.00, 'Bronze Desire, Month Chips&nbsp;');
A(21, 'AM04', '4 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(22, 'BM09', 'Nine Month', 1.00, 'Bronze Desire, Month Chips&nbsp;');
A(23, 'BM18', '18 Month', 1.00, 'Bronze Desire, Month Chips&nbsp;');
A(24, 'AM05', '5 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(25, 'AM06', '6 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(26, 'AM07', '7 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(27, 'AM08', '8 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(28, 'AM09', '9 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(29, 'AM10', '10 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(30, 'AM11', '11 Month', 0.75, 'Aluminum Desire, Month Chips&nbsp;');
A(31, 'BY12', '12 Year', 1.00, 'Years 1 - 55&nbsp;');
A(32, 'BY13', '13 Year', 1.00, 'Years 1 - 55&nbsp;');
A(33, 'BY14', '14 Year', 1.00, 'Years 1 - 55&nbsp;');
A(34, 'BY15', '15 Year', 1.00, 'Years 1 - 55&nbsp;');
A(35, 'BY16', '16 Year', 1.00, 'Years 1 - 55&nbsp;');
A(36, 'BY17', '17 Year', 1.00, 'Years 1 - 55&nbsp;');
A(37, 'BY18', '18 Year', 1.00, 'Years 1 - 55&nbsp;');
A(38, 'BY19', '19 Year', 1.00, 'Years 1 - 55&nbsp;');
A(39, 'BY20', '20 Year', 1.00, 'Years 1 - 55&nbsp;');
A(40, 'BY21', '21 Year', 1.00, 'Years 1 - 55&nbsp;');
A(41, 'BY22', '22 Year', 1.00, 'Years 1 - 55&nbsp;');
A(42, 'BY23', '23 Year', 1.00, 'Years 1 - 55&nbsp;');
A(43, 'BY24', '24 Year', 1.00, 'Years 1 - 55&nbsp;');
A(44, 'BY25', '25 Year', 1.00, 'Years 1 - 55&nbsp;');
A(45, 'BY26', '26 Year', 1.00, 'Years 1 - 55&nbsp;');
A(46, 'BY27', '27 Year', 1.00, 'Years 1 - 55&nbsp;');
A(47, 'BY28', '28 Year', 1.00, 'Years 1 - 55&nbsp;');
A(48, 'BY29', '29 Year', 1.00, 'Years 1 - 55&nbsp;');
A(49, 'BY30', '30 Year', 1.00, 'Years 1 - 55&nbsp;');
A(50, 'BY31', '31 Year', 1.00, 'Years 1 - 55&nbsp;');
A(51, 'BY32', '32 Year', 1.00, 'Years 1 - 55&nbsp;');
A(52, 'BY33', '33 Year', 1.00, 'Years 1 - 55&nbsp;');
A(53, 'BY34', '34 Year', 1.00, 'Years 1 - 55&nbsp;');
A(54, 'BY35', '35 Year', 1.00, 'Years 1 - 55&nbsp;');
A(55, 'BY36', '36 Year', 1.00, 'Years 1 - 55&nbsp;');
A(56, 'BY37', '37 Year', 1.00, 'Years 1 - 55&nbsp;');
A(57, 'BY38', '38 Year', 1.00, 'Years 1 - 55&nbsp;');
A(58, 'BY39', '39 Year', 1.00, 'Years 1 - 55&nbsp;');
A(59, 'BY40', '40 Year', 1.00, 'Years 1 - 55&nbsp;');
A(60, 'BY41', '41 Year', 1.00, 'Years 1 - 55&nbsp;');
A(61, 'BY42', '42 Year', 1.00, 'Years 1 - 55&nbsp;');
A(62, 'BY43', '43 Year', 1.00, 'Years 1 - 55&nbsp;');
A(63, 'BY44', '44 Year', 1.00, 'Years 1 - 55&nbsp;');
A(64, 'BY45', '45 Year', 1.00, 'Years 1 - 55&nbsp;');
A(65, 'BY46', '46 Year', 1.00, 'Years 1 - 55&nbsp;');
A(66, 'BY47', '47 Year', 1.00, 'Years 1 - 55&nbsp;');
A(67, 'BY48', '48 Year', 1.00, 'Years 1 - 55&nbsp;');
A(68, 'BY49', '49 Year', 1.00, 'Years 1 - 55&nbsp;');
A(69, 'BY50', '50 Year', 1.00, 'Years 1 - 55&nbsp;');
A(70, 'BY51', '51 Year', 1.00, 'Years 1 - 55&nbsp;');
A(71, 'BY52', '52 Year', 1.00, 'Years 1 - 55&nbsp;');
A(72, 'BY53', '53 Year', 1.00, 'Years 1 - 55&nbsp;');
A(73, 'BY54', '54 Year', 1.00, 'Years 1 - 55&nbsp;');
A(74, 'BY55', '55 Year', 1.00, 'Years 1 - 55&nbsp;');
var disFont = "<font face='Arial, Helvetica, sans-serif'>";
var andSearch = 1;
function A(i, id, s, p, c)
{
	ir[i] = new RECORD();
	ir[i].itemID = id; 
	ir[i].catalog=c;
	ir[i].itemName = s; 
	ir[i].price = p;
}

function MakeArray(n) {
      this.length = n;
      for(var i = 0; i < n; i++){
            this[i] = 0;
      }
      return this;
}

function Currency(money)
{
	money =  parseFloat(money);
	money += 0.005;
	money +=  "";           
	var monLen = money.length;
	var digPos = money.indexOf(".");
	if(digPos == -1) {
		if (money <=0) {
			money ="0.00";
		} else {
			money += ".00";
		}
		return money;
	} else {
		if (digPos + 3 > monLen) {
			money += "0";
		} else if (digPos + 3 != monLen) {
			money = money.substring(0, digPos+3);
		} 
		return money;
	}     
}
function RECORD()
{
	this.itemID = 0;
	this.itemName="";
	this.price=0;
	this.match=0;
	this.catalog="";
	return this;
}



function CompareMatch(a, b) {
   return a.match < b.match;
}

function Search()
{
	Search_Start(parent.frames["cart"].document.forms[0]);
}

function NewSearch(theForm)
{
	Search_Start(theForm);
}


function Search_Start(theForm)
{
	var searchStr = theForm.keywords.value;
     searchStr=searchStr.toLowerCase();
	var space = " ";
	var searchWords = searchStr.split(space);

	searchWords.sort();
	var searchStart =0;

	
	for (var i=0; i < searchWords.length; i++) {
		if (searchWords[i].length == 0) {
			searchStart++;
		} else {
			break;
		}
	}
	var totalSearchWord = searchWords.length - searchStart;
	if (totalSearchWord <= 0) {
		return;
	}
	var totalFound=0;
	var j;

	for (j=0;j<totalItems;j++) {
		var totalMatch=0;
		var str = ir[j].itemName.toLowerCase();
		var sid=ir[j].itemID.toLowerCase();
		var c= ir[j].catalog.toLowerCase();
		for (var i=searchStart; i < searchWords.length; i++) {
			if (str.search(searchWords[i])>=0) totalMatch++; 
			else 
			if (c.search(searchWords[i])>=0) totalMatch++; 
			else 
			if (sid.search(searchWords[i])>=0) totalMatch++; 
		}
		if (andSearch) {
			if (totalMatch != searchWords.length - searchStart) {
				totalMatch=0;
			}
		} 
		if (totalMatch>0) totalFound++;
		ir[j].match=totalMatch;
	}
	ir.sort(CompareMatch);
	
	var cWin=parent.frames["shop"].document;
	
	cWin.open();
	cWin.write("<HTML><HEAD><TITLE> Zilron StoreCreator v5.x Shopping Cart Viewer</TITLE></HEAD>");
	cWin.write("<BODY BACKGROUND='"+parent.mCartBGImage+"' Text='"+parent.mCartText+"' BGCOLOR='"+parent.mCartBGColor+"' LINK='"+parent.mCartALink+"' VLINK='"+parent.mCartLink+"'  ALINK='"+parent.mCartALink+"' valign=top>");
	cWin.write(" "+mAlignStr+"<TABLE width=600 border=1 CELLSPACING=0 CELLPADDING=0>");
	cWin.write("<tr><td width=600 bgcolor=#666699 height=24><p align='center'><big><font color=#FFFFFF size=6><strong>"+disFont+parent.storeName+"</strong></font></big></td></tr>");
	cWin.write("<tr><td width=600 bgcolor=#ffffff><font color=#333333 size=2>"+disFont+"<strong>Contact Address:</strong><BLOCKQUOTE><font color=#333333 size=2>"+disFont+parent.storeContactAddress+"</font></td></tr>");
	cWin.write("<tr><td width=600 bgcolor=#666699><center><Strong><font color=#ffffff>"+disFont+"Search results are as shown in the following table:["+totalFound+"]</td></tr>");
	cWin.write("<tr><td width=600>");
	cWin.write("<TABLE width=600 border=2 CELLSPACING=0 CELLPADDING=0>");
	cWin.write("<tr bgcolor='"+parent.mCartTableHeaderBGColor+"'><td width=10%><b><strong><font size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>Match#</center></td><td width=10%><b><strong><font size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>ItemID</center></td><td width=50%><b><strong><font size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>Item Name</center></td><td width=10%><b><strong><font size=2 color='"+parent.mCartTableHeaderColor+"'>"+disFont+"<center>Price</center></td></tr>");
	for (j=0;j<ir.length;j++) {
		if (ir[j].match>0) {
			cWin.write("<tr bgcolor='"+parent.mCartTableBodyBGColor+"'><td valign=top><font size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<strong><center>"+ir[j].match+"</strong></td><td valign=top><font size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<strong><center>"+ir[j].itemID+"</strong></td><td valign=top><font size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<strong><center><a href='item"+ir[j].itemID.toLowerCase()+".html'  target=shop>"+ir[j].itemName+"</a></strong></td><td align=right><font size=2 color='"+parent.mCartTableBodyColor+"'>"+disFont+"<strong><right>"+Currency(ir[j].price)+"</strong></td></tr>");
		}
	}
	cWin.write("</table></td></tr></table></body></html>");
	cWin.close();	
}


function PrintSearchPage()
{
	var cWin=parent.frames["shop"].document;
	cWin.open();
	cWin.write("<HTML><HEAD><TITLE> Zilron StoreCreator v5.x Shopping Cart Viewer</TITLE></HEAD>");
	cWin.write("<BODY Text=#000000 BGCOLOR=#ffffff LINK=#ff0000 VLINK=#ff0000 alink=#222222 valign=top OnLoad='document.forms[0].elements[0].focus()'>");
	cWin.write("<table border=0> <tr><td><a href='"+mainPage+"'>"+disFont+"<Strong>Main Page</strong></a></td><td>"+disFont+"<a href='"+parent.returnHtmlPath+"'><Strong>Back</strong></a></td></tr></table><hr size=1 width=50%>");
	cWin.write("<input type=button size=40 value='Submit' onClick='parent.frames[\"cart\"].Search()'>");
	cWin.write("</form></td></tr></table>");
	cWin.write("</body></html>");
	cWin.close();	
}


//===============================================================================================================================================
// Last Upgrade: 11 June 2001
//===============================================================================================================================================