// Contents copyright 1999-2003 YukonSoft Corporation 
//
//Global Variables
var tax		= parseFloat(0),
itemsonOrder = '',
option		= 0,
shipoption  = parseFloat(0),
totalitems  = parseFloat(0),
totalweight = parseFloat(0),
shipping 	= parseFloat(0),
shipchrg	= parseFloat(0),
taxchrg 	= parseFloat(0),
taxtotal    = 0,
invoice		= parseFloat(0),
totprice	= parseFloat(0),
delivery	= parseInt(1),
firstname	= '',
lastname 	= '',
address 	= '',
city 		= '',
state 	 	= '',
zip 		= '',
country 	= '',
firstname2	= '',
lastname2 	= '',
address2 	= '',
city2 		= '',
state2 	 	= '',
zip2 		= '',
country2 	= '',
phone 		= '',
email 		= '',
company     = ''
totalnumitems = 0,
itemlist    = 0,
method      = '',
deliverynum = 0,
num         = 0;




function getValueName(itemindex) {

var vals = new Array(295);
vals[0] = new Array(2);
vals[0][0] = 1;
vals[0][1] = 'Metallic White';
vals[1] = new Array(2);
vals[1][0] = 2;
vals[1][1] = 'Metallic Silver';
vals[2] = new Array(2);
vals[2][0] = 3;
vals[2][1] = 'Metallic Purple';
vals[3] = new Array(2);
vals[3][0] = 4;
vals[3][1] = 'Metallic Black';
vals[4] = new Array(2);
vals[4][0] = 5;
vals[4][1] = 'CH. BLACK';
vals[5] = new Array(2);
vals[5][0] = 6;
vals[5][1] = 'METALIC GREY';
vals[6] = new Array(2);
vals[6][0] = 7;
vals[6][1] = 'METALIC BLUE';
vals[7] = new Array(2);
vals[7][0] = 8;
vals[7][1] = 'TRANSPARENT GREEN';
vals[8] = new Array(2);
vals[8][0] = 9;
vals[8][1] = 'TRANSPARENT BLUE';
vals[9] = new Array(2);
vals[9][0] = 10;
vals[9][1] = 'Beach';
vals[10] = new Array(2);
vals[10][0] = 11;
vals[10][1] = 'Teak';
vals[11] = new Array(2);
vals[11][0] = 12;
vals[11][1] = 'Granite Black';
vals[12] = new Array(2);
vals[12][0] = 13;
vals[12][1] = 'Cherry Oak';
vals[13] = new Array(2);
vals[13][0] = 18;
vals[13][1] = 'Beach';
vals[14] = new Array(2);
vals[14][0] = 19;
vals[14][1] = 'Teak';
vals[15] = new Array(2);
vals[15][0] = 20;
vals[15][1] = 'Granite Black';
vals[16] = new Array(2);
vals[16][0] = 21;
vals[16][1] = 'Cherry Oak';
vals[17] = new Array(2);
vals[17][0] = 22;
vals[17][1] = 'Beach';
vals[18] = new Array(2);
vals[18][0] = 23;
vals[18][1] = 'Teak';
vals[19] = new Array(2);
vals[19][0] = 24;
vals[19][1] = 'Cherry Oak';
vals[20] = new Array(2);
vals[20][0] = 25;
vals[20][1] = 'Granite Black';
vals[21] = new Array(2);
vals[21][0] = 26;
vals[21][1] = 'Light Silver';
vals[22] = new Array(2);
vals[22][0] = 27;
vals[22][1] = 'Powder Blue';
vals[23] = new Array(2);
vals[23][0] = 28;
vals[23][1] = 'Natural Oak';
vals[24] = new Array(2);
vals[24][0] = 29;
vals[24][1] = 'Teak';
vals[25] = new Array(2);
vals[25][0] = 30;
vals[25][1] = 'Granite Black';
vals[26] = new Array(2);
vals[26][0] = 31;
vals[26][1] = 'Light Silver';
vals[27] = new Array(2);
vals[27][0] = 32;
vals[27][1] = 'Powder Blue';
vals[28] = new Array(2);
vals[28][0] = 37;
vals[28][1] = 'Beach';
vals[29] = new Array(2);
vals[29][0] = 38;
vals[29][1] = 'Teak';
vals[30] = new Array(2);
vals[30][0] = 39;
vals[30][1] = 'Cherry Oak';
vals[31] = new Array(2);
vals[31][0] = 40;
vals[31][1] = 'Granite Black';
vals[32] = new Array(2);
vals[32][0] = 41;
vals[32][1] = 'Powder Blue';
vals[33] = new Array(2);
vals[33][0] = 43;
vals[33][1] = 'Beach';
vals[34] = new Array(2);
vals[34][0] = 44;
vals[34][1] = 'Teak';
vals[35] = new Array(2);
vals[35][0] = 45;
vals[35][1] = 'Cherry Oak';
vals[36] = new Array(2);
vals[36][0] = 46;
vals[36][1] = 'Granite Black';
vals[37] = new Array(2);
vals[37][0] = 47;
vals[37][1] = 'Light Silver';
vals[38] = new Array(2);
vals[38][0] = 48;
vals[38][1] = 'Powder Blue';
vals[39] = new Array(2);
vals[39][0] = 49;
vals[39][1] = 'Beach';
vals[40] = new Array(2);
vals[40][0] = 50;
vals[40][1] = 'Teak';
vals[41] = new Array(2);
vals[41][0] = 51;
vals[41][1] = 'Granite Black';
vals[42] = new Array(2);
vals[42][0] = 52;
vals[42][1] = 'Cherry Oak';
vals[43] = new Array(2);
vals[43][0] = 53;
vals[43][1] = 'Light Silver';
vals[44] = new Array(2);
vals[44][0] = 54;
vals[44][1] = 'Powder Blue';
vals[45] = new Array(2);
vals[45][0] = 55;
vals[45][1] = 'Natural Oak';
vals[46] = new Array(2);
vals[46][0] = 56;
vals[46][1] = 'Teak';
vals[47] = new Array(2);
vals[47][0] = 57;
vals[47][1] = 'Granite Black';
vals[48] = new Array(2);
vals[48][0] = 58;
vals[48][1] = 'Light Silver';
vals[49] = new Array(2);
vals[49][0] = 59;
vals[49][1] = 'Powder Blue';
vals[50] = new Array(2);
vals[50][0] = 61;
vals[50][1] = 'Natural Oak';
vals[51] = new Array(2);
vals[51][0] = 62;
vals[51][1] = 'Teak';
vals[52] = new Array(2);
vals[52][0] = 63;
vals[52][1] = 'Cherry Oak';
vals[53] = new Array(2);
vals[53][0] = 64;
vals[53][1] = 'Granite Black';
vals[54] = new Array(2);
vals[54][0] = 65;
vals[54][1] = 'Dark Silver';
vals[55] = new Array(2);
vals[55][0] = 66;
vals[55][1] = 'Beach';
vals[56] = new Array(2);
vals[56][0] = 67;
vals[56][1] = 'Teak';
vals[57] = new Array(2);
vals[57][0] = 68;
vals[57][1] = 'Granite Black';
vals[58] = new Array(2);
vals[58][0] = 69;
vals[58][1] = 'Cherry Oak';
vals[59] = new Array(2);
vals[59][0] = 74;
vals[59][1] = 'Yellow Wax/Blue Liquid';
vals[60] = new Array(2);
vals[60][0] = 75;
vals[60][1] = 'Yellow Wax/Purple Liquid';
vals[61] = new Array(2);
vals[61][0] = 76;
vals[61][1] = 'Red Wax/Yellow Liquid';
vals[62] = new Array(2);
vals[62][0] = 77;
vals[62][1] = 'Blue Wax/Blue Liquid';
vals[63] = new Array(2);
vals[63][0] = 78;
vals[63][1] = 'Red Wax/Blue Liquid';
vals[64] = new Array(2);
vals[64][0] = 80;
vals[64][1] = 'Red Wax/Purple Liquid';
vals[65] = new Array(2);
vals[65][0] = 81;
vals[65][1] = 'Red Wax';
vals[66] = new Array(2);
vals[66][0] = 82;
vals[66][1] = 'Blue Wax';
vals[67] = new Array(2);
vals[67][0] = 83;
vals[67][1] = 'Purple Wax';
vals[68] = new Array(2);
vals[68][0] = 84;
vals[68][1] = 'Orange Wax';
vals[69] = new Array(2);
vals[69][0] = 85;
vals[69][1] = 'Green';
vals[70] = new Array(2);
vals[70][0] = 86;
vals[70][1] = 'Blue';
vals[71] = new Array(2);
vals[71][0] = 87;
vals[71][1] = 'Purple';
vals[72] = new Array(2);
vals[72][0] = 88;
vals[72][1] = 'Silver';
vals[73] = new Array(2);
vals[73][0] = 89;
vals[73][1] = 'Black';
vals[74] = new Array(2);
vals[74][0] = 90;
vals[74][1] = 'Silver';
vals[75] = new Array(2);
vals[75][0] = 91;
vals[75][1] = 'Black';
vals[76] = new Array(2);
vals[76][0] = 92;
vals[76][1] = 'Yellow Wax/Blue Liquid';
vals[77] = new Array(2);
vals[77][0] = 93;
vals[77][1] = 'Yellow Wax/Purple Liquid';
vals[78] = new Array(2);
vals[78][0] = 94;
vals[78][1] = 'Red Wax/Yellow Liquid';
vals[79] = new Array(2);
vals[79][0] = 95;
vals[79][1] = 'Blue Wax/Blue Liquid';
vals[80] = new Array(2);
vals[80][0] = 96;
vals[80][1] = 'Red Wax/Blue Liquid';
vals[81] = new Array(2);
vals[81][0] = 98;
vals[81][1] = 'Red Wax/Purple Liquid';
vals[82] = new Array(2);
vals[82][0] = 99;
vals[82][1] = 'Red Wax';
vals[83] = new Array(2);
vals[83][0] = 100;
vals[83][1] = 'Blue Wax';
vals[84] = new Array(2);
vals[84][0] = 101;
vals[84][1] = 'Purple Wax';
vals[85] = new Array(2);
vals[85][0] = 102;
vals[85][1] = 'Orange Wax';
vals[86] = new Array(2);
vals[86][0] = 103;
vals[86][1] = 'Silver';
vals[87] = new Array(2);
vals[87][0] = 104;
vals[87][1] = 'Black';
vals[88] = new Array(2);
vals[88][0] = 105;
vals[88][1] = 'Green';
vals[89] = new Array(2);
vals[89][0] = 106;
vals[89][1] = 'Blue';
vals[90] = new Array(2);
vals[90][0] = 107;
vals[90][1] = 'Purple';
vals[91] = new Array(2);
vals[91][0] = 108;
vals[91][1] = 'Silver';
vals[92] = new Array(2);
vals[92][0] = 109;
vals[92][1] = 'Black';
vals[93] = new Array(2);
vals[93][0] = 110;
vals[93][1] = 'White Wax/Blue Liquid';
vals[94] = new Array(2);
vals[94][0] = 111;
vals[94][1] = 'White Wax/Blue Liquid';
vals[95] = new Array(2);
vals[95][0] = 130;
vals[95][1] = '2Cyan + 1Black';
vals[96] = new Array(2);
vals[96][0] = 131;
vals[96][1] = '5Cyan + 1Black';
vals[97] = new Array(2);
vals[97][0] = 132;
vals[97][1] = '2 Magenta + 1 Black';
vals[98] = new Array(2);
vals[98][0] = 133;
vals[98][1] = '5 Magenta + 1 Black';
vals[99] = new Array(2);
vals[99][0] = 134;
vals[99][1] = '2 Yellow + 1 Black';
vals[100] = new Array(2);
vals[100][0] = 135;
vals[100][1] = '5 Yellow + 1 Black';
vals[101] = new Array(2);
vals[101][0] = 136;
vals[101][1] = '15"';
vals[102] = new Array(2);
vals[102][0] = 137;
vals[102][1] = '16"';
vals[103] = new Array(2);
vals[103][0] = 138;
vals[103][1] = '14"';
vals[104] = new Array(2);
vals[104][0] = 139;
vals[104][1] = '15"';
vals[105] = new Array(2);
vals[105][0] = 140;
vals[105][1] = '16"';
vals[106] = new Array(2);
vals[106][0] = 141;
vals[106][1] = '12"';
vals[107] = new Array(2);
vals[107][0] = 142;
vals[107][1] = '13"';
vals[108] = new Array(2);
vals[108][0] = 143;
vals[108][1] = '14"';
vals[109] = new Array(2);
vals[109][0] = 144;
vals[109][1] = '15"';
vals[110] = new Array(2);
vals[110][0] = 145;
vals[110][1] = '13"';
vals[111] = new Array(2);
vals[111][0] = 146;
vals[111][1] = '14';
vals[112] = new Array(2);
vals[112][0] = 147;
vals[112][1] = '15"';
vals[113] = new Array(2);
vals[113][0] = 148;
vals[113][1] = '13"';
vals[114] = new Array(2);
vals[114][0] = 149;
vals[114][1] = '14"';
vals[115] = new Array(2);
vals[115][0] = 150;
vals[115][1] = '13"';
vals[116] = new Array(2);
vals[116][0] = 151;
vals[116][1] = '14"';
vals[117] = new Array(2);
vals[117][0] = 152;
vals[117][1] = '13"';
vals[118] = new Array(2);
vals[118][0] = 153;
vals[118][1] = '14"';
vals[119] = new Array(2);
vals[119][0] = 154;
vals[119][1] = '13"';
vals[120] = new Array(2);
vals[120][0] = 155;
vals[120][1] = '14"';
vals[121] = new Array(2);
vals[121][0] = 156;
vals[121][1] = '15"';
vals[122] = new Array(2);
vals[122][0] = 157;
vals[122][1] = '13"';
vals[123] = new Array(2);
vals[123][0] = 158;
vals[123][1] = '14"';
vals[124] = new Array(2);
vals[124][0] = 159;
vals[124][1] = '15"';
vals[125] = new Array(2);
vals[125][0] = 160;
vals[125][1] = '13"';
vals[126] = new Array(2);
vals[126][0] = 161;
vals[126][1] = '14"';
vals[127] = new Array(2);
vals[127][0] = 162;
vals[127][1] = '15"';
vals[128] = new Array(2);
vals[128][0] = 163;
vals[128][1] = '13"';
vals[129] = new Array(2);
vals[129][0] = 164;
vals[129][1] = '14';
vals[130] = new Array(2);
vals[130][0] = 165;
vals[130][1] = '15"';
vals[131] = new Array(2);
vals[131][0] = 166;
vals[131][1] = '13"';
vals[132] = new Array(2);
vals[132][0] = 167;
vals[132][1] = '14"';
vals[133] = new Array(2);
vals[133][0] = 168;
vals[133][1] = '15"';
vals[134] = new Array(2);
vals[134][0] = 169;
vals[134][1] = '13"';
vals[135] = new Array(2);
vals[135][0] = 170;
vals[135][1] = '14"';
vals[136] = new Array(2);
vals[136][0] = 171;
vals[136][1] = '15"';
vals[137] = new Array(2);
vals[137][0] = 172;
vals[137][1] = '14"';
vals[138] = new Array(2);
vals[138][0] = 173;
vals[138][1] = '15"';
vals[139] = new Array(2);
vals[139][0] = 174;
vals[139][1] = '14"';
vals[140] = new Array(2);
vals[140][0] = 175;
vals[140][1] = '15"';
vals[141] = new Array(2);
vals[141][0] = 176;
vals[141][1] = '13"';
vals[142] = new Array(2);
vals[142][0] = 177;
vals[142][1] = '14"';
vals[143] = new Array(2);
vals[143][0] = 178;
vals[143][1] = '15"';
vals[144] = new Array(2);
vals[144][0] = 179;
vals[144][1] = '13"';
vals[145] = new Array(2);
vals[145][0] = 180;
vals[145][1] = '14"';
vals[146] = new Array(2);
vals[146][0] = 181;
vals[146][1] = '15"';
vals[147] = new Array(2);
vals[147][0] = 182;
vals[147][1] = '13"';
vals[148] = new Array(2);
vals[148][0] = 183;
vals[148][1] = '14"';
vals[149] = new Array(2);
vals[149][0] = 184;
vals[149][1] = '15"';
vals[150] = new Array(2);
vals[150][0] = 185;
vals[150][1] = '13"';
vals[151] = new Array(2);
vals[151][0] = 186;
vals[151][1] = '14"';
vals[152] = new Array(2);
vals[152][0] = 187;
vals[152][1] = '15"';
vals[153] = new Array(2);
vals[153][0] = 188;
vals[153][1] = '13"';
vals[154] = new Array(2);
vals[154][0] = 189;
vals[154][1] = '14"';
vals[155] = new Array(2);
vals[155][0] = 190;
vals[155][1] = '15"';
vals[156] = new Array(2);
vals[156][0] = 191;
vals[156][1] = '14';
vals[157] = new Array(2);
vals[157][0] = 192;
vals[157][1] = '15"';
vals[158] = new Array(2);
vals[158][0] = 193;
vals[158][1] = '13"';
vals[159] = new Array(2);
vals[159][0] = 194;
vals[159][1] = '14"';
vals[160] = new Array(2);
vals[160][0] = 195;
vals[160][1] = '15"';
vals[161] = new Array(2);
vals[161][0] = 196;
vals[161][1] = '13"';
vals[162] = new Array(2);
vals[162][0] = 197;
vals[162][1] = '14"';
vals[163] = new Array(2);
vals[163][0] = 198;
vals[163][1] = '15"';
vals[164] = new Array(2);
vals[164][0] = 199;
vals[164][1] = '15"';
vals[165] = new Array(2);
vals[165][0] = 200;
vals[165][1] = '13"';
vals[166] = new Array(2);
vals[166][0] = 201;
vals[166][1] = '14"';
vals[167] = new Array(2);
vals[167][0] = 202;
vals[167][1] = '15"';
vals[168] = new Array(2);
vals[168][0] = 203;
vals[168][1] = '13"';
vals[169] = new Array(2);
vals[169][0] = 204;
vals[169][1] = '14"';
vals[170] = new Array(2);
vals[170][0] = 205;
vals[170][1] = '15"';
vals[171] = new Array(2);
vals[171][0] = 206;
vals[171][1] = '13"';
vals[172] = new Array(2);
vals[172][0] = 207;
vals[172][1] = '14"';
vals[173] = new Array(2);
vals[173][0] = 208;
vals[173][1] = '15"';
vals[174] = new Array(2);
vals[174][0] = 209;
vals[174][1] = '13"';
vals[175] = new Array(2);
vals[175][0] = 210;
vals[175][1] = '14"';
vals[176] = new Array(2);
vals[176][0] = 211;
vals[176][1] = '15"';
vals[177] = new Array(2);
vals[177][0] = 212;
vals[177][1] = '13"';
vals[178] = new Array(2);
vals[178][0] = 213;
vals[178][1] = '14"';
vals[179] = new Array(2);
vals[179][0] = 214;
vals[179][1] = '15"';
vals[180] = new Array(2);
vals[180][0] = 215;
vals[180][1] = '13"';
vals[181] = new Array(2);
vals[181][0] = 216;
vals[181][1] = '14"';
vals[182] = new Array(2);
vals[182][0] = 217;
vals[182][1] = '15"';
vals[183] = new Array(2);
vals[183][0] = 218;
vals[183][1] = '13"';
vals[184] = new Array(2);
vals[184][0] = 219;
vals[184][1] = '14"';
vals[185] = new Array(2);
vals[185][0] = 220;
vals[185][1] = '15"';
vals[186] = new Array(2);
vals[186][0] = 221;
vals[186][1] = '13"';
vals[187] = new Array(2);
vals[187][0] = 222;
vals[187][1] = '14"';
vals[188] = new Array(2);
vals[188][0] = 223;
vals[188][1] = '15"';
vals[189] = new Array(2);
vals[189][0] = 224;
vals[189][1] = '13"';
vals[190] = new Array(2);
vals[190][0] = 225;
vals[190][1] = '14"';
vals[191] = new Array(2);
vals[191][0] = 226;
vals[191][1] = '15"';
vals[192] = new Array(2);
vals[192][0] = 227;
vals[192][1] = '13"';
vals[193] = new Array(2);
vals[193][0] = 228;
vals[193][1] = '14"';
vals[194] = new Array(2);
vals[194][0] = 229;
vals[194][1] = '15"';
vals[195] = new Array(2);
vals[195][0] = 230;
vals[195][1] = '13"';
vals[196] = new Array(2);
vals[196][0] = 231;
vals[196][1] = '14"';
vals[197] = new Array(2);
vals[197][0] = 232;
vals[197][1] = '15"';
vals[198] = new Array(2);
vals[198][0] = 233;
vals[198][1] = '13"';
vals[199] = new Array(2);
vals[199][0] = 234;
vals[199][1] = '14"';
vals[200] = new Array(2);
vals[200][0] = 235;
vals[200][1] = '13"';
vals[201] = new Array(2);
vals[201][0] = 236;
vals[201][1] = '14"';
vals[202] = new Array(2);
vals[202][0] = 237;
vals[202][1] = 'Red/Black';
vals[203] = new Array(2);
vals[203][0] = 238;
vals[203][1] = 'Blue/Black';
vals[204] = new Array(2);
vals[204][0] = 239;
vals[204][1] = 'Gray/Black';
vals[205] = new Array(2);
vals[205][0] = 240;
vals[205][1] = 'Yellow/Black';
vals[206] = new Array(2);
vals[206][0] = 241;
vals[206][1] = 'Solid Black ';
vals[207] = new Array(2);
vals[207][0] = 242;
vals[207][1] = 'Solid Gray';
vals[208] = new Array(2);
vals[208][0] = 243;
vals[208][1] = 'RED';
vals[209] = new Array(2);
vals[209][0] = 244;
vals[209][1] = 'GREEN ';
vals[210] = new Array(2);
vals[210][0] = 245;
vals[210][1] = 'LIGHT BLUE';
vals[211] = new Array(2);
vals[211][0] = 246;
vals[211][1] = 'DARK BLUE';
vals[212] = new Array(2);
vals[212][0] = 247;
vals[212][1] = 'TAN';
vals[213] = new Array(2);
vals[213][0] = 248;
vals[213][1] = 'BLACK';
vals[214] = new Array(2);
vals[214][0] = 249;
vals[214][1] = 'RED';
vals[215] = new Array(2);
vals[215][0] = 250;
vals[215][1] = 'BLUE';
vals[216] = new Array(2);
vals[216][0] = 251;
vals[216][1] = 'BLACK';
vals[217] = new Array(2);
vals[217][0] = 252;
vals[217][1] = 'BLACK';
vals[218] = new Array(2);
vals[218][0] = 253;
vals[218][1] = 'BLUE';
vals[219] = new Array(2);
vals[219][0] = 254;
vals[219][1] = 'RED';
vals[220] = new Array(2);
vals[220][0] = 255;
vals[220][1] = 'BLACK';
vals[221] = new Array(2);
vals[221][0] = 256;
vals[221][1] = 'BLUE';
vals[222] = new Array(2);
vals[222][0] = 257;
vals[222][1] = 'RED';
vals[223] = new Array(2);
vals[223][0] = 258;
vals[223][1] = 'GOLD';
vals[224] = new Array(2);
vals[224][0] = 259;
vals[224][1] = 'Silver Black ';
vals[225] = new Array(2);
vals[225][0] = 260;
vals[225][1] = 'Blue frame';
vals[226] = new Array(2);
vals[226][0] = 261;
vals[226][1] = 'SILVER BLUE';
vals[227] = new Array(2);
vals[227][0] = 262;
vals[227][1] = 'DARK GRAY ';
vals[228] = new Array(2);
vals[228][0] = 263;
vals[228][1] = 'SILVER BLACK';
vals[229] = new Array(2);
vals[229][0] = 264;
vals[229][1] = 'BLUE SILVER';
vals[230] = new Array(2);
vals[230][0] = 265;
vals[230][1] = 'BLACK';
vals[231] = new Array(2);
vals[231][0] = 266;
vals[231][1] = 'SILVER';
vals[232] = new Array(2);
vals[232][0] = 299;
vals[232][1] = 'Orange';
vals[233] = new Array(2);
vals[233][0] = 300;
vals[233][1] = 'Beige';
vals[234] = new Array(2);
vals[234][0] = 301;
vals[234][1] = 'Yellow';
vals[235] = new Array(2);
vals[235][0] = 302;
vals[235][1] = 'Black';
vals[236] = new Array(2);
vals[236][0] = 303;
vals[236][1] = 'Gray';
vals[237] = new Array(2);
vals[237][0] = 304;
vals[237][1] = 'White';
vals[238] = new Array(2);
vals[238][0] = 305;
vals[238][1] = 'Red';
vals[239] = new Array(2);
vals[239][0] = 306;
vals[239][1] = 'Green';
vals[240] = new Array(2);
vals[240][0] = 307;
vals[240][1] = 'Blue';
vals[241] = new Array(2);
vals[241][0] = 308;
vals[241][1] = 'Orange';
vals[242] = new Array(2);
vals[242][0] = 309;
vals[242][1] = 'Blue';
vals[243] = new Array(2);
vals[243][0] = 310;
vals[243][1] = 'Red';
vals[244] = new Array(2);
vals[244][0] = 311;
vals[244][1] = 'Gray';
vals[245] = new Array(2);
vals[245][0] = 312;
vals[245][1] = 'Black';
vals[246] = new Array(2);
vals[246][0] = 313;
vals[246][1] = 'Beige';
vals[247] = new Array(2);
vals[247][0] = 314;
vals[247][1] = 'Yellow';
vals[248] = new Array(2);
vals[248][0] = 315;
vals[248][1] = 'White';
vals[249] = new Array(2);
vals[249][0] = 316;
vals[249][1] = 'Green';
vals[250] = new Array(2);
vals[250][0] = 317;
vals[250][1] = 'Red';
vals[251] = new Array(2);
vals[251][0] = 318;
vals[251][1] = 'Gray';
vals[252] = new Array(2);
vals[252][0] = 319;
vals[252][1] = 'Blue';
vals[253] = new Array(2);
vals[253][0] = 320;
vals[253][1] = 'Yellow';
vals[254] = new Array(2);
vals[254][0] = 321;
vals[254][1] = 'Green';
vals[255] = new Array(2);
vals[255][0] = 322;
vals[255][1] = 'Black';
vals[256] = new Array(2);
vals[256][0] = 323;
vals[256][1] = 'Beige';
vals[257] = new Array(2);
vals[257][0] = 324;
vals[257][1] = 'White';
vals[258] = new Array(2);
vals[258][0] = 325;
vals[258][1] = 'Orange';
vals[259] = new Array(2);
vals[259][0] = 326;
vals[259][1] = 'Blue';
vals[260] = new Array(2);
vals[260][0] = 327;
vals[260][1] = 'Orange';
vals[261] = new Array(2);
vals[261][0] = 328;
vals[261][1] = 'Beige';
vals[262] = new Array(2);
vals[262][0] = 329;
vals[262][1] = 'Red';
vals[263] = new Array(2);
vals[263][0] = 330;
vals[263][1] = 'Yellow';
vals[264] = new Array(2);
vals[264][0] = 331;
vals[264][1] = 'Gray';
vals[265] = new Array(2);
vals[265][0] = 332;
vals[265][1] = 'Green';
vals[266] = new Array(2);
vals[266][0] = 333;
vals[266][1] = 'White';
vals[267] = new Array(2);
vals[267][0] = 334;
vals[267][1] = 'Black';
vals[268] = new Array(2);
vals[268][0] = 335;
vals[268][1] = 'Black';
vals[269] = new Array(2);
vals[269][0] = 336;
vals[269][1] = 'Orange';
vals[270] = new Array(2);
vals[270][0] = 337;
vals[270][1] = 'Blue';
vals[271] = new Array(2);
vals[271][0] = 338;
vals[271][1] = 'Gray';
vals[272] = new Array(2);
vals[272][0] = 339;
vals[272][1] = 'Yellow';
vals[273] = new Array(2);
vals[273][0] = 340;
vals[273][1] = 'White';
vals[274] = new Array(2);
vals[274][0] = 341;
vals[274][1] = 'Red';
vals[275] = new Array(2);
vals[275][0] = 342;
vals[275][1] = 'Beige';
vals[276] = new Array(2);
vals[276][0] = 343;
vals[276][1] = 'Green';
vals[277] = new Array(2);
vals[277][0] = 344;
vals[277][1] = 'Orange';
vals[278] = new Array(2);
vals[278][0] = 345;
vals[278][1] = 'Black';
vals[279] = new Array(2);
vals[279][0] = 346;
vals[279][1] = 'Red';
vals[280] = new Array(2);
vals[280][0] = 347;
vals[280][1] = 'Yellow';
vals[281] = new Array(2);
vals[281][0] = 348;
vals[281][1] = 'Right';
vals[282] = new Array(2);
vals[282][0] = 349;
vals[282][1] = 'Left';
vals[283] = new Array(2);
vals[283][0] = 350;
vals[283][1] = 'left';
vals[284] = new Array(2);
vals[284][0] = 351;
vals[284][1] = 'Right';
vals[285] = new Array(2);
vals[285][0] = 352;
vals[285][1] = 'Fish';
vals[286] = new Array(2);
vals[286][0] = 353;
vals[286][1] = 'Swan';
vals[287] = new Array(2);
vals[287][0] = 354;
vals[287][1] = 'Penguin';
vals[288] = new Array(2);
vals[288][0] = 355;
vals[288][1] = 'Silver/Black';
vals[289] = new Array(2);
vals[289][0] = 356;
vals[289][1] = 'Beige';
vals[290] = new Array(2);
vals[290][0] = 361;
vals[290][1] = 'E';
vals[291] = new Array(2);
vals[291][0] = 362;
vals[291][1] = 'A';
vals[292] = new Array(2);
vals[292][0] = 363;
vals[292][1] = 'C';
vals[293] = new Array(2);
vals[293][0] = 364;
vals[293][1] = 'F ADP-45CB 19V2.4A';
vals[294] = new Array(2);
vals[294][0] = 365;
vals[294][1] = 'REV.E 3 19V-2.4A';
var min = 0;
var max = 0;
var middle = 0;
max = vals.length - 1;
while (min <= max) {
middle = parseInt((max + min) / 2);
if (itemindex == vals[middle][0]) {
break;
} else if (itemindex < vals[middle][0]) {
max = middle - 1;
} else {
min = middle + 1;
}
}
return vals[middle][1];

}


function doesExist(theId) {
  if (document.getElementById && document.getElementById(theId)) return true;
  if (document.all) {
    if (theId != null) return true;
  }
  if (document.layers && document.layers[theId]) return true;
  return false;
}

// alterError - fixes a rounding bug in Netscape 2
function alterError(value) {
	if (value<=0.99) {
		newPounds = '0';
	} else {
		newPounds = parseInt(value);
	}
	newPence = parseInt((value+.0008 - newPounds)* 100);
	if (eval(newPence) <= 9) newPence='0'+newPence;
	newString = newPounds + '.' + newPence;
	return (newString);
}


function format1000 ( n ) {
    for (var i = n.indexOf('.')  -3; i > 0; i -= 3)
        n = n.substring(0, i) + ',' + n.substring(i);
    return n;
    }


function formatNum(expr,decplaces) {
var str = (Math.round(parseFloat(expr) * Math.pow(10,decplaces))).toString()
	while (str.length <= decplaces) {
		str = "0" + str;
		}
	var decpoint = str.length - decplaces;
	return str.substring(0,decpoint) + "." + str.substring(decpoint,str,length);
	}


function addSpaceR(argvalue, numlength)
{
if (!numlength > 0)
	numlength = 10;

	if (argvalue.length < numlength) {
		for (var i = argvalue.length; i < numlength; i++)
		argvalue = argvalue + " ";
	}
	return argvalue;
}


function addSpaceL(argvalue, numlength)
{
if (!numlength > 0)
	numlength = 10;

	if (argvalue.length < numlength) {
		for (var i = argvalue.length; i < numlength; i++)
		argvalue = " " + argvalue;
	}
	return argvalue;
}


function shipit(totalitems, totalweight, delivery, totprice) {
	shipoption = 2;
   
   switch (shipoption) {

		case 0:	// never add shipping charges.
           return 0;
		   break;

		case 4:	//1 = Add shipping charges according to the number of items ordered.

			 	if (totalitems <= 5) 
				  	return arShip[4+delivery][2];

				if (totalitems >= 5.01 && totalitems <= 10)  
					return arShip[4+delivery][3];

				if (totalitems >= 10.01 && totalitems <= 50)  
					return arShip[4+delivery][4];

				if (totalitems >= 50.01) 
					return arShip[4+delivery][5];

				break;
	
		case 1:  // Non-Variable shipping 
	
			return arShip[11][2];
			break;
	
        case 2:  // Add shipping charges according to the weight of the items ordered.
	
		   if (totalweight <= 2.5) 
		   	return arShip[7+delivery][2] ;

		   if (totalweight >= 2.51 && totalweight<= 10) 
		   	return arShip[7+delivery][3] ;

		   if ( totalweight>= 10.01 && totalweight<= 45) 
		   	return arShip[7+delivery][4] ;

		   if ( totalweight >= 45.01) 
		   	return arShip[7+delivery][5];

			break;
	
		case 3: // Add shipping charges according to the total price of the items.
	
            if (totprice <= 20) 
					return arShip[delivery][2];

				if (totprice >= 20.01 && totprice<= 40) 
					return arShip[delivery][3];

				if (totprice >= 40.01 && totprice<= 60) 
					return arShip[delivery][4];

				if (totprice >= 60.01)
					return arShip[delivery][5];
					break;
		}
	}

function taxes(state, totals, shipping, country) {
   option = 1;
	switch (option) {

		case 0:  // no tax.
			tax = 0;
			break;

		case 1:  // tax only if customer is in my state or my applicable business states.
			tax = 0;

			// US and Canada
			for (var i = 1; i < arStates.length; i++) {
				if ((arStates[i][1] == state.toUpperCase()) && (arStates[i][3]== "1")) {
				  tax = (parseFloat(totals) + parseFloat(shipping)) * (arStates[i][2] / 100);
				  break;
				}
				if (state.toUpperCase() == arStates[i][1]) {
				  tax = totals * (arStates[i][2]) / 100;
				  break;
				}
			}

			// International
			for (var i = 1; i < arCountrys.length; i++) {
				if ((arCountrys[i][1] == country.toUpperCase()) && (arCountrys[i][3]== "1")) {
				  tax = (parseFloat(totals) + parseFloat(shipping)) * (arCountrys[i][2] / 100);
				  break;
				}
				if (country.toUpperCase() == arCountrys[i][1]) {
				  tax = totals * (arCountrys[i][2]) / 100;
				  break;
				}
			}
			break;

		case 2:  // always tax.
			tax = (eval(totals) ) * (0) / 100;
			break;

        case 3:  // apply internet tax rules
         tax = 0;

			// US and Canada
			for (var i = 1; i < arStates.length; i++) {
				if ((arStates[i][1] == state.toUpperCase()) && (arStates[i][3]== "1")) {
				  tax = (parseFloat(totals) + parseFloat(shipping)) * (arStates[i][2] / 100);
				  break;
				}
				if (state.toUpperCase() == arStates[i][1]) {
				  tax = totals * (arStates[i][2]) / 100;
				  break;
				}
			}

			// International
			for (var i = 1; i < arCountrys.length; i++) {
				if ((arCountrys[i][1] == country.toUpperCase()) && (arCountrys[i][3]== "1")) {
				  tax = (parseFloat(totals) + parseFloat(shipping)) * (arCountrys[i][2] / 100);
				  break;
				}
				if (country.toUpperCase() == arCountrys[i][1]) {
				  tax = totals * (arCountrys[i][2]) / 100;
				  break;
				}
			}
			break;
		}
	return tax;
	}
	
function showCustomer(TheCookieName) {
MakeCookieArray(GetCookie(TheCookieName));
	if (ckArray[0] != "*") {
	firstname = ckArray[0];
	lastname  = ckArray[1];
	address   = ckArray[2];
	city 	  = ckArray[3];
	state 	  = ckArray[4];
	zip 	  = ckArray[5];
	country   = ckArray[6];
    firstname2 = ckArray[7];
	lastname2  = ckArray[8];
	address2   = ckArray[9];
	city2 	  = ckArray[10];
	state2 	  = ckArray[11];
	zip2 	  = ckArray[12];
	country2   = ckArray[13];
    phone 	  = ckArray[14];
	email 	  = ckArray[15];
	if (ckArray[16] != "") {
		delivery  = parseInt(ckArray[16]);
	}
	else {
	delivery  = parseInt(1);
	}
    company = ckArray[17];
	}
}

function getSelectedButton(buttonGroup) 
{
	for (var i = 0; i < buttonGroup.length; i++) {
		if (buttonGroup[i].checked) {
         return buttonGroup[i].value
        }
		}
	return 0
}

function shipvia(delivery) {
   switch (delivery) {
  
	 case 2:
       days= "2nd Day (BLUE)";
       return days;
	   break;
	 case 3:
       days= "Next Day (RED)";
       return days;
	   break;
     case 1:	
       days= "Regular";
       return days;
	   break;
   }
}


// clearBasket() - removes all items from the basket
function clearBasket() {

   index = document.cookie.indexOf("TheBasket");
		document.cookie="TheBasket=.";
	}


// showItems () - creates a table of items in the basket and
// creates the start of a form which sets information for
// basket items.

function showItems() {
  var pnptaxable ="";

  index = document.cookie.indexOf("TheBasket");
  countbegin = (document.cookie.indexOf("=", index) + 1);
   	countend = document.cookie.indexOf(";", index);
   	if (countend == -1) {
      countend = document.cookie.length;
   	}
  fulllist = document.cookie.substring(countbegin, countend);
  totprice = 0;
	
  document.writeln('<FORM NAME="test" TARGET="main">');
  document.writeln('<INPUT TYPE = "hidden" NAME = "info">');
  document.writeln('<TABLE BORDER="0" CELLPADDING=3>');
  document.writeln('<TR BGCOLOR="#808080"><TD><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >Cat.No.</font></TD><TD><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >Description</font></TD><TD><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><font size=-1>Quantity</font></font></TD><TD WIDTH=100><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><font size=-1>Cost Each</font></font></TD><td WIDTH=100><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><font size=-1>Total Cost</font></font></td></TR>');
  
  itemsonOrder += "Cat.No.              Description               Quantity    Cost Each\n";
  itemsonOrder += "====================================================================\n\n";

  var option1 = 0;
  var option2 = 0;
  var option3 = 0;
  var subItemID = 0;
  var taxable = 0;
  itemlist = 0;

  for (var i = 0; i <= fulllist.length; i++) {
  	if (fulllist.substring(i,i+1) == '[') {
  		thisitem = 1;
  		itemstart = i+1;
     } else if (fulllist.substring(i,i+1) == ']') {
        itemend = i;
		//thequantity = fulllist.substring(itemstart, itemend);
			
         itemtotal = 0;
			itemtotal = (eval(theprice*thequantity));
			temptotal = itemtotal * 100;
			var actualprice = 0;
			var individualprice = 0;
			individualprice = eval(getPrice(theitem,thequantity) + eval(theprice));
			actualprice = eval(thequantity * individualprice);
			
         if (eval(taxable) == 1) {
            taxtotal = taxtotal + actualprice;
         }
         totprice = totprice + actualprice;
         itemlist=itemlist+1;
			totalweight += eval(thequantity)*eval(theweight);
         totalnumitems += eval(thequantity);
         itemend = i;
         
         var nameandvalues;
         var nameandoptions;
         nameandvalues = thename;         
         nameandoptions = thename;
         if (eval(option1) != 0) {
            nameandoptions = nameandoptions + "|" + option1;
            nameandvalues = nameandvalues + " (" + getValueName(eval(option1)) + ") ";
         }
         if (eval(option2) != 0) {
            nameandoptions = nameandoptions + "|" + option2;
            nameandvalues = nameandvalues + " (" + getValueName(eval(option2)) + ") ";
         }
         if (eval(option3) != 0) {
            nameandoptions = nameandoptions + "|" + option3;
            nameandvalues = nameandvalues + " (" + getValueName(eval(option3)) + ") ";
         }


         document.write('<tr BGCOLOR="#C0C0C0"><td><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >'+theitem+'</font></td><td><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >'+nameandvalues+'</font></td>');
         document.write('<td align=center><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >'+ thequantity +'</font></td><td align=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36;  '+ format1000(formatNum(individualprice,2)) +'</font></td><td align=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36;  '+ format1000(formatNum(actualprice,2)) +'</font></td></tr>');
         
         itemsonOrder += addSpaceR(theitem, 12) + addSpaceR(nameandoptions, 34);
         itemsonOrder += addSpaceL(format1000(formatNum(thequantity,2)), 10) +  addSpaceL( format1000(formatNum(individualprice,2)), 13) + "\n";

         // iTransact code
		   //document.write('<INPUT TYPE="hidden" NAME="'+itemlist+'-desc" VALUE="'+nameandoptions+'" > ');
		   //document.write('<INPUT TYPE="hidden" NAME="'+itemlist+'-qty" VALUE="'+thequantity+'"> ');
		   //document.write('<INPUT TYPE="hidden" NAME="'+itemlist+'-cost" VALUE="'+formatNum(individualprice,2)+'"> ');
  
         // plug 'n Pay code
			document.write('<INPUT TYPE="hidden" NAME="item'+itemlist+'" VALUE="'+theitem+'"> ');
			document.write('<INPUT TYPE="hidden" NAME="description'+itemlist+'" VALUE="'+nameandoptions+'" > ');
			document.write('<INPUT TYPE="hidden" NAME="quantity'+itemlist+'" VALUE="'+thequantity+'"> ');
			document.write('<INPUT TYPE="hidden" NAME="cost'+itemlist+'" VALUE="'+formatNum(individualprice,2)+'"> ');

			if (taxable == 1) {
              pnptaxable = "y";
            }
			else
			{
			  pnptaxable = "n";
			}

			document.write('<INPUT TYPE="hidden" NAME="taxable'+itemlist+'" VALUE="'+pnptaxable+'"> ');
            document.write('<INPUT TYPE="hidden" NAME="order-id" VALUE="'+theitem+'"> ');

		} else if (fulllist.substring(i,i+1) == '|') {
			if (thisitem==1) theitem = fulllist.substring(itemstart, i);
			if (thisitem==2) thename = fulllist.substring(itemstart, i);
			if (thisitem==3) theprice = fulllist.substring(itemstart, i);
			if (thisitem==4) theweight = fulllist.substring(itemstart, i);
            if (thisitem==5) thequantity = fulllist.substring(itemstart, i);
            if (thisitem==6) option1 = fulllist.substring(itemstart, i);
			if (thisitem==7) option2 = fulllist.substring(itemstart, i);
			if (thisitem==8) option3 = fulllist.substring(itemstart, i);
            if (thisitem==9) subItemID = fulllist.substring(itemstart, i);
            if (thisitem==10) taxable = fulllist.substring(itemstart, i);
            if (thisitem==11) qtyavailable = fulllist.substring(itemstart, i);  // added 3/30/06 DLJ                     
			thisitem++;
			itemstart=i+1;
		}
	}
 
    document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Sub Total</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36; '+ format1000(formatNum(totprice,2))+'</font></td></tr>');
    itemsonOrder += "\n" + addSpaceL("Total: $ " + format1000(formatNum(totprice,2)),81) + "\n";
    document.writeln('<INPUT TYPE="hidden" NAME="Goods Total" VALUE="'+format1000(formatNum(totprice,2))+'" SIZE="40">');

    // Calculate Shipping and Taxes
    shipchrg = shipit(totalnumitems, totalweight, parseFloat(parent.banner.delivery), totprice);

  
    // test for Plug'n Pay
    if (doesExist(document.test.first_name)) {
    //if (document.test.first_name != null) {
      if (document.test.first_name.value != "") {
        taxchrg = taxes(state2, taxtotal, shipchrg, country);
        invoice = formatNum(totprice + tax + eval(shipchrg),2);
      }
    }

    // test for Purchase Order - Internet Explorer
    if ((is_ie) || (is_firefox)) {
      if  (document.junk != null) {
        taxchrg = taxes(state2, taxtotal, shipchrg, country);
        invoice = formatNum(totprice + tax + eval(shipchrg),2);
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Shipping Weight</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >'+ format1000(formatNum(totalweight,0)) + ' Lbs</font></td></tr>');
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Shipping Charges</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36; '+ format1000(formatNum(parseFloat(shipchrg),2)) + '</font></td></tr>');
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Taxes</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36; '+ format1000(formatNum(tax,2)) + '</font></td></tr>');
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Total</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36; '+ format1000(invoice) + '</font></td></tr>');
	  }
    }

    // test for Purchase Order - Netscape
	if ( document.submitForm != null) {
        taxchrg = taxes(state2, taxtotal, shipchrg, country);
        invoice = formatNum(totprice + tax + eval(shipchrg),2);
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Shipping Weight</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >'+ format1000(formatNum(totalweight,0)) + ' Lbs</font></td></tr>');
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Shipping Charges</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36; '+ format1000(formatNum(parseFloat(shipchrg),2)) + '</font></td></tr>');
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Taxes</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36; '+ format1000(formatNum(tax,2)) + '</font></td></tr>');
        document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Total</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" > &#36; '+ format1000(invoice) + '</font></td></tr>');
    }


    itemsonOrder += "====================================================================\n\n";
    itemsonOrder += addSpaceL("Total Shipping Weight of items: ",72) + format1000(formatNum(totalweight,0)) + " Lbs\n";
    itemsonOrder += addSpaceL("Total Shipping Charges: $ ",73) + format1000(formatNum(parseFloat(shipchrg),2))+ "\n";
    itemsonOrder += addSpaceL("Total Taxes: $ ",73) + format1000(formatNum(tax,2))+ "\n";
    itemsonOrder += addSpaceL("Total value of this Invoice is: $ ",73) + format1000(formatNum(invoice,2)) +"\n\n";
    itemsonOrder += "Thanks for shopping at SmartBuysOnly.com\n";

  //  document.writeln('<TR BGCOLOR="#808080"><TD COLSPAN=3 ALIGN=right><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" ><b>Shipping Weight</B></font></TD><TD ALIGN=left COLSPAN=2><FONT FACE="Verdana"  CLASS="tablefont"  COLOR="#000000" >'+ format1000(formatNum(totalweight,0)) + ' Lbs</font></td></tr>');
    document.writeln('</TABLE>');
  
    // Submit Shipping and Tax information to Credit card processor
    document.write('<INPUT TYPE="hidden" NAME="shipping" value="0">');
	document.write('<BR>');
}

function updateshipping(delivery) {
  shipchrg = shipit(totalnumitems, totalweight, parseFloat(parent.banner.delivery), totprice);
  if (shipchrg != 0) {
    // Plug 'N Pay code
	if (parent.banner.days == "" ) {
	parent.banner.days = "Regular";
	}
    document.test.shipping.value = formatNum(shipchrg,2);
    document.test.shipvia.value  = parent.banner.days;
	taxchrg                      = taxes("ZZ", parseFloat(taxtotal), parseFloat(shipchrg), parent.banner.countrycode);
    document.test.tax.value      = taxchrg;
	return true;
   }
   if (delivery == 0) {
	taxchrg                      = taxes("ZZ", parseFloat(taxtotal), 0, parent.banner.countrycode);
    document.test.tax.value      = taxchrg;
  }

}


