// Javascript ImageText service

/* 
Author: Scott Ord, Pentura Solutions
Copyright 2005-2006
This code may be modified as long as this comment stays intact
*/

/*
This is auxiliary file to the ImageTrail script, it provides
hard-coded text strings for display in the ImageTrail pane.

Inspired by the lack of a database for storing the text, it
makes automating and maintaining images and descriptions a
little more manageable

Example of how to enter the text string:

a[x] = "Book:Britannia School and School Farm - and My School Days - as told by Benson A. Madill:10.00";

The Title, Description, and Price are colon delimited, with no space on either side of the delimiter.
Omit dollar sign, as it is inserted by the script.
*/

var a = new Array(134);

a[0] = "Book:Britannia School and School Farm - and My School Days - as told by Benson A. Madill:10.00";
a[1] = "Postcard:Outside the Old Britannia Schoolhouse:0.50";
a[2] = "Postcard:Inside the Old Britannia Schoolhouse:0.50";
a[3] = "Art Card:\"School's Out\", signed print of The Old Britannia Schoolhouse by D. Scott Taylor; with envelope (frameable) 9\"x 6-1/4\":3.00";
a[4] = "Art Cards:Set pf 6 - signed prints from Scott Taylor's Schoolhouse Series, with envelopes (frameable) 9\"x 6-1/4\" - Includes Britannia School and 5 other one-room schoolhouses (Not pictured):18.00";
a[5] = "Note Cards: Package of 10 - 3 drawings by Audrey Caryi (see cover), dark brown imprint on natural white linen cover stock with matching envelopes 5\"x7\" when folded - 5 outside and 2 plus 3 inside views unless special request:10.00";
a[6] = "Single Card:(a) Recess:1.25";
a[7] = "Single Card:(b) Please, School Mistress:1.25";
a[8] = "Single Card:(c) Dictation:1.25";
a[9] = "Postage Stamp:With photo of The Old Britannia Schoolhouse; valid for domestic mail:2.00";
a[10] = "Card with Stamp: 'Recess' card with stamp on envelope:3.00";
a[11] = "Letter Cards:'The Concert...On Stage and Off'; 8-1/2\"x 11\" folded to 8-1/2\"x3 2/3\"; alabaster text with burgundy imprint; pencil included; package of 10 with matching envelopes (a) folded or (b) flat:6.00";
a[12] = "Greeting Cards:5\"x7\" when folded; naturalistic white classic linen cover stock; message inside - 'Warmest Greetings' (a) 'The Gathering':0.75, package of 10 - 7.00)";
a[13] = "Greeting Cards:5\"x7\" when folded; naturalistic white classic linen cover stock; message inside - 'Warmest Greetings' (a) 'Fetching the Tree':0.75, package of 10 - 7.00)";
a[14] = "Greeting Cards:5\"x7\" when folded; naturalistic white classic linen cover stock; message inside - 'Warmest Greetings' (a) 'The Christmas Concert':0.75, package of 10 - 7.00)";
a[15] = "Refrigerator Magnet:'Friends of the Schoolhouse':1.50";
a[16] = "Bone China Mug:Soft white with brown imprint on two sides; gold trim on rim and handle:18.00";
a[17] = "School Bell:Ceramic souvenir bell; cream with brown imprint on two sides:16.00";
a[18] = "T-Shirt: 100% cotton; navy white with off-white imprint; Medium, Large, X-Large:15.00";
a[19] = "Sweatshirt:Heavy; 90% cotton; navy white with off-white imprint; Medium, Large, X-Large:32.00";
a[20] = "Tea Towel:50% cotton 50% linen; off white with dark brown imprint:6.50";
a[21] = "Hanger:For tea towel:1.50";
a[22] = "Pencil: Unpainted wood imprinted 'The Old Britannia Schoolhouse' (a) eraser tipped or (b) Untipped:0.75 each or 3 for 2.00";
a[23] = "Apple Pencil:Pencil with wooden apple on the end; (a) bright red apple (b) dark red apple or (c) green apple:2.00";
a[24] = "Slate Kit:Genuine slate; stamped \"The Old Britannia Schoolhouse\"; drawstring bag with slate pencils and 'wipe-off' cloth; activity booklet:10.00";
a[25] = "Pen Set:Wooden penholder, two writing nibs, blotter and an old ink bottle that fit into a schoolhouse desk:3.00";
a[26] = "Quill Pen:With history:3.00";
a[27] = "Rules for Teachers:Two examples from the late 1800's, 8 1/2\"x11\" (Not pictured):1.00";
a[28] = "Punctuation Personified:By Mr. Stops; Originally published in \"Olde London Town\" in 1824; verse and 16 humourous and coloured illustrations:10.00";
a[29] = "Diecast Pencil Sharpener:Barn with Silo:3.00";
a[30] = "Diecast Pencil Sharpener:Red Caboose:3.00";
a[31] = "Diecast Pencil Sharpener:Kerosene Lantern (Red):3.00";
a[32] = "Diecast Pencil Sharpener:Potbellied Stove:3.00";
a[33] = "Diecast Pencil Sharpener:Spinning Wheel:3.00";
a[34] = "Diecast Pencil Sharpener:Windmill:3.00";
a[35] = "Diecast Pencil Sharpener:Wood Stove:3.00";
a[36] = "Diecast Key Chain: Red Caboose:2.00";
a[37] = "Recipe Booklet:Sweetmeats Plus (Not pictured); Some old...Some committee favorites...mostly, not all, sweets:2.00";
a[38] = "Maple Syrup:Log Cabin Tin; 250mL:8.00";
a[39] = "Stained Glass Apple:3 1/2\" diameter:9.00";
a[40] = "Stained Glass Strawberry:1 3/4\" diameter:6.00";
a[41] = "Apple Box:Wooden; with lid; 2 1/2\" diameter; boxed:10.00";
a[42] =	"Apple Tea Light Candle:Wooden; 2 3/4\" diameter:10.00";
a[43] = "Beeswax Candles:Tapers; 12\"; no drip; burn for 3 to 4 hours; cream or natural (pair):4.00";
a[44] = "Beeswax Candles:As above with bee trim; boxed:5.00";
a[45] = "Beeswax Candles:Pillars; 8\"x1\" diameter (pair):6.00";
a[46] = "Beeswax Candles:As above with bee trim; boxed:7.00";
a[47] = "Pantry Candlestick:Tin; 2\"x4 3/4\":15.00";
a[48] = "Votive Shade:Pierced tin; 9 1/4\"x5 1/2\":30.00";
a[49] = "Pillar Shade:Pierced tin; 9 1/4\"x5 1/2\":26.00";
// Need to add the comment somewhere: *Any 3 of x, y, and or z (mixed or all the same): 36.00
a[50] = "Victorian Christmas Tree Tinsel:50 Pieces in container:14.00";
a[51] = "Christmas Tree Stars:20 shiny tin stars in a tin container; hooks included:14.00";
a[52] = "Christmas Tree Light Reflectors:Shiny tin; 24 in a box; fit over miniature lights - Round:14.00";
a[53] = "Christmas Tree Light Reflectors:Shiny tin; 24 in a box; fit over miniature lights - Star Shape:14.00";
// Apply the above comment to the above 4 items
a[54] = "Colored Tin Tinsel:6\" long; 24 per box; assorted red, blue, green, gold; each piece hangs on a string that lets it turn in the moving air:15.00";
a[55] = "Spool Doll:About 3 1/2\" tall; with wire to hang; with or without straw hat:6.00";
a[56] = "Angel Spool Doll:About 3 1/2\" tall; with wire to hang:8.00";
a[57] = "Clothes Peg Doll Kit:All you need is a needle and thread - Girl Doll:4.00";
a[58] = "Clothes Peg Doll Kit:All you need is a needle and thread - Boy Doll:4.00";
a[59] = "Pioneer Handkerchief Doll Kit:Doll about 6\" tall; with material for clothes and instructions:3.00";
a[60] = "Corking Kit:Wooden; yarn to get started and instructions included:10.00";
a[61] = "Mini Train Set:5 pieces; pull 'n go:9.00"; 
a[62] = "Paddle Boat Kit:Wooden; easy to assemble; elastic propelled; great fun in the bath tub or water centre:6.50";
a[63] = "Right Angle Prism:2\" long; with information:9.00";
a[64] = "Bull Grinder:Often called a \"Do nothing toy\"; wooden; handle inscribes an oval:11.00";
a[65] = "Magnetic Marbles:Assorted colors; fascinating (Not illustrated):0.50";
a[66] = "Bag of Glass Marbles:Cotton drawstring bag; includes 2 shooters (Not pictured):4.00";
a[67] = "Marbles:Glass; 25 marbles, 2 shooters in denim bag; includes booklet of games:8.00";
a[68] = "Marbles:Clay; 10 target marbles and 2 shooters; in suede pouch:9.00";
a[69] = "Jacks:10 lead-free pewter jacks, 1 wooden and 1 rubber ball; in suede pouch; history and instructions included:10.00";
a[70] = "Pewter Dice:Lead-free pewter; package of 3:6.00";
a[71] = "Bamboo Flute:About 12\" long; centuries old:2.00";
a[72] = "Kazoo:Original tin kazoo; no talent required - just hum into it; about 5\" long";
a[73] = "Penny Whistle:Key of D; 12\" long; tinned steel with wooden mouthpiece; with history, music, and instruction sheet:9.00";
a[74] = "Harmonica:\"Pocket Pal\" by Hohner in blue denim-look box; key of C; with history and instruction sheet:12.50";
a[75] = "Jaw Harp:Also known as \"Juice Harp\" or \"Jews Harp\" with history and instruction sheet";
a[76] = "Train Whistle:Beautifully sculpted two-tone whistle made of cherry wood:12.00";
a[77] = "Music Box:\"Memorable Memories\"; wind-up music box in clear plastic case with metal crank handle; Available tunes - O Canada, Old McDonald Had a Farm, I've been working on the Railroad, Row, Row, Row your Boat, Frere Jacques, Twinkle, Twinkle, Little Star:7.00";
a[78] = "Make a 'T' Puzzle:4 pieces (Not pictured):1.00";
a[79] = "Make a Square Puzzle:5 pieces (Not pictured):1.00";
a[80] = "Bead Puzzle:Remove the string without removing the bead:2.00";
a[81] = "Yoke Puzzle:Move the beads from one side to the other:2.00";
a[82] = "Ring Puzzle:An elegant rendition of a traditional brain-teaser; all you have to do is get the ring off:14.00";
a[83] = "Sweet Sixteen Puzzle:Walnut and cherry; a challenge to assemble:15.00";
a[84] = "Cat and Mouse Game:A game of strategy for 2 players; instructions included:10.00";
a[85] = "Game of Fox and Geese: A strategy game for 2 or an elimination Solitaire game. Hand-made hardwood board with game pegs; includes instructions for play and a history of the game:18.00";
a[86] = "Ball and Board Toy:A classic; fun for all ages:2.00";
a[87] = "Ring and Stick Toy:A classic; fun for all ages:2.00";
a[88] = "Ball and Cup Toy:A classic: fun for all ages:7.50";
a[89] = "Larger Ball and Cup Toy: 10 1/2\" long with 1\" wooden ball; history and instruction sheet included:10.00";
a[90] = "Bilbo Catcher:Variation of the ball and cup but more challenging; about 5\" long with 1 1/2\" ball; catch the ball in the cup or on the spindle; history included:10.00";
a[91] = "Flip Shooter:Flip the ball from one cup to the other; ash construction:12.00";
a[92] = "Double Flipper:2 person version of the Flip Shooter; ash and walnut construction:13.00";
a[93] = "Fiddlesticks: Transfer the ball from one cup to the other; not so easy when the cups are at the ends of 3' spring steel wire! Great for party fun.:12.00";
a[94] = "Roll Around:Roll the ball down one side and around the end onto the other side; Practice makes perfect!:14.00";
a[95] = "Pick-up Sticks:Wooden sticks in wooden box; 5\" long; includes instructions:3.00";
a[96] = "Tabletop Nine Pins:9 solid wood pins 5\"tall with 2 wooden 2\" balls; includes instructions and history:18.00";
a[97] = "Rolling Hoop:Solid hardwood; 28\" diameter; 1 1/2\" wide; 1/4\" thick; trundling stick and history card included:22.00";
a[98] = "Game of Graces:Two 10\" wooden hoops; 4 tapered 22\" wands and 8 lengths of colored ribbon; history and instructions included:25.00";
a[99] = "Wooden Top: 1 1/2\" diameter:2.00";
a[100] = "Peg Top: Solid wood, set in motion with a wound string; history and instructions included:7.00";
a[101] = "Whip Top:Solid wood top and dowel with rawhide lash; history and instructions included:10.00";
a[102] = "Mountain Top:String-powered with launcher; slip-on colored circles included:12.00";
a[103] = "Whimmy Diddle:Sometimes called a Hooey Stick; used to be whittled with a pocket knife:4.00";
a[104] = "Buzz Toy:Wood slice button; works like an old fashioned 'Button Buzzer':2.50";
a[105] = "Button Spinner: 2\" diameter; with handles:4.00";
a[106] = "Buzz Saw: 2 1/2\" diameter leather button with wooden handles; very smooth running:7.00";
a[107] = "Spinner (Hooey Stick):Roll between your hands and let it fly:2.00";
a[108] = "Flying Machine:Pull the string and it flies up to 40 feet! (An outdoor toy):14.00";
a[109] = "Jacob's Ladder Kit:Instructions and everything you need except for a bit of white glue:7.00";
a[110] = "Jacob's Latter:Already assembled: instructions for using included:10.00";
a[111] = "Climbing Bear: Made of red oak; pull the strings to make him climb:12.00";
a[112] = "Twirl Climber:Cherry and birch; swing the weight and watch the gingerbread man climb. Touch the weight on the table and down he slides. Amazing!:20.00";
a[113] = "Acrobat:Wooden; squeeze bottom of supports to make him flip:8.00";
a[114] = "Flying Fred:Upgraded and larger bersion of the Acrobat:20.00";
a[115] = "Pecking Pete: A great 'executive' toy; birch and cherry; slide the bird to the top and watch him peck his way down:15.00";
a[116] = "Sliding Sarie:Ash with cherry and birch; Sarie slides back and forth from top to bottom; Toddlers love her:20.00";
a[117] = "Tumbling Tom:Tom tumbles head over heels from top to bottom:20.00";
a[118] = "Dancing Man:Cherry, walnut, and birch; a popular traditional toy. Tap the paddle to music and the man step-dances right along!:25.00";
a[119] = "Bubble Stick:24\" long dowel; creates amazingly huge bubbles; recipe and instructions included:12.00";
a[120] = "Thaumatrope Disc:A toy that sparked the invention of motion pictures by showing the phenomenon of the persistence of vision; part of pictures on each side of disc; 19th century reproduction:1.50";
a[121] = "Jeu du Thaumatrope Discs:Set of 12 discs plus 2 blanks in a reproduction of the original box:16.00";
a[122] = "Phenakistascope:Package of 4 discs (three 19th centura reproductions and one blank) and handle for viewing. Look in a mirror to see the movement; history and instructions included:12.00";
a[123] = "Magic Wheel:Boxed phenakistascope; six 19th century reproduction discs plus one blank; handle for viewing and history included:18.00";
a[124] = "Zoetrope Kit:Includes materials and directions to make a paper zoetrope; includes animated strips and blanks for drawing (Rather flimsy, but it does show how the device works):9.00";
a[125] = "Mov-I-Graff: 1920's vintage amusement; 5\"x 7\" card with cartoon man whose nose and chin are made up a fine-linked chain so you can create new faces:6.00";
a[126] = "Merry Christmas Santa:Flip book; 2 1/2\" x 3\":4.00";
a[127] = "Juggling Sam:Flip book; 2\" x 2 1/4\":5.00";
a[128] = "Record of a Sneeze:2\" x 3\"; 45 pages; Thomas Edison's Kinetoscopic Record of a Sneeze, 1894:7.00";
a[129] = "Cat Running:Eadweard Muybridge's 1887 Animal Locomotion Series; 2\" x 4 1/8\"; 48 pages plus biographical booklet:7.00";
a[130] = "Elephant Walking:Eadweard Muybridge's 1887 Animal Locomotion Series; 2\" x 4 1/8\"; 48 pages plus biographical booklet:7.00";
a[131] = "Horse Galloping:Eadweard Muybridge's 1887 Animal Locomotion Series; 2\" x 4 1/8\"; 48 pages plus biographical booklet:7.00";
a[132] = "Presto Collars:2-sided flipbook showing how to use a male and female collar; 1903 advertisement:6.00";
a[133] = "Whirlwind Movie Scope:1920's flipbook advertising the whirlwind vacuum cleaner; 2-sided:6.00";
a[134] = "Tricks of the Trade:A flipbook, a transparency card, a thaumatrope, a mechanical card, and a slide card; copies of original novelty ads from the 1890s:10.00";

// Returns the Title component of the item text
// param: itemNum: The item number

function getTitle(itemNum) {

	// Get the index of the first ':' character
	var index = a[itemNum].indexOf(":");
	
	// Return the Title
	return a[itemNum].substring(0, index);	
}

// Returns the Description component of the item text
// param: itemNum: The item number

function getDesc(itemNum) {

	// Get the index of the first ':' character
	var firstIndex = a[itemNum].indexOf(":");
	// Get the index of the second ':' character by searching
	// past the index of the first character
	var secondIndex = a[itemNum].indexOf(":", firstIndex+1);
	
	// Return the Description
	return a[itemNum].substring(firstIndex+1, secondIndex);	
}

// Returns the Price component of the item text
// param: itemNum: The item number

function getPrice(itemNum) {

	// Get the index of the first ':' character
	var firstIndex = a[itemNum].indexOf(":");
	// Get the index of the second ':' character by searching
	// past the index of the first character
	var secondIndex = a[itemNum].indexOf(":", firstIndex+1);
	
	// Return the Price
	return a[itemNum].substring(secondIndex+1, a[itemNum].length);

}