//auto generates by the storecreator and templates
var storeName='MothersDayGift.net';
var mainPage='intro.html';
var totalItems=24;
var ir = new Array(totalItems);
var mAlignStr='<Center>';
A(0, 'P-TOP-B10K', 'Blue Topaz Pendant and Chain ', 75.00, '<i>Natural Gemstone Pendants </i>');
A(1, 'N-MULTI', 'Multi-stone Gem Necklace ', 50.00, '<i>Pearl and Gemstone Necklaces </i>');
A(2, 'C-PER-2CT', 'Peridot Pendant Cross and Chain ', 100.00, '<i>Natural Gemstone Crosses </i>');
A(3, 'N-P-16', 'Genuine Teardrop Pearl Necklace  ', 90.00, '<i>Pearl and Gemstone Necklaces </i>');
A(4, '122', 'Horizontal Frame ', 19.95, '<i>Memory Maker Photo Bracelets </i>');
A(5, 'C-CIT-2CT', 'Natural Citrine Gemstone Cross Pendant and Chain', 160.00, '<i>Natural Gemstone Crosses </i>');
A(6, 'B-TOP-PNK', 'Pink Topaz Bracelet in Solid Gold ', 220.00, '<i>Natural Gemstone Bracelets </i> ');
A(7, 'E-RUB-6MM', 'Red Ruby and Gold Lever-back Earrings ', 55.00, '<i>Natural Gemstone Earrings </i>');
A(8, 'R-YEMD-3.7', 'Yellow Emerald  and Aquamarine Fashion Ring ', 280.00, '<i>Natural Gemstone Rings </i>Size6 7 8 ');
A(9, 'E-TOP5MM', 'Genuine Natural Topaz Earrings ', 40.00, '<i>Natural Gemstone Earrings </i>Specify colorBlue Topaz Deep Yellow Topaz Light Yellow Topaz Mystic Rainbow Topaz ');
A(10, 'B-MULTI', 'Multi-stone Gem Bracelet ', 22.00, '<i>Natural Gemstone Bracelets </i> ');
A(11, 'P-PER-5MM', 'Single Stone Peridot Pendant and Chain ', 45.00, '<i>Natural Gemstone Pendants </i>');
A(12, 'R-TAN-1.5', 'Tanzanite and Yellow Gold Fashion Ring ', 180.00, '<i>Natural Gemstone Rings </i>Size6 7 ');
A(13, 'E-ALX-8X6', 'Alexandrite Earrings Lab-created 14 kt. Gold', 65.00, '<i>Natural Gemstone Earrings </i>');
A(14, 'R-IOL-4CT', 'Natural Iolite Floral Ring ', 260.00, '<i>Natural Gemstone Rings </i>Size6 7 8 ');
A(15, '222', 'Square Frame ', 19.95, '<i>Memory Maker Photo Bracelets </i>');
A(16, 'C-ZIR', 'Zircon and Gold Miniature Cross with Chain', 58.00, '<i>Natural Gemstone Crosses </i>');
A(17, 'C-SAP', 'Natural Sapphire and Gold Cross with Chain ', 120.00, '<i>Natural Gemstone Crosses </i>');
A(18, '322', 'Vertical Frame ', 19.95, '<i>Memory Maker Photo Bracelets </i>');
A(19, 'P-PADR-6R', 'Padparadscha Sapphire Pendant and Chain', 50.00, '<i>Natural Gemstone Pendants </i>');
A(20, 'C-RUB', 'Natural Ruby and Solid Gold Cross and Chain ', 150.00, '<i>Natural Gemstone Crosses </i>');
A(21, 'R-ALX-1.14CT', 'Alexandrite Marquis Ring ', 120.00, '<i>Natural Gemstone Rings </i>Size7 only (can be sized) ');
A(22, 'C-TOP-B', 'Blue Topaz Cross Pendant and Chain ', 80.00, '<i>Natural Gemstone Crosses </i>');
A(23, 'P-CHD-6X4', 'Natural Green Chrome Diopside Pendant and Chain ', 40.00, '<i>Natural Gemstone Pendants </i>');
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
//===============================================================================================================================================
