function dispHandle(obj) { if (obj.style.display == "none") obj.style.display = ""; else obj.style.display = "none"; } // read cookie if available function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return ""; } // wrapper function used to invoke PayPal Express Checkout // AMosin 11012007 Express PayPal Option function goPayPalExpress(theForm, usePayLater) { //updateFreeSoftware(theForm); theForm.action = "/edealinv/servlet/CheckoutItems"; theForm.checkoutMethod.value = "PayPal"; //By setting this flag to Y, PayLater will appear as an alternate payment option on PayPal if(usePayLater == "Y") { theForm.usePayLater.value = "Y"; } else { theForm.usePayLater.value = "N"; } theForm.method = "post"; theForm.submit(); } // TKO: 02/16/2006 // Used to remove a store item from the cart // This function is also used to remove order items created from (buy-more-of-same) functionality. function removeOrderItem(theForm, oriId, siId, oriType) { theForm.action = "/edealinv/servlet/DeleteStoreOrderItem"; theForm.nurl.value = "control/AddOrder.vm"; theForm.ori_id.value = oriId; theForm.ori_type.value = oriType; theForm.siId.value = siId; theForm.method = "post"; theForm.submit(); } function removeStorePurchase(theForm, stpId) { // note that for standard checkout, on store purchases can be removed theForm.action = "/edealinv/servlet/DeleteStoreOrderItem"; theForm.nurl.value = "control/AddOrder.vm"; theForm.stpId.value = stpId; theForm.method = "post"; theForm.submit(); } function updateShopCart(theForm) { theForm.action = "/edealinv/servlet/UpdateShoppingCart"; theForm.nurl.value = "control/AddOrder.vm"; theForm.method = "post"; theForm.submit(); } // wrapper function used to submit the form from button press function goSubmitAddOrder(theForm) { //updateFreeSoftware(theForm); theForm.action = "/edealinv/servlet/CheckoutItems"; theForm.checkoutMethod.value = "Store"; // JSESSIONID is HttpOnly and cannot be read (DEV-28993) //if(theForm.orig_sessionid) // theForm.orig_sessionid.value = readCookie("JSESSIONID"); theForm.method = "post"; // AMosin 11012007 Express PayPal Option theForm.submit(); } // Creates and submits a dynamic form given the inputs, action, and method function goSubmitDynamicForm(params, path, method) { path = path || "/edealinv/servlet/AddStoreOrderItem"; // default AddStoreOrderItem if not specified method = method || "post"; // default post if not specified var form = document.createElement("FORM"); form.setAttribute("method", method); form.setAttribute("action", path); // loop through the parameteres to create the form's inputs parameters = params.split('|'); for (var i = 0; i < parameters.length; ++i) { var pair = parameters[i].split('='); var hiddenField = document.createElement("INPUT"); hiddenField.setAttribute("type", "hidden"); // trim the name and value and then assign them hiddenField.setAttribute("name", pair[0].replace(/^\s\s*/, '').replace(/\s\s*$/, '')); hiddenField.setAttribute("value", pair[1].replace(/^\s\s*/, '').replace(/\s\s*$/, '')); form.appendChild(hiddenField); } document.body.appendChild(form); form.submit(); document.body.removeChild(form); // remove the form from the DOM just in case } // Wrapper function used to submit the form from button press. For express checkout, // create a dynamic form so the original value of nurl doesn't get changed. function goSubmitAddOrderExpress(theForm) { var path = "/edealinv/servlet/CheckoutItems"; var method = "post"; //Must set the checkout method explicitly to avoid redirecting to some other type of checkout in case the shopper changes the checkout method //e.g. Shopper chooses PayPal, cancels and returns to storefront and then selects Express Checkout. If the checkout method is not updated, // the shopper will be redirected to PayPal again theForm.checkoutMethod.value = "expressCheckout"; var params = extractFormInputsForMissingWarrantySKU(theForm); // change nurl to redirect to ExpressCheckout params = params.replace(/nurl=[^|]*/, "nurl=control/ExpressCheckout.vm"); goSubmitDynamicForm(params, path, method); } // wrapper function used to invoke PayPal Express Checkout function goSubmitAddOrderPayPalExpress(theForm, usePayLater) { theForm.action = "/edealinv/servlet/CheckoutItems"; theForm.checkoutMethod.value = "PayPal"; //By setting this flag to Y, PayLater will appear as an alternate payment option on PayPal if(usePayLater == "Y") { theForm.usePayLater.value = "Y"; } else { theForm.usePayLater.value = "N"; } theForm.method = "post"; theForm.submit(); } // wrapper function used to invoke PayPal Pay Later function goPayLater(theForm) { updateFreeSoftware(theForm); theForm.action = "/edealinv/servlet/CheckoutItems"; theForm.checkoutMethod.value = "PayLater"; theForm.usePayLater.value = "Y"; theForm.method = "post"; theForm.submit(); } // Returns a string containing the "name" and "value" attributes of all non-button // inputs from the given form delimited by '|' function extractFormInputs(theForm) { var params = ""; jQuery(":input[type != 'button']", theForm).each(function() { var type = jQuery(this).attr("type"); if ((type == "radio" || type == "checkbox") && !jQuery(this).is(':checked')) { // skip unchecked radio buttons and checkboxes return; } var name = jQuery(this).attr("name"); var value = jQuery(this).val(); if (params == "") { params += name + "=" + value; } else { params += "|" + name + "=" + value; } }); return params; } // DEV-31029,DEV-30988,DEV-31093: This is same as extractFormInputs() except for the fact it adds the missed warrantySKU if its not defined for a logged in user , while for guest user it adds the include_ //parameter for warrantySKU function extractFormInputsForMissingWarrantySKU(theForm) { var params = ""; var includeList = ""; jQuery(":input[type != 'button']", theForm).each(function() { var type = jQuery(this).attr("type"); if ((type == "radio" || type == "checkbox") && !jQuery(this).is(':checked')) { // skip unchecked radio buttons and checkboxes return; } var name = jQuery(this).attr("name"); var value = jQuery(this).val(); if (!name){ name="storeitem_" + value; includeName="include_" + value; value="Y"; includeValue="Y"; if (includeList == "") { includeList += includeName + "=" + includeValue; } else { includeList += "|" + includeName + "=" + includeValue; } } if (params == "") { params += name + "=" + value; } else { params += "|" + name + "=" + value; } }); if(includeList != "") { params += "|" + includeList; } return params; } function winPopup(mypage, myname, w, h, sc) { if (navigator.appVersion.indexOf("AOL") != -1) { newHeight = h + 25; newWidth = w + 25; winprops = 'height=' + newHeight + ',width=' + newWidth win = window.open(mypage, myname, winprops); } else { if (parseInt(navigator.appVersion) >= 4) { var offsetW = (screen.width - w) / 2; var offsetH = (screen.height - h) / 2; winprops = 'height='+ h +',width='+ w +',top='+ offsetH +',left='+ offsetW + ',scrollbars='+sc win = window.open(mypage, myname, winprops) win.window.focus(); } else { newHeight = h + 25; newWidth = w + 25; winprops = 'height=' + newHeight + ',width=' + newWidth win = window.open(mypage, myname, winprops); } } } // TKO: 02/16/2006 // This function is to add (buy-more-of-same) up-sell items, from the shopping cart page. function buyUpSellItem(form, cskuId, itemPrice, itemCurrency, qty) { //validate quantity var num = new Number(parseInt(qty)); if(num.toString()=="NaN") { alert(qty +" is not a valid quantity. Please double-check the quantity to add to your shopping cart."); return; }//if form.action = "/edealinv/servlet/AddUpSellItem"; form.cskuId.value = cskuId; form.itemPrice.value = itemPrice; form.itemCurrency.value = itemCurrency; form.itemQty.value = qty; form.method = "post"; form.submit(); } //SL Dec 2006: A function to logon using the shopping cart form function doCheckoutLoginSubmit(form) { form.action = "/edealinv/servlet/StoreLogon"; form.nurl.value = "control/AddOrder.vm"; form.eurl.value = "control/StoreLogon.vm"; form.rurl.value = "control/AddOrder.vm"; form.method="post"; form.submit(); } //END of JS from ADD ORDER //START of JS from CHECKOUT SHIP TO function refreshAddr(selector) { selector.form.action = "/edealinv/servlet/ExecMacro"; selector.form.nurl.value = "control/CheckoutShipTo.vm"; selector.form.pageAnchor.value = "address"; selector.form.method = "post"; selector.form.submit(); } // wrapper function used to submit the form from button press function goSubmitCheckoutShipTo(theForm) { theForm.action = "/edealinv/servlet/CheckoutShipTo"; theForm.method = "post"; // if(theForm.tcAnswer.checked == false) { document.getElementById('errDiv').className = 'show'; }else { document.getElementById('errDiv').className = 'hide'; theForm.submit(); } } // note that address validation will be done on the server side function checkAddress(f) { var doUpd = false; doUpd = f.fname.value!=f.old_fname.value || f.lname.value!=f.old_lname.value || f.addr1.value!=f.old_addr1.value || f.addr2.value!=f.old_addr2.value || f.city.value!=f.old_city.value || f.zipc.value!=f.old_zipc.value || f.phone.value!=f.old_phone.value || f.email.value!=f.old_email.value; //Better check, whether the custom fields are used if(f.addressCustomField_0&&f.old_addressCustomField_0) doUpd = doUpd || f.addressCustomField_0.value!=f.old_addressCustomField_0.value || f.addressCustomField_1.value!=f.old_addressCustomField_1.value || f.addressCustomField_2.value!=f.old_addressCustomField_2.value || f.addressCustomField_3.value!=f.old_addressCustomField_3.value || f.addressCustomField_4.value!=f.old_addressCustomField_4.value || f.addressCustomField_5.value!=f.old_addressCustomField_5.value || f.addressCustomField_6.value!=f.old_addressCustomField_6.value || f.addressCustomField_7.value!=f.old_addressCustomField_7.value || f.addressCustomField_8.value!=f.old_addressCustomField_8.value || f.addressCustomField_9.value!=f.old_addressCustomField_9.value; if(f.state.type=="text") doUpd = doUpd || f.state.value!=f.old_state.value; else doUpd = doUpd || f.state.options[f.state.selectedIndex].value!=f.old_state.value; doUpd = doUpd || f.cntry.options[f.cntry.selectedIndex].value!=f.old_cntry.value; if(doUpd) f.doUpdAddr.value = "Y"; } // clear all the input fields function clearAddressForm(f) { f.vca_name.value = ""; f.company_name.value = ""; f.add_title.value = ""; f.fname.value = ""; f.lname.value = ""; f.addr1.value = ""; f.addr2.value = ""; f.city.value = ""; f.zipc.value = ""; f.phone.value = ""; f.email.value = ""; f.state.value = ""; if(f.addressCustomField_0){ f.addressCustomField_0.value = ""; f.addressCustomField_1.value = ""; f.addressCustomField_2.value = ""; f.addressCustomField_3.value = ""; f.addressCustomField_4.value = ""; f.addressCustomField_5.value = ""; f.addressCustomField_6.value = ""; f.addressCustomField_7.value = ""; f.addressCustomField_8.value = ""; f.addressCustomField_9.value = ""; } } function addNewAddressForm(f) { clearAddressForm(f); f.action = "/edealinv/servlet/ExecMacro"; f.nurl.value = "control/CheckoutShipTo.vm"; f.addNewAddr.value = "Y"; f.pageAnchor.value = "address"; f.submit(); } function useOldAddressForm(f) { f.action = "/edealinv/servlet/ExecMacro"; f.nurl.value = "control/CheckoutShipTo.vm"; f.addNewAddr.value = "N"; f.pageAnchor.value = "address"; f.submit(); } function textCounterOrdInstruct(field, countfield, maxlimit) { if (field.value.length > maxlimit){ // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter } else{ countfield.value = maxlimit - field.value.length; } } function textCharacterCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit){ // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter } else{ countfield.value = maxlimit - field.value.length; } } //END of JS from CHECKOUT SHIP TO //START of JS from CHECKOUT SHIP METHOD // wrapper function used to submit the form from button press function goSubmitCheckoutShipMethod(theForm) { theForm.action = "https://dellrefurbished.com/edealinv/servlet/ExecMacro"; theForm.nurl.value = "control/ViewOrderCustomer.vm" theForm.method = "get"; theForm.submit(); } // wrapper function used to update the contents of the page on shipping method change function updateShipMeth(theForm) { theForm.action = "/edealinv/servlet/ExecMacro"; theForm.nurl.value = "control/CheckoutShipMethod.vm" theForm.pageAnchor.value = "shipmeth"; theForm.method = "post"; theForm.submit(); } // wrapper function used to remove non-combinable items for the shopping cart display function removeNonCombineItems(theForm) { theForm.action = "/edealinv/servlet/RemoveNonCombineItems"; theForm.nurl.value = "control/CheckoutShipMethod.vm" theForm.pageAnchor.value = "shipmeth"; theForm.method = "post"; theForm.submit(); } // Used to update page when insurance option is checked or unchecked function setInsuranceInclude(theForm){ var chooseIns = theForm.chooseIns.checked if (chooseIns){ theForm.insInclude.value ="Y" theForm.insIncludeUpdate.value ="Y" }else{ theForm.insInclude.value ="N" theForm.insIncludeUpdate.value ="N" } theForm.action = "/edealinv/servlet/ExecMacro"; theForm.nurl.value = "control/CheckoutShipMethod.vm"; theForm.method = "post"; theForm.submit(); } //END of JS from CHECKOUT SHIP METHOD //START of JS from VIEW ORDER CUSTOMER // enable continue button function toggleOn() { var theForm = document.CreateOrder; // hide the payment message document.getElementById('paymentSubmittedMessage').className='hide'; // enable button if(theForm.ordButton) theForm.ordButton.disabled = false; } // disable continue button function toggleOff() { var theForm = document.CreateOrder; // show the payment message document.getElementById('paymentSubmittedMessage').className='show'; // disable button if(theForm.ordButton) theForm.ordButton.disabled = true; } function changeBillToAddr(selector) { selector.form.action = "/edealinv/servlet/ExecMacro"; selector.form.nurl.value = "control/ViewOrderCustomer.vm"; selector.form.method = "post"; selector.form.submit(); } function changeAuctionBillToAddr(selector) { selector.form.action = "/edealinv/servlet/ExecMacro"; selector.form.nurl.value = "control/AuctionPaymentCreditCard.vm"; selector.form.method = "post"; selector.form.submit(); } // note that address validation will be done on the server side // this indicates the billing address needs to be updated function checkAddressBillTo(f) { var doUpd = false; doUpd = f.billing_fname.value!=f.old_fname.value || f.billing_lname.value!=f.old_lname.value || f.billing_addr1.value!=f.old_addr1.value || f.billing_addr2.value!=f.old_addr2.value || f.billing_city.value!=f.old_city.value || f.billing_zipc.value!=f.old_zipc.value || f.billing_phone.value!=f.old_phone.value || f.billing_email.value!=f.old_email.value; if(f.billing_state.type=="text") doUpd = doUpd || f.billing_state.value!=f.old_state.value; else doUpd = doUpd || f.billing_state.options[f.billing_state.selectedIndex].value!=f.old_state.value; doUpd = doUpd || f.billing_cntry.options[f.billing_cntry.selectedIndex].value!=f.old_cntry.value; if(doUpd) f.doUpdBillAddr.value = "Y"; } // clear all the input fields function clearAddressFormBillTo(f) { f.billing_vca_name.value = ""; f.billing_company_name.value = ""; f.billing_title.value = ""; f.billing_fname.value = ""; f.billing_lname.value = ""; f.billing_addr1.value = ""; f.billing_addr2.value = ""; f.billing_city.value = ""; f.billing_zipc.value = ""; f.billing_phone.value = ""; f.billing_email.value = ""; f.billing_state.value = "" } // clear all the input fields function clearAuctionAddressFormBillTo(f) { f.auction_billing_company_name.value = ""; f.auction_billing_title.value = ""; f.auction_billing_fname.value = ""; f.auction_billing_lname.value = ""; f.auction_billing_addr1.value = ""; f.auction_billing_addr2.value = ""; f.auction_billing_city.value = ""; f.auction_billing_zipc.value = ""; f.auction_billing_phone.value = ""; f.auction_billing_state.value = "" } function addNewAddressFormBillTo(f) { clearAddressFormBillTo(f); f.action = "/edealinv/servlet/ExecMacro"; f.nurl.value = "control/ViewOrderCustomer.vm"; f.addNewAddr.value = "Y"; f.pageAnchor.value = "address"; f.submit(); } function addNewAuctionAddressFormBillTo(f) { clearAuctionAddressFormBillTo(f); f.action = "/edealinv/servlet/ExecMacro"; f.nurl.value = "control/AuctionPaymentCreditCard.vm"; f.addNewAddr.value = "Y"; f.pageAnchor.value = "address"; f.submit(); } function useOldAddressFormBillTo(f) { f.action = "/edealinv/servlet/ExecMacro"; f.nurl.value = "control/ViewOrderCustomer.vm"; f.addNewAddr.value = "N"; f.pageAnchor.value = "address"; f.submit(); } function useOldAuctionAddressFormBillTo(f) { f.action = "/edealinv/servlet/ExecMacro"; f.nurl.value = "control/AuctionPaymentCreditCard.vm"; f.addNewAddr.value = "N"; f.pageAnchor.value = "address"; f.submit(); } function refreshAddrBillTo(selector) { selector.form.action = "/edealinv/servlet/ExecMacro"; selector.form.nurl.value = "control/ViewOrderCustomer.vm"; selector.form.pageAnchor.value = "billto"; selector.form.method = "post"; selector.form.submit(); } function refreshAuctionAddrBillTo(selector) { selector.form.action = "/edealinv/servlet/ExecMacro"; selector.form.nurl.value = "control/AuctionPaymentCreditCard.vm"; selector.form.pageAnchor.value = "billto"; selector.form.method = "post"; selector.form.submit(); } /* ML Sep 2011: Add for Save Payment Method by Marvin Function: Drive to invoke src\war\js\checkoutfunctions.inc.refreshPaymentMethod() Background: During checkout process, if the payment method includes payflowCreditDebitForm.inc, when the customer arrives the payment method page(ViewOrderCustomer.vm), "PayFlow Credit or Debit Card" will be selected by default But "Selecting PayFlow Credit or Debit Card BY DEFAULT" won't triger javascript method checkoutfunctions.inc.refreshPaymentMethod(), which is used to invoke CheckoutPayMethod.java to put some shipping cost into session whenever neccessary Before adding "DEV-25506:Save Payment Method", the credit card type dropdown list is empty, and when the customer selects credit card type, checkoutfunctions.inc.refreshPaymentMethod() will be invoked and the neccessary info will be put into session, and the page will be refreshed (Actually, we need not invoke checkoutfunctions.inc.refreshPaymentMethod() each time we change card type, because, the information put into session dose not relate with card type, it only relates with payment method(BankCheck, Credit Card....)) Now I add "DEV-25506:Save Payment Method", and we don't want to refresh the page whenever the customer selects credit card type however, we still need to invoke checkoutfunctions.inc.refreshPaymentMethod() in order to put neccessary info into session whenever the customer selects "PayFlow Credit or Debit Card" To do so, we invoke this method after the page is loaded by onload() of ViewOrderCustomer.vm when "Selecting PayFlow Credit Card by default" */ function refreshCheckoutPayMethodOnLoad(theForm){ //alert("Hello, I'm in"); if(theForm == null){ return; } var eleRefresh = document.getElementById('refresh4PayFlowCC'); if(eleRefresh == null){ return; } var valueRefresh = eleRefresh.value; if(valueRefresh == null || valueRefresh == "" || valueRefresh == "Y"){ //Set to N so that even the customer click "PayFlow Credit Card" again on the web UI, the onload() won't //send request to "/edealinv/servlet/CheckoutPayMethod" eleRefresh.value = "N"; //alert("Yes, I'll do the refresh"); refreshPaymentMethod(theForm); } } function refreshPaymentMethod(theForm) { // reset the shipping address value, only if the variable is there if(theForm.useShipAddr) { theForm.useShipAddr.value = "Y"; } // This method will be invoked, when we click different payment method("Credit or Debit Card", // "Transfer via WireCardMoney", "OrderBank"...) on the web UI // Here, we always set to Y, so that when the customer clicks different payment method, // we shall use the credit card number in database(not the one on the web UI) // Note:useStoredCcnumber is defined in storedCreditCardSelect.inc and only used for "PayFlow Credit Card" and "Wire Credit Card" if(document.getElementById('useStoredCcnumber') != null){ document.getElementById('useStoredCcnumber').value = "Y"; } theForm.action = "/edealinv/servlet/CheckoutPayMethod"; theForm.nurl.value = "control/ViewOrderCustomer.vm"; theForm.method = "post"; theForm.submit(); } //ML Sept 2011, refresh the pages when we change the stored credit card number function refreshStoredCC(theForm) { // reset the shipping address value, only if the variable is there if(theForm.useShipAddr) { theForm.useShipAddr.value = "Y"; } // 1. Card Number setTextValue('ccnumber', ""); setTextValue('ccnumberMasked', ""); // 2. Card Type setComboBoxSelected('cctype', -1);//defined in payflowCreditDebitForm.inc setComboBoxSelected('cardtype', -1);//defined in wirecardCreditCardForm.inc // 3. Expiry Date setComboBoxSelected('ccmonth', -1); setComboBoxSelected('ccyear', -1); // 4. Start Date setComboBoxSelected('ccstartmonth', -1); setComboBoxSelected('ccstartyear', -1); // 5. Card Issue setTextValue('ccissuenum', ""); // 6. Card Holder setTextValue('cardholder', ""); // 7. CSC setTextValue('cscnum', "");//defined in payflowCreditDebitForm.inc setTextValue('cvc2num', "");//defined in wirecardCreditCardForm.inc // 8. "Yes, I'd like to save the above credit card data to my account" to uncheck var eleChkSaveCreditCard = document.getElementById('chkSaveCreditCard'); if(eleChkSaveCreditCard != null){ eleChkSaveCreditCard.checked = false; eleChkSaveCreditCard.value = "N"; } // Make sure we shall use the credit card number in database(not the one on the web UI) // Note:useStoredCcnumber is defined in storedCreditCardSelect.inc and only used for "PayFlow Credit Card" and "Wire Credit Card" setTextValue('useStoredCcnumber', "Y"); theForm.action = "/edealinv/servlet/ExecMacro"; theForm.nurl.value = "control/ViewOrderCustomer.vm"; theForm.method = "post"; theForm.submit(); } function goSubmitPaymentReview(theForm) { if(theForm.ordTotalValNew != null && theForm.ord_store_credit_redeemed != null && theForm.ordTotalValNew.value == "0" && parseFloat(theForm.ord_store_credit_redeemed.value) > 0 ){ submitOK = false; alert("Please 'Recalculate Order' to apply store credits before placing order."); }else if(theForm.ord_store_credit_redeemed != null && theForm.ord_store_credit_redeemed.value != ""){ if(parseFloat(theForm.ord_store_credit_redeemed.value) >= 0){ if(theForm.ord_id_value != ""){ submitOK = true; }else{ if(theForm.ordTotalValNew != null && parseFloat(theForm.ordTotalValNew.value) < 0 ){ submitOK = false; alert("The maximum store credit redeemable has been exceeded.\n\nPlease adjust the amount of store credit used."); }else if((parseFloat(theForm.ordTotalValue.value) - parseFloat(theForm.ord_store_credit_redeemed.value)) < 0){ submitOK = false; alert("The maximum store credit redeemable has been exceeded.\n\nPlease adjust the amount of store credit used."); }else{ submitOK = true; } } }else if(theForm.ordTotalValNew != null && parseFloat(theForm.ordTotalValue.value) < 0){ submitOK = false; alert("Cannot create a negative total order."); }else{ submitOK = false; alert("Please Recalculate Order to apply store credit or clear the field"); } }else{ submitOK = true; } if(submitOK){ // disable the button toggleOff(); theForm.action = "/edealinv/servlet/CreateOrder"; theForm.nurl.value = "control/ViewOrderCustomer.vm" // Always set to N // so that when the customer clicks "Place Order" or "Make Payment", if the credit card fails to check, when he // comes back to this page, we can still display the same credit card info just as that when he commits this request // (if we set to Y, we would use the stored credit card or display a blank credit card info, that's not what we expect) // Note:useStoredCcnumber is defined in storedCreditCardSelect.inc and only used for "PayFlow Credit Card" and "Wire Credit Card" if(document.getElementById('useStoredCcnumber') != null){ document.getElementById('useStoredCcnumber').value = "N"; } theForm.method = "post"; theForm.submit(); } } function printReceipt(theForm) { theForm.action = "/edealinv/servlet/PrintOrders"; theForm.method = "post"; theForm.target = "_receipt"; theForm.submit(); return; } //END of JS from VIEW ORDER CUSTOMER //START of JS from ORDER HISTORY CUSTOMER function rmaRedirect(ordID) { document.rmaRedirect.action="/edealinv/servlet/ExecMacro?nurl=control/ReqRMACustomer.vm&ctl_nbr=17140&ord_id=" + ordID; document.rmaRedirect.submit(); } //END of JS from ORDER HISTORY CUSTOMER