/*
**
**  Copyright (c) 1997-2003 by Sniglets, Inc., all rights reserved.
**
**  Usage, duplication, and/or modification of this program, its
**  representation, or its results without written permission from
**  Sniglets, Inc. is expressly prohibited.
**
**  $Id: woven.js,v 1.3 2003/03/08 17:13:17 john Exp john $
**
*/

var sb_config_drop_down, sb_products, sb_product, sb_option, sb_options;

sb_config = new Object();
sb_config['label'] = 'shades';
sb_config['name'] = 'Honeycomb Shades';
sb_config['product_type_list_box'] = 0;
sb_config['product_color_list_box'] = 0;


sb_products = new Array();

sb_product = new Object();
sb_product['name'] = '1/2" Double Cell Translucent Honeycomb Shades';
sb_product['url'] = 'http://www.dantehill.com/';
sb_product['width_minimum'] = 12;
sb_product['width_maximum'] = 120;
sb_product['length_minimum'] = 8;
sb_product['length_maximum'] = 120;
sb_product['colors'] = new Array(
'Beechwood',
'Honeysuckle',
'Porcelain',
'Rose Trellis',
'Shady Blue',
'Star Magnolia',
'Sweetpea',
'Thistle'
);
sb_product['widths'] = new Array(
24, 30, 36, 42, 48, 54, 60, 66, 72, 84, 96, 108, 120
);
sb_product['lengths'] = new Array(
36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 108, 120
);
sb_product['prices'] = new Array(
58, 65, 71, 81, 88, 95, 102, 111, 118, 134, 150, 167, 182,
61, 69, 77, 86, 94, 105, 112, 122, 130, 148, 166, 184, 201,
65, 73, 84, 94, 103, 111, 122, 132, 142, 160, 182, 200, 221,
69, 77, 89, 99, 111, 120, 131, 142, 153, 173, 197, 217, 240,
73, 82, 95, 106, 117, 128, 141, 152, 164, 186, 213, 234, 259,
75, 88, 100, 113, 125, 137, 150, 163, 175, 200, 227, 252, 277,
80, 92, 105, 119, 132, 146, 159, 173, 186, 213, 242, 269, 295,
84, 97, 110, 126, 140, 154, 167, 184, 197, 226, 256, 286, 315,
86, 101, 116, 131, 147, 161, 176, 192, 207, 237, 270, 300, 332,
90, 104, 122, 137, 154, 168, 186, 202, 218, 249, 285, 317, 351,
94, 109, 126, 142, 161, 176, 193, 211, 229, 261, 298, 332, 368,
100, 118, 137, 155, 174, 193, 207, 230, 249, 287, 326, 364, 403,
107, 126, 147, 168, 189, 208, 228, 251, 270, 311, 355, 397, 438
);
sb_product['price_cordless'] = new Array(
20.81, 21.74, 23.29, 24.53, 24.84, 25.46, 25.45, 27.63, 28.41, 29.80, 31.66, 32.90, 34.45 
);
sb_product['price_cord_loop'] = new Array(
18.95, 20.19, 21.74, 22.36, 22.98, 23.60, 23.91, 25.77, 26.08, 27.32, 29.18, 30.42, 31.66 
);
sb_product['price_heavy_cord'] = new Array(
32.34, 34.20, 34.82, 36.06, 37.30, 38.54, 39.47, 40.71, 42.88, 43.50, 46.91, 48.77, 50.32 
);
sb_product['duo_fold_width_minimum'] = 12;
sb_product['duo_fold_width_maximum'] = 72;
sb_product['duo_fold_length__minimum'] = 12;
sb_product['duo_fold_length__maximum'] = 96;

sb_products.push(sb_product);

sb_product = new Object();
sb_product['name'] = '3/4" Single Cell Translucent Honeycomb Shades';
sb_product['url'] = 'http://www.dantehill.com/';
sb_product['width_minimum'] = 12;
sb_product['width_maximum'] = 120;
sb_product['length_minimum'] = 8;
sb_product['length_maximum'] = 120;
sb_product['colors'] = new Array(
'Acadia',
'Beechwood',
'Camelhair',
'Desert Sunrise',
'Herb Garden',
'Mediterranean',
'Mushroom',
'Organic',
'Porcelain',
'Silver Birch',
'Star Magnolia',
'Sunbeam'
);
sb_product['widths'] = new Array(
24, 30, 36, 42, 48, 54, 60, 66, 72, 84, 96, 108, 120
);
sb_product['lengths'] = new Array(
36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 108, 120
);
sb_product['prices'] = new Array(
58, 65, 71, 81, 88, 95, 102, 111, 118, 134, 150, 167, 182,
61, 69, 77, 86, 94, 105, 112, 122, 130, 148, 166, 184, 201,
65, 73, 84, 94, 103, 111, 122, 132, 142, 160, 182, 200, 221,
69, 77, 89, 99, 111, 120, 131, 142, 153, 173, 197, 217, 240,
73, 82, 95, 106, 117, 128, 141, 152, 164, 186, 213, 234, 259,
75, 88, 100, 113, 125, 137, 150, 163, 175, 200, 227, 252, 277,
80, 92, 105, 119, 132, 146, 159, 173, 186, 213, 242, 269, 295,
84, 97, 110, 126, 140, 154, 167, 184, 197, 226, 256, 286, 315,
86, 101, 116, 131, 147, 161, 176, 192, 207, 237, 270, 300, 332,
90, 104, 122, 137, 154, 168, 186, 202, 218, 249, 285, 317, 351,
94, 109, 126, 142, 161, 176, 193, 211, 229, 261, 298, 332, 368,
100, 118, 137, 155, 174, 193, 207, 230, 249, 287, 326, 364, 403,
107, 126, 147, 168, 189, 208, 228, 251, 270, 311, 355, 397, 438
);
sb_product['price_cordless'] = new Array(
20.81, 21.74, 23.29, 24.53, 24.84, 25.46, 25.45, 27.63, 28.41, 29.80, 31.66, 32.90, 34.45 
);
sb_product['price_cord_loop'] = new Array(
18.95, 20.19, 21.74, 22.36, 22.98, 23.60, 23.91, 25.77, 26.08, 27.32, 29.18, 30.42, 31.66 
);
sb_product['price_heavy_cord'] = new Array(
32.34, 34.20, 34.82, 36.06, 37.30, 38.54, 39.47, 40.71, 42.88, 43.50, 46.91, 48.77, 50.32 
);
sb_product['duo_fold_width_minimum'] = 12;
sb_product['duo_fold_width_maximum'] = 72;
sb_product['duo_fold_length__minimum'] = 12;
sb_product['duo_fold_length__maximum'] = 96;

sb_products.push(sb_product);

sb_product = new Object();
sb_product['name'] = '3/4" Single Cell Blackout Honeycomb Shades';
sb_product['url'] = 'http://www.dantehill.com/';
sb_product['width_minimum'] = 12;
sb_product['width_maximum'] = 120;
sb_product['length_minimum'] = 8;
sb_product['length_maximum'] = 120;
sb_product['colors'] = new Array(
'Beechwood',
'Bordeaux',
'Deep Navy',
'Dogwood',
'Persimmon',
'White Azalea'
);
sb_product['widths'] = new Array(
24, 30, 36, 42, 48, 54, 60, 66, 72, 84, 96, 108, 120
);
sb_product['lengths'] = new Array(
36, 42, 48, 54, 60, 66, 72, 78, 84, 90, 96, 108, 120
);
sb_product['prices'] = new Array(
67, 75, 83, 93, 102, 110, 118, 129, 137, 155, 175, 194, 211,
71, 80, 89, 100, 110, 122, 130, 142, 150, 172, 193, 213, 233,
76, 85, 98, 109, 119, 129, 142, 153, 164, 186, 211, 232, 256,
80, 89, 104, 115, 128, 139, 152, 164, 178, 201, 228, 252, 278,
84, 95, 111, 123, 136, 149, 163, 177, 190, 216, 247, 272, 300,
87, 102, 116, 131, 145, 159, 174, 190, 203, 232, 263, 292, 321,
92, 107, 122, 138, 153, 169, 184, 201, 216, 247, 281, 312, 343,
97, 112, 128, 146, 162, 179, 194, 213, 228, 262, 297, 332, 365,
100, 117, 134, 152, 170, 187, 205, 223, 240, 275, 313, 348, 385,
104, 121, 142, 159, 179, 195, 215, 234, 253, 289, 331, 368, 407,
109, 126, 146, 165, 187, 204, 224, 245, 265, 303, 346, 385, 427,
116, 137, 158, 180, 202, 224, 240, 267, 288, 333, 378, 423, 467,
124, 146, 170, 195, 219, 241, 264, 291, 313, 361, 412, 461, 508
);
sb_product['price_cordless'] = new Array(
20.81, 21.74, 23.29, 24.53, 24.84, 25.46, 25.45, 27.63, 28.41, 29.80, 31.66, 32.90, 34.45 
);
sb_product['price_cord_loop'] = new Array(
18.95, 20.19, 21.74, 22.36, 22.98, 23.60, 23.91, 25.77, 26.08, 27.32, 29.18, 30.42, 31.66 
);
sb_product['price_heavy_cord'] = new Array(
32.34, 34.20, 34.82, 36.06, 37.30, 38.54, 39.47, 40.71, 42.88, 43.50, 46.91, 48.77, 50.32 
);
sb_product['duo_fold_width_minimum'] = 12;
sb_product['duo_fold_width_maximum'] = 72;
sb_product['duo_fold_length__minimum'] = 12;
sb_product['duo_fold_length__maximum'] = 96;

sb_products.push(sb_product);

sb_options = new Array();

sb_option = new Object();
sb_option['type'] = 'select';
sb_option['label'] = 'mount_position';
sb_option['name'] = 'Mount position';
sb_option['script_check'] = "if (!v) s = 'Please select a mount position.';";
//sb_option['script_price'] = "if (v == 'inside') p = 0; else if (v == 'outside') p = 0;";
sb_option['script_string'] = "s = ', Mount: ' + v;";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'cord_position';
sb_option['name'] = 'Lift position';
sb_option['script_check'] = "if (!v) s = 'Please select a lift position.';";
sb_option['script_string'] = "s = ', Lift: ' + v;";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'checkbox';
sb_option['label'] = 'duo_fold';
sb_option['name'] = 'Top Down/Bottom Up';
sb_option['script_string'] = "if (v == 'yes') s = ', Top Down/Bottom Up';";
//sb_option['script_check'] = "if ((product_width < 18) || (product_length < 18)) s = 'Top Down/Bottom Up control not available at these dimensions';";
sb_option['script_check'] = "if (v == 'yes') { if ((product_width < sb_product['duo_fold_width_minimum']) || (product_width > sb_product['duo_fold_width_maximum']) || (product_length < sb_product['duo_fold_length_minimum']) || (product_length > sb_product['duo_fold_length_maximum'])) s = 'Top Down/Bottom Up not available for these dimensions.'; if (f.elements['form_top_down'].checked) s = 'Top Down/Bottom Up cannot be combined with Top Down Only'; else if (f.elements['form_cordless'].checked) s = 'Top Down/Bottom Up cannot be combined with Cordless Lift System'; else if (f.elements['form_headrail'].value == 'two') s = 'Top Down/Bottom Up not available with 2-on-1 option'; else if (f.elements['form_cord_loop'].checked) s = 'Top Down/Bottom Up cannot be combined with Continuous Cord Loop'; else if (f.elements['form_heavy_cord'].checked) s = 'Top Down/Bottom Up cannot be combined with Heavy Duty Continuous Cord Loop';}";
sb_option['script_price'] = "if ((v == 'yes') && (f.elements['form_headrail'].value == 'one')) p = 3500; else if ((v == 'yes') && (f.elements['form_headrail'].value == 'two')) p = 7000;";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'checkbox';
sb_option['label'] = 'top_down';
sb_option['name'] = 'Top Down Only';
sb_option['script_string'] = "if (v == 'yes') s = ', Top Down Only';";
sb_option['script_check'] = "if (v == 'yes') { if ((product_width < sb_product['duo_fold_width_minimum']) || (product_width > sb_product['duo_fold_width_maximum']) || (product_length < sb_product['duo_fold_length_minimum']) || (product_length > sb_product['duo_fold_length_maximum'])) s = 'Top Down Only not available for these dimensions.'; if (f.elements['form_duo_fold'].checked) s = 'Top Down Only cannot be combined with Top Down/Bottom Up'; else if (f.elements['form_cordless'].checked) s = 'Top Down Only cannot be combined with Cordless Lift System'; else if (f.elements['form_headrail'].value == 'two') s = 'Top Down Only not available with 2-on-1 option';}";
sb_option['script_price'] = "if ((v == 'yes') && (f.elements['form_headrail'].value == 'one')) p = 3500; else if ((v == 'yes') && (f.elements['form_headrail'].value == 'two')) p = 7000;";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'checkbox';
sb_option['label'] = 'cordless';
sb_option['name'] = 'Cordless Lift System';
sb_option['script_string'] = "if (v == 'yes') s = ', Cordless Lift System';";
//sb_option['script_check'] = "if ((product_width < 18) || (product_length < 18)) s = 'Cordless Lift System control not available at these dimensions';";
sb_option['script_price'] = "if ((v == 'yes') && (f.elements['form_headrail'].value == 'one')) p = Math.floor(sb_product['price_cordless'][i_w] * 100); else if ((v == 'yes') && (f.elements['form_headrail'].value == 'two')) p = Math.floor(sb_product['price_cordless'][i_w] * 160);";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'checkbox';
sb_option['label'] = 'cord_loop';
sb_option['name'] = 'Continuous Cord Loop';
sb_option['script_string'] = "if (v == 'yes') s = ', Continuous Cord Loop';";
//sb_option['script_check'] = "if (v == 'yes') {if (product_width < 22) s = 'Continuous Cord Loop not available for this width. Minimum width is 22\"'; else if ((product_width < 44) && (f.elements['form_headrail'].value == 'two')) s = 'Continuous Cord Loop cannot be combined with 2-on-1 option for this width. The minimum width for this combination is 44\"';}";
//sb_option['script_price'] = "if ((v == 'yes') && (f.elements['form_headrail'].value == 'one')) p = Math.floor(sb_product['price_cord_loop'][i_w] * 100); else if ((v == 'yes') && (f.elements['form_headrail'].value == 'two')) p = Math.floor(sb_product['price_cord_loop'][i_w] * 160);";
sb_option['script_check'] = "if (v == 'yes') {if (product_width < 22) s = 'Continuous Cord Loop not available for this width. Minimum width is 22\"'; if (f.elements['form_headrail'].value == 'two') s = 'Continuous Cord Loop cannot be combined with 2-on-1 option'; if (f.elements['form_cordless'].checked) s = 'Continuous Cord Loop cannot be combined with Cordless Lift System';}";
sb_option['script_price'] = "if (v == 'yes') p = Math.floor(sb_product['price_cord_loop'][i_w] * 100);";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'checkbox';
sb_option['label'] = 'heavy_cord';
sb_option['name'] = 'Heavy Duty Continuous Cord Loop';
sb_option['script_string'] = "if (v == 'yes') s = ', Heavy Duty Continuous Cord Loop';";
//sb_option['script_check'] = "if (v == 'yes') { if ((product_width < 44) && (f.elements['form_headrail'].value == 'two')) s = 'Heavy Duty Continuous Cord Loop cannot be combined with 2-on-1 option for this width. The minimum width for this combination is 44\"';}";
//sb_option['script_price'] = "if ((v == 'yes') && (f.elements['form_headrail'].value == 'one')) p = Math.floor(sb_product['price_heavy_cord'][i_w] * 100); else if ((v == 'yes') && (f.elements['form_headrail'].value == 'two')) p = Math.floor(sb_product['price_heavy_cord'][i_w] * 160 + 3000);";
sb_option['script_check'] = "if (v == 'yes') { if (f.elements['form_headrail'].value == 'two') s = 'Heavy Duty Continuous Cord Loop cannot be combined with 2-on-1 option.'; if (f.elements['form_cordless'].checked) s = 'Heavy Duty Continuous Cord Loop cannot be combined with Cordless Lift System'; if (f.elements['form_cord_loop'].checked) s = 'Heavy Duty Continuous Cord Loop cannot be combined with Continuous Cord Loop';}";
sb_option['script_price'] = "if (v == 'yes') p = Math.floor(sb_product['price_heavy_cord'][i_w] * 100);";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'select';
sb_option['label'] = 'headrail';
sb_option['name'] = 'Blinds on one headrail';
sb_option['script_string'] = "if (v != 'one') s = ', ' + v + ' blinds on one headrail';";
sb_option['script_check'] = "if (v == 'two') { if (product_width < 16) s = '2-on-1 option not available for this width. The minimum width is 16\"'; if (f.elements.form_comments.value == '') s = 'Note for 2-on-1 option you have selected: At the bottom of the page you will see a blank box for comments, notes or requests. Please use it to enter the width of each shade and position of the lift controls. If they are equal, just enter \"Equal shades\" and the lift position of each shade';}";
sb_option['script_price'] = "if (v == 'one') p = 0; else if (v == 'two') p = Math.floor(price * 0.15 + 3000);";
sb_options.push(sb_option);
