/****
  The following global variables set the parameters (both horizontal and vertical) for the scrolling images.
    Adjusting parameters locates the scroll on the screen, how many elements are fully visible at one time,
    the intervals between movements, the size of the individual elements and at what speed they move.

    As of 3/10/10 altering paramenters works fine for horizontal scrolling but the vertical seems to only want
    to show five at a time.
****/

var dir=2;            // direction: 0=right, 1=left, 2=down, 3=up
var hshow=5;          // horizontal # visible
var vshow=3;          // vertical # visible
var hspacer=56;       // the horizontal spacing between the image holding objects (used for horizontal motion only)
var vspacer=72;       // the vertical spacing between the image holding objects (used for vertical motion only)
var innerTime=10;     // length of the waits while images are "sliding"
var outerTime=5000;   // length of the "pause" between image slides
var ispeed=1;         // sets the rate, in pixels, for the inner loop
var hlit=24;          // horizontal leftmost position where an image is visible (but hidden by an end block)
var vlit=-62;
var hfin=360;         // horizontal rightmost position where an image is visible(but hidden by an end block)
var vfin=220;         // vertical bottommost position where an image is visible (but hidden by an end block)
var hbgn=-144;        // end of the horizontal queue (objects are hidden from hbgn/vbgn until they are next
var vbgn=-62;         // end of the vertical queue   (to be scrolled on screen, already there or scrolling off screen)
var roof="11px";
var lside="1px";     // current left side of the images (horizontal: left edge of leftmost visible object, vertical: left edge of all objects

////////////////////////////////
// NOTE: ifin-ibgn=n*pixels where n is the # elements (see IAsize below) and the pixels correspond to the dimension
//       of motion (eg. horizontal motion corresponds to the horizontal width of the images in pixels).
//
//       ilit+(n+1)*ispacer=ifin where n is the # of "visible" elements.
////////////////////////////////
var iAsize=12;     // number of elements-1 (array begins at '0') in the image array below
////////////////////////////////
// iArray0 elements hold the scrolling image data.
//      0 = image location
//      1 = start order
//      2 = product description
//      3 = object ID    
//      4 = product supplier URL
////////////////////////////////
// NOTE: the image sizes being used below are 56w x 72h (see spacer variables above)
//    If there are five fully visible horizontal images, then the outside blocks should be 56x5=280 pixels apart.
////////////////////////////////
// OK, some new stuff (5/23/11)-- variables below are just to simplify data access in case the database is rearranged.
var IMG=0;
var WDTH=0;
var HGT=1;
var SIZE=1;
var TEXT=2;
var OBJ=3;
var VNDR=4;

var iArray0 = new Array(iAsize);
for (i=0; i<iAsize; i++) iArray0[i]=new Array(5);
iArray0[0][0]='img/prods/calc_keychain_126x165.png';
iArray0[0][1]=0;
iArray0[0][2]='<b><u>Super Mini Flexi Calc Keychain</u></b><br>* Flexible Rubber Calculator<br>* Conveniently On A Key Ring<br>* 8 Digit Display<br>* Battery Included<br><br>Available in Red, Lime Green, Silver, Blue<br>or Black.';
iArray0[0][3]='i0';
iArray0[0][4]='';
iArray0[1][0]='img/prods/mini_mister_108x165.png';
iArray0[1][1]=1;
iArray0[1][2]='<b><u>Mini Personal Mister</u></b><br>* Made Of 100% Lead And Phthalate Free<br>ABS Plastic<br>* 1 OZ. Fluid Capacity<br>* Never Needs Batteries<br>* Push Button Technology<br>* Ultra Fine Mist<br><br>Available in Purple, Blue, Lime Green, Black,<br>White or Red.';
iArray0[1][3]='i1';
iArray0[1][4]='';
iArray0[2][0]='img/prods/bamboo_circle_coasters_126x126.png';
iArray0[2][1]=2;
iArray0[2][2]='<b><u>Bamboo Circle Coaster</b></u><br>* Made From All Natural Bamboo<br>* 1/8-inch Thick<br>* Absorbent and Durable<br>* Bulk packed<br>* Available in Gift Pack Set of 4.';
iArray0[2][3]='i2';
iArray0[2][4]='';
iArray0[3][0]='img/prods/monkey_do_keychain_126x128.png';
iArray0[3][1]=3;
iArray0[3][2]='<b><u>Monkey Do Keychain/Light</b></u><br><br>Monkey keyholder with blue LED light and<br>"monkey-speak" sound. One color logo only.';
iArray0[3][3]='i3';
iArray0[3][4]='';
iArray0[4][0]='img/prods/travel_sew_kit_126x126.png';
iArray0[4][1]=4;
iArray0[4][2]='<b><u>Travel Sewing Kit</b></u><br>Contains:<br>* Mini Scissors<br>* 6 mini colored thread skeins<br>* Buttons & snaps<br>* Needles & pins<br>* Safety pin<br>* Tweezers<br>* Needle threader';
iArray0[4][3]='i4';
iArray0[4][4]='';
iArray0[5][0]='img/prods/running_pedometer_126x126.png';
iArray0[5][1]=5;
iArray0[5][2]='<b><u>Running Man Pedometer</b></u><br>* Step counter in fun, attractive casing<br>* Top-view LCD display for easy monitoring<br>* Tracks up to 99,999 steps<br>* Non-replaceable battery<br><br>Comes in Blue, Green, Red and White';
iArray0[5][3]='i5';
iArray0[5][4]='';
iArray0[6][0]='img/prods/full_zip_sweatshirt_110x165.png';
iArray0[6][1]=6;
iArray0[6][2]='<b><u>Hampton Full Zip Hooded Sweatshirt</b></u><br>9 oz. 50% cotton/50% polyester with double<br>layered hood and muff pocket.<br><br> Available in sizes S-XXL';
iArray0[6][3]='i6';
iArray0[6][4]='';
iArray0[7][0]='img/prods/throwback_crew_110x165.png';
iArray0[7][1]=7;
iArray0[7][2]='<b><u>Throwback Crewneck</b></u><br>Sturdy 9oz. 80% cotton/20% polyester crew-<br>neck sweatshirt including raglan sleeves with<br>sewn in knit "V" notch.<br>The exclusive washing process locks in extra<br>softness.<br><br>Available in sizes S-3XL.';
iArray0[7][3]='i7';
iArray0[7][4]='';
iArray0[8][0]='img/prods/doggie_skins_126x149.png';
iArray0[8][1]=8;
iArray0[8][2]='<b><u>Doggie Skins Camouflage Tank</b></u><br>* 100% combed ringspun cotton print 1x1 <br>baby rib<br>* 5.8-oz.<br>* double-needle ribbed binding on neck,<br>armholes and bottom<br>* for breeds with larger chests, purchase one<br>size up from weight range';
iArray0[8][3]='i8';
iArray0[8][4]='';
iArray0[9][0]='img/prods/camp_shirt_126x141.png';
iArray0[9][1]=9;
iArray0[9][2]="<b><u>Men's Bedford Cord Camp Shirt</b></u><br>* 68% rayon/32% polyester Bedford cord<br>* 5.3-oz.<br>* sand wash finish for luxurious touch and<br>drape<br>* Cubavera streamer on inside placket<br>* coconut shell buttons<br>* left chest pocket";
iArray0[9][3]='i9';
iArray0[9][4]='';
iArray0[10][0]='img/prods/herbal_tea_pack_126x126.png';
iArray0[10][1]=10;
iArray0[10][2]='<b><u>Herbal Tea Pack</b></u><br><br>Relaxing herbal tea pack attractively<br>packaged in natural paper envelope.';
iArray0[10][3]='i10';
iArray0[10][4]='';
iArray0[11][0]='img/prods/travel_pack_126x126.png';
iArray0[11][1]=11;
iArray0[11][2]='<b><u>Little black travel pack with zipper case.</b></u><br>Little black travel pack has black microfiber<br>nylon zipper case and holds a black sleep<br>shade, earplugs, toothbrush, toothpaste<br>packet, sugar free mints, mini lip balm, mini<br>relax organic lotion pack, mini sleep organic<br>lotion pack, and a relax shower gel.';
iArray0[11][3]='i11';
iArray0[11][4]='';

