/*
**
**  Copyright (c) 1986-2008, Accent Blinds and Shades. All rights reserved.
**
**  Usage, duplication, and/or modification of this program, its
**  representation, or its results without written permission from
**  Accent Blinds and Shades is expressly prohibited.
**
*/

var sb_config_drop_down, sb_products, sb_product, sb_option, sb_options;

sb_config = new Object();
sb_config['label'] = 'shades';
sb_config['name'] = 'Cellular 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'] = '3/4" Single Cell Blackout Cellular Shades';
sb_product['url'] = 'http://www.homeblindz.com/';
sb_product['width_minimum'] = 6;
sb_product['width_maximum'] = 120;
sb_product['length_minimum'] = 6;
sb_product['length_maximum'] = 144;
sb_product['markup_multiplier'] = 1.25;
sb_product['colors'] = new Array(
'3001 True White', '#000000', '#ffffff',
'3002 Mist', '#000000', '#ffffff',
'3003 Sand', '#000000', '#ffffff',
'3004 Woodtone', '#000000', '#ffffff',
'3005 Thyme', '#000000', '#ffffff',
'3006 Midnight', '#000000', '#ffffff'
);
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, 132, 144
);
sb_product['prices'] = new Array(
47.69, 54.25, 60.07, 68.08, 74.27, 81.91, 88.10, 96.48, 102.30, 117.23, 132.15, 155.64, 176.21,
50.60, 58.25, 64.80, 73.18, 80.82, 90.29, 97.20, 105.94, 112.49, 128.88, 145.26, 171.55, 194.41,
54.61, 61.89, 71.36, 79.73, 88.10, 96.48, 105.94, 114.68, 123.42, 140.53, 160.55, 183.30, 211.88,
58.25, 65.17, 76.09, 84.46, 94.66, 104.12, 113.95, 123.42, 133.61, 152.18, 173.29, 197.83, 227.90,
61.16, 69.54, 81.19, 90.65, 100.84, 111.40, 122.69, 132.88, 143.08, 163.83, 187.49, 211.67, 245.38,
64.07, 74.63, 85.55, 97.20, 108.13, 119.78, 130.33, 142.71, 152.91, 176.21, 199.87, 227.57, 260.67,
67.35, 78.27, 90.29, 102.30, 113.95, 127.42, 138.71, 151.45, 163.10, 187.86, 213.70, 242.10, 277.41,
70.99, 82.64, 94.29, 108.49, 120.87, 134.34, 146.35, 160.92, 172.57, 199.51, 226.45, 255.24, 292.71,
72.45, 86.65, 99.39, 112.86, 127.06, 140.53, 154.36, 168.20, 182.03, 208.97, 238.82, 267.00, 308.72,
76.45, 89.20, 105.21, 118.68, 133.61, 147.08, 162.74, 176.93, 191.86, 220.26, 252.66, 279.45, 325.47,
79.73, 93.20, 108.49, 123.42, 139.80, 154.00, 169.65, 184.94, 200.96, 230.81, 264.31, 292.60, 339.31,
85.55, 101.57, 117.96, 134.70, 151.45, 168.92, 184.94, 202.42, 218.80, 253.75, 289.06, 320.96, 369.89,
91.38, 109.95, 127.42, 145.99, 163.10, 183.85, 200.23, 219.89, 236.64, 276.69, 313.82, 349.32, 400.47,
97.20, 118.32, 136.89, 157.27, 174.75, 198.78, 215.52, 237.37, 254.48, 299.62, 338.58, 377.68, 431.05,
103.03, 126.69, 146.35, 168.56, 186.40, 213.70, 230.81, 254.84, 272.32, 322.56, 363.33, 406.04, 461.63
);
sb_product['price_cordless'] = new Array(
18.22, 19.35, 21.25, 22.39, 23.15, 23.91, 23.91, 26.57, 27.32, 28.84, 31.12, 33.40, 35.67
);
sb_product['price_easylift_bu'] = new Array(
16.70, 17.46, 19.35, 20.49, 21.25, 21.63, 22.01, 24.29, 24.67, 26.19, 28.08, 29.98, 31.88
);
sb_product['price_easylift_td'] = new Array(
36.25, 37.01, 38.90, 40.04, 40.80, 41.18, 41.56, 43.84, 44.22, 45.74, 47.63, 49.53, 51.43
);
sb_product['price_arch'] = new Array(
47.44, 53.89, 59.96, 67.93, 77.42, 87.29, 98.67, 110.06, 124.10, 152.18, 0, 0, 0
);

sb_products.push(sb_product);


sb_options = new Array();

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'mount_position';
sb_option['name'] = 'Mount position';
sb_option['script_check'] = "if (!v) s = 'Please select a mount position'; else if ((v == 'side_mount') && (product_width > 46)) s = 'Side Mount is available only for widths up to 46\". Side mount brackets must be included in your order';";
sb_option['script_string'] = "s = ', Mount-' + v;";
sb_options.push(sb_option);

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

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'cordless';
sb_option['name'] = 'Cordless Lift System';
sb_option['script_check'] = "if (v == 'yes') { if ((product_width < 18) || (product_width > 96) || (product_length < 12) || (product_length > 72)) s = 'Cordless Lift System is not available at these dimensions'; else if ((product_width*product_length)/144 > 60) s = 'Cordless Lift System is only available on shades up to 35 sq. ft'; if (f.elements['form_headrail'].value == 'two')  s = 'Cordless Lift System cannot be combined with 2-on-1 headrail option'; if (f.elements.form_tdbu[0].checked)  s = 'Cordless Lift System cannot be combined with Top Down/Bottom Up'; if (f.elements.form_easylift_bu[0].checked)  s = 'Cordless Lift System cannot be combined with EasyLift Bottom Up'; if (f.elements.form_easylift_td[0].checked)  s = 'Cordless Lift System cannot be combined with EasyLift Top Down';}";
sb_option['script_price'] = "if (v == 'yes') p = Math.floor(sb_product['price_cordless'][i_w] * 100);";
sb_option['script_string'] = "if (v == 'yes') s = ', Cordless Lift System';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'tdbu';
sb_option['name'] = 'Top Down/Bottom Up';
sb_option['script_check'] = "if (v == 'yes') { if (f.elements['form_headrail'].value == 'two')  s = 'Top Down/Bottom Up cannot be combined with 2-on-1 headrail option'; if (f.elements.form_easylift_bu[0].checked)  s = 'Top Down/Bottom Up cannot be combined with EasyLift Bottom Up'; if (f.elements.form_easylift_td[0].checked)  s = 'Top Down/Bottom Up cannot be combined with EasyLift Top Down';}";
sb_option['script_price'] = "if (v == 'yes') p = 2754;";
sb_option['script_string'] = "if (v == 'yes') s = ', Top Down/Bottom Up';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'easylift_bu';
sb_option['name'] = 'EasyLift Bottom Up';
sb_option['script_check'] = "if (v == 'yes') { if ((product_width < 10) || (product_width > 96) || (product_length > 84)) s = 'EasyLift Bottom Up is not available at these dimensions'; if (f.elements['form_headrail'].value == 'two')  s = 'EasyLift Bottom Up cannot be combined with 2-on-1 headrail option'; if (f.elements.form_tdbu[0].checked)  s = 'EasyLift Bottom Up cannot be combined with Top Down/Bottom Up'; if (f.elements.form_easylift_td[0].checked)  s = 'EasyLift Bottom Up cannot be combined with EasyLift Top Down';}";
sb_option['script_price'] = "if (v == 'yes') p = Math.floor(sb_product['price_easylift_bu'][i_w] * 100);";
sb_option['script_string'] = "if (v == 'yes') s = ', EasyLift Bottom Up';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'easylift_td';
sb_option['name'] = 'EasyLift Top Down';
sb_option['script_check'] = "if (v == 'yes') { if ((product_width < 10) || (product_width > 96) || (product_length > 84)) s = 'EasyLift Top Down is not available at these dimensions'; if (f.elements['form_headrail'].value == 'two')  s = 'EasyLift Top Down cannot be combined with 2-on-1 headrail option'; if (f.elements.form_tdbu[0].checked)  s = 'EasyLift Top Down cannot be combined with Top Down/Bottom Up'; if (f.elements.form_easylift_bu[0].checked)  s = 'EasyLift Top Down cannot be combined with EasyLift Bottom Up';}";
sb_option['script_price'] = "if (v == 'yes') p = Math.floor(sb_product['price_easylift_td'][i_w] * 100);";
sb_option['script_string'] = "if (v == 'yes') s = ', EasyLift Top Down';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'arch';
sb_option['name'] = 'Perfect Arch';
sb_option['script_check'] = "if (v == 'yes') { if (product_width > 84) s = 'Perfect Arch is not available for widths over 84\"';}";
sb_option['script_price'] = "if (v == 'yes') p = Math.floor(sb_product['price_arch'][i_w] * 100);";
sb_option['script_string'] = "if (v == 'yes') s = ', Perfect Arch';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'select';
sb_option['label'] = 'headrail';
sb_option['name'] = 'Shades on one headrail';
//sb_option['script_price'] = "if (v == 'one') p = 0; else if (v != 'one') p = Math.floor(price * 0.1);";
sb_option['script_check'] = "if ((v == 'one') && (product_width >= 84)) s = 'Shades over 84\" must be done as two on one spliced headrail.'; else if ((v == 'two') && (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. If you do not enter the width of each shade, we will assume that they are equal in size';";
sb_option['script_string'] = "if (v == 'one') s = ''; else if (v != 'one') s = ', ' + v + ' shades on one headrail';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'side_mount';
sb_option['name'] = 'Side Mount brackets';
sb_option['script_check'] = "if (!v) s = 'Please choose whether you need side mount brackets';";
sb_option['script_string'] = "if (v == 'yes') s = ', side mount brackets';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'hold_down';
sb_option['name'] = 'Hold down brackets';
sb_option['script_check'] = "if (!v) s = 'Please choose whether you need hold down brackets';";
sb_option['script_string'] = "if (v == 'yes') s = ', hold down brackets';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'extension';
sb_option['name'] = 'Extension brackets';
sb_option['script_check'] = "if (!v) s = 'Please choose whether you need extension brackets';";
sb_option['script_string'] = "if (v == 'yes') s = ', extension brackets';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'radio';
sb_option['label'] = 'spacer';
sb_option['name'] = 'Spacer blocks';
sb_option['script_check'] = "if (!v) s = 'Please choose whether you need spacer blocks';";
sb_option['script_string'] = "if (v == 'yes') s = ', spacer blocks';";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'select';
sb_option['label'] = 'room';
sb_option['name'] = 'Room';
sb_option['suffix'] = '(for your records)';
sb_option['script_string'] = "if (v != 'none') s = ', located in ' + v;";
sb_options.push(sb_option);

sb_option = new Object();
sb_option['type'] = 'select';
sb_option['label'] = 'window';
sb_option['name'] = 'Window';
sb_option['suffix'] = '(for your records)';
sb_option['script_string'] = "if (v != 'none') s = ', window #' + v;";
sb_options.push(sb_option);


function showNote()
{
	var note = document.getElementById('hiddenNote');
	
	if (document.getElementById('form_headrail').value != 'one')
		note.style.display = "block";
	else
		note.style.display = "none";
}