// This script maps positions on the screen to the corresponding label and
// price. For example, in the necklaces array, the label of the top lefthand
// picture will be the first part of the string after necklace[0]. The price
// will be the part after the ^ sign. The functions at the bottom chop the 
// string up and put the label and price on the screen.

necklaces = new Array(8);
necklaces[0] = "Giant circle necklace 1^$208";
necklaces[1] = "sprout 2^$60";
necklaces[2] = "bisected circle necklace 1^$105";
necklaces[3] = "medium oval 1^$138";
necklaces[4] = "armor 1^$135";
necklaces[5] = "medium circle 1^$148";
necklaces[6] = "big oval 1^$158";
necklaces[7] = "tiny circle 2^$105";

custom = new Array(8);
custom[0] = "^$";
custom[1] = "A set of wedding rings, using her engagment ring.";
custom[2] = "^$";
custom[3] = "^$";
custom[4] = "^$";
custom[5] = "^$";
custom[6] = "^$";
custom[7] = "^$";

earrings = new Array(8);
earrings[0] = "flower earrings^$175";
earrings[1] = "manuscript hoops^$230";
earrings[2] = "small hoops^$175";
earrings[3] = "medium hoops^$185";
earrings[4] = "sprout earrings^$85";
earrings[5] = "large hoops^$190";
earrings[6] = "rectangular earrings^$130";
earrings[7] = "^$";

rings = new Array(8);
rings[0] = "manuscript ring 1^$110";
rings[1] = "circle ring 2^$168";
rings[2] = "manuscript ring 3^$110";
rings[3] = "^$";
rings[4] = "manuscript ring 2^$110";
rings[5] = "circle ring 1^$168";
rings[6] = "^$";
rings[7] = "^$";

stackedrings = new Array(8);
stackedrings[0] = "Stacked Ring 0^$25";
stackedrings[1] = "Stacked Ring 1^$25";
stackedrings[2] = "Stacked Ring 2^$25";
stackedrings[3] = "Stacked Ring 3^$25";
stackedrings[4] = "Stacked Ring 4^$25";
stackedrings[5] = "Stacked Ring 5^$25";
stackedrings[6] = "Stacked Ring 6^$25";
stackedrings[7] = "Stacked Ring 7^$25";
stackedrings[8] = "Stacked Ring 8^$25";
stackedrings[9] = "Stacked Ring 9^$25";
stackedrings[10] = "Stacked Ring 10^$25";

men = new Array(8);
men[0] = "men manuscript ring 1^$110";
men[1] = "men manuscript ring 2^$110";
men[2] = "dragon ring^$120";
men[3] = "men thin cuff bracelet^$185";
men[4] = "men manuscript ring 3^$110";
men[5] = "men manuscript ring 4^$110";
men[6] = "men wide cuff bracelet^$205";
men[7] = "^$";

necklaces2 = new Array(8);
necklaces2[0] = "big circle 1^$180";
necklaces2[1] = "tiny oval 1^$92";
necklaces2[2] = "medium oval 2^$138";
necklaces2[3] = "^$";
necklaces2[4] = "sprout 1^$60";
necklaces2[5] = "medium circle 2^$148";
necklaces2[6] = "tiny circle 1^$105";
necklaces2[7] = "^";

newstuff = new Array(8);
newstuff[0] = "green twirly earrings ^$140";
newstuff[1] = "shell ring 1^$195";
newstuff[2] = "shell ring 2^$195";
newstuff[3] = "blue twirly necklace ^$170 ";
newstuff[4] = "orange twirly necklace ^$170";
newstuff[5] = "orange twirly necklace- could be worn this way, too.^$170";
newstuff[6] = "one of a kind 10 gauge earrings ^$220 ";
newstuff[7] = "ear plugs- 1 1/4inch ^$180  ";

bracelets = new Array(8);
bracelets[0] = "manuscript bracelet 1^$220";
bracelets[1] = "wrapped bangles each^$120";
bracelets[2] = "manuscript bracelet 3^$180";
bracelets[3] = "^$";
bracelets[4] = "manuscript bracelet 4^$190";
bracelets[5] = "wrapped cuff each^$85";
bracelets[6] = "^$";
bracelets[7] = "^$";

bracelets2 = new Array(8);
bracelets2[0] = "new name1^$100";
bracelets2[1] = "new name2^$200";
bracelets2[2] = "new name3^$300";
bracelets2[3] = "new name4^$400";
bracelets2[4] = "new name5^$500";
bracelets2[5] = "new name6^$600";
bracelets2[6] = "new name7^$700";
bracelets2[7] = "new name8^$800";

function DisplayName(InString) {
    segments = InString.split("^");
    alert(segments[0]);
}

function DisplayPrice(InString) {
    segments = InString.split("^");
    alert(segments[1]);
}

function DisplayNamePrice(InString) {
    string = InString;
    segments = string.split("^");
    name = segments[0];
    price = segments[1];
    alert(segments[0] + " " + segments[1]);
}

function GetText(InString) {
    string = InString;
    segments = string.split("^");
    return (segments[0]);
}

function GetPrice(InString) {
    string = InString;
    segments = string.split("^");
	price = segments[1];
    return (price);
}

function GetNumericPrice(InString) {
    string = InString;
    segments = string.split("^$");
	price = parseInt(segments[1]);
	return (price);
//	alert(price);
}