<%

'+------------------
'| Amazon Light - Main page
'+------------------

'+------------------
'| Grab variables from querystring if they exist
'|  - szSchType = Type of main category -
'|		(books,elec,game,home)
'|  - szSchMode = Type of sub category (none = books) -
'|		(music,dvd,pc-hardware,software,toys,videogames,kitchen,universal,
'| 		garden,magazines,vhs,electronics,baby,photo)
'| 	- Request("term") and Request("field-keywords") are equivalent - just
'|		supporting old code by including "term"
'+------------------

szSchType = Request("typ")
szSchMode = Request("mod")


If ((Request("term") <> "") OR (Request("field-keywords") <> "")) Then
	szTerm = Replace(Request("term")," ","+")
	If szTerm = "" Then
		szTerm = Replace(Request("field-keywords")," ","+")
	End if
	szTerm = Replace(szTerm,Chr(34),"'")
Else
	szTerm = ""
End if

szTerm = Replace(szTerm,Chr(34),"'")

If (Request("node") <> "") Then
	szNode = Request("node")
Else
	szNode = "1"
End if

If (Request("sb") = "o") Then
	szSB = "o"
	szSortTerm = szTerm & "');return false;"
Else
	szSB = "s"
	szSortTerm ="'+document.forms[0].elements[0].value);return false;"
End if

Select Case szSchMode
	Case "music"
		sztNode = "1"
	Case "dvd"
		sztNode = "2"
	Case "pc-hardware"
		sztNode = "3"
	Case "software"
		sztNode = "4"
	Case "toys"
		sztNode = "5"
	Case "videogames"
		sztNode = "6"
	Case "kitchen"
		sztNode = "7"
	Case "universal"
		sztNode = "8"
	Case "garden"
		sztNode = "9"
	Case "magazines"
		sztNode = "10"
	Case "vhs"
		sztNode = "11"
	Case "electronics"
		sztNode = "12"
	Case "baby"
		sztNode = "13"
	Case "photo"
		sztNode = "14"
	Case Else
		sztNode = "0"
End Select

'+------------------
'| subCatTot = Counts of subcategories in each category
'| subCatTot2 = Starting Index within subCatNodes of subcategories for a particular cat
'| subCatNodes = Node names | Node IDs
'+------------------

subCatTot = Array(22,14,15,7,19,13,7,9,10,9,29,22,17,7,10)
subCatTot2 = Array(0,23,38,54,62,82,96,104,114,125,135,165,188,206,214)
subCatNodes = Array("Top Selling|1000","Business|3","Cooking|6","Home/Garden|48","Literature/Fiction|17","Nonfiction|53","Technical|173507","Romance|23","Sports|26","Childrens|4","Engineering|13643","Health|10","Reference|21","Science|75","Biographies|2","Computers/Internet|5","Entertainment|86","History|9","Law|10777","Mystery|18","Religion|22","SciFi/Fantasy|25","Travel|27","Top Selling|301668","Classical|85","Dance/DJ|7","Pop|37","Rock|40","Alternative|30","Classic Rock|67204","Jazz|34","Rap|38","Soundtracks|42","Blues|31","Christian|173429","Country|16","Latin|289122","R/B|39","Animation|712256","Classic|163345","Documentary|508532","Horror|163396","SciFi/Fantasy|163431","Television|163450","Action/Adventure|163296","Anime/Manga|517956","Comedy|163357","Drama|163379","Kids/Family|163414","Music Video|163420","Special Interest|163448","Military/War|586156","Suspense|512030","Sports|467970","Top Selling|565118","AMD|602286","Apple|565124","HP|565120","IBM|603128","Intel|565122","Sony|565126","Toshiba|598398","Top Selling|491286","Communication|229636","Graphics|229614","Linux|290562","Operating Sys|229653","Downloadable|531448","Utilities|229672","Business|229535","Education|229563","Home/Hobby|229624","Macintosh|229643","Finance|229540","Handhelds|229663","Video|497022","Childrens|229548","Games|229575","Language/Travel|497026","Networking|229637","Programming|229667","Web Dev|497024","Top Selling|491290","Crafts|171859","Dolls|171569","Games|171689","Outdoor|171960","Action Figures|171662","Bikes|569472","Electronics|720366","Stuffed Animals|171992","Learning|171911","Building|171814","Furniture|172790","Puzzles|171744","Vehicles|171600","Top Selling|471280","Game Cube|541022","Play Station 2|301712","Game Boy|229783","Mac|229647","PC|229575","Game Boy Advance|541020","XBox|537504","Top Selling|491864","Coffee/Tea|289742","Cookware|289814","Appliances|289913","Baking|289668","Housewares|510080","Tableware|289891","Bar|289728","Gadgets|289754","Knives|289851","Top Selling|468240","Electrical|495266","H/C|495346","Lighting|495224","Automotive|553294","Hand Tools|551238","Equipment|551240","Power Tools|551236","Models|923468","Hardware|511228","Lawn/Garden|551242","Top Selling|468250","Gifts|553648","L/G Tools|915484","Pest Control|553844","Birding|553632","Grills|553760","Camping|892986","Decor|553788","Heat/Light|553778","Furniture|553824","Top Selling|599872","Computer/Internet|602324","Family|602330","Games|602336","History|602342","Lifestyle|602348","Music|602354","Pets|602360","Espanol|1040158","Travel|602370","Arts|602314","Business|602320","Electronics|602326","Fashion|602332","Home/Garden|602344","Literary|602350","Newspapers|1040160","Religion|602362","Sport|602366","Womens|602372","Automotive|602316","Childrens|602322","Entertain|602328","Food|602334","Health|602340","International|602346","Mens|602352","News/Politics|602358","Science/Nature|602364","Teen|602368","Top Selling|404274","Action/Adventure|141","African American|301597","Animation|712260","Anime/Manga|281300","International|126","Classics|127","Comedy|128","Cult|162482","Documentary|508530","Drama|129","Gay/Lesbian|301665","Horror|131","Kids/Family|132","Military/War|586154","Musicals/Arts|508526","Music Video|133","Suspense|512026","Science Fiction|144","Special Interest|135","Sports|169798","Television|136","Westerns|139725","Top Selling|493964","Accessories/Supplies|281407","Car Accessories|226184","Clocks & Clock Radios|509280","Computer Add-Ons|172455","DVD Players|172514","Gadgets|172517","GPS & Navigation|172526","Handhelds & PDAs|172594","Home Theater|172593","Home Office|172574","Receivers|281053","Digital Audio|172630","Phones|172606","Portable Audio/Video|172623","Printers|172635","TVs|172659","VCRs & DVRs|172669","Top Selling|540988","Activity|542460","Bath & Potty|541586","Feeding|541564","Gear|541558","Health & Safety|541580","Layette|738468","Nursery|541572","Top Selling|502394","Digital Cameras|281052","Camcorders|172421","Film Cameras|499106","Binoculars|499320","Telescopes|281063","Microscopes|499170","Batteries & Chargers|173563","Memory Cards|697752","All Accessories|172435","Printers|499328")


%><html>
<head>
<title>Amazon Light</title>
<meta name="keywords" content="Amazon.com, Amazon webservices, amazon web services, amazon light, amazon lite, amazonlight, amazagoogle, googlezon, amagoogle, amazon.com light, amazon associates, easy search, kokogiak amazon">
<meta name="description" content="Amazon Light - a fast and easy way to search and browse Amazon.com, Amazon Light, an Amazon.com Web Service, Amazon Light by Kokogiak Media">

<%
'+------------------
'| CSS Lame hack. The CSS file linked here is actually an empty file - this was inserted to solve an IE formatting bug (tables were not aligning to full 100%)
'+------------------
%>

<link rel="stylesheet" type="text/css" href="ph.css">
</head>
<body bgcolor="#ffffff" link="#222222" alink="#000066" vlink="#666666" text="#000000" marginheight=0 marginwidth=0 topmargin=0 leftmargin=0>
<table border=0 cellspacing=0 cellpadding=0 width=100% ><tr bgcolor="#efeecf"><td> </td></table>
<center>
<font face="arial,helvetica" size=2>
<img src="amzn-logo-b.gif" alt="Amazon" width="341" height="40" border="0" hspace="0" vspace="4"><br><font size=1> <br></font>
<table border=0 cellspacing=0 cellpadding=0 width=620>
<tr bgcolor="#efeecf"><td bgcolor="#ffffff" width="170"><img src="l.gif" border=0 height=20 width=170><br></td>
<%

'+------------------
'| Determine how to display search box and surrounding tabs
'+------------------

Select Case szSchType

	Case "elec"
	szTspan = 4
	szBgcolor= "#0000cc" %>

<td <% if szSchMode="electronics" Then%>bgcolor=#0000cc<% End if %> align=center width=113 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=electronics&typ=elec&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="electronics" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Electronics</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=electronics&typ=elec" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=electronics&typ=elec&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Electronics</font></a><% End if %>
<td <% if szSchMode="photo" Then%>bgcolor=#0000cc<% End if %> align=center width=113 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=photo&typ=elec&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="photo" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Camera & Photo</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=photo&typ=elec" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=photo&typ=elec&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Camera & Photo</font></a><% End if %></td>
<td <% if szSchMode="software" Then%>bgcolor=#0000cc<% End if %> align=center width=112 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=software&typ=elec&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="software" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Software</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=software&typ=elec" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=software&typ=elec&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Software</font></a><% End if %></td>
<td <% if szSchMode="pc-hardware" Then%>bgcolor=#0000cc<% else %><% End if %> align=center width=112 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=pc-hardware&typ=elec&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="pc-hardware" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Computers</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=pc-hardware&typ=elec" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=pc-hardware&typ=elec&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Computers</font></a><% End if %></td>
<td><img width=1 height=1 alt=""></td></tr>

<% Case "game"
	szTspan = 3
	szBgcolor= "#990099" %>

<td <% if szSchMode="toys" Then%>bgcolor=#990099<% End if %> align=center width=150 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=toys&typ=game&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="toys" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Toys</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=toys&typ=game" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=toys&typ=game&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Toys</font></a><% End if %></td>
<td <% if szSchMode="videogames" Then%>bgcolor=#990099<% End if %> align=center width=150 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=videogames&typ=game&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="videogames" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Videogames</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=videogames&typ=game" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=videogames&typ=game&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Videogames</font></a><% End if %></td>
<td <% if szSchMode="baby" Then%>bgcolor=#990099<% End if %> align=center width=150 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=baby&typ=game&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="baby" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Baby</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=baby&typ=game" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=baby&typ=game&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Baby</font></a><% End if %></td>
<td><img width=1 height=1 alt=""></td></tr>


<% Case "home"
	szTspan = 3
	szBgcolor= "#990000" %>

<td <% if szSchMode="kitchen" Then%>bgcolor=#990000<% End if %> align=center width=150 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=kitchen&typ=home&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="kitchen" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Kitchen & Housewares</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=kitchen&typ=home" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=kitchen&typ=home&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Kitchen & Housewares</font></a><% End if %></td>
<td <% if szSchMode="garden" Then%>bgcolor=#990000<% End if %> align=center width=150 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=garden&typ=home&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="garden" Then%><font face='arial,helvetica' color=#ffffff size=-1><b>Outdoor Living</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=garden&typ=home" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=garden&typ=home&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Outdoor Living</font></a><% End if %></td>
<td <% if szSchMode="universal" Then%>bgcolor=#990000<% End if %> align=center width=150 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=universal&typ=home&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="universal" Then%><font face='arial,helvetica' color=#ffffff size=-1> <b>Tools & Hardware</b> </font><% else %> <a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=universal&typ=home" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=universal&typ=home&field-keywords=<% = szSortTerm %>"><font face='arial,helvetica' size=-1 color="#000000">Tools & Hardware</font></a> <% End if %></td>
<td><img width=1 height=1 alt=""></td></tr>

<% Case Else
 szTspan = 4
 szBgcolor= "#006699" %>

<td <% if (szSchMode="books" OR szSchMode="") Then%>bgcolor=#006699<% End if %> align=center width=112 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=books&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if (szSchMode="books" OR szSchMode="") Then%><font color=#ffffff size=-1><b>Books</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=books" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=books&field-keywords=<% = szSortTerm %>"><font size=-1 color="#000000">Books</font></a><% End if %></td>
<td <% if szSchMode="music" Then%>bgcolor=#006699<% End if %> align=center width=112 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=music&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="music" Then%><font color=#ffffff size=-1><b>Music</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=music" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=music&field-keywords=<% = szSortTerm %>"><font size=-1 color="#000000">Music</font></a><% End if %></td>
<td <% if szSchMode="dvd" Then%>bgcolor=#006699<% End if %> align=center width=112 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=dvd&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="dvd" Then%><font color=#ffffff size=-1><b>DVD</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=dvd" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=dvd&field-keywords=<% = szSortTerm %>"><font size=-1 color="#000000">DVD</font></a><% End if %></td>
<td <% if szSchMode="vhs" Then%>bgcolor=#006699<% End if %> align=center width=112 onclick="document.location=('default.asp?sb=<% =szSB %>&mod=vhs&field-keywords=<% = szSortTerm %>" style="font-family:arial;cursor:hand;"><% if szSchMode="vhs" Then%><font color=#ffffff size=-1><b>Video</b></font><% else %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=vhs" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=vhs&field-keywords=<% = szSortTerm %>"><font size=-1 color="#000000">Video</font></a><% End if %></td>
<td><img width=1 height=1 alt=""></td></tr>

<% End Select %>
</tr>

<tr valign=top>
<td bgcolor="#efeecf" align="center">
<font face="arial,helvetica" size=2>
<form action="results.asp">
	<table border=0 cellpadding=0 cellspacing=1>
	<tr><td align=center><font size=1 style="font-size:5px;"> <br></font></td></tr>
	<tr><td align=center><font face="arial,helvetica" size=-1><% if szSchType<>"" Then %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&mod=books" onclick="document.location=('default.asp?sb=<% =szSB %>&mod=books&field-keywords=<% = szSortTerm %>"><font color="#000000">Books, Music & Video</font></a><% Else %><b><font color="#006699">Books, Music & Video</font><% End if %><br></b></td></tr>
	<tr><td align=center><font face="arial,helvetica" size=-1><% if szSchType<>"elec" Then %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&typ=elec&mod=electronics" onclick="document.location=('default.asp?sb=<% =szSB %>&typ=elec&mod=electronics&field-keywords=<% = szSortTerm %>"><font color="#000000">Electronics & Photo</font></a><% Else %><b><font color="#0000cc">Electronics & Photo</b></font><% End if %><br></td></tr>
	<tr><td align=center><font face="arial,helvetica" size=-1><% if szSchType<>"game" Then %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&typ=game&mod=toys" onclick="document.location=('default.asp?sb=<% =szSB %>&typ=game&mod=toys&field-keywords=<% = szSortTerm %>"><font color="#000000">Toys & Videogames</font></a><% Else %><b><font color="#990099">Toys & Videogames</b></font><% End if %><br></td></tr>
	<tr><td align=center><font face="arial,helvetica" size=-1><% if szSchType<>"home" Then %><a href="default.asp?field-keywords=<% =szTerm %>&sb=<% =szSB %>&typ=home&mod=kitchen" onclick="document.location=('default.asp?sb=<% =szSB %>&typ=home&mod=kitchen&field-keywords=<% = szSortTerm %>"><font color="#00000">Home & Garden</font></a><% Else %><b><font color="#990000">Home & Garden</font><% End if %><br></b></td></tr>
	<tr><td align=center><font size=1 style="font-size:5px;"> <br></font></td></tr>
	</table>
	<font face="arial,helvetica" size=-1><a href="advsearch.asp" onclick="document.location=('advsearch.asp?field-keywords=<% = szSortTerm %>"><font color="#00000">Advanced Search</font></a><br>
	<font size=1 style="font-size:5px;"> <br></font>
</td>
<% If szSB = "s" Then %>
	<td align=center colspan=<% =szTspan %>>
	<font size=+1> <br></font>
	<input maxLength=256 size=40 name="field-keywords" value="<% =Replace(szTerm,"+"," ") %>"><br><font face="arial,helvetica" size=-1>
	<input type="image" height="20" width="150" border="0" src="azs.gif" value="Amazon Search" name=AZSch>
	<input type=hidden value="<% =szSchMode %>" name=schMod>
	<input type=hidden value="<% =szSchType %>" name=typ>
	<input type=hidden value=<% =szSB %> name=sb>
<% else %>
	<td align=left colspan=<% =szTspan %>>
	<table border=0 cellspacing=5><tr><td colspan=4><font size=2 color='<% =szBgcolor %>' style='font-size:12px;'>Browse a Subcategory:<br></font></td></tr><tr valign=top><td> </td><td><font face="arial,helvetica" size=-1>
	<%
	catCount = 0
	If (subCatTot(sztNode)<16) Then
		nMod = 4
	Else
		nMod = 6
	End if
	For i=subCatTot2(sztNode) to (subCatTot(sztNode)+subCatTot2(sztNode))
		catCount = catCount + 1
		rgScNodes = Split(subCatNodes(i),"|")
		Response.write("<nobr>• <a href='results.asp?sb=" & szSB & "&scNode=" & rgScNodes(1) & "&schMod=" & szSchMode & "&typ=" & szSchType & "&field-keywords=" & szTerm & "'><font color='" & szBgcolor & "'>" & rgScNodes(0) & "</font></a></nobr><br>")
		If catCount Mod nMod = 0 Then
			Response.write("</td><td><font face='arial,helvetica' size=-1>")
		End if
Next %>
</td></tr></table>
<% End if %>
</font>
</td>
<td rowspan=2 bgcolor=#efeecf><img width=1 height=1 alt=""></td>
</tr>
<tr><td bgcolor="#efeecf"><img width=1 height=1 alt=""></td><td colspan=<% =szTspan %> bgcolor=#efeecf><img width=1 height=1 alt=""></td></tr>
<tr valign=top><td bgcolor="#ffffff"><img width=170 height=20 border=0 src="bl.gif"><br></td><td colspan=<% =szTspan %> bgcolor=#ffffff><img src="<% =szSB %>.gif" alt="Search or Browse" width="299" height="20" border="0" hspace="0" vspace="0" usemap="#sb"></td></tr>
</table>
<map name="sb"><area shape="rect" onclick="document.location=('default.asp?sb=s&typ=<% Response.write(szSchType & "&mod=" & szSchMode) %>&field-keywords=<% = szSortTerm %>" href=default.asp?sb=s&typ=<% Response.write(szSchType & "&mod=" & szSchMode & "&field-keywords=" & szTerm) %> coords="0,0,149,20"><area shape="rect" onclick="document.location=('default.asp?sb=o&typ=<% Response.write(szSchType & "&mod=" & szSchMode) %>&field-keywords=<% = szSortTerm %>" href=default.asp?sb=o&typ=<% Response.write(szSchType & "&mod=" & szSchMode & "&field-keywords=" & szTerm) %> coords="149,0,299,20"></map>
</form>
<p><br><font color="#006699">

<table width=285 cellpadding=0 cellspacing=0><tr valign=top>

<td width=100 align=center>
<img border=0 width=100 height=15 alt="Reload page to see a new random item." src="t.gif"><font face='arial,helvetica'><br>
<%

'+------------------
'| Little routine to grab a random ASIN from my list below, fetch its lite xml
'|   doc from Amazon, and display in the "Amazon Sells This?" box.
'|   The 130 ASINs in the array were just gathered by hand, and are subject to going out of stock fairly rapidly.
'+------------------
	On Error Resume Next
	Randomize
	ano = Int((130 * Rnd))
	oddAsins = Array("B00006A7Z1","B00005O4TU","B00005LAEN","B00003TL7L","B00005AS57","B00004OCLV","B00004UE7P","B00005NK9X","B00005AL3X","B00005KI80","B00006A8NW","B00004SBKK","B00005V8P1","B00005OU65","B000067ECL","B00005QVVV","B000068FNW","B00005NJEZ","B00004UDPW","B00005B0BL","B00005N9Y8","B00005NBEL","B00004YRVM","B00005V3SP","B00004SU35","B00005BHUI","B00004R93A","B00005KJKZ","B00005OU7X","B00000ISQ6","B00005V5YP","B000068UBZ","B000069EL0","B00005LL1K","B0000669FM","B000069E8G","B000066TD1","B000068M1V","B00005JD3R","B000067ETU","B00005OU1N","B00005YY48","B00005V8KC","B00005OUAT","B000066T7A","B00004RA8M","B0000636U4","B000065DPF","B0000667EE","B000068LD6","B000068LFY","B00005QEIW","B00005OT99","B00005RE3K","B00005B6YH","B00005OTVI","B000063SZ8","B000066R38","B00006443K","B000068XHV","B000068YSQ","B000068Y8T","B000066BFA","B000065DPE","B000065DLY","B000068YLL","B000068XSO","B000068Z0H","B000066B74","B000068LCR","B00005NWXP","B000050FF8","B00004RA1U","B00005N7S9","B00004YT3R","B00005LBRP","B00005KC7M","B00005U4T9","B00005NAUI","B00005M1WF","B00005NAV5","B000053AB4","B00005NWVI","B00005JD6E","B000065CN4","B000063XLJ","B00005V3XF","B00005V3XX","B000063N6X","B000065CNB","B00002252D","B00004YNMT","B0000224VN","B00004S1Q8","B00001P5ID","B0000224WH","B00004Z028","B00005V7KI","B00005S6IJ","B00002252W","B000022509","B0000224W3","B000050ASC","B000068U5Y","B000068FH8","B0000224HO","B00005NMSD","B00004T82R","B00004RHR8","B000056EYA","B00004RB6Z","B00004YOQC","B00004Y5RS","B000051XJ2","B000067A4M","B00002N6UW","B00005NMTB","B00005OM1U","0962303208","B000068M0K","B00006A8GT","B00000JIKJ","B000059GED","B000059MSD","B00004S1DC","B000066544","B00006F2VU","B00005R8TI","B00006371B","B00005CFGG","B00005OTG6","B00005QVXH")
	dim objHTTP
	dim objXML
	dim szGetString
	set objHTTP = Server.CreateObject("Microsoft.XMLHTTP")
	szGetString = "http://xml.amazon.com/onca/xml?v=1.0&t=kokogiak-20&dev-t=[Insert Developer's Token Here]&AsinSearch=" & oddAsins(ano) & "&type=lite&f=xml"
	objHTTP.open "GET", szGetString, false
	objHTTP.Send
	Set objXML = objHTTP.ResponseXML

	If (objXML.getElementsByTagName("error").length=0) Then
		totProds = objXML.getElementsByTagName("Details").length
		For i = 0 to (totProds-1)
			set o15 = objXML.getElementsByTagName("Details").item(i)
			set o16 = o15.childNodes
			For j = 0 to o16.length-1
				Select Case o16.item(j).nodeName
					Case "ProductName" szProductName = o16.item(j).text
					Case "OurPrice" szOurPrice = o16.item(j).text
					Case "ListPrice" szListPrice = o16.item(j).text
				End Select
			Next
		Next
	End if

	Response.write("<a href='detpage.asp?sb=o&asin="& oddAsins(ano) & "'><img border=0 vspace=3 alt='" & Replace(szProductName,"'","") & "' src='http://images.amazon.com/images/P/" & oddAsins(ano) & ".01.THUMBZZZ.jpg'></a><br><font size=1 style='font-size:11px;'>")

	If (szProductname <> "") Then
		If (Len(szProductName)>47) Then
			szElip = "..."
		Else
			szElip = ""
		End if
		Response.write ("<b><a href='detpage.asp?sb=o&asin="& oddAsins(ano) & "' style='text-decoration:none;' title='" & Replace(szProductName,"'","") & "'>" & Left(szProductname,47) & szElip & "</a></b> ")
	End if

	If (szOurprice <> "") Then
		Response.write ("<b><font color='red'>" & szOurprice & "</font></b></font><br>")
	End if
%>
</td>

<td width=10>    </td>

<td width=175 align=center>
<td align=center>
<%
'+------------------
'| Include the mini-shopping-cart (ylist.inc)
'| Reset mode to browse ("o"), and search term to " " for simpler results page.
'+------------------
	szTerm = "%20"
 	szSB = "o" %>
<!-- #INCLUDE FILE="ylist.inc" -->
</td>

</tr></table>
<p>Read more about <a href="about.asp">Recent Updates</a>.<p><br>
<font size=1 style="font-size:11px;">by <a href="/default.asp">Kokogiak Media</a> -- Read more about <a href="about.asp">Amazon Light</a>, an Amazon.com Webservices App.
<br><br>
Bugs, problems, suggestions? Send them to <a href="mailto:info@kokogiak.com?subject=AmazonLight">info@kokogiak.com</a>.</font>
<br><br>
<b>At Amazon.com Proper</b><br>
<table border=0 cellspacing=0 cellpadding=0 width=620 ><tr bgcolor="#efeecf"><td align="center"><font face="arial,helvetica" size=2>
<a href="http://www.amazon.com/exec/obidos/tg/stores/recs/instant-recs/-/recs">Recommendations</a> -
<a href="http://www.amazon.com/exec/obidos/tg/stores/static/-/gateway/international-gateway">International</a> -
<a href="http://www.amazon.com/exec/obidos/account-access-login">Your Account</a> -
<a href="http://www.amazon.com/exec/obidos/wishlist">Wish List</a> -
<a href="http://www.amazon.com/exec/obidos/tg/browse/-/909656">Today's Deals</a> -
<a href="http://www.amazon.com/exec/obidos/tg/browse/-/508510">Help</a>
 </td></table></body></html>