Array.prototype.inArray = function (value) { var i; for(i=0; i < this.length; i++){ if(this[i] == value){ return true; } } return false; }; Array.prototype.shift=function(){ var i=0, b=this[0]; for(i;i 1){ if(td_label) td_label.className = labelClassName; return true; } if(td_label && errorClassName) td_label.className = errorClassName; return false; } function getSelect(SelectField, bln_text){ var answer = ''; for(var i=0; i'+attr_val_label+''; } } if(optGroupIds.inArray(productNameId) && attributeName=='Quantity') values += ''; document.getElementById('td_48_options').innerHTML = ''; } function setException25(){ var attributeName = 'Stock'; var productNameId = 61; var arr_ids = []; var obj = setException25.arguments; for(var i=0; i'+attr_val_label+''; } } if(optGroupIds.inArray(productNameId) && attributeName=='Quantity') values += ''; document.getElementById('td_25_options').innerHTML = ''; } function setException26(){ var attributeName = 'Color'; var productNameId = 61; var arr_ids = []; var obj = setException26.arguments; for(var i=0; i'+attr_val_label+''; } } if(optGroupIds.inArray(productNameId) && attributeName=='Quantity') values += ''; document.getElementById('td_26_options').innerHTML = ''; } function setException39(){ return true; } function setException51(){ var attributeName = 'Hole Location'; var productNameId = 61; var arr_ids = []; var obj = setException51.arguments; for(var i=0; i'+attr_val_label+''; } } if(optGroupIds.inArray(productNameId) && attributeName=='Quantity') values += ''; document.getElementById('td_51_options').innerHTML = ''; } function setException30(){ var attributeName = 'Quantity'; var productNameId = 61; var arr_ids = []; var obj = setException30.arguments; for(var i=0; i'+attr_val_label+''; } } if(optGroupIds.inArray(productNameId) && attributeName=='Quantity') values += ''; document.getElementById('td_30_options').innerHTML = ''; } function setException27(){ var arr_ids = []; var obj = setException27.arguments; for(var i=0; i'; values += ' '; values += ''; } else { values += ''; } has_checked = true; j++; }else{ if(turnaround_id == attr_val_id){ turnaround_id = 0; } } } document.getElementById('td_27_options').innerHTML = values; } function checkOrderPageForm(Form, compute_price, is_turnaround){ //alert('test'); var validated = true; if(!checkSelect(Form.attr48) && getFieldValue(Form.attr48) != 'custom')validated = false; if(getFieldValue(document.getElementById('attr48')) == 'custom'){ if(!checkSelect(Form.width)) validated = false; if(!checkSelect(Form.height)) validated = false; } if(!checkSelect(Form.attr25))validated = false; if(!checkSelect(Form.attr26))validated = false; if(!checkText(Form.attr39))validated = false; if(!checkSelect(Form.attr51))validated = false; if(!checkSelect(Form.attr30))validated = false; if(!checkRadio(Form, 'attr27'))validated = false; if(!validated && !compute_price){ alert('Please select a product before placing an order'); //return false; } //alert(validated); return validated; } var turnaround_id = 1470; function computePrice(Form, is_turnaround, effect_flag){ if(!Form) var Form = document.orderPageForm; if(!effect_flag) var effect_flag = false; //if(is_turnaround) FloatingCostVisible = true; if(is_turnaround) { if(document.getElementById('is_turnaround')) document.getElementById('is_turnaround').value = 1; } else { if(document.getElementById('is_turnaround')) document.getElementById('is_turnaround').value = 0; } if(document.getElementById('qty_price')) document.getElementById('qty_price').innerHTML = ''; if(document.getElementById('reg_price')) document.getElementById('reg_price').innerHTML = ''; var _effect_flag = (typeof(effect_flag) == 'undefined' ? true : effect_flag); if(navigator.appName!='Microsoft Internet Explorer' && !is_turnaround && _effect_flag) { if(document.getElementById('qty_price')) { document.getElementById('qty_price').innerHTML = ' '; new Effect.Opacity('qty_price', { from: 0, to: 1, duration: 1 }); } } var param_str = ''; var width = 0; var height = 0; var qty = 0; if(!is_turnaround) Form.total_price.value = 0; setSizeExceptions(Form); setTurnaround(); if(checkOrderPageForm(Form, true, is_turnaround)){ if(getFieldValue(Form.attr48) == 'custom'){ width = getSelect(Form.width); height = getSelect(Form.height); } param_str += (param_str ? '|' : '')+getSelect(Form.attr48); param_str += (param_str ? '|' : '')+getSelect(Form.attr25); param_str += (param_str ? '|' : '')+getSelect(Form.attr26); param_str += (param_str ? '|' : '')+Form.attr39.value; param_str += (param_str ? '|' : '')+getSelect(Form.attr51); param_str += (param_str ? '|' : '')+getSelect(Form.attr30); param_str += (param_str ? '|' : '')+getRadio(Form, 'attr27'); is_turnaround = (is_turnaround && Form.compute_flag.value == '1') ? true : false; x_get_price_by_stock_ver2(61, param_str, width, height, qty, '', displayPrice); if(!is_turnaround){ if(document.getElementById('div_attr27_1470_price')){ x_get_price_by_stock_ver2(61, param_str, width, height, qty, '27|'+getRadio(Form, 'attr27')+'|1470', displayPrice); } } if(!is_turnaround){ if(document.getElementById('div_attr27_1471_price')){ x_get_price_by_stock_ver2(61, param_str, width, height, qty, '27|'+getRadio(Form, 'attr27')+'|1471', displayPrice); } } Form.compute_flag.value = 1; }else{ Form.compute_flag.value = 0; if(document.getElementById('disp_printing_text')) document.getElementById('disp_printing_text').innerHTML = 'Print Cost'; if(document.getElementById('disp_printing_price')) document.getElementById('disp_printing_price').innerHTML = '0'; if(document.getElementById('disp_unit_price')) document.getElementById('disp_unit_price').innerHTML = '0'; if(document.getElementById('disp_total_price')) document.getElementById('disp_total_price').innerHTML = '0'; if(document.getElementById('floating_cost')) document.getElementById('floating_cost').innerHTML = '
Total Cost $' + 0 + '
'; if(document.getElementById('qty_price')) document.getElementById('qty_price').innerHTML = '0'; if(document.getElementById('reg_price')) document.getElementById('reg_price').innerHTML = '0'; } //if(CURRENT_PAGE=='catalog_offset_jun') // setDefaultValues('final'); } function displayPrice(returned_value){ var returned_value = returned_value.replace('+:',''); returned_value = returned_value.replace(':+',''); //alert(returned_value); eval(returned_value); if(document.getElementById('div_attr27_1470_price')){ document.getElementById('div_attr27_1470_price').innerHTML = ''; document.getElementById('div_attr27_1470_price_curr').innerHTML = ''; } if(document.getElementById('div_attr27_1471_price')){ if(document.getElementById('div_attr27_1471_price_temp') && document.getElementById('div_attr27_'+turnaround_id+'_price_temp')) { var turnaround_diff = parseFloat(document.getElementById('div_attr27_1471_price_temp').innerHTML) - parseFloat(document.getElementById('div_attr27_'+turnaround_id+'_price_temp').innerHTML); } else { var turnaround_diff = 0; } if(!isNaN(turnaround_diff)){ var nf = new NumberFormat(turnaround_diff); nf.setPlaces(2); nf.setCommas(false); document.getElementById('div_attr27_1471_price').innerHTML = (nf.toFormatted() > 0 ? (CURRENT_PAGE=='order_confirm_details' || CURRENT_PAGE=='portal_confirm_details' || CURRENT_PAGE=='catalog_newdb_newudesign' ? 'Add $' : '+ $') + nf.toFormatted() : ''); document.getElementById('div_attr27_1471_price_curr').innerHTML = ''; }else{ document.getElementById('div_attr27_1471_price_curr').innerHTML = '$'; } } // mailing :: commented 08282009 -rEanNe- //var mailing_flag = 0; var added_price = 0; if(typeof(exit_flag) != 'undefined'){ if(exit_flag){ return true; } } if(document.getElementById('qty_text')){ if(typeof(is_digital) != 'undefined' && is_digital != 0){ document.getElementById('qty_text').innerHTML = 'Printed on Digital Press.
No additional coating.'; } else { document.getElementById('qty_text').innerHTML = 'Printed on Offset Press.'; } } //setProofingHours(); frm = document.orderPageForm; if(frm.weight) frm.weight.value = weight; if(frm.total_price){ //frm.total_price.value = total_price_overwrite > 0 ? total_price_overwrite : total_price; frm.total_price.value = total_price; } if(frm.unit_price) { //frm.unit_price.value = total_price_overwrite > 0 ? unit_price_overwrite : unit_price; frm.unit_price.value = unit_price; } if(frm.width && !frm.width.disabled && (frm.width.tagName == 'input' || width % 0.25 == 0)) frm.width.value = width; if(frm.height && !frm.height.disable && (frm.height.tagName == 'input' || height % 0.25 == 0)) frm.height.value = height; if(frm.is_digital) frm.is_digital.value = is_digital; if(frm.qty) frm.qty.value = qty; var promo = PROMO; var promo_code_percentage = PROMO_CODE_PERCENTAGE; var promo_code_amount = PROMO_CODE_AMOUNT; var promo_code_max = PROMO_CODE_MAX; var coupon_field_code = document.orderPageForm.coupon_field_code.value; var coupon_field_discount_percentage = parseFloat(document.orderPageForm.coupon_field_discount_percentage.value); var coupon_field_discount_amount = parseFloat(document.orderPageForm.coupon_field_discount_amount.value); var coupon_field_max_discount = parseFloat(document.orderPageForm.coupon_field_max_discount.value); if(coupon_field_code){ if( (!promo_code_percentage && !isNaN(coupon_field_discount_percentage) && coupon_field_discount_percentage ) || (promo_code_percentage && !isNaN(coupon_field_discount_percentage) && coupon_field_discount_percentage > promo_code_percentage) || (!promo_code_amount && !isNaN(coupon_field_discount_amount) && coupon_field_discount_amount) || (promo_code_amount && !isNaN(coupon_field_discount_amount) && coupon_field_discount_percentage > promo_code_amount)){ promo = 'y'; promo_code_percentage = coupon_field_discount_percentage; promo_code_amount = coupon_field_discount_amount; promo_code_max = coupon_field_max_discount; } } //if(promo && promo=='y' && (typeof(total_price_overwrite) == 'undefined' || total_price_overwrite == 0 || (typeof(has_markdown != 'undefined') && has_markdown))) { if(promo && promo=='y') { if(promo_code_percentage && promo_code_percentage!='') { nf = new NumberFormat(promo_code_percentage/100); nf.setCommas(false); nf.setPlaces(2); var promo_code_percent = nf.toFormatted(); nf = null; /*if(typeof(has_markdown != 'undefined') && has_markdown){ total_price = total_price_overwrite; }*/ nf = new NumberFormat(total_price*promo_code_percent); nf.setCommas(false); nf.setPlaces(2); var discount_price = nf.toFormatted(); nf = null; if(document.getElementById('div_discount_text')){ document.getElementById('div_discount_text').innerHTML = promo_code_percentage+'% OFF'; } } else if(promo_code_amount && promo_code_amount!='') { nf = new NumberFormat(promo_code_amount); nf.setCommas(false); nf.setPlaces(2); var discount_price = nf.toFormatted(); nf = null; if(document.getElementById('div_discount_text')){ document.getElementById('div_discount_text').innerHTML = promo_code_amount+' Off'; } } if(promo_code_max && promo_code_max!='') { if(discount_price>promo_code_max) { nf = new NumberFormat(promo_code_max); nf.setCommas(false); nf.setPlaces(2); var discount_price = nf.toFormatted(); nf = null; } } nf = new NumberFormat(added_price+discount_price); nf.setCommas(false); nf.setPlaces(2); var added_price = -nf.toFormatted(); nf = null; nf = new NumberFormat((parseFloat(total_price)-parseFloat(discount_price)) / parseInt(qty)); nf.setCommas(false); nf.setPlaces(3); var new_unit_price = nf.toFormatted(); nf = null; if(document.getElementById('disp_discount_price')) document.getElementById('disp_discount_price').innerHTML = discount_price; if(document.getElementById('discount_field')) document.getElementById('discount_field').style.display = ''; if(document.getElementById('disp_unit_price')) document.getElementById('disp_unit_price').innerHTML = new_unit_price; if(promo_code_max && document.getElementById('disp_max_discount')) document.getElementById('disp_max_discount').innerHTML = 'Up to $'+promo_code_max; if(document.getElementById('disp_printing_text')){ document.getElementById('disp_printing_text').innerHTML = 'Regular Print Cost'; } /*} else if(typeof(total_price_overwrite) != 'undefined' && total_price_overwrite > 0) { nf = new NumberFormat(total_price-total_price_overwrite); nf.setCommas(false); nf.setPlaces(5); var discount_price = nf.toFormatted(); nf = null; nf = new NumberFormat(added_price+discount_price); nf.setCommas(false); nf.setPlaces(5); var added_price = -nf.toFormatted(); nf = null; unit_price = unit_price_overwrite; //total_price = total_price_overwrite; if(document.getElementById('div_discount_text')){ document.getElementById('div_discount_text').innerHTML = 'Economic Relief Discount'; } if(document.getElementById('disp_discount_price')) document.getElementById('disp_discount_price').innerHTML = total_price_overwrite; if(document.getElementById('discount_field')) document.getElementById('discount_field').style.display = 'none'; //document.getElementById('discount_field').style.display = ''; if(document.getElementById('disp_printing_text')){ document.getElementById('disp_printing_text').innerHTML = 'Regular Print Cost'; }*/ } else { if(document.getElementById('discount_field')) document.getElementById('discount_field').style.display = 'none'; if(document.getElementById('disp_printing_text')){ document.getElementById('disp_printing_text').innerHTML = 'Print Cost'; } } if(CURRENT_PAGE=='catalog_newdb_newudesign') { nf = new NumberFormat(total_price); nf.setCommas(false); nf.setPlaces(2); printing_price = nf.toFormatted(); nf = null; if(document.getElementById('disp_printing_text')) document.getElementById('disp_printing_text').innerHTML = 'Print Cost'; if(document.getElementById('disp_printing_price')) document.getElementById('disp_printing_price').innerHTML = total_price; if(document.getElementById('qty_price')) { var tempPrice = ((promo && promo=='y') ? (total_price-discount_price) : total_price); nf = new NumberFormat(tempPrice); nf.setPlaces(2); //animatePrice(); //new Effect.Opacity('qty_price', { from: 0, to: 1, duration: 0.5 }); document.getElementById('qty_price').innerHTML = '$'+nf.toFormatted(); } } if(document.getElementById('disp_unit_price')) document.getElementById('disp_unit_price').innerHTML = unit_price; if(document.getElementById('disp_total_price')) { if(promo && promo=='y') { if(document.getElementById('disp_discount_price')) { document.getElementById('disp_discount_price').innerHTML = discount_price; } } nf = new NumberFormat(parseFloat(total_price) + parseFloat(added_price)); nf.setCommas(false); nf.setPlaces(2); var disp_total_price = nf.toFormatted(); nf = null; if(CURRENT_PAGE == 'cal_design_wizard_preview'){ var cal_design_service_fee = 99; nf = new NumberFormat(parseFloat(disp_total_price) + parseFloat(cal_design_service_fee)); nf.setCommas(false); nf.setPlaces(2); disp_total_price = nf.toFormatted(); nf = null; } nf = new NumberFormat(total_price); nf.setCommas(false); nf.setPlaces(2); printing_price = nf.toFormatted(); nf = null; if(document.getElementById('disp_printing_price')) document.getElementById('disp_printing_price').innerHTML = printing_price; if(document.getElementById('disp_total_price')) document.getElementById('disp_total_price').innerHTML = disp_total_price; if(document.getElementById('floating_cost')) document.getElementById('floating_cost').innerHTML = '
Total Cost $' + disp_total_price + '
'; if(document.getElementById('qty_price')) { var tempPrice = ((promo && promo=='y') ? (total_price-discount_price) : total_price); /* var turnOpts = document.orderPageForm.attr27; if(typeof(turnOpts.length)=='undefined') { var turnOptsValId = turnOpts.value; } else { for(var i=0; i'; if(document.getElementById('result_shippingRates')) document.getElementById('result_shippingRates').innerHTML = ''; if(document.getElementById('qty_price')) document.getElementById('qty_price').innerHTML = '0'; } else { if(document.getElementById('is_turnaround')) { if(document.getElementById('is_turnaround').value==0) { do_call_ups_xml(); } } } } function do_call_ups() { frm = document.orderPageForm; if(frm.weight && frm.weight.value > 0){ compute_shipping(); } } function do_call_ups_xml(){ frm = document.orderPageForm; param_str = 'product_id='+ frm.product_id.value; if(frm.width.disabled==false && frm.height.disabled==false) { param_str += (param_str ? '|' : '')+'width='+ frm.width.options[frm.width.selectedIndex].value; param_str += (param_str ? '|' : '')+'height='+ frm.height.options[frm.height.selectedIndex].value; } param_str += (param_str ? '|' : '')+'attr48='+ getSelect(frm.attr48); param_str += (param_str ? '|' : '')+'attr25='+ getSelect(frm.attr25); param_str += (param_str ? '|' : '')+'attr26='+ getSelect(frm.attr26); param_str += (param_str ? '|' : '')+'attr39='+frm.attr39.value; param_str += (param_str ? '|' : '')+'attr51='+ getSelect(frm.attr51); param_str += (param_str ? '|' : '')+'attr30='+ getSelect(frm.attr30); param_str += (param_str ? '|' : '')+'attr27='+ getRadio(frm, 'attr27'); if(document.getElementById('zip_code')) { if(document.getElementById('zip_code').value && document.getElementById('zip_code').value!='Enter' && document.getElementById('zip_code').value!='Enter Zip Code') { if(document.getElementById('divSpinLoader')) document.getElementById('divSpinLoader').innerHTML = ''; if(document.getElementById('result_shippingRates').innerHTML != '') document.getElementById('result_shippingRates').innerHTML = '
'; x_call_ups_xml(param_str, frm.zip_code.value, list_shipping); } else { if(document.getElementById('result_shippingRates')) document.getElementById('result_shippingRates').innerHTML = ''; } } } function list_shipping(returnedValue){ var returnedValue = returnedValue.replace('+:', ''); if(document.getElementById('disp_total_price').innerHTML=='0') { alert('Please select a product to calculate shipping.'); setVisibility(false); } else if(document.getElementById('zip_code').value=='' || document.getElementById('zip_code').value=='Enter' || document.getElementById('zip_code').value=='Enter Zip Code') { alert('Please enter zipcode to calculate shipping.'); setVisibility(false); } else if(document.getElementById('zip_code').value.length!=5) { alert('Invalid Zipcode'); setVisibility(false); } else { if(document.getElementById('divZipCode')) document.getElementById('divZipCode').style.display = 'none'; if(document.getElementById('result_shippingRates')) document.getElementById('result_shippingRates').innerHTML = 'Ship to '+document.getElementById('zip_code').value+' Change'+returnedValue; if(document.getElementById('default_shipping')) updatePricingDisplay(document.getElementById('default_shipping').value); if(document.getElementById('divShippingPrice')) document.getElementById('divShippingPrice').style.display = ''; } } function display_shipping(returned_array){ returned_array = returned_array.replace('+:',''); returned_array = returned_array.replace(':+',''); eval(returned_array); //alert(returned_array); //document.getElementById('result_shippingRates').innerHTML = quote; if(document.getElementById('disp_total_price').innerHTML=='0') { alert('Please select a product to calculate shipping.'); } else if(document.getElementById('zip_code').value=='' || document.getElementById('zip_code').value=='Enter' || document.getElementById('zip_code').value=='Enter Zip Code') { if(document.getElementById('result_shippingRates').innerHTML!='') { alert('Please enter zipcode to calculate shipping.'); } } else { quotes = quotes.split('|'); html_output = ''; for (var i=0;i'; html_output += '
UPS'+quotesText[0]+'
'; html_output += '
$'+quotesText[1]+'
'; html_output += ''; } else { html_output += '
'; html_output += '
UPS'+quotesText[0]+'
'; html_output += '
$'+quotesText[1]+'
'; html_output += '
'; } } } //alert(html_output); document.getElementById('result_shippingRates').innerHTML = html_output; } } function compute_shipping() { var ups_product = ''; frm = document.orderPageForm; var shipping_zip = frm.zip_code.value; var weight = frm.weight.value; if(document.getElementById('divZipCode')) { if(document.getElementById('divZipCode').style['display'] != 'none') { x_call_ups('GND', shipping_zip, weight, display_shipping); } else { if(document.getElementById('result_shippingRates')) document.getElementById('result_shippingRates').innerHTML = ''; } } } function import_data() { frm = document.orderPageForm; if (window.opener.document.jobForm) { p_frm = window.opener.document.jobForm; // reset job form fields p_frm.width.value = ''; p_frm.height.value = ''; p_frm.paper.value = ''; p_frm.fold.value = ''; p_frm.ink.value = ''; p_frm.print_page.value = ''; p_frm.coating.value = ''; p_frm.quantity.value = ''; p_frm.turnaround.value = ''; p_frm.description.value = ''; p_frm.weight.value = ''; p_frm.unit_price.value = ''; p_frm.price.value = ''; // set job form field values p_frm.category.value = 'Hang Tags'; p_frm.type_id.value = '1'; p_frm.width.value = frm.width.value; p_frm.height.value = frm.height.value; // description var description = ''; description += (description ? ', ' : '')+ 'stock: '+getFieldValueText(document.getElementById('attr25'));description += (description ? ', ' : '')+ 'color: '+getFieldValueText(document.getElementById('attr26'));description += (description ? ', ' : '')+ 'hole drilling: '+getFieldValueText(document.getElementById('attr39'));description += (description ? ', ' : '')+ 'hole location: '+getFieldValueText(document.getElementById('attr51'));description += (description ? ', ' : '')+ 'quantity: '+getFieldValueText(document.getElementById('attr30'));description += (description ? ', ' : '')+ 'turnaround: '+getFieldValueText(document.getElementById('attr27')); frm.description.value = description; p_frm.description.value = frm.description.value; // weight and price p_frm.weight.value = frm.weight.value; p_frm.unit_price.value = frm.unit_price.value; p_frm.price.value = frm.total_price.value; window.close(); } } /*if(window.opener.document.jobForm){ if(window.opener.document.jobForm.category){ window.opener.document.jobForm.category.value = 'Hang Tags'; if(window.opener.document.jobForm.category.tagName.toLowerCase() == 'select') window.opener.get_product_pages(window.opener.document.jobForm.category); } }*/ function isNumberKey(evt){ var charCode = (evt.which) ? evt.which : event.keyCode if ((charCode >= 48 && charCode <= 57 && charCode != 46) || charCode == 8 || charCode == 13) return true; return false; } function checkValue(inputId,inputValue){ if (inputValue>500) document.getElementById(inputId).value = 500; } function computeDateEst(turnaround,transit_time,freight_flag){ if(typeof(freight_flag)=='undefined') var freight_flag = 'n'; var total_days = parseInt(turnaround) + parseInt(transit_time); if(freight_flag=='y') { if(document.getElementById('printArrival')) document.getElementById('printArrival').style.display = 'none'; } else { if(document.getElementById('printArrival')) document.getElementById('printArrival').style.display = ''; } x_compute_date_estimate(total_days, '', displayDateEst); } function displayDateEst(returnValue) { returnValue = returnValue.replace('+:',''); //document.getElementById('estDate').innerHTML = returnValue; //document.getElementById('estDate').innerHTML = returnValue.toUpperCase(); } function setTurnaround(){ var turnOpts = document.orderPageForm.attr27; if(typeof(turnOpts.length)=='undefined') { x_get_turnaround_text(turnOpts.value, displayTurnaround); } else { for(var i=0; i'; if(mailing_bulk_rate && mailing_bulk_rate!='') mailing_html += ''; if(mailing_first_class && mailing_first_class!='') mailing_html += ''; mailing_html += ''; if(document.getElementById('mailingOptions')) document.getElementById('mailingOptions').innerHTML = mailing_html; if(document.getElementById('disp_mailing_service_fee')) document.getElementById('disp_mailing_service_fee').innerHTML = mailing_service_fee; if(document.getElementById('disp_mailing_postage_estimate')) document.getElementById('disp_mailing_postage_estimate').innerHTML = mailing_postage_estimate; if(document.getElementById('disp_mailing_total_price')) document.getElementById('disp_mailing_total_price').innerHTML = total_mailing_charge; if(document.getElementById('disp_total_price')) document.getElementById('disp_total_price').innerHTML = sub_total_price; } if(getFieldValue(document.getElementById('attr25')) == '1438' ){setException('27', '1471');} function setSizeExceptions(Form){ var min_width = 2; var max_width = 8.5; var min_height = 2; var max_height = 11; // set minimum and maximum width min_width = min_width % 0.25 ? (Math.ceil(min_width/0.25) * 0.25) : min_width; max_width = max_width % 0.25 ? (Math.floor(max_width/0.25) * 0.25) : max_width; if(Form.width && Form.width.options){ var val = Form.width.selectedIndex > 0 ? Form.width.options[Form.width.selectedIndex].value : ''; Form.width.options.length = 0; for(var i=min_width; i<=max_width; i+=0.25){ Form.width.options[Form.width.options.length] = new Option(i+'"', i); if(i == val){ Form.width.options[Form.width.options.length-1].selected = true; } } } // set minimum and maximum weight min_height = min_height % 0.25 ? (Math.ceil(min_height/0.25) * 0.25) : min_height; max_height = max_height % 0.25 ? (Math.floor(max_height/0.25) * 0.25) : max_height; if(Form.height && Form.height.options){ var val = Form.height.selectedIndex > 0 ? Form.height.options[Form.height.selectedIndex].value : ''; Form.height.options.length = 0; for(var i=min_height; i<=max_height; i+=0.25){ Form.height.options[Form.height.options.length] = new Option(i+'"', i); if(i == val){ Form.height.options[Form.height.options.length-1].selected = true; } } } } setSizeExceptions(document.orderPageForm); if(getFieldValue(document.getElementById('attr48')) == 'custom'){document.getElementById('tr_Width').style.display='';document.getElementById('tr_Height').style.display='';document.getElementById('height').disabled=false;document.getElementById('width').disabled=false;}else{document.getElementById('tr_Width').style.display='none';document.getElementById('tr_Height').style.display='none';document.getElementById('height').disabled=true;document.getElementById('width').disabled=true;} //computePrice(document.orderPageForm); computePrice(document.orderPageForm); setDefaultValues('initial'); resetGallery(1,'61-1'); slideReviews(5); initIdeas(1,61); function showShipping() { document.getElementById('linkShippingOptions').style.display = 'none'; document.getElementById('divShippingOptions').style.display = ''; }