/* Create a Payment option */
function paymentOption(id,payment_option,price) {
	this.id = id;
	this.payment_option = payment_option;
	this.price = price;
}

/* Create a Payment group */
function paymentGroup(id,payment_group,options) {
	this.id = id;
	this.payment_group = payment_group;
	this.options = options.split(",");
}

/***************************************************************************
* Update the payment submission form with the price and item description   *
* When a user selects an option from the list                              *
***************************************************************************/
function updateItemValues(form,id) {
					form.amount.value = paymentOptions[id].price;
			form.item_name.value = (paymentOptions[id].payment_option).replace(/&quot;/g,'"');
					}

/***************************************************************************
* Create the array of payment options. This contains all options for the   *
* site.The options available for a given photo are hardwired into the      *
* photo page whichis why we can't use the quick browse methods on payment  *
* enabled sites                                                            *
***************************************************************************/
var paymentOptions = new Object();
paymentOptions[81779] = new paymentOption(81779,'10&quot;x8&quot; Canvas','89.00');
paymentOptions[81780] = new paymentOption(81780,'12&quot;x10&quot; Canvas','105.00');
paymentOptions[81781] = new paymentOption(81781,'18&quot;x12&quot; Canvas','129.00');
paymentOptions[81782] = new paymentOption(81782,'20&quot;X20&quot; Canvas','169.00');
paymentOptions[81785] = new paymentOption(81785,'24&quot;x20&quot; Canvas','189.00');
paymentOptions[81786] = new paymentOption(81786,'30&quot;x24&quot; Canvas','239.00');
paymentOptions[81787] = new paymentOption(81787,'40&quot;x40&quot; Canvas','369.00');
paymentOptions[78407] = new paymentOption(78407,'SOLO PHOTO - one colour 8x6 photo, one colour 6x4 photo, one black and white 6x4 photo and four wallet prints.','25.00');
paymentOptions[83159] = new paymentOption(83159,'PACK A:  (ONE POSE) One 8x6, four 6x4s and a set of four wallets prints.','45.00');
paymentOptions[83160] = new paymentOption(83160,'PACK B: (TWO POSES), Two 8x6s, eight 6x4s and a two sets of four wallets prints.','60.00');
paymentOptions[83161] = new paymentOption(83161,'PACK UPGRADE ONE POSE: One 8x6, four 6x4s and one set of four wallet prints.','15.00');
paymentOptions[83206] = new paymentOption(83206,'9&quot;x6&quot; Mounted Nativity Photograph','6.50');
paymentOptions[62787] = new paymentOption(62787,'7x5 Friendship Group Photo','7.00');
paymentOptions[62786] = new paymentOption(62786,'9x6 Class Photo','10.00');
paymentOptions[56507] = new paymentOption(56507,'16&quot;x12&quot; canvas','99.00');
paymentOptions[62784] = new paymentOption(62784,'9x6 whole school photo','10.00');
paymentOptions[60507] = new paymentOption(60507,'Play Centre Bronze Package - One 10&quot;x8&quot; photo and Three 7&quot;x5&quot; photos (one of which is black and white) of <b>One Pose</b>','25.00');
paymentOptions[61755] = new paymentOption(61755,'Bronze Package','25.00');
paymentOptions[58641] = new paymentOption(58641,'Pop Art Service','10.00');
paymentOptions[77441] = new paymentOption(77441,'Pack A','10.00');
paymentOptions[77442] = new paymentOption(77442,'Pack B','15.00');
paymentOptions[77443] = new paymentOption(77443,'Pack C','20.00');
paymentOptions[61756] = new paymentOption(61756,'Silver Package','35.00');
paymentOptions[60508] = new paymentOption(60508,'Play Centre Silver Package - Two 10&quot;x8&quot; photos and Six 7&quot;x5&quot; photos (two of which are black and white) of <b>Two Poses</b>','45.00');
paymentOptions[62785] = new paymentOption(62785,'12x8 Whole School Photo','15.00');
paymentOptions[60509] = new paymentOption(60509,'Play Centre Gold Package - Three 10&quot;x8&quot; photos and Nine 7&quot;x5&quot; photos (three of which are black and white) of <b>Three Poses</b>','60.00');
paymentOptions[61757] = new paymentOption(61757,'Gold','45.00');
paymentOptions[77444] = new paymentOption(77444,'Pack D','25.00');
paymentOptions[62953] = new paymentOption(62953,'9x6 Mounted Individual Photograph','10.00');
paymentOptions[62954] = new paymentOption(62954,'SPECIAL OFFER!  Buy two 9x6 mounted prints and get one FREE!','20.00');
paymentOptions[77445] = new paymentOption(77445,'Special Offer!','30.00');
paymentOptions[56595] = new paymentOption(56595,'£15 gift voucher','15.00');
paymentOptions[60705] = new paymentOption(60705,'Graduation Group Photograph','10.00');
paymentOptions[60706] = new paymentOption(60706,'9&quot;x6&quot; Mounted Graduation Group Photograph','10.00');
paymentOptions[60569] = new paymentOption(60569,'9&quot;x6&quot; Event Portrait','10.00');
paymentOptions[60570] = new paymentOption(60570,'Special Event Package - Buy two 9&quot;x6&quot; photographs and receive a third one for FREE. Please email us with details of the two other photographs you would like.','20.00');
paymentOptions[56510] = new paymentOption(56510,'£25 Gift Voucher','25.00');
paymentOptions[56596] = new paymentOption(56596,'£50 gift voucher','50.00');
paymentOptions[56617] = new paymentOption(56617,'6&quot;x4&quot; print','7.00');
paymentOptions[65186] = new paymentOption(65186,'Play Centre Platinum Package - Four 10&quot;x8&quot; photos and twelve 7&quot;x5&quot; photos (four of which are black and white) of <b>Four Poses</b>','75.00');
paymentOptions[56618] = new paymentOption(56618,'7&quot;x5&quot; print','10.00');
paymentOptions[56626] = new paymentOption(56626,'Bump & Babe Package 1','100.00');
paymentOptions[58502] = new paymentOption(58502,'Large Fusion Print','50.00');
paymentOptions[58503] = new paymentOption(58503,'Medium Fusion Print','30.00');
paymentOptions[58507] = new paymentOption(58507,'24&quot; x 10&quot; Fusion Panoramic Canvas','99.00');
paymentOptions[58506] = new paymentOption(58506,'24&quot; x 18&quot; Fusion Art Canvas','125.00');
paymentOptions[56619] = new paymentOption(56619,'8x6 print','12.00');
paymentOptions[56627] = new paymentOption(56627,'Bump & Babe Package 2','130.00');
paymentOptions[56620] = new paymentOption(56620,'10&quot;x8&quot;','15.00');
paymentOptions[58564] = new paymentOption(58564,'34&quot; x 14&quot; Fusion Panoramic Canvas','145.00');
paymentOptions[58563] = new paymentOption(58563,'30&quot;x20&quot;  Fusion Art Canvas','159.00');
paymentOptions[58513] = new paymentOption(58513,'16x12 Canvas','119.00');
paymentOptions[58514] = new paymentOption(58514,'18&quot;x24&quot; canvas','95.00');
paymentOptions[56688] = new paymentOption(56688,'£100 Gift Voucher','100.00');
paymentOptions[63426] = new paymentOption(63426,'9x6 mounted print','10.00');
paymentOptions[63427] = new paymentOption(63427,'7x5 mounted print','7.00');
paymentOptions[67358] = new paymentOption(67358,'6&quot;x4&quot; Acrylic Block','24.99');
paymentOptions[67359] = new paymentOption(67359,'7&quot;x5&quot; Acrylic Block','29.99');
paymentOptions[76855] = new paymentOption(76855,'BRONZE PACKAGE - One 10x8 colour photo and two 7x5 colour photos','20.00');
paymentOptions[76856] = new paymentOption(76856,'SILVER PACKAGE - One 10x8 colour photo, three 7x5 colour photos & one 7x5 black & white photo','30.00');
paymentOptions[74261] = new paymentOption(74261,'Package A - One pose','35.50');
paymentOptions[74262] = new paymentOption(74262,'Package B - Two Poses','56.50');
paymentOptions[74263] = new paymentOption(74263,'Package C - Huge Savings & Two Poses','71.50');
paymentOptions[74727] = new paymentOption(74727,'Package B and Black Frame Option','95.50');
paymentOptions[74730] = new paymentOption(74730,'Standard 16&quot;x12&quot; Canvas','85.00');
paymentOptions[74731] = new paymentOption(74731,'Deluxe 16&quot;x12&quot; Canvas 75yr guarantee','125.00');
paymentOptions[74729] = new paymentOption(74729,'Standard 30&quot;x20&quot; Canvas','199.00');
paymentOptions[74728] = new paymentOption(74728,'Deluxe 30&quot; x 20&quot; Canvas 75yr guarantee','275.00');
paymentOptions[74732] = new paymentOption(74732,'18&quot;x12&quot; unmounted photograph','50.00');
paymentOptions[74733] = new paymentOption(74733,'4 Wallet Prints','10.00');
paymentOptions[58508] = new paymentOption(58508,'6&quot;x4&quot; board mounted photograph','10.00');
paymentOptions[58509] = new paymentOption(58509,'7&quot;x5&quot; board mounted photograph','15.00');
paymentOptions[58510] = new paymentOption(58510,'8&quot;x6&quot; board mounted photograph','20.00');
paymentOptions[58511] = new paymentOption(58511,'10&quot;x8&quot; board mounted photograph','30.00');
paymentOptions[58512] = new paymentOption(58512,'12&quot;x8&quot; board mounted photograph','40.00');
paymentOptions[74735] = new paymentOption(74735,'Obsidian Black Glass Frame (8x6 print) HALF PRICE UNTIL 31st JULY 2011','50.00');
paymentOptions[74734] = new paymentOption(74734,'Obsidian Black Glass Frame (10x8 print) HALF PRICE UNTIL 31st JULY 2011','60.00');
paymentOptions[74736] = new paymentOption(74736,'Obsidian Double - Black Glass Frame (two 6x4 prints) HALF PRICE UNTIL 31st JULY 2011','75.00');
paymentOptions[74737] = new paymentOption(74737,'Obsidian Double - Black Glass Frame (two 7x5 prints) HALF PRICE UNTIL 31st JULY 2011','80.00');
paymentOptions[74741] = new paymentOption(74741,'P&P Correction','3.50');
paymentOptions[56621] = new paymentOption(56621,'12x8','20.00');
paymentOptions[74877] = new paymentOption(74877,'Package A - ONE POSE, (One 8x6 photo, two 7x5 photos, one black & white 6x4 photo and 4 wallet prints)','39.00');
paymentOptions[74878] = new paymentOption(74878,'Package B - TWO POSES (Two 8x6 photos, four 7x5 photos, two black & white 6x4 photos and eight wallet prints)','60.00');
paymentOptions[74879] = new paymentOption(74879,'Package C - TWO POSES: One Black Glass Framed 10x8 print, (pose of your choice) plus 10 photos - a 7x5 photo and four wallet prints for BOTH poses.','75.00');
paymentOptions[74880] = new paymentOption(74880,'Package D - TWO POSES One Black Glass Framed 10x8 print (pose of your choice) plus 16 photos - one 8x6 photo, two 7x5 photos, one black & white 6x4 photos & four wallet prints for BOTH poses.','99.00');
paymentOptions[75063] = new paymentOption(75063,'DISCOUNTED 3 POSES, three 8x6 photos, six 7x5 photos, three 6x4 black & white photos and 3 sets of 4 wallet prints','79.00');
/***************************************************************************
* Create the array of payment groups. If site does notuse groups create    *
* just one with an ID of 0                                                 *
***************************************************************************/
var paymentGroups = new Object();
			paymentGroups[19255] = new paymentGroup(19255,'9x6 Mounted Prints','62953');
			paymentGroups[19208] = new paymentGroup(19208,'Ashbridge Leavers Photo','62784,62785');
			paymentGroups[23688] = new paymentGroup(23688,'BRONZE & SILVER PACKAGES','76855,76856');
			paymentGroups[17349] = new paymentGroup(17349,'bump and babe','56626,56627');
			paymentGroups[23127] = new paymentGroup(23127,'Chorley & Leyland Guardian Fairy in the Park Photos','74877,74878,74879,74880');
			paymentGroups[25798] = new paymentGroup(25798,'CHRISTMAS CUTIES ADDITIONAL ORDERS','83161');
			paymentGroups[25797] = new paymentGroup(25797,'CHRISTMAS CUTIES PACAKGES','83159,83160');
			paymentGroups[18597] = new paymentGroup(18597,'Events','60569,60570,56617,56620');
			paymentGroups[23182] = new paymentGroup(23182,'FAIRY 3 POSES','74877,74878,74879,74880,75063');
			paymentGroups[22911] = new paymentGroup(22911,'Fairy in the Park','74730,74731,74729,74728,74732,74733,58508,74735,74734,74736,74737');
			paymentGroups[18433] = new paymentGroup(18433,'Farmers Little Helpers','60569,60570');
			paymentGroups[17267] = new paymentGroup(17267,'Fine Art Prints','56507');
			paymentGroups[19400] = new paymentGroup(19400,'Fledgling print prices','63426,63427');
			paymentGroups[17997] = new paymentGroup(17997,'fusion art','58502,58503,58507,58506,58564,58563');
			paymentGroups[17317] = new paymentGroup(17317,'Gift Vouchers','56595,56510,56596,56688');
			paymentGroups[25813] = new paymentGroup(25813,'LEP Nativities','83206');
			paymentGroups[18640] = new paymentGroup(18640,'Nursery Graduation','60705');
			paymentGroups[23897] = new paymentGroup(23897,'Nursery Graduation Packages 2011','77441,77442,77443,77444,77445');
			paymentGroups[18905] = new paymentGroup(18905,'Nursery Packages','61755,61756,61757');
			paymentGroups[18590] = new paymentGroup(18590,'Play Centre Packages','60507,60508,60509,65186');
			paymentGroups[18048] = new paymentGroup(18048,'Pop Art Service','58641');
			paymentGroups[18641] = new paymentGroup(18641,'Pre-School Graduation','60706');
			paymentGroups[17327] = new paymentGroup(17327,'print purchases','56617,56618,56619,56620,58514,67358,67359,56621');
			paymentGroups[25343] = new paymentGroup(25343,'Red Frog Studio Price List','81779,81780,81781,81782,81785,81786,81787,58513,58508,58509,58510,58511,58512');
			paymentGroups[25351] = new paymentGroup(25351,'Red Frog Studio PRINT Price List','58508,58509,58510,58511,58512');
			paymentGroups[24201] = new paymentGroup(24201,'SOLO PACKS & GROUP FOR GRADS','78407,60705');
	/***************************************************************************
* Get payment options field for given payment group                        *
***************************************************************************/
function getPaymentOptions(payment_groups_id) {
	var temp = '';
		
		
		if(paymentGroups[payment_groups_id].options[0] != ''){
		$.each(paymentGroups[payment_groups_id].options, function(i){
						
			paymentOption = paymentOptions[paymentGroups[payment_groups_id].options[i]];
			temp = temp + '<option  value="' + paymentOption.id + '">' + paymentOption.payment_option + ' - &pound;' + paymentOption.price + '</option>';
		});
	}
		return temp;
}


