//auto generates by the storecreator and templates
var storeName='e-Scopes';
var mainPage='intro.html';
var totalItems=42;
var ir = new Array(totalItems);
var mAlignStr='<Center>';
A(0, 'CGF2', '2-Inch Color Glass Filters', 0.00, 'FILTERS Type 7 Filter Set  Four Filter Set 11 Yellow-Green 12 Yellow 15 Deep Yellow 21 Orange 23A Lt. Red 56 Lt. Green 80A Blue ND-13 Neutral DensityND-25 Neutral Density');
A(1, 'CGF', '1.25-Inch Color Glass Filters', 0.00, 'FILTERS Type 7 Filter Set  Four Filter Set 11 Yellow-Green 12 Yellow 15 Deep Yellow 21 Orange 23A Lt. Red 56 Lt. Green 80A Blue ND-13 Neutral DensityND-25 Neutral Density');
A(2, '125SD90P', '1.25 inch 90 Degree Star Diagonal', 49.95, 'STAR DIAGONALS Select typeMirror Prism ');
A(3, '4.5F8', '4.5 inch F/8 Mirror Set, Primary Mirror, Secondary Mirror', 0.00, 'TELESCOPE MIRRORS Mirror Type4.5 inch f/8 MIRROR SET 4.5 inch f/8 PRIMARY Mirror ONLY SECONDARY Mirror 1.0 inch M.A. ');
A(4, 'SB2X', 'Economical 2X Short Barlow Lens 1.25-inch', 29.95, 'BARLOW LENSES ');
A(5, 'EPP', 'Eyepiece Projection Adaptor', 24.95, 'ASTRO PHOTOGRAPHY ');
A(6, 'TRAD', 'Telrad Reflex Sight with Base', 49.95, 'TELRADS AND ACCESSORIES ');
A(7, '8X50RA', '7 X 50 Right Angle Achromatic Finder Scope', 109.95, 'FINDER SCOPES ');
A(8, 'TRADBASE', 'Extra Telrad Mounting Base', 12.95, 'TELRADS AND ACCESSORIES ');
A(9, 'ALP', 'Light Pollution - Nebular Filters', 0.00, 'FILTERS Size1.25 inch 2.00 inch ');
A(10, 'PFA', 'Prime Focus (Direct Photography) Adaptor', 14.95, 'ASTRO PHOTOGRAPHY ');
A(11, '2TOTM', '2 inch to Male T-thread Camera Adaptor', 29.95, 'ASTRO PHOTOGRAPHY ');
A(12, '125DEI45', '1.25 inch 45 Degree Erect Image Diagonal', 49.95, 'STAR DIAGONALS ');
A(13, '2RP1', '2 inch Low-Profile Rack and Pinion Focuser', 79.95, 'FOCUSERS AND SPIDERS');
A(14, '6F8', '6 inch F/8 Mirror Set, Primary Mirror, Secondary Mirror', 0.00, 'TELESCOPE MIRRORS Mirror Type6 inch f/8 MIRROR SET 6 inch f/8 PRIMARY Mirror ONLY SECONDARY Mirror 1.4 inch M.A. ');
A(15, '8X50EI', '7 X 50 Erect Image Right-Angle Achromatic Finder Scope', 119.95, 'FINDER SCOPES ');
A(16, 'UB2X', 'Short 2X Ultra Barlow Lens', 0.00, 'BARLOW LENSES Size1.25 inch O.965 inch ');
A(17, 'XPOL', 'Variable Polarizing Filter', 34.95, 'FILTERS ');
A(18, '9X50ST', '9 X 50 Straight-Through Achromatic Finder Scope', 69.95, 'FINDER SCOPES ');
A(19, 'ARS', 'Camera Specific Adaptor Rings', 19.95, 'ASTRO PHOTOGRAPHY CameraCanon (all but EOS) Canon EOS Contax, Yashica  (all) Konika (all) Minolta (Autofocus) Minolta (NON-autofocus) Nikon (all) Olympus (all) Pentax K Bayonet Pentax Screw Mount ');
A(20, 'IXP10', 'Illuminated 10mm Double Cross Hair Plossl Eyepiece ', 149.95, 'ASTRO PHOTOGRAPHY ');
A(21, 'IXK12', 'Illuminated Double Cross Hair Kellner Eyepiece ', 124.95, 'ASTRO PHOTOGRAPHY ');
A(22, '126_DEI90', '1.25 inch 90 Degree Erect Image Diagonal ', 54.95, 'STAR DIAGONALS ');
A(23, '6F8KIT', '6 Inch F/8 Odyssey<sup>&reg</sup>Telescope Component Kit', 249.95, 'DOBSONIAN TELESCOPE COMPONENT KITS  KIT TYPEBasic Upgrade w/ SPL & Telrad ');
A(24, '90F11', '90 mm F/11 Guide Scope with Mount Rings', 199.95, 'ASTRO PHOTOGRAPHY  Eyepiece  None 10mm Illum. XX-Hair Plossl 12mm Illum. XX-hair Kellner 27mm No Illum. X-hair Diagonal  None 90 Deg. Erect Image 90 Deg. Mirror 90 Deg. Prism ');
A(25, '2LPHF', 'Low Profile Helical Focuser 2-inch', 59.95, 'FOCUSERS AND SPIDERS');
A(26, 'UB3X', 'Short 3X Ultra Barlow Lens 1.25-inch', 74.95, 'BARLOW LENSES ');
A(27, 'TRADDS', 'Telrad Dew Shield', 16.95, 'TELRADS AND ACCESSORIES ');
A(28, 'TRADDSP', 'Telrad Dew Shield <i>Plus</i>', 29.95, 'TELRADS AND ACCESSORIES ');
A(29, 'NDF125', 'Neutral Density Filters ', 0.00, 'FILTERS  Size1.25 inch 2 inch DensityND13 (less light) ND25 (more light) ');
A(30, 'DTMR', 'Removable "Dovetail" Mounting Rings', 39.95, 'FINDER SCOPES ');
A(31, 'SCT-MT', 'SCT to Male T Thread Adaptor', 29.95, 'ASTRO PHOTOGRAPHY ');
A(32, 'TRADPSR', 'Telrad Pulser', 26.95, 'TELRADS AND ACCESSORIES ');
A(33, 'PLOSSL', '4-Element Multicoated Plossl Eyepieces', 0.00, 'EYEPIECES Focal Length 7.5 mm 10 mm 25 mm ');
A(34, 'TSB2XPHOTO', 'T-thread 1.25 inch 2X Short Barlow Lens for Astro Photos', 34.95, 'ASTRO PHOTOGRAPHY ');
A(35, '10F5', '10 inch f/5 Mirror Set, Primary Mirror, Secondary Mirror', 0.00, 'TELESCOPE MIRRORS Mirror Type10"  f/5 SET w/ 2.3" Secondary 10" f/5 PRIMARY Mirror ONLY 2.3" M.A. Secondary Mirror ONLY ');
A(36, '10F5KIT', '10 Inch F/5 Odyssey<sup>&reg</sup> Telescope Kit  ', 499.95, 'DOBSONIAN TELESCOPE COMPONENT KITS  EYEPIECEBasic Kit - 25mm Kellner Option 1 - 25mm Plossl Option 4 - 24mm Speers-Waler  FINDERBasic Kit - 5 X 24 Finder included. Optional - Telrad Reflex Sight   FOCUSERBasic Kit - 1.25" Focuser includedOption 1 - 2" Helical Focuser Option 2 - 2" Rack & Pinion Focuser ');
A(37, '22125F', '2 Inch to 1.25 Inch Eyepiece Adaptor', 11.95, 'FOCUSERS AND SPIDERS');
A(38, 'F4VS', 'Fully Adjustable 4 Vane Spiders', 39.95, 'FOCUSERS AND SPIDERSFits Tube 7.5 - 8.5 inch I.D. 1.3 inch hub  9.5 - 10.5 inch I.D. 1.3 inch hub  9.5 - 10.5 inch I.D. 1.8 inch hub 11.5 - 12.5 inch I.D. 1.8 inch hub 14.5 - 15.5 inch I.D. 1.8 inch hub ');
A(39, 'DIAGS', 'Elliptical Diagonal (Secondary) Mirrors', 0.00, 'TELESCOPE MIRRORS Minor Axis0.8 inch 1.0 inch 1.2 inch 1.4 inch 1.8 inch ENHANCED 2.1 inch ENHANCED 2.3 inch 2.5 inch 2.7 inch ');
A(40, 'IXK12A', 'Illuminated Double Cross Hair Kellner ', 79.95, 'EYEPIECES ');
A(41, '22125', '2 Inch to 1.25 Inch Adaptor', 11.95, 'EYEPIECES ');
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
//===============================================================================================================================================
