var brandnames = new Array()
brandnames[0] = "squigle"
brandnames[1] = "gengigel"
brandnames[2] = "lysine"
brandnames[3] = "oralb"
brandnames[4] = "curasept220"
brandnames[5] = "cankermelts"
brandnames[6] = "curaseptgel"
brandnames[7] = "ulcerease"
brandnames[8] = "cankercover"
brandnames[9] = "coldstick"
brandnames[10] = "superlysine"
brandnames[11] = "xylimelts"
brandnames[12] = "avaminmelts"
brandnames[13] = "anc"
brandnames[14] = "mirror"
brandnames[15] = "toothbuilder"
brandnames[16] = "xyligum"
brandnames[17] = "periobalance"
brandnames[18] = "curasept205"
brandnames[19] = "hybenx"

var productnames = new Array()
productnames[0] = "squigle"
productnames[1] = "gengigelrinse"
productnames[2] = "gengigel"
productnames[3] = "lysine"
productnames[4] = "oralb"
productnames[5] = "curasept220"
productnames[6] = "cankermelts"
productnames[7] = "curaseptgel"
productnames[8] = "ulcerease"
productnames[9] = "cankercover"
productnames[10] = "coldstick"
productnames[11] = "superlysine90"
productnames[12] = "superlysine180"
productnames[13] = "xylimelts"
productnames[14] = "avaminmelts"
productnames[15] = "anc"
productnames[16] = "mirror"
productnames[17] = "toothbuilder"
productnames[18] = "xyligum"
productnames[19] = "periobalance"
productnames[20] = "curasept205"
productnames[21] = "hybenx"

var priceUKP = new Array()
priceUKP[0] = 6.00
priceUKP[1] = 7.80
priceUKP[2] = 6.40
priceUKP[3] = 6.00
priceUKP[4] = 2.80
priceUKP[5] = 4.90
priceUKP[6] = 6.50
priceUKP[7] = 3.40
priceUKP[8] = 7.00
priceUKP[9] = 6.00
priceUKP[10] = 3.00
priceUKP[11] = 7.00
priceUKP[12] = 12.00
priceUKP[13] = 6.00
priceUKP[14] = 8.00
priceUKP[15] = 2.50
priceUKP[16] = 0.80
priceUKP[17] = 6.50
priceUKP[18] = 1.50
priceUKP[19] = 14.80
priceUKP[20] = 4.90
priceUKP[21] = 6.00

var description = new Array()
description[0] = "Squigle Enamel Saver Toothpaste 4oz"
description[1] = "Gengigel Mouth Rinse 150ml"
description[2] = "Gengigel Gel 20ml"
description[3] = "HealthAid L-Lysine HCl 60 500mg Tablets"
description[4] = "Oral-B CrossAction Vitalizer"
description[5] = "Curasept ADS220 Chlorhexidine Rinse 200ml"
description[6] = "Cankermelts-GX (18 disks)"
description[7] = "Curasept Parodontal Gel 30ml"
description[8] = "UlcerEase Anaesthetic Rinse 178ml"
description[9] = "Quantum Canker Cover (6 Patches)"
description[10] = "Super Lysine+ ColdStick 5g"
description[11] = "Super Lysine+ 90 tablets"
description[12] = "Super Lysine+ 180 tablets"
description[13] = "XyliMelts 60 Domes"
description[14] = "Avamin Melts 30 Disks"
description[15] = "Upgrade to courier delivery"
description[16] = "Oral Examination Mirror"
description[17] = "Squigle Tooth Builder Toothpaste 4.4oz"
description[18] = "XyliGum 12 squares"
description[19] = "PerioBalance 30 lozenges"
description[20] = "Curasept ADS205 Daily Rinse 200ml"
description[21] = "Mouth Ulcer Treatment"


var weight = new Array()
weight[0] = 137
weight[1] = 150
weight[2] = 35
weight[3] = 82
weight[4] = 34
weight[5] = 326
weight[6] = 18
weight[7] = 44
weight[8] = 210
weight[9] = 16
weight[10] = 14
weight[11] = 122
weight[12] = 230
weight[13] = 60
weight[14] = 18
weight[15] = 0
weight[16] = 5
weight[17] = 146
weight[18] = 20
weight[19] = 46
weight[20] = 260
weight[21] = 8

// prices inc. VAT
var squigleUKP = priceUKP[0]
var gengigelrinseUKP = priceUKP[1]
var gengigelUKP = priceUKP[2]
var lysineUKP = priceUKP[3]
var oralbUKP = priceUKP[4]
var curasept220UKP = priceUKP[5]
var cankermeltsUKP = priceUKP[6]
var curaseptgelUKP = priceUKP[7]
var ulcereaseUKP = priceUKP[8]
var cankercoverUKP = priceUKP[9]
var coldstickUKP = priceUKP[10]
var superlysine90UKP = priceUKP[11]
var superlysine180UKP = priceUKP[12]
var xylimeltsUKP = priceUKP[13]
var avaminmeltsUKP = priceUKP[14]
var ancUKP = priceUKP[15]
var mirrorUKP = priceUKP[16]
var toothbuilderUKP = priceUKP[17]
var xyligumUKP = priceUKP[18]
var periobalanceUKP = priceUKP[19]
var curasept205UKP = priceUKP[20]
var hybenxUKP = priceUKP[21]
var labelUKP = 0.17
var boxUKP = 0.36

// weights in grams
var boxWeight = 78
var squigleWeight = weight[0]
var gengigelrinseWeight = weight[1]
var gengigelWeight = weight[2]
var lysineWeight = weight[3]
var oralbWeight = weight[4]
var curasept220Weight = weight[5]
var cankermeltsWeight = weight[6]
var curaseptgelWeight = weight[7]
var ulcereaseWeight = weight[8]
var cankercoverWeight = weight[9]
var coldstickWeight = weight[10]
var superlysine90Weight = weight[11]
var superlysine180Weight = weight[12]
var xylimeltsWeight = weight[13]
var avaminmeltsWeight = weight[14]
var ancWeight = weight[15]
var mirrorWeight = weight[16]
var toothbuilderWeight = weight[17]
var xyligumWeight = weight[18]
var periobalanceWeight = weight[19]
var curasept205Weight = weight[20]
var hybenxWeight = weight[21]

var postBandUK = new Array() ; var postUK = new Array()
//postBand is weight in grams, post is cost in UKB
postBandUK[0] = 100 ; postUK[0] = 1.20
postBandUK[1] = 250 ; postUK[1] = 1.49
postBandUK[2] = 500 ; postUK[2] = 1.80
postBandUK[3] = 750 ; postUK[3] = 2.23
postBandUK[4] = 1000 ; postUK[4] = 2.70
postBandUK[5] = 1250 ; postUK[5] = 3.76
postBandUK[6] = 1500 ; postUK[6] = 4.42
postBandUK[7] = 1750 ; postUK[7] = 5.07
postBandUK[8] = 2000 ; postUK[8] = 5.66

var postBandEU = new Array() ; var postEU = new Array()
postBandEU[0] = 100 ; postEU[0] = 1.19
postBandEU[1] = 120 ; postEU[1] = 1.28
postBandEU[2] = 140 ; postEU[2] = 1.42
postBandEU[3] = 160 ; postEU[3] = 1.54
postBandEU[4] = 180 ; postEU[4] = 1.66
postBandEU[5] = 200 ; postEU[5] = 1.78
postBandEU[6] = 220 ; postEU[6] = 1.91
postBandEU[7] = 240 ; postEU[7] = 2.02
postBandEU[8] = 260 ; postEU[8] = 2.13
postBandEU[9] = 280 ; postEU[9] = 2.26
postBandEU[10] = 300 ; postEU[10] = 2.39
postBandEU[11] = 320 ; postEU[11] = 2.50
postBandEU[12] = 340 ; postEU[12] = 2.61
postBandEU[13] = 360 ; postEU[13] = 2.72
postBandEU[14] = 380 ; postEU[14] = 2.83
postBandEU[15] = 400 ; postEU[15] = 2.94
postBandEU[16] = 420 ; postEU[16] = 3.05
postBandEU[17] = 440 ; postEU[17] = 3.16
postBandEU[18] = 460 ; postEU[18] = 3.27
postBandEU[19] = 480 ; postEU[19] = 3.38
postBandEU[20] = 500 ; postEU[20] = 3.49
postBandEU[21] = 520 ; postEU[21] = 3.60
postBandEU[22] = 540 ; postEU[22] = 3.71
postBandEU[23] = 560 ; postEU[23] = 3.82
postBandEU[24] = 580 ; postEU[24] = 3.93
postBandEU[25] = 600 ; postEU[25] = 4.04
postBandEU[26] = 620 ; postEU[26] = 4.15
postBandEU[27] = 640 ; postEU[27] = 4.26
postBandEU[28] = 660 ; postEU[28] = 4.37
postBandEU[29] = 680 ; postEU[29] = 4.48
postBandEU[30] = 700 ; postEU[30] = 4.59
postBandEU[31] = 720 ; postEU[31] = 4.70
postBandEU[32] = 740 ; postEU[32] = 4.81
postBandEU[33] = 760 ; postEU[33] = 4.92
postBandEU[34] = 780 ; postEU[34] = 5.03
postBandEU[35] = 800 ; postEU[35] = 5.14
postBandEU[36] = 820 ; postEU[36] = 5.25
postBandEU[37] = 840 ; postEU[37] = 5.36
postBandEU[38] = 860 ; postEU[38] = 5.47
postBandEU[39] = 880 ; postEU[39] = 5.58
postBandEU[40] = 900 ; postEU[40] = 5.69
postBandEU[41] = 920 ; postEU[41] = 5.80
postBandEU[42] = 940 ; postEU[42] = 5.91
postBandEU[43] = 960 ; postEU[43] = 6.02
postBandEU[44] = 980 ; postEU[44] = 6.13
postBandEU[45] = 1000 ; postEU[45] = 6.24
postBandEU[46] = 1500 ; postEU[46] = 8.74
postBandEU[47] = 2000 ; postEU[47] = 11.24

var postBandWW = new Array() ; var postWW = new Array()
postBandWW[0] = 100 ; postWW[0] = 1.65
postBandWW[1] = 120 ; postWW[1] = 1.89
postBandWW[2] = 140 ; postWW[2] = 2.15
postBandWW[3] = 160 ; postWW[3] = 2.39
postBandWW[4] = 180 ; postWW[4] = 2.65
postBandWW[5] = 200 ; postWW[5] = 2.89
postBandWW[6] = 220 ; postWW[6] = 3.13
postBandWW[7] = 240 ; postWW[7] = 3.36
postBandWW[8] = 260 ; postWW[8] = 3.59
postBandWW[9] = 280 ; postWW[9] = 3.83
postBandWW[10] = 300 ; postWW[10] = 4.06
postBandWW[11] = 320 ; postWW[11] = 4.30
postBandWW[12] = 340 ; postWW[12] = 4.54
postBandWW[13] = 360 ; postWW[13] = 4.78
postBandWW[14] = 380 ; postWW[14] = 5.02
postBandWW[15] = 400 ; postWW[15] = 5.26
postBandWW[16] = 420 ; postWW[16] = 5.50
postBandWW[17] = 440 ; postWW[17] = 5.74
postBandWW[18] = 460 ; postWW[18] = 5.98
postBandWW[19] = 480 ; postWW[19] = 6.22
postBandWW[20] = 500 ; postWW[20] = 6.46
postBandWW[21] = 520 ; postWW[21] = 6.69
postBandWW[22] = 540 ; postWW[22] = 6.92
postBandWW[23] = 560 ; postWW[23] = 7.15
postBandWW[24] = 580 ; postWW[24] = 7.38
postBandWW[25] = 600 ; postWW[25] = 7.61
postBandWW[26] = 620 ; postWW[26] = 7.84
postBandWW[27] = 640 ; postWW[27] = 8.07
postBandWW[28] = 660 ; postWW[28] = 8.30
postBandWW[29] = 680 ; postWW[29] = 8.53
postBandWW[30] = 700 ; postWW[30] = 8.76
postBandWW[31] = 720 ; postWW[31] = 8.99
postBandWW[32] = 740 ; postWW[32] = 9.22
postBandWW[33] = 760 ; postWW[33] = 9.45
postBandWW[34] = 780 ; postWW[34] = 9.68
postBandWW[35] = 800 ; postWW[35] = 9.91
postBandWW[36] = 820 ; postWW[36] = 10.14
postBandWW[37] = 840 ; postWW[37] = 10.37
postBandWW[38] = 860 ; postWW[38] = 10.60
postBandWW[39] = 880 ; postWW[39] = 10.83
postBandWW[40] = 900 ; postWW[40] = 11.06
postBandWW[41] = 920 ; postWW[41] = 11.29
postBandWW[42] = 940 ; postWW[42] = 11.52
postBandWW[43] = 960 ; postWW[43] = 11.75
postBandWW[44] = 980 ; postWW[44] = 11.98
postBandWW[45] = 1000 ; postWW[45] = 12.21
postBandWW[46] = 1500 ; postWW[46] = 17.71
postBandWW[47] = 2000 ; postWW[47] = 23.21

function fmtPrice(value) {
   result = Math.floor(value)+"."
   var pence = 100*(value-Math.floor(value))+0.5
   result += Math.floor(pence/10)
   result += Math.floor(pence%10)
   return(result)
}

