var dayPrices = [[125, 199, 274, 349, 424, 498, 573, 648, 722, 797, 872, 946, 1021, 1097], [117, 187, 257, 327, 397, 462, 537, 607, 677, 747, 817, 887, 957, 1027], [110, 175, 241, 356, 372, 437, 503, 569, 634, 700, 765, 831, 897, 962], [103, 164, 226, 287, 348, 410, 471, 533, 594, 656, 717, 779, 840, 902], [96, 154, 211, 269, 327, 384, 442, 499, 557, 614, 672, 70, 787, 845], [90, 144, 198, 252, 306, 360, 414, 468, 522, 576, 630, 684, 738, 792], [85, 135, 186, 236, 287, 337, 388, 438, 489, 539, 590, 591, 691, 742]];
var depositFactor = 0.5;
var scheduleStartHour = 7;
var scheduleEndHour = 16;
var scheduleHolidays = '6;0;1-1;31-12';
var options = {};
var defaultValues = {};
options['cd_commented_no'] = {optiongroup: 'cd_commented', group: 'markup', id: 'cd_commented_no', name: 'cd_commented', value: 'no', price: 0, title: 'Comments', deselectable: false, parent: null};
options['cd_commented_yes'] = {optiongroup: 'cd_commented', group: 'markup', id: 'cd_commented_yes', name: 'cd_commented', value: 'yes', price: 5, title: 'Comments', deselectable: false, parent: null};
defaultValues['cd_commented'] = 'no';
options['c_section508_no'] = {optiongroup: 'c_section508', group: 'markup', id: 'c_section508_no', name: 'c_section508', value: 'no', price: 0, title: 'Section 508 Compliance', deselectable: false, parent: null};
options['c_section508_yes'] = {optiongroup: 'c_section508', group: 'markup', id: 'c_section508_yes', name: 'c_section508', value: 'yes', price: 7, title: 'Section 508 Compliance', deselectable: false, parent: null};
defaultValues['c_section508'] = 'no';
options['c_web_content_accessibility_no'] = {optiongroup: 'c_web_content_accessibility', group: 'markup', id: 'c_web_content_accessibility_no', name: 'c_web_content_accessibility', value: 'no', price: 0, title: 'Web Content Accessibility Guidelines', deselectable: false, parent: null};
options['c_web_content_accessibility_yes'] = {optiongroup: 'c_web_content_accessibility', group: 'markup', id: 'c_web_content_accessibility_yes', name: 'c_web_content_accessibility', value: 'yes', price: 7, title: 'Web Content Accessibility Guidelines', deselectable: false, parent: null};
defaultValues['c_web_content_accessibility'] = 'no';
options['c_disability_discrimination_act_compliance_no'] = {optiongroup: 'c_disability_discrimination_act_compliance', group: 'markup', id: 'c_disability_discrimination_act_compliance_no', name: 'c_disability_discrimination_act_compliance', value: 'no', price: 0, title: 'Disability Discrimination Act Compliance', deselectable: false, parent: null};
options['c_disability_discrimination_act_compliance_yes'] = {optiongroup: 'c_disability_discrimination_act_compliance', group: 'markup', id: 'c_disability_discrimination_act_compliance_yes', name: 'c_disability_discrimination_act_compliance', value: 'yes', price: 7, title: 'Disability Discrimination Act Compliance', deselectable: false, parent: null};
defaultValues['c_disability_discrimination_act_compliance'] = 'no';
options['c_screen_reader_no'] = {optiongroup: 'c_screen_reader', group: 'markup', id: 'c_screen_reader_no', name: 'c_screen_reader', value: 'no', price: 0, title: 'Screen Reader Compatibility', deselectable: false, parent: null};
options['c_screen_reader_yes'] = {optiongroup: 'c_screen_reader', group: 'markup', id: 'c_screen_reader_yes', name: 'c_screen_reader', value: 'yes', price: 7, title: 'Screen Reader Compatibility', deselectable: false, parent: null};
defaultValues['c_screen_reader'] = 'no';
options['c_mobile_device_compatibility_no'] = {optiongroup: 'c_mobile_device_compatibility', group: 'markup', id: 'c_mobile_device_compatibility_no', name: 'c_mobile_device_compatibility', value: 'no', price: 0, title: 'Mobile Device Compatibility', deselectable: false, parent: null};
options['c_mobile_device_compatibility_yes'] = {optiongroup: 'c_mobile_device_compatibility', group: 'markup', id: 'c_mobile_device_compatibility_yes', name: 'c_mobile_device_compatibility', value: 'yes', price: 0, title: 'Mobile Device Compatibility', deselectable: false, parent: null};
defaultValues['c_mobile_device_compatibility'] = 'no';
options['f_sifr_no'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_no', name: 'f_sifr', value: 'no', price: 0, title: 'Non-web Fonts', deselectable: false, parent: null};
options['f_sifr_yes'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_yes', name: 'f_sifr', value: 'yes', price: 15, title: 'Non-web Fonts', deselectable: false, parent: null};
options['f_sifr_cufon'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_cufon', name: 'f_sifr', value: 'cufon', price: 15, title: 'Non-web Fonts', deselectable: false, parent: null};
options['f_sifr_fontface'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_fontface', name: 'f_sifr', value: 'font-face', price: 15, title: 'Non-web Fonts', deselectable: false, parent: null};
defaultValues['f_sifr'] = 'no';
options['cd_microformats_no'] = {optiongroup: 'cd_microformats', group: 'markup', id: 'cd_microformats_no', name: 'cd_microformats', value: 'no', price: 0, title: 'Microformats', deselectable: false, parent: null};
options['cd_microformats_yes'] = {optiongroup: 'cd_microformats', group: 'markup', id: 'cd_microformats_yes', name: 'cd_microformats', value: 'yes', price: 5, title: 'Microformats', deselectable: false, parent: null};
defaultValues['cd_microformats'] = 'no';
options['cd_print_version_css_no'] = {optiongroup: 'cd_print_version_css', group: 'markup', id: 'cd_print_version_css_no', name: 'cd_print_version_css', value: 'no', price: 0, title: 'Print Version', deselectable: false, parent: null};
options['cd_print_version_css_yes'] = {optiongroup: 'cd_print_version_css', group: 'markup', id: 'cd_print_version_css_yes', name: 'cd_print_version_css', value: 'yes', price: 40, title: 'Print Version', deselectable: false, parent: null};
defaultValues['cd_print_version_css'] = 'no';
options['l_width_fixed'] = {optiongroup: 'l_width', group: 'markup', id: 'l_width_fixed', name: 'l_width', value: 'fixed', price: 0, title: 'Layout Width', deselectable: false, parent: null};
options['l_width_100'] = {optiongroup: 'l_width', group: 'markup', id: 'l_width_100', name: 'l_width', value: '100%', price: 10, title: 'Layout Width', deselectable: false, parent: null};
defaultValues['l_width'] = 'fixed';
options['cd_css_reset_no'] = {optiongroup: 'cd_css_reset', group: 'markup', id: 'cd_css_reset_no', name: 'cd_css_reset', value: 'no', price: 0, title: '&lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; Reset', deselectable: false, parent: null};
options['cd_css_reset_ericmeyer'] = {optiongroup: 'cd_css_reset', group: 'markup', id: 'cd_css_reset_ericmeyer', name: 'cd_css_reset', value: 'Eric Meyer', price: 0, title: '&lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; Reset', deselectable: false, parent: null};
options['cd_css_reset_yui'] = {optiongroup: 'cd_css_reset', group: 'markup', id: 'cd_css_reset_yui', name: 'cd_css_reset', value: 'YUI', price: 0, title: '&lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; Reset', deselectable: false, parent: null};
defaultValues['cd_css_reset'] = 'no';
options['ad_favicon_no'] = {optiongroup: 'ad_favicon', group: 'markup', id: 'ad_favicon_no', name: 'ad_favicon', value: 'no', price: 0, title: 'Favicon', deselectable: false, parent: null};
options['ad_favicon_yes'] = {optiongroup: 'ad_favicon', group: 'markup', id: 'ad_favicon_yes', name: 'ad_favicon', value: 'yes', price: 8, title: 'Favicon', deselectable: false, parent: null};
defaultValues['ad_favicon'] = 'no';
options['cd_javascript_framework_none'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_none', name: 'cd_javascript_framework', value: 'none', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
options['cd_javascript_framework_jquery'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_jquery', name: 'cd_javascript_framework', value: 'jquery', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
options['cd_javascript_framework_mootools'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_mootools', name: 'cd_javascript_framework', value: 'mootools', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
options['cd_javascript_framework_scriptaculous'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_scriptaculous', name: 'cd_javascript_framework', value: 'script.aculo.us', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
defaultValues['cd_javascript_framework'] = 'none';
options['d_menu_no'] = {optiongroup: 'd_menu', group: 'scripting', id: 'd_menu_no', name: 'd_menu', value: 'no', price: 0, title: 'Multi Tier Fly-out Menu', deselectable: false, parent: null};
options['d_menu_multilevel'] = {optiongroup: 'd_menu', group: 'scripting', id: 'd_menu_multilevel', name: 'd_menu', value: 'multilevel', price: 10, title: 'Multi Tier Fly-out Menu', deselectable: false, parent: null};
defaultValues['d_menu'] = 'no';
options['wid_tabs_no'] = {optiongroup: 'wid_tabs', group: 'scripting', id: 'wid_tabs_no', name: 'wid_tabs', value: 'no', price: 0, title: 'Tabs', deselectable: false, parent: null};
options['wid_tabs_yes'] = {optiongroup: 'wid_tabs', group: 'scripting', id: 'wid_tabs_yes', name: 'wid_tabs', value: 'yes', price: 10, title: 'Tabs', deselectable: false, parent: null};
defaultValues['wid_tabs'] = 'no';
options['wid_expandable_blocks_no'] = {optiongroup: 'wid_expandable_blocks', group: 'scripting', id: 'wid_expandable_blocks_no', name: 'wid_expandable_blocks', value: 'no', price: 0, title: 'Expandable Blocks', deselectable: false, parent: null};
options['wid_expandable_blocks_yes'] = {optiongroup: 'wid_expandable_blocks', group: 'scripting', id: 'wid_expandable_blocks_yes', name: 'wid_expandable_blocks', value: 'yes', price: 20, title: 'Expandable Blocks', deselectable: false, parent: null};
defaultValues['wid_expandable_blocks'] = 'no';
options['wid_carousel_no'] = {optiongroup: 'wid_carousel', group: 'scripting', id: 'wid_carousel_no', name: 'wid_carousel', value: 'no', price: 0, title: 'Carousel', deselectable: false, parent: null};
options['wid_carousel_yes'] = {optiongroup: 'wid_carousel', group: 'scripting', id: 'wid_carousel_yes', name: 'wid_carousel', value: 'yes', price: 25, title: 'Carousel', deselectable: false, parent: null};
defaultValues['wid_carousel'] = 'no';
options['wid_accordion_no'] = {optiongroup: 'wid_accordion', group: 'scripting', id: 'wid_accordion_no', name: 'wid_accordion', value: 'no', price: 0, title: 'Accordion', deselectable: false, parent: null};
options['wid_accordion_yes'] = {optiongroup: 'wid_accordion', group: 'scripting', id: 'wid_accordion_yes', name: 'wid_accordion', value: 'yes', price: 25, title: 'Accordion', deselectable: false, parent: null};
defaultValues['wid_accordion'] = 'no';
options['wid_slideshow_no'] = {optiongroup: 'wid_slideshow', group: 'scripting', id: 'wid_slideshow_no', name: 'wid_slideshow', value: 'no', price: 0, title: 'SlideShow', deselectable: false, parent: null};
options['wid_slideshow_yes'] = {optiongroup: 'wid_slideshow', group: 'scripting', id: 'wid_slideshow_yes', name: 'wid_slideshow', value: 'yes', price: 35, title: 'SlideShow', deselectable: false, parent: null};
defaultValues['wid_slideshow'] = 'no';
options['wid_lightbox_no'] = {optiongroup: 'wid_lightbox', group: 'scripting', id: 'wid_lightbox_no', name: 'wid_lightbox', value: 'no', price: 0, title: 'Lightbox', deselectable: false, parent: null};
options['wid_lightbox_yes'] = {optiongroup: 'wid_lightbox', group: 'scripting', id: 'wid_lightbox_yes', name: 'wid_lightbox', value: 'yes', price: 35, title: 'Lightbox', deselectable: false, parent: null};
defaultValues['wid_lightbox'] = 'no';
options['wid_custom_scrolls_no'] = {optiongroup: 'wid_custom_scrolls', group: 'scripting', id: 'wid_custom_scrolls_no', name: 'wid_custom_scrolls', value: 'no', price: 0, title: 'Custom Scrolls', deselectable: false, parent: null};
options['wid_custom_scrolls_yes'] = {optiongroup: 'wid_custom_scrolls', group: 'scripting', id: 'wid_custom_scrolls_yes', name: 'wid_custom_scrolls', value: 'yes', price: 25, title: 'Custom Scrolls', deselectable: false, parent: null};
defaultValues['wid_custom_scrolls'] = 'no';
options['wid_custom_forms_no'] = {optiongroup: 'wid_custom_forms', group: 'scripting', id: 'wid_custom_forms_no', name: 'wid_custom_forms', value: 'no', price: 0, title: 'Custom Forms', deselectable: false, parent: null};
options['wid_custom_forms_yes'] = {optiongroup: 'wid_custom_forms', group: 'scripting', id: 'wid_custom_forms_yes', name: 'wid_custom_forms', value: 'yes', price: 35, title: 'Custom Forms', deselectable: false, parent: null};
defaultValues['wid_custom_forms'] = 'no';
options['wid_addthis_no'] = {optiongroup: 'wid_addthis', group: 'scripting', id: 'wid_addthis_no', name: 'wid_addthis', value: 'no', price: 0, title: 'AddThis', deselectable: false, parent: null};
options['wid_addthis_yes'] = {optiongroup: 'wid_addthis', group: 'scripting', id: 'wid_addthis_yes', name: 'wid_addthis', value: 'yes', price: 20, title: 'AddThis', deselectable: false, parent: null};
defaultValues['wid_addthis'] = 'no';
options['cd_ssi_serversideincludes'] = {optiongroup: 'implementation', group: 'implementation', id: 'cd_ssi_serversideincludes', name: 'cd_ssi', value: 'yes', price: 20, title: 'Server Side Includes', deselectable: true, parent: null};
defaultValues['cd_ssi'] = 'no';
options['i_engine_no'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_no', name: 'i_engine', value: 'no', price: 0, title: 'XHTML / CSS', deselectable: true, parent: null};
options['i_engine_wordpress'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wordpress', name: 'i_engine', value: 'Wordpress', price: 116, title: 'WordPress', deselectable: true, parent: null};
options['i_engine_wp_pagenavi_wppagenavi'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_pagenavi_wppagenavi', name: 'i_engine_wp_pagenavi', value: 'yes', price: 38, title: 'WP-PageNavi', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_pagenavi'] = 'no';
options['i_engine_wp_cf7_contactform7'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_cf7_contactform7', name: 'i_engine_wp_cf7', value: 'yes', price: 38, title: 'Contact Form 7', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_cf7'] = 'no';
options['i_engine_wp_twitter_twitterforwordpress'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_twitter_twitterforwordpress', name: 'i_engine_wp_twitter', value: 'yes', price: 38, title: 'Twitter for Wordpress', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_twitter'] = 'no';
options['i_engine_wp_ajaxnewsletter_ajaxnewsletter'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_ajaxnewsletter_ajaxnewsletter', name: 'i_engine_wp_ajaxnewsletter', value: 'yes', price: 8, title: 'Ajax Newsletter', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_ajaxnewsletter'] = 'no';
options['i_engine_movabletype'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_movabletype', name: 'i_engine', value: 'Movable Type', price: 140, title: 'Movable Type', deselectable: true, parent: null};
options['i_engine_blogger'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_blogger', name: 'i_engine', value: 'Blogger', price: 76, title: 'Blogger', deselectable: true, parent: null};
options['i_engine_cubecart'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_cubecart', name: 'i_engine', value: 'CubeCart', price: 179, title: 'CubeCart', deselectable: true, parent: null};
options['i_engine_magento'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_magento', name: 'i_engine', value: 'Magento', price: 181, title: 'Magento', deselectable: true, parent: null};
options['i_engine_shopify'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_shopify', name: 'i_engine', value: 'Shopify', price: 165, title: 'Shopify', deselectable: true, parent: null};
options['i_engine_xcart'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_xcart', name: 'i_engine', value: 'X-Cart', price: 181, title: 'X-Cart', deselectable: true, parent: null};
options['i_engine_drupal'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal', name: 'i_engine', value: 'Drupal', price: 140, title: 'Drupal', deselectable: true, parent: null};
options['i_engine_drupal_treemenus_treemenus'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_treemenus_treemenus', name: 'i_engine_drupal_treemenus', value: 'yes', price: 38, title: 'Tree Menus', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_treemenus'] = 'no';
options['i_engine_drupal_simplenews_simplenews'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_simplenews_simplenews', name: 'i_engine_drupal_simplenews', value: 'yes', price: 38, title: 'SimpleNews', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_simplenews'] = 'no';
options['i_engine_drupal_cck_cck'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_cck_cck', name: 'i_engine_drupal_cck', value: 'yes', price: 19, title: 'CCK', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_cck'] = 'no';
options['i_engine_drupal_views_views'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_views_views', name: 'i_engine_drupal_views', value: 'yes', price: 38, title: 'Views', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_views'] = 'no';
options['i_engine_drupal_menubreadcrumb_menubreadcrumb'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_menubreadcrumb_menubreadcrumb', name: 'i_engine_drupal_menubreadcrumb', value: 'yes', price: 19, title: 'Menu Breadcrumb', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_menubreadcrumb'] = 'no';
options['i_engine_joomla'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla', name: 'i_engine', value: 'Joomla', price: 140, title: 'Joomla', deselectable: true, parent: null};
options['i_engine_joomla_joomap_joomap'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla_joomap_joomap', name: 'i_engine_joomla_joomap', value: 'yes', price: 38, title: 'Joomap', deselectable: true, parent: 'i_engine_joomla'};
defaultValues['i_engine_joomla_joomap'] = 'no';
options['i_engine_joomla_joomfish_joomfish'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla_joomfish_joomfish', name: 'i_engine_joomla_joomfish', value: 'yes', price: 38, title: 'Joom!Fish', deselectable: true, parent: 'i_engine_joomla'};
defaultValues['i_engine_joomla_joomfish'] = 'no';
options['i_engine_joomla_attachmentsarticles_attachmentsforarticles'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla_attachmentsarticles_attachmentsforarticles', name: 'i_engine_joomla_attachmentsarticles', value: 'yes', price: 75, title: 'Attachments for articles', deselectable: true, parent: 'i_engine_joomla'};
defaultValues['i_engine_joomla_attachmentsarticles'] = 'no';
options['i_engine_expressionengine'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_expressionengine', name: 'i_engine', value: 'ExpressionEngine', price: 140, title: 'Expression Engine', deselectable: true, parent: null};
options['i_engine_cmsmadesimple'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_cmsmadesimple', name: 'i_engine', value: 'CMSMadeSimple', price: 165, title: 'CMS Made Simple', deselectable: true, parent: null};
options['i_engine_modx'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_modx', name: 'i_engine', value: 'MODx', price: 196, title: 'MODx', deselectable: true, parent: null};
defaultValues['i_engine'] = 'no';
var s3FlashUploadOrder = null;
function enableButtonSubmitOrder() {
	var buttonSubmitOrder = $('submit-order');
	if(buttonSubmitOrder) {
		buttonSubmitOrder.removeProperty('disabled');
	}
}
function disableButtonSubmitOrder() {
	var buttonSubmitOrder = $('submit-order');
	if(buttonSubmitOrder) {
		buttonSubmitOrder.setProperty('disabled', 'disabled');
	}
};
function enableButtonPayNow() {
	var buttonPayNow = $('pay-now');
	if(buttonPayNow) {
		buttonPayNow.removeProperty('disabled');
	}
}
function disableButtonPayNow() {
	var buttonPayNow = $('pay-now');
	if(buttonPayNow) {
		buttonPayNow.setProperty('disabled', 'disabled');
	}
};
function enableButtonPayDeposit() {
	var buttonPayDeposit = $('pay-deposit');
	if(buttonPayDeposit) {
		buttonPayDeposit.removeProperty('disabled');
	}
}
function disableButtonPayDeposit() {
	var buttonPayDeposit = $('pay-deposit');
	if(buttonPayDeposit) {
		buttonPayDeposit.setProperty('disabled', 'disabled');
	}
};
function submitOrder() {
	if(canSubmitOrder()) {
if(s3FlashUploadOrder) {
	s3FlashUploadOrder.submit();
}

		return true;
	}
	else {
		return false;
	}
};
function canSubmitOrder() {
	errorMessages = [];
	if(typeof canSubmitOrderCustom == 'function') {
		var result = canSubmitOrderCustom();
	}
	else {
		var result = true;
		result &= isNotEmpty('name', 'Please enter your name.');
	result &= checkPhoneNumber('order', 'phone', 'Please enter a valid phone number.');
	result &= checkEmail('order', 'email', 'Please enter a valid email address.');
	result &= checkSource('order', 'upload', 'Please upload file or enter URL of file.');
	result &= isNotEmpty('first-name', 'Please specify your first name.');
	result &= isNotEmpty('last-name', 'Please specify your last name.');
	result &= isPhoneNumber('billing', 'Please enter your billing phone number.');
	result &= isNotEmpty('address', 'Enter address where CC statement is sent.');
	result &= isCardNumber('card-number', 'Please enter a valid CC number.');
	result &= checkExpiry('order', 'mexpires', 'Please enter a valid expiry date.');
	result &= checkCvv('order', 'cvvcode', 'Please enter a valid CVV code.');
	
	}
	if(result) {
		return true;
	}
	else {
		showErrors();
		return false;
	}
};
window.addEvent('domready', function() {
	var buttonSubmitOrder = $('submit-order');
	if(buttonSubmitOrder) {
		buttonSubmitOrder.addEvent('click', function(event) {
			event.stop();
			disableButtonSubmitOrder();
			if(!submitOrder()) {
				enableButtonSubmitOrder();
			}
		});
	}
	var buttonPayNow = $('pay-now');
	if(buttonPayNow) {
		buttonPayNow.addEvent('click', function(event) {
			event.stop();
			disableButtonPayNow();
			if(!submitOrder()) {
				enableButtonPayNow();
			}
		});
	}
	var buttonPayDeposit = $('pay-deposit');
	if(buttonPayDeposit) {
		buttonPayDeposit.addEvent('click', function(event) {
			event.stop();
			disableButtonPayDeposit();
			if(!submitOrder()) {
				enableButtonPayDeposit();
			}
		});
	}
	var formOrder = $('order');
	if(formOrder) {
		formOrder.addEvent('submit', function(event) {
			event.stop();
			submitOrder();
		});
	}
});



/*var dayPrices = [[249, 398, 548, 697, 847, 996, 1145, 1295, 1444, 1594, 1743, 1892, 2042, 2194], [233, 373, 513, 653, 793, 933, 1073, 1213, 1353, 1493, 1633, 1773, 1913, 2053], [219, 350, 481, 612, 743, 874, 1006, 1137, 1268, 1399, 1530, 1661, 1793, 1924], [205, 328, 451, 574, 696, 819, 942, 1065, 1188, 1311, 1434, 1557, 1680, 1803], [192, 307, 422, 537, 653, 768, 883, 998, 1113, 1228, 1344, 1459, 1574, 1689], [180, 288, 396, 504, 611, 719, 827, 935, 1043, 1151, 1259, 1367, 1475, 1583], [169, 270, 371, 472, 573, 674, 775, 876, 977, 1078, 1180, 1281, 1382, 1483]];
var depositFactor = 0.5;
var scheduleStartHour = 7;
var scheduleEndHour = 16;
var scheduleHolidays = '6;0;1-1;31-12';
var options = {};
var defaultValues = {};
options['cd_commented_no'] = {optiongroup: 'cd_commented', group: 'markup', id: 'cd_commented_no', name: 'cd_commented', value: 'no', price: 0, title: 'Comments', deselectable: false, parent: null};
options['cd_commented_yes'] = {optiongroup: 'cd_commented', group: 'markup', id: 'cd_commented_yes', name: 'cd_commented', value: 'yes', price: 9, title: 'Comments', deselectable: false, parent: null};
defaultValues['cd_commented'] = 'no';
options['c_section508_no'] = {optiongroup: 'c_section508', group: 'markup', id: 'c_section508_no', name: 'c_section508', value: 'no', price: 0, title: 'Section 508 Compliance', deselectable: false, parent: null};
options['c_section508_yes'] = {optiongroup: 'c_section508', group: 'markup', id: 'c_section508_yes', name: 'c_section508', value: 'yes', price: 14, title: 'Section 508 Compliance', deselectable: false, parent: null};
defaultValues['c_section508'] = 'no';
options['c_web_content_accessibility_no'] = {optiongroup: 'c_web_content_accessibility', group: 'markup', id: 'c_web_content_accessibility_no', name: 'c_web_content_accessibility', value: 'no', price: 0, title: 'Web Content Accessibility Guidelines', deselectable: false, parent: null};
options['c_web_content_accessibility_yes'] = {optiongroup: 'c_web_content_accessibility', group: 'markup', id: 'c_web_content_accessibility_yes', name: 'c_web_content_accessibility', value: 'yes', price: 14, title: 'Web Content Accessibility Guidelines', deselectable: false, parent: null};
defaultValues['c_web_content_accessibility'] = 'no';
options['c_disability_discrimination_act_compliance_no'] = {optiongroup: 'c_disability_discrimination_act_compliance', group: 'markup', id: 'c_disability_discrimination_act_compliance_no', name: 'c_disability_discrimination_act_compliance', value: 'no', price: 0, title: 'Disability Discrimination Act Compliance', deselectable: false, parent: null};
options['c_disability_discrimination_act_compliance_yes'] = {optiongroup: 'c_disability_discrimination_act_compliance', group: 'markup', id: 'c_disability_discrimination_act_compliance_yes', name: 'c_disability_discrimination_act_compliance', value: 'yes', price: 14, title: 'Disability Discrimination Act Compliance', deselectable: false, parent: null};
defaultValues['c_disability_discrimination_act_compliance'] = 'no';
options['c_screen_reader_no'] = {optiongroup: 'c_screen_reader', group: 'markup', id: 'c_screen_reader_no', name: 'c_screen_reader', value: 'no', price: 0, title: 'Screen Reader Compatibility', deselectable: false, parent: null};
options['c_screen_reader_yes'] = {optiongroup: 'c_screen_reader', group: 'markup', id: 'c_screen_reader_yes', name: 'c_screen_reader', value: 'yes', price: 14, title: 'Screen Reader Compatibility', deselectable: false, parent: null};
defaultValues['c_screen_reader'] = 'no';
options['c_mobile_device_compatibility_no'] = {optiongroup: 'c_mobile_device_compatibility', group: 'markup', id: 'c_mobile_device_compatibility_no', name: 'c_mobile_device_compatibility', value: 'no', price: 0, title: 'Mobile Device Compatibility', deselectable: false, parent: null};
options['c_mobile_device_compatibility_yes'] = {optiongroup: 'c_mobile_device_compatibility', group: 'markup', id: 'c_mobile_device_compatibility_yes', name: 'c_mobile_device_compatibility', value: 'yes', price: 0, title: 'Mobile Device Compatibility', deselectable: false, parent: null};
defaultValues['c_mobile_device_compatibility'] = 'no';
options['f_sifr_no'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_no', name: 'f_sifr', value: 'no', price: 0, title: 'Non-web Fonts', deselectable: false, parent: null};
options['f_sifr_yes'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_yes', name: 'f_sifr', value: 'yes', price: 29, title: 'Non-web Fonts', deselectable: false, parent: null};
options['f_sifr_cufon'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_cufon', name: 'f_sifr', value: 'cufon', price: 29, title: 'Non-web Fonts', deselectable: false, parent: null};
options['f_sifr_fontface'] = {optiongroup: 'f_sifr', group: 'markup', id: 'f_sifr_fontface', name: 'f_sifr', value: 'font-face', price: 29, title: 'Non-web Fonts', deselectable: false, parent: null};
defaultValues['f_sifr'] = 'no';
options['cd_microformats_no'] = {optiongroup: 'cd_microformats', group: 'markup', id: 'cd_microformats_no', name: 'cd_microformats', value: 'no', price: 0, title: 'Microformats', deselectable: false, parent: null};
options['cd_microformats_yes'] = {optiongroup: 'cd_microformats', group: 'markup', id: 'cd_microformats_yes', name: 'cd_microformats', value: 'yes', price: 9, title: 'Microformats', deselectable: false, parent: null};
defaultValues['cd_microformats'] = 'no';
options['cd_print_version_css_no'] = {optiongroup: 'cd_print_version_css', group: 'markup', id: 'cd_print_version_css_no', name: 'cd_print_version_css', value: 'no', price: 0, title: 'Print Version', deselectable: false, parent: null};
options['cd_print_version_css_yes'] = {optiongroup: 'cd_print_version_css', group: 'markup', id: 'cd_print_version_css_yes', name: 'cd_print_version_css', value: 'yes', price: 79, title: 'Print Version', deselectable: false, parent: null};
defaultValues['cd_print_version_css'] = 'no';
options['l_width_fixed'] = {optiongroup: 'l_width', group: 'markup', id: 'l_width_fixed', name: 'l_width', value: 'fixed', price: 0, title: 'Layout Width', deselectable: false, parent: null};
options['l_width_100'] = {optiongroup: 'l_width', group: 'markup', id: 'l_width_100', name: 'l_width', value: '100%', price: 19, title: 'Layout Width', deselectable: false, parent: null};
defaultValues['l_width'] = 'fixed';
options['cd_css_reset_no'] = {optiongroup: 'cd_css_reset', group: 'markup', id: 'cd_css_reset_no', name: 'cd_css_reset', value: 'no', price: 0, title: '&lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; Reset', deselectable: false, parent: null};
options['cd_css_reset_ericmeyer'] = {optiongroup: 'cd_css_reset', group: 'markup', id: 'cd_css_reset_ericmeyer', name: 'cd_css_reset', value: 'Eric Meyer', price: 0, title: '&lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; Reset', deselectable: false, parent: null};
options['cd_css_reset_yui'] = {optiongroup: 'cd_css_reset', group: 'markup', id: 'cd_css_reset_yui', name: 'cd_css_reset', value: 'YUI', price: 0, title: '&lt;acronym title=&quot;Cascading Style Sheets&quot;&gt;CSS&lt;/acronym&gt; Reset', deselectable: false, parent: null};
defaultValues['cd_css_reset'] = 'no';
options['ad_favicon_no'] = {optiongroup: 'ad_favicon', group: 'markup', id: 'ad_favicon_no', name: 'ad_favicon', value: 'no', price: 0, title: 'Favicon', deselectable: false, parent: null};
options['ad_favicon_yes'] = {optiongroup: 'ad_favicon', group: 'markup', id: 'ad_favicon_yes', name: 'ad_favicon', value: 'yes', price: 16, title: 'Favicon', deselectable: false, parent: null};
defaultValues['ad_favicon'] = 'no';
options['cd_javascript_framework_none'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_none', name: 'cd_javascript_framework', value: 'none', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
options['cd_javascript_framework_jquery'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_jquery', name: 'cd_javascript_framework', value: 'jquery', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
options['cd_javascript_framework_mootools'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_mootools', name: 'cd_javascript_framework', value: 'mootools', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
options['cd_javascript_framework_scriptaculous'] = {optiongroup: 'cd_javascript_framework', group: 'scripting', id: 'cd_javascript_framework_scriptaculous', name: 'cd_javascript_framework', value: 'script.aculo.us', price: 0, title: 'Preferred JavaScript Library', deselectable: false, parent: null};
defaultValues['cd_javascript_framework'] = 'none';
options['d_menu_no'] = {optiongroup: 'd_menu', group: 'scripting', id: 'd_menu_no', name: 'd_menu', value: 'no', price: 0, title: 'Multi Tier Fly-out Menu', deselectable: false, parent: null};
options['d_menu_multilevel'] = {optiongroup: 'd_menu', group: 'scripting', id: 'd_menu_multilevel', name: 'd_menu', value: 'multilevel', price: 19, title: 'Multi Tier Fly-out Menu', deselectable: false, parent: null};
defaultValues['d_menu'] = 'no';
options['wid_tabs_no'] = {optiongroup: 'wid_tabs', group: 'scripting', id: 'wid_tabs_no', name: 'wid_tabs', value: 'no', price: 0, title: 'Tabs', deselectable: false, parent: null};
options['wid_tabs_yes'] = {optiongroup: 'wid_tabs', group: 'scripting', id: 'wid_tabs_yes', name: 'wid_tabs', value: 'yes', price: 19, title: 'Tabs', deselectable: false, parent: null};
defaultValues['wid_tabs'] = 'no';
options['wid_expandable_blocks_no'] = {optiongroup: 'wid_expandable_blocks', group: 'scripting', id: 'wid_expandable_blocks_no', name: 'wid_expandable_blocks', value: 'no', price: 0, title: 'Expandable Blocks', deselectable: false, parent: null};
options['wid_expandable_blocks_yes'] = {optiongroup: 'wid_expandable_blocks', group: 'scripting', id: 'wid_expandable_blocks_yes', name: 'wid_expandable_blocks', value: 'yes', price: 39, title: 'Expandable Blocks', deselectable: false, parent: null};
defaultValues['wid_expandable_blocks'] = 'no';
options['wid_carousel_no'] = {optiongroup: 'wid_carousel', group: 'scripting', id: 'wid_carousel_no', name: 'wid_carousel', value: 'no', price: 0, title: 'Carousel', deselectable: false, parent: null};
options['wid_carousel_yes'] = {optiongroup: 'wid_carousel', group: 'scripting', id: 'wid_carousel_yes', name: 'wid_carousel', value: 'yes', price: 49, title: 'Carousel', deselectable: false, parent: null};
defaultValues['wid_carousel'] = 'no';
options['wid_accordion_no'] = {optiongroup: 'wid_accordion', group: 'scripting', id: 'wid_accordion_no', name: 'wid_accordion', value: 'no', price: 0, title: 'Accordion', deselectable: false, parent: null};
options['wid_accordion_yes'] = {optiongroup: 'wid_accordion', group: 'scripting', id: 'wid_accordion_yes', name: 'wid_accordion', value: 'yes', price: 49, title: 'Accordion', deselectable: false, parent: null};
defaultValues['wid_accordion'] = 'no';
options['wid_slideshow_no'] = {optiongroup: 'wid_slideshow', group: 'scripting', id: 'wid_slideshow_no', name: 'wid_slideshow', value: 'no', price: 0, title: 'SlideShow', deselectable: false, parent: null};
options['wid_slideshow_yes'] = {optiongroup: 'wid_slideshow', group: 'scripting', id: 'wid_slideshow_yes', name: 'wid_slideshow', value: 'yes', price: 69, title: 'SlideShow', deselectable: false, parent: null};
defaultValues['wid_slideshow'] = 'no';
options['wid_lightbox_no'] = {optiongroup: 'wid_lightbox', group: 'scripting', id: 'wid_lightbox_no', name: 'wid_lightbox', value: 'no', price: 0, title: 'Lightbox', deselectable: false, parent: null};
options['wid_lightbox_yes'] = {optiongroup: 'wid_lightbox', group: 'scripting', id: 'wid_lightbox_yes', name: 'wid_lightbox', value: 'yes', price: 69, title: 'Lightbox', deselectable: false, parent: null};
defaultValues['wid_lightbox'] = 'no';
options['wid_custom_scrolls_no'] = {optiongroup: 'wid_custom_scrolls', group: 'scripting', id: 'wid_custom_scrolls_no', name: 'wid_custom_scrolls', value: 'no', price: 0, title: 'Custom Scrolls', deselectable: false, parent: null};
options['wid_custom_scrolls_yes'] = {optiongroup: 'wid_custom_scrolls', group: 'scripting', id: 'wid_custom_scrolls_yes', name: 'wid_custom_scrolls', value: 'yes', price: 49, title: 'Custom Scrolls', deselectable: false, parent: null};
defaultValues['wid_custom_scrolls'] = 'no';
options['wid_custom_forms_no'] = {optiongroup: 'wid_custom_forms', group: 'scripting', id: 'wid_custom_forms_no', name: 'wid_custom_forms', value: 'no', price: 0, title: 'Custom Forms', deselectable: false, parent: null};
options['wid_custom_forms_yes'] = {optiongroup: 'wid_custom_forms', group: 'scripting', id: 'wid_custom_forms_yes', name: 'wid_custom_forms', value: 'yes', price: 69, title: 'Custom Forms', deselectable: false, parent: null};
defaultValues['wid_custom_forms'] = 'no';
options['wid_addthis_no'] = {optiongroup: 'wid_addthis', group: 'scripting', id: 'wid_addthis_no', name: 'wid_addthis', value: 'no', price: 0, title: 'AddThis', deselectable: false, parent: null};
options['wid_addthis_yes'] = {optiongroup: 'wid_addthis', group: 'scripting', id: 'wid_addthis_yes', name: 'wid_addthis', value: 'yes', price: 39, title: 'AddThis', deselectable: false, parent: null};
defaultValues['wid_addthis'] = 'no';
options['cd_ssi_serversideincludes'] = {optiongroup: 'implementation', group: 'implementation', id: 'cd_ssi_serversideincludes', name: 'cd_ssi', value: 'yes', price: 39, title: 'Server Side Includes', deselectable: true, parent: null};
defaultValues['cd_ssi'] = 'no';
options['i_engine_no'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_no', name: 'i_engine', value: 'no', price: 0, title: 'XHTML / CSS', deselectable: true, parent: null};
options['i_engine_wordpress'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wordpress', name: 'i_engine', value: 'Wordpress', price: 231, title: 'WordPress', deselectable: true, parent: null};
options['i_engine_wp_pagenavi_wppagenavi'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_pagenavi_wppagenavi', name: 'i_engine_wp_pagenavi', value: 'yes', price: 75, title: 'WP-PageNavi', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_pagenavi'] = 'no';
options['i_engine_wp_cf7_contactform7'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_cf7_contactform7', name: 'i_engine_wp_cf7', value: 'yes', price: 75, title: 'Contact Form 7', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_cf7'] = 'no';
options['i_engine_wp_twitter_twitterforwordpress'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_twitter_twitterforwordpress', name: 'i_engine_wp_twitter', value: 'yes', price: 75, title: 'Twitter for Wordpress', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_twitter'] = 'no';
options['i_engine_wp_ajaxnewsletter_ajaxnewsletter'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_wp_ajaxnewsletter_ajaxnewsletter', name: 'i_engine_wp_ajaxnewsletter', value: 'yes', price: 15, title: 'Ajax Newsletter', deselectable: true, parent: 'i_engine_wordpress'};
defaultValues['i_engine_wp_ajaxnewsletter'] = 'no';
options['i_engine_movabletype'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_movabletype', name: 'i_engine', value: 'Movable Type', price: 279, title: 'Movable Type', deselectable: true, parent: null};
options['i_engine_blogger'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_blogger', name: 'i_engine', value: 'Blogger', price: 151, title: 'Blogger', deselectable: true, parent: null};
options['i_engine_cubecart'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_cubecart', name: 'i_engine', value: 'CubeCart', price: 358, title: 'CubeCart', deselectable: true, parent: null};
options['i_engine_magento'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_magento', name: 'i_engine', value: 'Magento', price: 361, title: 'Magento', deselectable: true, parent: null};
options['i_engine_shopify'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_shopify', name: 'i_engine', value: 'Shopify', price: 330, title: 'Shopify', deselectable: true, parent: null};
options['i_engine_xcart'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_xcart', name: 'i_engine', value: 'X-Cart', price: 361, title: 'X-Cart', deselectable: true, parent: null};
options['i_engine_drupal'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal', name: 'i_engine', value: 'Drupal', price: 279, title: 'Drupal', deselectable: true, parent: null};
options['i_engine_drupal_treemenus_treemenus'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_treemenus_treemenus', name: 'i_engine_drupal_treemenus', value: 'yes', price: 75, title: 'Tree Menus', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_treemenus'] = 'no';
options['i_engine_drupal_simplenews_simplenews'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_simplenews_simplenews', name: 'i_engine_drupal_simplenews', value: 'yes', price: 75, title: 'SimpleNews', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_simplenews'] = 'no';
options['i_engine_drupal_cck_cck'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_cck_cck', name: 'i_engine_drupal_cck', value: 'yes', price: 38, title: 'CCK', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_cck'] = 'no';
options['i_engine_drupal_views_views'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_views_views', name: 'i_engine_drupal_views', value: 'yes', price: 75, title: 'Views', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_views'] = 'no';
options['i_engine_drupal_menubreadcrumb_menubreadcrumb'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_drupal_menubreadcrumb_menubreadcrumb', name: 'i_engine_drupal_menubreadcrumb', value: 'yes', price: 38, title: 'Menu Breadcrumb', deselectable: true, parent: 'i_engine_drupal'};
defaultValues['i_engine_drupal_menubreadcrumb'] = 'no';
options['i_engine_joomla'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla', name: 'i_engine', value: 'Joomla', price: 279, title: 'Joomla', deselectable: true, parent: null};
options['i_engine_joomla_joomap_joomap'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla_joomap_joomap', name: 'i_engine_joomla_joomap', value: 'yes', price: 75, title: 'Joomap', deselectable: true, parent: 'i_engine_joomla'};
defaultValues['i_engine_joomla_joomap'] = 'no';
options['i_engine_joomla_joomfish_joomfish'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla_joomfish_joomfish', name: 'i_engine_joomla_joomfish', value: 'yes', price: 75, title: 'Joom!Fish', deselectable: true, parent: 'i_engine_joomla'};
defaultValues['i_engine_joomla_joomfish'] = 'no';
options['i_engine_joomla_attachmentsarticles_attachmentsforarticles'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_joomla_attachmentsarticles_attachmentsforarticles', name: 'i_engine_joomla_attachmentsarticles', value: 'yes', price: 75, title: 'Attachments for articles', deselectable: true, parent: 'i_engine_joomla'};
defaultValues['i_engine_joomla_attachmentsarticles'] = 'no';
options['i_engine_expressionengine'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_expressionengine', name: 'i_engine', value: 'ExpressionEngine', price: 279, title: 'Expression Engine', deselectable: true, parent: null};
options['i_engine_cmsmadesimple'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_cmsmadesimple', name: 'i_engine', value: 'CMSMadeSimple', price: 330, title: 'CMS Made Simple', deselectable: true, parent: null};
options['i_engine_modx'] = {optiongroup: 'implementation', group: 'implementation', id: 'i_engine_modx', name: 'i_engine', value: 'MODx', price: 391, title: 'MODx', deselectable: true, parent: null};
defaultValues['i_engine'] = 'no';
var s3FlashUploadOrder = null;
function enableButtonSubmitOrder() {
	var buttonSubmitOrder = $('submit-order');
	if(buttonSubmitOrder) {
		buttonSubmitOrder.removeProperty('disabled');
	}
}
function disableButtonSubmitOrder() {
	var buttonSubmitOrder = $('submit-order');
	if(buttonSubmitOrder) {
		buttonSubmitOrder.setProperty('disabled', 'disabled');
	}
};
function enableButtonPayNow() {
	var buttonPayNow = $('pay-now');
	if(buttonPayNow) {
		buttonPayNow.removeProperty('disabled');
	}
}
function disableButtonPayNow() {
	var buttonPayNow = $('pay-now');
	if(buttonPayNow) {
		buttonPayNow.setProperty('disabled', 'disabled');
	}
};
function enableButtonPayDeposit() {
	var buttonPayDeposit = $('pay-deposit');
	if(buttonPayDeposit) {
		buttonPayDeposit.removeProperty('disabled');
	}
}
function disableButtonPayDeposit() {
	var buttonPayDeposit = $('pay-deposit');
	if(buttonPayDeposit) {
		buttonPayDeposit.setProperty('disabled', 'disabled');
	}
};
function submitOrder() {
	if(canSubmitOrder()) {
if(s3FlashUploadOrder) {
	s3FlashUploadOrder.submit();
}

		return true;
	}
	else {
		return false;
	}
};
function canSubmitOrder() {
	errorMessages = [];
	if(typeof canSubmitOrderCustom == 'function') {
		var result = canSubmitOrderCustom();
	}
	else {
		var result = true;
		result &= isNotEmpty('name', 'Please enter your name.');
	result &= checkPhoneNumber('order', 'phone', 'Please enter a valid phone number.');
	result &= checkEmail('order', 'email', 'Please enter a valid email address.');
	result &= checkSource('order', 'upload', 'Please upload file or enter URL of file.');
	result &= isNotEmpty('first-name', 'Please specify your first name.');
	result &= isNotEmpty('last-name', 'Please specify your last name.');
	result &= isPhoneNumber('billing', 'Please enter your billing phone number.');
	result &= isNotEmpty('address', 'Enter address where CC statement is sent.');
	result &= isCardNumber('card-number', 'Please enter a valid CC number.');
	result &= checkExpiry('order', 'mexpires', 'Please enter a valid expiry date.');
	result &= checkCvv('order', 'cvvcode', 'Please enter a valid CVV code.');
	
	}
	if(result) {
		return true;
	}
	else {
		showErrors();
		return false;
	}
};
window.addEvent('domready', function() {
	var buttonSubmitOrder = $('submit-order');
	if(buttonSubmitOrder) {
		buttonSubmitOrder.addEvent('click', function(event) {
			event.stop();
			disableButtonSubmitOrder();
			if(!submitOrder()) {
				enableButtonSubmitOrder();
			}
		});
	}
	var buttonPayNow = $('pay-now');
	if(buttonPayNow) {
		buttonPayNow.addEvent('click', function(event) {
			event.stop();
			disableButtonPayNow();
			if(!submitOrder()) {
				enableButtonPayNow();
			}
		});
	}
	var buttonPayDeposit = $('pay-deposit');
	if(buttonPayDeposit) {
		buttonPayDeposit.addEvent('click', function(event) {
			event.stop();
			disableButtonPayDeposit();
			if(!submitOrder()) {
				enableButtonPayDeposit();
			}
		});
	}
	var formOrder = $('order');
	if(formOrder) {
		formOrder.addEvent('submit', function(event) {
			event.stop();
			submitOrder();
		});
	}
});
*/


