// 3.Create Product Group // 3.1.Add All Selections (by ID) // 3.2.Add All Options (by ID) // 3.3.Product Assign Array // 3.4.Create // Products var pOptSel_20364_105_51 = new Selection(51,"Turnaround 4 - 6 Business Days","
Normal 4 - 6 Day
turnaround is fine. Please note
this is the manufacture time which only starts
from the time your Artwork is completed and
approved so the job is ready to go to print.
","Normal 4-6 Business Days from Artwork Sign off","","10",true,0.0,0,0,0); var pOptSel_20364_105_52 = new Selection(52,"Turnaround 2 Business days","
Rush Order 2 Days.
Quick drop everything!

              I need them super fast!
","Rush Order 2 Business Days","","1",false,0.0,0,0,0); var pOptSel_20364_98_91 = new Selection(91,"Upload - Print Ready","
Upload Print Ready -
Already have your file ready to upload, then this is the option for you","Print Ready inc 3mm bleed","","",true,0.0,0,0,0); var pOptSel_20364_98_97 = new Selection(97,"Design Services","
Full Artwork Design -
Let us do it for you, send your logo
and text and any other information to art@front.com.au
and place your order now, but please email all the details at
the time of placing your order as later changes will incur
additional costs. Also our stated turnaround time only
starts once your artwork has been completed and approved.
","Artwork Design Services","","",false,0.0,0,0,0); var pOptSel_20364_98_110 = new Selection(110,"Design Online","
Design Online
Use our online design tool to let your creative mind run wild.  Pick from different templates and backgrounds.","Design Online","","",false,0.0,0,0,0); var pOptSel_20364_98_263 = new Selection(263,"Make Artwork Press Ready","
Need a little help -
I have existing Artwork but need some small changes made.
Please email what you have to art@front.com.au and
place your order through our system now.
","I need a little help","","",false,0.0,0,0,0); var pOptSel_20364_190_297 = new Selection(297,"12 Pages Full colour","

A4 Brochures
 in Portrait, 12 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","12 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_298 = new Selection(298,"16 Pages Full Colour","

A4 Brochures
 in Portrait, 16 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","16 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_299 = new Selection(299,"20 Pages Full Colour","

A4 Brochures
 in Portrait, 20 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","20 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_300 = new Selection(300,"8 Pages Full Colour","

A4 Brochures
 in Portrait, 8 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","8 Pages Full Colour","","",true,0.0,0,0,0); var pOptSel_20364_190_301 = new Selection(301,"24 Pages Full Colour","

A4 Brochures
in Portrait, 24 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","24 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_302 = new Selection(302,"28 Pages Full Colour","

A4 Brochures
 in Portrait, 28 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","28 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_303 = new Selection(303,"32 Pages Full Colour","

A4 Brochures
 in Portrait, 32 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","32 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_304 = new Selection(304,"36 Pages Full Colour","

A4 Brochures
 in Portrait, 36 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","36 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_305 = new Selection(305,"40 Pages Full Colour","

A4 Brochures
 in Portrait, 40 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","40 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_306 = new Selection(306,"44 Pages Full Colour","

A4 Brochures
 in Portrait, 44 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","44 Pages Full Colour","","",false,0.0,0,0,0); var pOptSel_20364_190_307 = new Selection(307,"48 Pages Full Colour","

A4 Brochures
 in Portrait, 48 pages printed on
Gloss or Matt coated paper (Specify below)
Full Colour both sides and saddle stitched
(2 staples on the spine)
","48 Pages Full Colour","","",false,0.0,0,0,0); var pOpt_20364_98 = new Option(98,"Artwork Options","","Artwork Options","Artwork Options ","

Your selection is:

","DropDown","5","Design Option","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_20364_98_110, pOptSel_20364_98_91, pOptSel_20364_98_97, pOptSel_20364_98_263],true); var pOpt_20364_105 = new Option(105,"Turn Around Time","","Turn Around Time","Turn Around Time ","

How quick do you need it:

","DropDown","2","Turn Around","-1","","1","Table","vertical","SingleLine","","","","1","0",0,[pOptSel_20364_105_51, pOptSel_20364_105_52],true); var pOpt_20364_190 = new Option(190,"Number of Pages","","Number of Pages Printed","Number of Pages ","Note: Brochures/Magazines/Newsletter artwork should not be imposed as spreads & should be supplied as a \"1 Up\" multiple page file (pref. PDF) with front cover as page 1, & the back cover as the last page. (Eg: A 16 page magazine should be supplied as one file with 16 pages – not 16 separate files).External & internal bleed should both be set at 5mm. ","DropDown","-1","","-1","","1","Table","vertical","MultiLine","","","","1","0",0,[pOptSel_20364_190_300, pOptSel_20364_190_297, pOptSel_20364_190_298, pOptSel_20364_190_299, pOptSel_20364_190_301, pOptSel_20364_190_302, pOptSel_20364_190_303, pOptSel_20364_190_304, pOptSel_20364_190_305, pOptSel_20364_190_306, pOptSel_20364_190_307],true); var pq_143702_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143702_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143702_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143702_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143702_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_143702_190_297 = new SelectionsPrice(190, 297, 13.000) var pq_143702_98_97 = new SelectionsPrice(98, 97, 90.000) var pq_143702_190_298 = new SelectionsPrice(190, 298, 28.000) var pq_143702_98_263 = new SelectionsPrice(98, 263, 45.000) var pq_143702_190_299 = new SelectionsPrice(190, 299, 39.000) var pq_143702_190_301 = new SelectionsPrice(190, 301, 49.000) var pq_143702_190_302 = new SelectionsPrice(190, 302, 67.000) var pq_143702_190_303 = new SelectionsPrice(190, 303, 80.000) var pq_143702_190_304 = new SelectionsPrice(190, 304, 99.000) var pq_143702_190_305 = new SelectionsPrice(190, 305, 117.000) var pq_143702_190_306 = new SelectionsPrice(190, 306, 135.000) var pq_143702_190_307 = new SelectionsPrice(190, 307, 153.000) var pq_143702 = new ProductQuantities(143702, 20364, 10, 75.0000, [pq_143702_98_110, pq_143702_105_51, pq_143702_190_300, pq_143702_98_91, pq_143702_105_52, pq_143702_190_297, pq_143702_98_97, pq_143702_190_298, pq_143702_98_263, pq_143702_190_299, pq_143702_190_301, pq_143702_190_302, pq_143702_190_303, pq_143702_190_304, pq_143702_190_305, pq_143702_190_306, pq_143702_190_307]); var pq_143703_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143703_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143703_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143703_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143703_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_143703_190_297 = new SelectionsPrice(190, 297, 17.000) var pq_143703_98_97 = new SelectionsPrice(98, 97, 90.000) var pq_143703_190_298 = new SelectionsPrice(190, 298, 32.000) var pq_143703_98_263 = new SelectionsPrice(98, 263, 45.000) var pq_143703_190_299 = new SelectionsPrice(190, 299, 46.000) var pq_143703_190_301 = new SelectionsPrice(190, 301, 58.000) var pq_143703_190_302 = new SelectionsPrice(190, 302, 72.000) var pq_143703_190_303 = new SelectionsPrice(190, 303, 89.000) var pq_143703_190_304 = new SelectionsPrice(190, 304, 113.000) var pq_143703_190_305 = new SelectionsPrice(190, 305, 131.000) var pq_143703_190_306 = new SelectionsPrice(190, 306, 150.000) var pq_143703_190_307 = new SelectionsPrice(190, 307, 165.000) var pq_143703 = new ProductQuantities(143703, 20364, 25, 123.0000, [pq_143703_98_110, pq_143703_105_51, pq_143703_190_300, pq_143703_98_91, pq_143703_105_52, pq_143703_190_297, pq_143703_98_97, pq_143703_190_298, pq_143703_98_263, pq_143703_190_299, pq_143703_190_301, pq_143703_190_302, pq_143703_190_303, pq_143703_190_304, pq_143703_190_305, pq_143703_190_306, pq_143703_190_307]); var pq_143694_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143694_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143694_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143694_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143694_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_143694_190_297 = new SelectionsPrice(190, 297, 23.000) var pq_143694_98_97 = new SelectionsPrice(98, 97, 90.000) var pq_143694_190_298 = new SelectionsPrice(190, 298, 55.000) var pq_143694_98_263 = new SelectionsPrice(98, 263, 45.000) var pq_143694_190_299 = new SelectionsPrice(190, 299, 85.000) var pq_143694_190_301 = new SelectionsPrice(190, 301, 118.000) var pq_143694_190_302 = new SelectionsPrice(190, 302, 138.000) var pq_143694_190_303 = new SelectionsPrice(190, 303, 165.000) var pq_143694_190_304 = new SelectionsPrice(190, 304, 206.000) var pq_143694_190_305 = new SelectionsPrice(190, 305, 249.000) var pq_143694_190_306 = new SelectionsPrice(190, 306, 271.000) var pq_143694_190_307 = new SelectionsPrice(190, 307, 299.000) var pq_143694 = new ProductQuantities(143694, 20364, 50, 145.0000, [pq_143694_98_110, pq_143694_105_51, pq_143694_190_300, pq_143694_98_91, pq_143694_105_52, pq_143694_190_297, pq_143694_98_97, pq_143694_190_298, pq_143694_98_263, pq_143694_190_299, pq_143694_190_301, pq_143694_190_302, pq_143694_190_303, pq_143694_190_304, pq_143694_190_305, pq_143694_190_306, pq_143694_190_307]); var pq_143697_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143697_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143697_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143697_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143697_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_143697_190_297 = new SelectionsPrice(190, 297, 53.000) var pq_143697_98_97 = new SelectionsPrice(98, 97, 90.000) var pq_143697_190_298 = new SelectionsPrice(190, 298, 111.000) var pq_143697_98_263 = new SelectionsPrice(98, 263, 45.000) var pq_143697_190_299 = new SelectionsPrice(190, 299, 173.000) var pq_143697_190_301 = new SelectionsPrice(190, 301, 227.000) var pq_143697_190_302 = new SelectionsPrice(190, 302, 264.000) var pq_143697_190_303 = new SelectionsPrice(190, 303, 288.000) var pq_143697_190_304 = new SelectionsPrice(190, 304, 373.000) var pq_143697_190_305 = new SelectionsPrice(190, 305, 417.000) var pq_143697_190_306 = new SelectionsPrice(190, 306, 470.000) var pq_143697_190_307 = new SelectionsPrice(190, 307, 522.000) var pq_143697 = new ProductQuantities(143697, 20364, 100, 192.0000, [pq_143697_98_110, pq_143697_105_51, pq_143697_190_300, pq_143697_98_91, pq_143697_105_52, pq_143697_190_297, pq_143697_98_97, pq_143697_190_298, pq_143697_98_263, pq_143697_190_299, pq_143697_190_301, pq_143697_190_302, pq_143697_190_303, pq_143697_190_304, pq_143697_190_305, pq_143697_190_306, pq_143697_190_307]); var pq_143695_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143695_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143695_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143695_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143695_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_143695_190_297 = new SelectionsPrice(190, 297, 92.000) var pq_143695_98_97 = new SelectionsPrice(98, 97, 90.000) var pq_143695_190_298 = new SelectionsPrice(190, 298, 174.000) var pq_143695_98_263 = new SelectionsPrice(98, 263, 45.000) var pq_143695_190_299 = new SelectionsPrice(190, 299, 248.000) var pq_143695_190_301 = new SelectionsPrice(190, 301, 319.000) var pq_143695_190_302 = new SelectionsPrice(190, 302, 364.000) var pq_143695_190_303 = new SelectionsPrice(190, 303, 415.000) var pq_143695_190_304 = new SelectionsPrice(190, 304, 547.000) var pq_143695_190_305 = new SelectionsPrice(190, 305, 604.000) var pq_143695_190_306 = new SelectionsPrice(190, 306, 659.000) var pq_143695_190_307 = new SelectionsPrice(190, 307, 710.000) var pq_143695 = new ProductQuantities(143695, 20364, 150, 250.0000, [pq_143695_98_110, pq_143695_105_51, pq_143695_190_300, pq_143695_98_91, pq_143695_105_52, pq_143695_190_297, pq_143695_98_97, pq_143695_190_298, pq_143695_98_263, pq_143695_190_299, pq_143695_190_301, pq_143695_190_302, pq_143695_190_303, pq_143695_190_304, pq_143695_190_305, pq_143695_190_306, pq_143695_190_307]); var pq_143696_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143696_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143696_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143696_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143696_105_52 = new SelectionsPrice(105, 52, 28.000) var pq_143696_190_297 = new SelectionsPrice(190, 297, 110.000) var pq_143696_98_97 = new SelectionsPrice(98, 97, 90.000) var pq_143696_190_298 = new SelectionsPrice(190, 298, 206.000) var pq_143696_98_263 = new SelectionsPrice(98, 263, 45.000) var pq_143696_190_299 = new SelectionsPrice(190, 299, 291.000) var pq_143696_190_301 = new SelectionsPrice(190, 301, 412.000) var pq_143696_190_302 = new SelectionsPrice(190, 302, 463.000) var pq_143696_190_303 = new SelectionsPrice(190, 303, 490.000) var pq_143696_190_304 = new SelectionsPrice(190, 304, 679.000) var pq_143696_190_305 = new SelectionsPrice(190, 305, 699.000) var pq_143696_190_306 = new SelectionsPrice(190, 306, 791.000) var pq_143696_190_307 = new SelectionsPrice(190, 307, 822.000) var pq_143696 = new ProductQuantities(143696, 20364, 200, 308.0000, [pq_143696_98_110, pq_143696_105_51, pq_143696_190_300, pq_143696_98_91, pq_143696_105_52, pq_143696_190_297, pq_143696_98_97, pq_143696_190_298, pq_143696_98_263, pq_143696_190_299, pq_143696_190_301, pq_143696_190_302, pq_143696_190_303, pq_143696_190_304, pq_143696_190_305, pq_143696_190_306, pq_143696_190_307]); var pq_143698_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143698_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143698_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143698_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143698_105_52 = new SelectionsPrice(105, 52, 50.000) var pq_143698_190_297 = new SelectionsPrice(190, 297, 116.000) var pq_143698_98_97 = new SelectionsPrice(98, 97, 135.000) var pq_143698_190_298 = new SelectionsPrice(190, 298, 226.000) var pq_143698_98_263 = new SelectionsPrice(98, 263, 90.000) var pq_143698_190_299 = new SelectionsPrice(190, 299, 343.000) var pq_143698_190_301 = new SelectionsPrice(190, 301, 489.000) var pq_143698_190_302 = new SelectionsPrice(190, 302, 549.000) var pq_143698_190_303 = new SelectionsPrice(190, 303, 600.000) var pq_143698_190_304 = new SelectionsPrice(190, 304, 753.000) var pq_143698_190_305 = new SelectionsPrice(190, 305, 836.000) var pq_143698_190_306 = new SelectionsPrice(190, 306, 947.000) var pq_143698_190_307 = new SelectionsPrice(190, 307, 1021.000) var pq_143698 = new ProductQuantities(143698, 20364, 250, 373.0000, [pq_143698_98_110, pq_143698_105_51, pq_143698_190_300, pq_143698_98_91, pq_143698_105_52, pq_143698_190_297, pq_143698_98_97, pq_143698_190_298, pq_143698_98_263, pq_143698_190_299, pq_143698_190_301, pq_143698_190_302, pq_143698_190_303, pq_143698_190_304, pq_143698_190_305, pq_143698_190_306, pq_143698_190_307]); var pq_143705_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143705_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143705_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143705_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143705_105_52 = new SelectionsPrice(105, 52, 50.000) var pq_143705_190_297 = new SelectionsPrice(190, 297, 141.000) var pq_143705_98_97 = new SelectionsPrice(98, 97, 135.000) var pq_143705_190_298 = new SelectionsPrice(190, 298, 276.000) var pq_143705_98_263 = new SelectionsPrice(98, 263, 90.000) var pq_143705_190_299 = new SelectionsPrice(190, 299, 395.000) var pq_143705_190_301 = new SelectionsPrice(190, 301, 536.000) var pq_143705_190_302 = new SelectionsPrice(190, 302, 618.000) var pq_143705_190_303 = new SelectionsPrice(190, 303, 653.000) var pq_143705_190_304 = new SelectionsPrice(190, 304, 846.000) var pq_143705_190_305 = new SelectionsPrice(190, 305, 1014.000) var pq_143705_190_306 = new SelectionsPrice(190, 306, 1107.000) var pq_143705_190_307 = new SelectionsPrice(190, 307, 1237.000) var pq_143705 = new ProductQuantities(143705, 20364, 300, 421.0000, [pq_143705_98_110, pq_143705_105_51, pq_143705_190_300, pq_143705_98_91, pq_143705_105_52, pq_143705_190_297, pq_143705_98_97, pq_143705_190_298, pq_143705_98_263, pq_143705_190_299, pq_143705_190_301, pq_143705_190_302, pq_143705_190_303, pq_143705_190_304, pq_143705_190_305, pq_143705_190_306, pq_143705_190_307]); var pq_143704_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143704_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143704_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143704_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143704_105_52 = new SelectionsPrice(105, 52, 50.000) var pq_143704_190_297 = new SelectionsPrice(190, 297, 201.000) var pq_143704_98_97 = new SelectionsPrice(98, 97, 135.000) var pq_143704_190_298 = new SelectionsPrice(190, 298, 341.000) var pq_143704_98_263 = new SelectionsPrice(98, 263, 90.000) var pq_143704_190_299 = new SelectionsPrice(190, 299, 491.000) var pq_143704_190_301 = new SelectionsPrice(190, 301, 623.000) var pq_143704_190_302 = new SelectionsPrice(190, 302, 737.000) var pq_143704_190_303 = new SelectionsPrice(190, 303, 813.000) var pq_143704_190_304 = new SelectionsPrice(190, 304, 1144.000) var pq_143704_190_305 = new SelectionsPrice(190, 305, 1317.000) var pq_143704_190_306 = new SelectionsPrice(190, 306, 1436.000) var pq_143704_190_307 = new SelectionsPrice(190, 307, 1607.000) var pq_143704 = new ProductQuantities(143704, 20364, 400, 521.0000, [pq_143704_98_110, pq_143704_105_51, pq_143704_190_300, pq_143704_98_91, pq_143704_105_52, pq_143704_190_297, pq_143704_98_97, pq_143704_190_298, pq_143704_98_263, pq_143704_190_299, pq_143704_190_301, pq_143704_190_302, pq_143704_190_303, pq_143704_190_304, pq_143704_190_305, pq_143704_190_306, pq_143704_190_307]); var pq_143699_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143699_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143699_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143699_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143699_105_52 = new SelectionsPrice(105, 52, 100.000) var pq_143699_190_297 = new SelectionsPrice(190, 297, 236.000) var pq_143699_98_97 = new SelectionsPrice(98, 97, 180.000) var pq_143699_190_298 = new SelectionsPrice(190, 298, 405.000) var pq_143699_98_263 = new SelectionsPrice(98, 263, 135.000) var pq_143699_190_299 = new SelectionsPrice(190, 299, 538.000) var pq_143699_190_301 = new SelectionsPrice(190, 301, 742.000) var pq_143699_190_302 = new SelectionsPrice(190, 302, 960.000) var pq_143699_190_303 = new SelectionsPrice(190, 303, 1071.000) var pq_143699_190_304 = new SelectionsPrice(190, 304, 1414.000) var pq_143699_190_305 = new SelectionsPrice(190, 305, 1624.000) var pq_143699_190_306 = new SelectionsPrice(190, 306, 1702.000) var pq_143699_190_307 = new SelectionsPrice(190, 307, 1782.000) var pq_143699 = new ProductQuantities(143699, 20364, 500, 593.0000, [pq_143699_98_110, pq_143699_105_51, pq_143699_190_300, pq_143699_98_91, pq_143699_105_52, pq_143699_190_297, pq_143699_98_97, pq_143699_190_298, pq_143699_98_263, pq_143699_190_299, pq_143699_190_301, pq_143699_190_302, pq_143699_190_303, pq_143699_190_304, pq_143699_190_305, pq_143699_190_306, pq_143699_190_307]); var pq_143701_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143701_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143701_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143701_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143701_105_52 = new SelectionsPrice(105, 52, 150.000) var pq_143701_190_297 = new SelectionsPrice(190, 297, 302.000) var pq_143701_98_97 = new SelectionsPrice(98, 97, 180.000) var pq_143701_190_298 = new SelectionsPrice(190, 298, 618.000) var pq_143701_98_263 = new SelectionsPrice(98, 263, 135.000) var pq_143701_190_299 = new SelectionsPrice(190, 299, 707.000) var pq_143701_190_301 = new SelectionsPrice(190, 301, 880.000) var pq_143701_190_302 = new SelectionsPrice(190, 302, 1069.000) var pq_143701_190_303 = new SelectionsPrice(190, 303, 1296.000) var pq_143701_190_304 = new SelectionsPrice(190, 304, 1620.000) var pq_143701_190_305 = new SelectionsPrice(190, 305, 1762.000) var pq_143701_190_306 = new SelectionsPrice(190, 306, 1905.000) var pq_143701_190_307 = new SelectionsPrice(190, 307, 1948.000) var pq_143701 = new ProductQuantities(143701, 20364, 750, 697.0000, [pq_143701_98_110, pq_143701_105_51, pq_143701_190_300, pq_143701_98_91, pq_143701_105_52, pq_143701_190_297, pq_143701_98_97, pq_143701_190_298, pq_143701_98_263, pq_143701_190_299, pq_143701_190_301, pq_143701_190_302, pq_143701_190_303, pq_143701_190_304, pq_143701_190_305, pq_143701_190_306, pq_143701_190_307]); var pq_143700_98_110 = new SelectionsPrice(98, 110, 0.000) var pq_143700_105_51 = new SelectionsPrice(105, 51, 0.000) var pq_143700_190_300 = new SelectionsPrice(190, 300, 0.000) var pq_143700_98_91 = new SelectionsPrice(98, 91, 0.000) var pq_143700_105_52 = new SelectionsPrice(105, 52, 200.000) var pq_143700_190_297 = new SelectionsPrice(190, 297, 353.000) var pq_143700_98_97 = new SelectionsPrice(98, 97, 180.000) var pq_143700_190_298 = new SelectionsPrice(190, 298, 625.000) var pq_143700_98_263 = new SelectionsPrice(98, 263, 135.000) var pq_143700_190_299 = new SelectionsPrice(190, 299, 868.000) var pq_143700_190_301 = new SelectionsPrice(190, 301, 1044.000) var pq_143700_190_302 = new SelectionsPrice(190, 302, 1442.000) var pq_143700_190_303 = new SelectionsPrice(190, 303, 1611.000) var pq_143700_190_304 = new SelectionsPrice(190, 304, 1846.000) var pq_143700_190_305 = new SelectionsPrice(190, 305, 1923.000) var pq_143700_190_306 = new SelectionsPrice(190, 306, 2112.000) var pq_143700_190_307 = new SelectionsPrice(190, 307, 2126.000) var pq_143700 = new ProductQuantities(143700, 20364, 1000, 770.0000, [pq_143700_98_110, pq_143700_105_51, pq_143700_190_300, pq_143700_98_91, pq_143700_105_52, pq_143700_190_297, pq_143700_98_97, pq_143700_190_298, pq_143700_98_263, pq_143700_190_299, pq_143700_190_301, pq_143700_190_302, pq_143700_190_303, pq_143700_190_304, pq_143700_190_305, pq_143700_190_306, pq_143700_190_307]); var p_20364 = new Product(20364, "Brochures/Booklets/Newsletters A4 Full Colour 150gsm, Saddle Stitched (2 staples on spine)", [pq_143702, pq_143703, pq_143694, pq_143697, pq_143695, pq_143696, pq_143698, pq_143705, pq_143704, pq_143699, pq_143701, pq_143700], [pOpt_20364_190, pOpt_20364_98, pOpt_20364_105], [], [],[],[false]); var prodGroup = new ProductGroup("Booklets & Newsletters A4 150gsm Saddle stitched, up to 200gsm Cover", [], [], [], []); //alert(pgGrpOpt_74.selections[2].name); // 4.Create products // 4.1.Add All Selections (by ID) // 4.2.Add All Options (by ID) // 2.3. Create Selection Arrays for each product Quantity // 2.4. Create Option Constructor // 4.5. Create Array of Product Options // 4.6. Create Array of Product Option Dependencies // 4.7. Create Array of Option Qty Excludes // 4.5. Create Array of Product Quantities // 4.8. Create // 0.Create initial config Settings var ConfigSettings = new ConfigSettings(89, 20364, p_20364, 143702, pq_143702); function ConfigSettings(productGroupID, productID, objProduct, productQuantityID, productQuantity) { this.productGroupID = productGroupID; this.productID = productID; this.product = objProduct; this.productQuantityID = productQuantityID; this.productQuantity = productQuantity; // Addl Ptr to prodGroup Obj this.prodGroup = prodGroup; // Base Product Quantity ID this.baseProductQuantityID = productQuantityID; this.baseProdTimeSelectionID = 0; this.basePriceWithTurnAround = 0; } function ProductQuantities(ID, productID, quantity, basePrice, selectionsPrice) { this.ID = ID; this.productID = productID; this.quantity = quantity; this.basePrice = basePrice; this.selectionsPrice = selectionsPrice; this.PriceForSelection=function GetPriceForSelection(pqID, OptionID, SelectionID) { //alert("pq_" + pqID.toString() + "_" + OptionID.toString() + "_" + SelectionID.toString()); return eval("pq_" + pqID.toString() + "_" + OptionID.toString() + "_" + SelectionID.toString()).price; /* for (i = 0; i < this.selectionsPrice.length; i++) { alert(this.selectionsPrice[i].OptionID.toString if ((this.selectionsPrice[i].OptionID == OptionID) && (this.selectionsPrice[i].SelectionID == SelectionID)) return this.selectionsPrice[i].Price; } return null; */ } } function SelectionsPrice(OptionID,SelectionID,Price) { this.optionID=OptionID; this.selectionID=SelectionID; this.price=Price; } function Product(ID, name, quantities, options, optionDepends, optionQtyExludes,turnArounds,doNotAllowDiscount) { this.ID = ID; this.name = name; this.quantities = quantities; this.options = options; this.optionDepends = optionDepends; this.optionQtyExcludes = optionQtyExludes; this.turnArounds=turnArounds; this.doNotAllowDiscount=doNotAllowDiscount; Product.prototype.GetQuantityObj=function (Qty) { var vClosestObj = null; var vCurrentClosestDiff = 99999999; for (z=0; z < this.quantities.length; z++) { if (this.quantities[z].quantity==Qty) { return this.quantities[z] } if (vClosestObj == null) { vClosestObj = this.quantities[z]; vCurrentClosestDiff = Math.abs(vClosestObj.quantity-Qty) } else { if (Math.abs(vClosestObj.quantity-Qty) < vCurrentClosestDiff) { vClosestObj = this.quantities[z]; vCurrentClosestDiff = Math.abs(vClosestObj.quantity-Qty) } } } return vClosestObj; } } function Option(ID, name, notes, description, displayTitle, displayDescription, type, role, roleName, subRole, subRoleName, repeatColumns, repeatLayout, repeatDirection, textMode, width, height, defaultText, required, maxLength, readOnly, selections, DisplayInItemizedData) { this.ID = ID; this.name = name; this.notes = notes; this.description = description; this.displayTitle = displayTitle; this.displayDescription = displayDescription; this.type = type; this.role = role; this.roleName = roleName; this.subRole = subRole; this.subRoleName = subRoleName; this.repeatColumns = repeatColumns; this.repeatDirection = repeatDirection; this.repeatLayout = repeatLayout; this.textMode = textMode; this.width = width; this.height = height; this.defaultText = defaultText; this.required = required; this.maxLength = maxLength; this.readOnly = readOnly; this.selections = selections; this.isVisible=false; this.DisplayInItemizedData=DisplayInItemizedData; } function Selection(selectionID, name, description, title, image, suffix, isDefault, price, printedPages, width, height) { this.selectionID = selectionID; this.name = name; this.description = description; this.title = title; this.image = image; this.suffix = suffix; this.isDefault = isDefault; this.price = price; this.printedPages = printedPages; this.width = width; this.height = height; } // Product TurnAround function TurnAround(ID, name, description, type, amount, TurnAroundQtys ){ this.ID = ID; this.name = name; this.type = type; this.amount = amount; this.description = description; this.TurnAroundQtys=TurnAroundQtys; } function TurnAroundQty(ID,Cost,TurnAroundID,ExcludeTurnAround) { this.ID=ID; this.Cost=Cost; this.TurnAroundID=TurnAroundID; this.ExcludeTurnAround=ExcludeTurnAround; } // Product Group function ProductGroup(name, products, productGroupOptions, productOptionAssigns, productOptionDepends) { this.name = ""; this.products = products; this.productGroupOptions = productGroupOptions; this.productOptionAssigns = productOptionAssigns; this.productOptionDepends = productOptionDepends; } function ProductOptionAssign(ID, productID, optionID, selectionID) { this.ID = ID; this.productID = productID; this.optionID = optionID; this.selectionID = selectionID; } // Product Option Dependencies function ProductOptionDependencies(optionID, requiresOptionID, requiresSelectionID, checkboxValue) { this.optionID = optionID; this.requiresOptionID = requiresOptionID; this.requiresSelectionID = requiresSelectionID; this.checkboxValue = checkboxValue; } // Product Option Qty Dependencies function ProductOptionQtyDependencies(optionID, qtyID, qty) { this.optionID = optionID; this.qtyID = qtyID; this.qty = qty; } // Product Option Qty Dependencies function OptionQtyExcludes(productID, optionID, qty) { this.productID = productID; this.optionID = optionID; this.qty = qty; } function SelectedSelections(OptionID, SelectionID) { this.optionID=OptionID; this.selectionID=SelectionID; } /* function _CurrentGroupSelections() { this.selected = []; _CurrentGroupSelections.prototype.UpdateSelection = function SetSelection(OptionID, SelectionID) { var bFound = false; for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { this.selected[i].selectionID = SelectionID; bFound = true; } } if (bFound == false) { var vNewObj = new SelectedSelections(OptionID, SelectionID); this.selected.push(vNewObj); //this.UpdateOptionPrice(); } } // Get Selected Value for given OptionID _CurrentGroupSelections.prototype.GetSelected = function GetSelectedOptionID(OptionID) { for (var x = 0; x < this.selected.length; x++) { if (this.selected[x].optionID == OptionID) { return this.selected[x].selectionID; } } return -1; } // Get "|" Selection String _CurrentGroupSelections.prototype.SelectionString = function GetSelections() { var vStr = "|"; for (i = 0; i < this.selected.length; i++) { vStr += this.selected[i].optionID.toString() + "_" + this.selected[i].selectionID.toString() + "|" } return vStr; } } */ function _CurrentSelections() { this.selected = []; //to update check box selections _CurrentSelections.prototype.UpdateChkSelection = function SetChkSelection(OptionID, SelectionID) { var check=1; //will loop through and check if its already selected ot not if selected will make it -1 for unchecking it, if not selection does not exists for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { if(this.selected[i].selectionID == SelectionID){ //alert("here"); this.selected[i].selectionID =-1; return; check=0; } else { check=1; } } } //alert(check); //will check if first selection is -1 or not if -1 it will replace the first selection if(check==1){ for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { if(this.selected[i].selectionID == -1){ this.selected[i].selectionID =SelectionID; return; check=0; } } } } //if selection does not exist or first one is not -1 then it will add a new row. if(check==1){ var vNewObj = new SelectedSelections(OptionID, SelectionID); this.selected.push(vNewObj); } } _CurrentSelections.prototype.GetChkSelected = function GetChkSelectedOptionID(OptionID) { var vStr = "|"; for (var x = 0; x < this.selected.length; x++) { if (this.selected[x].optionID == OptionID) { vStr=vStr + this.selected[x].selectionID +"|"; } } return vStr; } _CurrentSelections.prototype.UpdateSelection = function SetSelection(OptionID, SelectionID) { var bFound = false; for (i = 0; i < this.selected.length; i++) { if (this.selected[i].optionID == OptionID) { this.selected[i].selectionID = SelectionID; for (j = 0; j < ConfigSettings.product.options.length; j++) { if((ConfigSettings.product.options[j].ID==OptionID)&&(ConfigSettings.product.options[j].type=='TextBox')) { if (ConfigSettings.product.options[j].selections[0].selectionID==SelectionID){ this.selected[i].selectionID = ' '; } } } //alert(OptionID.toString() + ":::" + SelectionID.toString()); bFound = true; } } if (bFound == false) { var vNewObj = new SelectedSelections(OptionID, SelectionID); this.selected.push(vNewObj); //this.UpdateOptionPrice(); } } // Get Selected Value for given OptionID _CurrentSelections.prototype.GetSelected = function GetSelectedOptionID(OptionID) { for (var x = 0; x < this.selected.length; x++) { if (this.selected[x].optionID == OptionID) { return this.selected[x].selectionID; } } return -1; } // Get "|" Selection String _CurrentSelections.prototype.SelectionString = function GetSelections() { var vStr = "|"; for (i = 0; i < this.selected.length; i++) { for (j = 0; j < ConfigSettings.product.options.length; j++) { if(ConfigSettings.product.options[j].ID==this.selected[i].optionID){ if(ConfigSettings.product.options[j].isVisible==true){ vStr += this.selected[i].optionID.toString() + "_" + this.selected[i].selectionID.toString() + "|" } } } } return vStr; } // Build Display Option HTML String for Selected Options _CurrentSelections.prototype.DisplayOptionsString = function GetDisplayOptionsString() { var vStr = ""; //alert(ConfigSettings.product.options.length); for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); if (1==1) {//(ConfigSettings.product.options[j].role != 5) { if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role != 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if (vPQ.price > 0) vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } // else { // Role 5 -- Finishing OPtions // if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].isVisible==true)) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // if (vCalcPrice > 0) // vStr += "
" + vSel.title + "
$" + CurrencyFormatted(vCalcPrice) + "
" // } // } } return vStr; } _CurrentSelections.prototype.SetOptionPriceRows = function SetOptionPriceRowsDisplay(tbl,QtyH, CSymbol) { var vStr = ""; //alert(ConfigSettings.product.options.length); for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); if (1==1) {//(ConfigSettings.product.options[j].role != 5) { if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role != 2) && (ConfigSettings.product.options[j].isVisible==true) && (ConfigSettings.product.options[j].type!='TextBox')) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert('123'); //alert("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if(QtyH>0) { var vPQH = eval("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQH); } //alert(vPQH); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //if (vPQ.price > 0) { //alert(vSel.DisplayInItemizedData.toString()+" "+vSelSelectionID.toString()); //alert(ConfigSettings.product.options[j].DisplayInItemizedData); if(ConfigSettings.product.options[j].DisplayInItemizedData==true ){ var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var bold1 = document.createElement("B"); var textnode1a = document.createTextNode(ConfigSettings.product.options[j].displayTitle + ": "); var textnode1b = document.createTextNode(vSel.title); if(QtyH>0) { var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price,vPQH.price))); } else var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price,0))); bold1.appendChild(textnode1a); cell1.appendChild(bold1); cell1.appendChild(textnode1b); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } else if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role == 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if(QtyH>0) { var vPQH = eval("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQH); } var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQ.price); //if (vPQ.price > 0) { if(ConfigSettings.product.options[j].DisplayInItemizedData==true ){ var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var textnode1 = document.createTextNode(ConfigSettings.product.options[j].displayTitle + ": " + vSel.title); if(QtyH>0) { var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price,vPQH.price))); } else var textnode2 = document.createTextNode(CSymbol + CurrencyFormatted(GetPriceBySize(vPQ.price))); cell1.appendChild(textnode1); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } } // else { // Role 5 -- Finishing OPtions // if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].isVisible==true)) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // if (vCalcPrice > 0) { // var row = tbl.insertRow(tbl.rows.length); // var cell1 = document.createElement("TH"); // var cell2 = document.createElement("TD"); // var textnode1 = document.createTextNode(vSel.title); // var textnode2 = document.createTextNode("$" + CurrencyFormatted(vCalcPrice)); // cell1.appendChild(textnode1); // cell2.appendChild(textnode2); // row.appendChild(cell1); // row.appendChild(cell2); // // //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(vCalcPrice) + "
" // } // } // } } return vStr; } _CurrentSelections.prototype.SetOptionPriceRowsOld = function SetOptionPriceRowsDisplayOLD(tbl) { var vStr = ""; //alert(ConfigSettings.product.options.length); for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); if (1==1) {//(ConfigSettings.product.options[j].role != 5) { if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role != 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if (vPQ.price > 0) { var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var textnode1 = document.createTextNode(ConfigSettings.product.options[j].displayTitle + vSel.title); var textnode2 = document.createTextNode("$" + CurrencyFormatted(GetPriceBySize(vPQ.price))); cell1.appendChild(textnode1); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } else if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].role == 2) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQ.price); if (vPQ.price > 0) { var row = tbl.insertRow(tbl.rows.length); var cell1 = document.createElement("TH"); var cell2 = document.createElement("TD"); var textnode1 = document.createTextNode(ConfigSettings.product.options[j].displayTitle + ": " + vSel.title); var textnode2 = document.createTextNode("$" + CurrencyFormatted(GetPriceBySize(vPQ.price))); cell1.appendChild(textnode1); cell2.appendChild(textnode2); row.appendChild(cell1); row.appendChild(cell2); //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(GetPriceBySize(vPQ.price)) + "
" } } } // else { // Role 5 -- Finishing OPtions // if ((vSelSelectionID > -1) && (ConfigSettings.product.options[j].isVisible==true)) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vSel = eval("pOptSel_" + ConfigSettings.productID.toString() + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // if (vCalcPrice > 0) { // var row = tbl.insertRow(tbl.rows.length); // var cell1 = document.createElement("TH"); // var cell2 = document.createElement("TD"); // var textnode1 = document.createTextNode(vSel.title); // var textnode2 = document.createTextNode("$" + CurrencyFormatted(vCalcPrice)); // cell1.appendChild(textnode1); // cell2.appendChild(textnode2); // row.appendChild(cell1); // row.appendChild(cell2); // // //vStr += "
" + vSel.title + "
$" + CurrencyFormatted(vCalcPrice) + "
" // } // } // } } return vStr; } this.GetOptionPrice = function GetOptionPrice (QtyH) { var vOptionPrice = 0.0; for (j = 0; j < ConfigSettings.product.options.length; j++) { var vSelSelectionID = this.GetSelected(ConfigSettings.product.options[j].ID); //if ((ConfigSettings.product.options[j].role != 5) && (ConfigSettings.product.options[j].isVisible==true)) { //alert(ConfigSettings.product.options[j].ID); //alert(ConfigSettings.product.options[j].isVisible); if (vSelSelectionID == -1) { // get default var selCnt = ConfigSettings.product.options[j].selections.length; for (var selIndex = 0; selIndex < selCnt; selIndex++) { if (ConfigSettings.product.options[j].selections[selIndex].isDefault == true) { vSelSelectionID = ConfigSettings.product.options[j].selections[selIndex].selectionID; continue; } } } if ((ConfigSettings.product.options[j].isVisible==true)&& (ConfigSettings.product.options[j].type != 'TextBox') ){ if (vSelSelectionID > -1) { var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); if(QtyH>0) { var vPQH = eval("pq_"+ QtyH+ "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); //alert(vPQH); } if(QtyH>0) vOptionPrice +=GetPriceBySize(vPQ.price,vPQH.price); else vOptionPrice += vPQ.price; } } // else if ((ConfigSettings.product.options[j].role == 5) && (ConfigSettings.product.options[j].isVisible==true)) { // Role 5 -- Finishing OPtions // // if (vSelSelectionID > -1) { // //alert(ConfigSettings.product.options[j].role); // //alert(ConfigSettings.product.options[j].ID.toString() + ":" + this.GetSelected(ConfigSettings.product.options[j].ID).toString()); // //alert("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vPQ = eval("pq_"+ ConfigSettings.productQuantityID + "_" + ConfigSettings.product.options[j].ID.toString() + "_" + vSelSelectionID.toString()); // var vCalcPrice = GetBannerOptionPrice(ConfigSettings.product.options[j], vPQ.price); // vOptionPrice += vCalcPrice; // } // } } return vOptionPrice; } } function GetBannerOptionPrice(option, unitPrice) { if (option.subRoleName == "Grommets") { //alert(GetGrommetCount()); //alert(unitPrice); return unitPrice * GetGrommetCount(); } else if (option.subRoleName == "Webbing") { return unitPrice * GetWebbingLength(); } else if (option.subRoleName == "Pole Pockets") { return unitPrice * GetPolePocketsLength(); } else if (option.subRoleName == "Rope") { return unitPrice * GetRopeLength(); } else if (option.subRoleName == "Sewing") { return unitPrice * GetSewingLength(); } else if (option.subRoleName == "3/4\" Velcro") { return unitPrice * GetVelcro3Length(); } else if (option.subRoleName == "2\" Velcro") { return unitPrice * GetVelcro2Length(); } //else //alert(option.subRoleName); } var currentSelections = new _CurrentSelections(); var currentGroupSelections = new _CurrentSelections(); function SetCurrentGroupSelections() { //alert('abc'); for (z=0; z < prodGroup.productGroupOptions.length; z++) { var OptionID = prodGroup.productGroupOptions[z].ID; var obj = document.getElementById("grpopt_" + OptionID.toString()); //alert(obj); //alert("opt_" + OptionID.toString()); if (obj) { if (prodGroup.productGroupOptions[z].type == "DropDown") { var SelectionID = obj.options[obj.selectedIndex].value; currentGroupSelections.UpdateSelection(OptionID, SelectionID); } } } //alert(currentGroupSelections.SelectionString()); } function SetCurrentSelections() { //alert(ConfigSettings.product.options.length); for (z=0; z < ConfigSettings.product.options.length; z++) { var OptionID = ConfigSettings.product.options[z].ID; //alert(OptionID.toString() + ":" + currentSelections.GetSelected(OptionID).toString()) if (currentSelections.GetSelected(OptionID) == -1) { //alert(ConfigSettings.product.options[z].selections); if (ConfigSettings.product.options[z].selections) { for (y=0; y < ConfigSettings.product.options[z].selections.length; y++) { if (ConfigSettings.product.options[z].selections[y].isDefault == true) { //alert(OptionID.toString() + ":" + ConfigSettings.product.options[z].selections[y].selectionID.toString()); currentSelections.UpdateSelection(OptionID, ConfigSettings.product.options[z].selections[y].selectionID); y=99999; } } } else { currentSelections.UpdateSelection(OptionID, ConfigSettings.product.options[z].defaultText); } } } //alert(currentSelections.SelectionString()); } function CurrencyFormatted(amount) { var i = parseFloat(amount.toString().replace("$","")); if(isNaN(i)) { i = 0.00; } var minus = ''; if(i < 0) { minus = '-'; } i = Math.abs(i); i = parseInt((i + .005) * 100); i = i / 100; s = new String(i); if(s.indexOf('.') < 0) { s += '.00'; } if(s.indexOf('.') == (s.length - 2)) { s += '0'; } s = minus + s; return CommaFormatted(s); } // end of function CurrencyFormatted() function CommaFormatted(amount) { var delimiter = ","; // replace comma if desired var a = amount.split('.',2) var d = a[1]; var i = parseInt(a[0]); if(isNaN(i)) { return ''; } var minus = ''; if(i < 0) { minus = '-'; } i = Math.abs(i); var n = new String(i); var a = []; while(n.length > 3) { var nn = n.substr(n.length-3); a.unshift(nn); n = n.substr(0,n.length-3); } if(n.length > 0) { a.unshift(n); } n = a.join(delimiter); if(d.length < 1) { amount = n; } else { amount = n + '.' + d; } amount = minus + amount; return amount; } // end of function CommaFormatted()