//auto generates by the storecreator and templates
var storeName='Edietz.com';
var mainPage='intro.html';
var totalItems=41;
var ir = new Array(totalItems);
var mAlignStr='<Center>';
A(0, '12000016', 'a001)  Personal Diet Consultation Support Service (per month)', 17.95, 'Herbal and Related Products');
A(1, '12000014', 'a101)  Diet Carb Shredder ', 34.87, 'Herbal and Related Products');
A(2, '12000005', 'a102)  Diet Fat Burner 60 Tablets ', 23.65, 'Herbal and Related Products');
A(3, '12000015', 'a103)  Diet Fat Transporter (Fat Metabolizer) 60 Tablets', 21.96, 'Herbal and Related Products');
A(4, '12000002', 'a104)  Diet Herbal (120 Tablets)', 23.95, 'Herbal and Related Products');
A(5, '12000004', 'a105)  Diet Herbal (60 Tablets)', 17.99, 'Herbal and Related Products');
A(6, '12000003', 'a106)  Diet Herbal Product 120 tablets', 23.95, 'Herbal and Related Products');
A(7, '12000011', 'q001)    Creatine (7 ounces)', 11.95, 'Herbal and Related Products');
A(8, '12000028', 'q002)    Echinacea 2oz. liquid', 17.95, 'Herbal and Related Products');
A(9, '12000021', 'q003) Energy Boost - AeroMax™HP - 90 Tablets', 21.95, 'Herbal and Related Products');
A(10, '12000008', 'q004)  Ginko Biloba (60 tablets)', 17.95, 'Herbal and Related Products');
A(11, '12000006', 'q004)  Ginko Biloba Extract 60 tablets', 17.35, 'Herbal and Related Products');
A(12, '12000022', 'q005)  Ginsing - 100 Tablets ', 17.76, 'Herbal and Related Products');
A(13, '12000030', 'q006)  Green Tea Natural - Laci Le Beau Tea 30 bags', 5.97, 'Herbal and Related Products');
A(14, '12000023', 'q007) Gren Tea Extract (100 Tablets)', 19.95, 'Herbal and Related Products');
A(15, '12000026', 'q008)  Herbal Colon Clenz - 120 Tablets', 21.95, 'Herbal and Related Products');
A(16, '12000047', 'q020)  MSM Now ', 12.99, 'Herbal and Related Products');
A(17, '12000037', 'q030) Mushrooms Maitake - 100 Tablets', 24.35, 'Herbal and Related Products');
A(18, '12000040', 'q031)  Mushrooms REISHI - 100 Tablets', 24.95, 'Herbal and Related Products');
A(19, '12000039', 'q033) MUSHROOMS SHITAKE  - 100 Tablets', 24.95, 'Herbal and Related Products');
A(20, '12000007', 'q201)  Sexual Enhancer For Men 60 tablets', 19.95, 'Herbal and Related Products');
A(21, '12000012', 'q202)  Sexual Enhancer for Woman (60 Tablets)', 19.95, 'Herbal and Related Products');
A(22, '12000013', 'q250)  Sleep Aid a Herbal Product  (120 tablets)', 19.95, 'Herbal and Related Products');
A(23, '12000010', 'q279)  St. Johns Wort Anti-Depressant (60 Capsules)', 16.66, 'Herbal and Related Products');
A(24, '12000025', 'q314)  The Natural Immune Complex', 65.89, 'Herbal and Related Products');
A(25, '12000024', 'q355)  Ultimate MultiPlus', 32.67, 'Herbal and Related Products');
A(26, '12000029', 'x100) Food - Eating the Proper Fats Can Help Make You Healthy  ', 17.95, 'Herbal and Related Products');
A(27, '12000027', 'x101) Food - Rice Protein 21 oz.', 23.95, 'Herbal and Related Products');
A(28, '12000019', 'x102) Food - Soy Baking Mix', 19.95, 'Herbal and Related Products');
A(29, '12000018', 'x103) Food - Soy Protein Concentrate 16 oz.', 12.95, 'Herbal and Related Products');
A(30, '12000020', 'x104) Food - Whey Protein Mix - 5 lbs', 39.95, 'Herbal and Related Products');
A(31, '12000045', 'z001)  Hypnotic Tape - Self Hypnonsis - Stop Smoking', 19.95, 'Herbal and Related Products');
A(32, '12000046', 'z002)  Hypnotic Tape - Self Hypnosis - Energy & Motivation', 19.95, 'Herbal and Related Products');
A(33, '12000041', 'z003)  Hypnotic Tape - Self-Hypnosis Lose Weight Tape', 19.95, 'Herbal and Related Products');
A(34, '12000043', 'z004) Hypnotic Tape - Self Hypnosis -  Develop Self Confidence', 19.95, 'Herbal and Related Products');
A(35, '12000044', 'z005)  Hypnotic Tape - Self Hypnosis - Heal Your Body', 19.95, 'Herbal and Related Products');
A(36, '12000032', 'z201)  Book - A-Z Guide to Supplements', 15.95, 'Herbal and Related Products');
A(37, '12000035', 'z203)  Book - Cook Right 4 Your Type', 15.95, 'Herbal and Related Products');
A(38, '12000033', 'z206)  Book - NONI Nature`s Amazing Healer', 15.95, 'Herbal and Related Products');
A(39, '12000031', 'z207) Book - THE CARBOHYDRATE ADDICT`S DIET', 15.95, 'Herbal and Related Products');
A(40, '12000036', 'z208) Book - The Ultimate Nutrient Glutamine', 15.95, 'Herbal and Related Products');
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 (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 v3.0 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>"+parent.storeName+"</strong></font></big></td></tr>");
	cWin.write("<tr><td width=600 bgcolor=#ffffff><font color=#333333 size=2><strong>Contact Address:</strong><BLOCKQUOTE><font color=#333333 size=2>"+parent.storeContactAddress+"</font></td></tr>");
	cWin.write("<tr><td width=600 bgcolor=#666699><center><Strong><font color=#ffffff>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+"'><center>Match#</center></td><td width=10%><b><strong><font size=2 color='"+parent.mCartTableHeaderColor+"'><center>ItemID</center></td><td width=50%><b><strong><font size=2 color='"+parent.mCartTableHeaderColor+"'><center>Item Name</center></td><td width=10%><b><strong><font size=2 color='"+parent.mCartTableHeaderColor+"'><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+"'><strong><center>"+ir[j].match+"</strong></td><td valign=top><font size=2 color='"+parent.mCartTableBodyColor+"'><strong><center>"+ir[j].itemID+"</strong></td><td valign=top><font size=2 color='"+parent.mCartTableBodyColor+"'><strong><center><a href='item"+ir[j].itemID+".html'  target=shop>"+ir[j].itemName+"</a></strong></td><td align=right><font size=2 color='"+parent.mCartTableBodyColor+"'><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 v3.0 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+"'><Strong>Main Page</strong></a></td><td><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();	
}