var companyType;function init(){framework.widget.helpmenu.init("bol_helpmenu");initializeHelpMenu("nonsecure_bol");initializeAppNav("nonsecure_bol");framework.widget.menu.init("bol_menu");framework.widget.module.init("shipper_type_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.init("from_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.collapse("from_module");framework.util.hideElement("from_module._headerEdit");populateLabels("fromStateLabel","fromZipLabel","US");populateStateDropDown("fromState","US");
framework.widget.module.init("to_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.collapse("to_module");framework.util.hideElement("to_module._headerEdit");populateLabels("toStateLabel","toZipLabel","US");populateStateDropDown("toState","US");framework.widget.module.init("thirdparty_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.collapse("thirdparty_module");framework.util.hideElement("thirdparty_module._headerEdit");populateLabels("tpStateLabel","tpZipLabel","US");populateStateDropDown("thirdPartyState","US");framework.widget.module.init("shipment_details_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.collapse("shipment_details_module");framework.util.hideElement("shipment_details_module._headerEdit");framework.eventmodel.addElementEvent("addRow_link",framework.EventType.CLICK,addShipmentRow);document.getElementById("deleteRow_link").disabled=true;document.getElementById("deleteRow_link").className="lesslinklongdisabled";
framework.eventmodel.removeElementEvent("deleteRow_link",framework.EventType.CLICK,deleteShipmentRow);framework.widget.module.init("hazmat_phone_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.collapse("hazmat_phone_module");framework.util.hideElement("hazmat_phone_module._headerEdit");
showHideHazmatPhoneModule();populateStateDropDown("codState","US");populateLabels("codStateLabel","codZipLabel","US");framework.widget.module.init("service_selection_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.collapse("service_selection_module");
framework.util.hideElement("service_selection_module._headerEdit");framework.widget.module.init("intl_shipment_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.collapse("intl_shipment_module");framework.util.hideElement("intl_shipment_module._headerEdit");
framework.widget.module.init("shipment_options_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.collapse("shipment_options_module");framework.util.hideElement("shipment_options_module._headerEdit");var b=new Date();var a=framework.util.clone(b);a.setDate(a.getDate()+14);
var c=[b,a];framework.widget.calendar.setLocalizedMonthNames("January,February,March,April,May,June,July,August,September,October,November,December");framework.widget.calendar.setLocalizedDayOfWeekNames("Su,M,Tu,W,Th,F,Sa");framework.widget.calendar.setLocalizedYearSuffix("");framework.widget.calendar.setLocalizedDaySuffix("");
framework.widget.calendar.init("cust_del_between1",c,"%mm/%dd/%yyyy","%sm %yyyy",framework.WidgetConstants.SUNDAY,true,"",null,null);framework.widget.calendar.init("cust_del_between2",c,"%mm/%dd/%yyyy","%sm %yyyy",framework.WidgetConstants.SUNDAY,true,"",null,null);framework.widget.calendar.init("cust_del_on",c,"%mm/%dd/%yyyy","%sm %yyyy",framework.WidgetConstants.SUNDAY,true,"",null,null);
framework.widget.calendar.init("cust_del_before",c,"%mm/%dd/%yyyy","%sm %yyyy",framework.WidgetConstants.SUNDAY,true,"",null,null);framework.widget.calendar.init("cust_del_after",c,"%mm/%dd/%yyyy","%sm %yyyy",framework.WidgetConstants.SUNDAY,true,"",null,null);byId("cust_del_on._text").disabled=true;
byId("cust_del_on._icon").disabled=true;byId("cust_del_before._text").disabled=true;byId("cust_del_before._icon").disabled=true;byId("cust_del_after._text").disabled=true;byId("cust_del_after._icon").disabled=true;disableDependentModules();showHideSpecialInstructionsModule();if(document.getElementById("shipperPhoneCountryCode").value=="001"){document.getElementById("usShipperPhoneFormat").style.display="inline";
document.getElementById("intlShipperPhoneFormat").style.display="none";}else{document.getElementById("usShipperPhoneFormat").style.display="none";document.getElementById("intlShipperPhoneFormat").style.display="inline";}if(document.getElementById("consigneePhoneCountryCode").value=="001"){document.getElementById("usConsigneePhoneFormat").style.display="inline";
document.getElementById("intlConsigneePhoneFormat").style.display="none";}else{document.getElementById("usConsigneePhoneFormat").style.display="none";document.getElementById("intlConsigneePhoneFormat").style.display="inline";}if(document.getElementById("thirdPartyPhoneCountryCode").value=="001"){document.getElementById("usThirdPartyPhoneFormat").style.display="inline";
document.getElementById("intlThirdPartyPhoneFormat").style.display="none";}else{document.getElementById("usThirdPartyPhoneFormat").style.display="none";document.getElementById("intlThirdPartyPhoneFormat").style.display="inline";}addAccessorialHelpEvents();framework.eventmodel.addElementEvent("handling_help",framework.EventType.CLICK,getShipmentDetailsHelpMessagesNonSecBOL);
framework.eventmodel.addElementEvent("packing_help",framework.EventType.CLICK,getShipmentDetailsHelpMessagesNonSecBOL);framework.widget.module.expand("shipper_type_module");framework.widget.busy.stop("shipper_type_module");addProductHelpEvents();}function addProductHelpEvents(){framework.eventmodel.addElementEvent("priorityGuaranteeStdHelp",framework.EventType.CLICK,getProductTariffHelpMessagesNonSecBOL);
framework.eventmodel.addElementEvent("priorityGuaranteeAmHelp",framework.EventType.CLICK,getProductTariffHelpMessagesNonSecBOL);framework.eventmodel.addElementEvent("priorityGuaranteeDayHelp",framework.EventType.CLICK,getProductTariffHelpMessagesNonSecBOL);framework.eventmodel.addElementEvent("economyGuaranteeStdHelp",framework.EventType.CLICK,getProductTariffHelpMessagesNonSecBOL);
framework.eventmodel.addElementEvent("economyGuaranteeAmHelp",framework.EventType.CLICK,getProductTariffHelpMessagesNonSecBOL);framework.eventmodel.addElementEvent("economyGuaranteeDayHelp",framework.EventType.CLICK,getProductTariffHelpMessagesNonSecBOL);}function roleAndTermsSelected(){if((byId("radShipTypeS").checked==true||byId("radShipTypeC").checked==true||byId("radShipTypeB").checked==true)&&(byId("radTermTypeP").checked==true||byId("radTermTypeC").checked==true||byId("radTermType7").checked==true)){return true;
}else{return false;}}function openAddressBook(){window.open("AddressBook.jsp",null,"resizable=no,scrollbars=yes,status=no,height=600,width=800");}function openItemList(){window.open("ItemList.jsp",null,"resizable=no,scrollbars=yes,status=no,height=600,width=800");}function getModuleSummaryMessages(e){var b="";
switch(e){case"service_selection_module":if((byId("priorityGuaranteeStd").checked!=false)||(byId("priorityGuaranteeDay").checked!=false)||(byId("priorityGuaranteeAm").checked!=false)){b=byId("priorityGuaranteeStd").value;}else{if((byId("economyGuaranteeStd").checked!=false)||(byId("economyGuaranteeDay").checked!=false)||(byId("economyGuaranteeAm").checked!=false)){b=byId("economyGuaranteeStd").value;
}else{b="Please enter the service selection.";}}break;case"shipper_type_module":if(byId("radShipTypeS").checked){b+="Shipper, ";}else{if(byId("radShipTypeC").checked){b+="Consignee, ";}else{if(byId("radShipTypeB").checked){b+="Third party, ";}}}if(byId("radTermTypeP").checked){b+="Prepaid, ";}else{if(byId("radTermTypeC").checked){b+="Collect, ";
}else{if(byId("radTermType7").checked){b+="Collect Section 7, ";}}}checkComma=b.substring(b.length-2,b.length);if(checkComma==", "){b=b.substring(0,b.length-2);}if(b==""){b="Please enter shipper type/terms information.";}break;case"from_module":if(getValue("fromCompanyName")){b+=getValue("fromCompanyName")+", ";
}if(getValue("fromAddress")){b+=getValue("fromAddress")+", ";}if(getValue("fromState")){b+=getValue("fromState")+", ";}if((getValue("shipperPhoneCountryCode")=="001")&&(getValue("shipperPhoneAreaCode")!=null)){b+=getValue("shipperPhoneAreaCode")+"-"+getValue("shipperPhoneExchange")+"-"+getValue("shipperPhoneNumber");
}else{if((getValue("shipperPhoneCountryCode")=="052")&&(getValue("shipperPhoneAreaCode")!=null)){b+=getValue("shipperPhoneAreaCode")+"-"+getValue("shipperPhoneIntlNumber");}}checkComma=b.substring(b.length-2,b.length);if(checkComma==", "){b=b.substring(0,b.length-2);}if(b==""||b===getValue("fromCountry")){b="Please enter From information.";
}break;case"to_module":if(getValue("toCompanyName")){b+=getValue("toCompanyName")+", ";}if(getValue("toAddress")){b+=getValue("toAddress")+", ";}if(getValue("toState")){b+=getValue("toState")+", ";}if((getValue("consigneePhoneCountryCode")=="001")&&(getValue("consigneePhoneAreaCode")!=null)){b+=getValue("consigneePhoneAreaCode")+"-"+getValue("consigneePhoneExchange")+"-"+getValue("consigneePhoneNumber");
}else{if((getValue("consigneePhoneCountryCode")=="052")&&(getValue("consigneePhoneIntlAreaCode")!=null)){b+=getValue("consigneePhoneIntlAreaCode")+"-"+getValue("consigneePhoneIntlNumber");}}checkComma=b.substring(b.length-2,b.length);if(checkComma==", "){b=b.substring(0,b.length-2);}if(b==""||b===getValue("toCountry")){b="Please enter To information.";
}break;case"thirdparty_module":if(getValue("thirdPartyCompanyName")){b+=getValue("thirdPartyCompanyName")+", ";}if(getValue("thirdPartyAddress")){b+=getValue("thirdPartyAddress")+", ";}if(getValue("thirdPartyState")){b+=getValue("thirdPartyState")+", ";}if((getValue("thirdPartyPhoneCountryCode")=="001")&&(getValue("thirdPartyPhoneAreaCode")!=null)){b+=getValue("thirdPartyPhoneAreaCode")+"-"+getValue("thirdPartyPhoneExchange")+"-"+getValue("thirdPartyPhoneNumber");
}else{if((getValue("thirdPartyPhoneCountryCode")=="052")&&(getValue("thirdPartyPhoneIntlAreaCode")!=null)){b+=getValue("thirdPartyPhoneIntlAreaCode")+"-"+getValue("thirdPartyPhoneIntlNumber");}}checkComma=b.substring(b.length-2,b.length);if(checkComma==", "){b=b.substring(0,b.length-2);}if(b==""||b===getValue("thirdPartyCountry")){b="Please enter Third Party information.";
}break;case"shipment_details_module":if(getValue("fromZip")){b+="From ";b+=getValue("fromZip");}else{b+=" ";}if(getValue("fromCountry")){b+="-"+getValue("fromCountry");}else{b+=", ";}b+=" to ";if(getValue("toZip")){b+=getValue("toZip");}else{b+=" ";}if(getValue("toCountry")){b+="-"+getValue("toCountry")+", ";
}else{b+=", ";}if(getValue("handlingUnits0")){b+=getValue("handlingUnits0");}else{b+=" ";}select=byId("packagingUnits0");b+="/"+select.options[select.selectedIndex].text;if(byId("class0").selectedIndex>0){select=byId("class0");b+="/"+select.options[select.selectedIndex].text;}else{b+="/ ";}if(getValue("weight0")){b+="/"+getValue("weight0");
}else{b+="/ ";}if(byId("hazmat0").checked){b+="/HM";}if(getValue("nmfc0")){b+="/"+getValue("nmfc0");}break;case"shipment_details_module":if(byId("callBeforeDelivery").checked){b+=byId("callBeforeDelivery").title+", ";}if(byId("freezableProtection").checked){b+=byId("freezableProtection").title+", ";}if(byId("oversizeExtremeLength").checked){b+=byId("oversizeExtremeLength").title+", ";
}if(byId("poison").checked){b+=byId("poison").title+", ";}if(byId("food").checked){b+=byId("food").title+", ";}if(byId("resedentialDelivery").checked){b+=byId("resedentialDelivery").title+", ";}if(byId("resedentialPickup").checked){b+=byId("resedentialPickup").title+", ";}if(byId("doNotStackPallets").checked){b+=byId("doNotStackPallets").title+", ";
}if(byId("unlimitedLimitedAccessDelivery").checked){b+=byId("unlimitedLimitedAccessDelivery").title+", ";}if(byId("limitedAccessPickup").checked){b+=byId("limitedAccessPickup").title+", ";}if(byId("doNotBreakDownPallet").checked){b+=byId("doNotBreakDownPallet").title+", ";}if(byId("topLoadOnly").checked){b+=byId("topLoadOnly").title+", ";
}if(byId("liftgateDelivery").checked){if(byId("liftgateDeliveryPrepaid").checked){b+=byId("liftgateDeliveryPrepaid").title+", ";}if(byId("liftgateDeliveryCollect").checked){b+=byId("liftgateDeliveryCollect").title+", ";}}if(byId("insideDelivery").checked){if(byId("insideDeliveryPrepaid").checked){b+=byId("insideDeliveryPrepaid").title+", ";
}if(byId("insideDeliveryCollect").checked){b+=byId("insideDeliveryCollect").title+", ";}}if(byId("liftgatePickup").checked){if(byId("liftgatePickupPrepaid").checked){b+=byId("liftgatePickupPrepaid").title+", ";}if(byId("liftgatePickupCollect").checked){b+=byId("liftgatePickupCollect").title+", ";}}if(byId("insidePickup").checked){if(byId("insidePickupPrepaid").checked){b+=byId("insidePickupPrepaid").title+", ";
}if(byId("insidePickupCollect").checked){b+=byId("insidePickupCollect").title+", ";}}b=b.substring(0,b.length-2);if(b==""){b="Please enter additional services information.";}break;case"shipment_options_module":if(getValue("codAmount")){b+="USD "+getValue("codAmount")+", ";}if(byId("codCertFunds").checked){b+=byId("codCertFunds").title;
}if(byId("codCompCheck").checked){b+=byId("codCompCheck").title;}if(byId("codPersCheck").checked){b+=byId("codPersCheck").title;}if(b==""){b="Please enter collect on delivery information.";}break;case"shipment_options_module":if(getValue("declValAmount")){b="USD "+getValue("declValAmount");}if(b==""){b="Please enter declared value information.";
}break;case"shipment_options_module":if(byId("emailDocBOL").checked){b+=byId("emailDocBOL").title;}if(byId("emailDocShipLabels").checked){b+=byId("emailDocShipLabels").title;}if(byId("emailDocBoth").checked){b+=byId("emailDocBoth").title;}if(byId("emailToShipper").checked){b+=byId("emailToShipper").title;
}if(byId("emailToConsignee").checked){b+=byId("emailToConsignee").title;}if(byId("emailToThirdParty").checked){b+=byId("emailToThirdParty").title;}if(getValue("sendCopies1")){b+=getValue("sendCopies1");}if(getValue("sendCopies2")){b+=", "+getValue("sendCopies2");}if(getValue("sendCopies3")){b+=", "+getValue("sendCopies3");
}if(b==""){b="Please enter e-mail notification information.";}break;case"intl_shipment_module":if(getValue("intnlBrokerName")){b+=getValue("intnlBrokerName")+", ";}if(getValue("intnlShipPhone2")){b+=getValue("intnlShipPhone2")+", ";}if(getValue("intnlShipPhone3")){b+=getValue("intnlShipPhone3")+", ";
}if(getValue("intnlShipPhone4")){b+=getValue("intnlShipPhone4")+", ";}if(getValue("intnlShipExt")){b+=getValue("intnlShipExt");}if(b==""){b="Please enter international shipment information.";}break;case"shipment_options_module":var c=new Date();var a="";c=framework.widget.calendar.getSelectedDateObject("pickupDate");
if(c!=null){a=formatDate(c,"MM/dd/y");}b=a;if(getValue("bolSubmitPickupDockReady")){b+=", "+getValue("bolSubmitPickupDockReady");}if(getValue("bolSubmitPickupDockClose")){b+=", "+getValue("bolSubmitPickupDockClose");}if(b==""){b="Please enter pickup information.";}break;case"hazmat_phone_module":if(getValue("emergencyPhoneAreaCode")&&getValue("emergencyPhoneExchange")&&getValue("emergencyPhoneNumber")){b+=getValue("emergencyPhoneAreaCode")+"-";
b+=getValue("emergencyPhoneExchange")+"-"+getValue("emergencyPhoneNumber");if(getValue("emergencyResponseProviderPersonOrContractNo")!=null){b+=", "+getValue("emergencyResponseProviderPersonOrContractNo");}}else{b="Please enter HM emergency contact information.";}break;case"shipment_details_module":if(getValue("assignProYes")){if(getValue("proNumber")){b+="Assiged PRO: "+getValue("proNumber");
}else{b+="Assign a PRO";}}else{b="Please enter PRO number information. ";}break;case"shipment_options_module":b=getValue("labelCount");}return b;}function showHideSpecialInstructionsModule(){if(byId("speclInstr").value!=""){framework.util.showElement("shipment_options_module");}}function hideHelpFloatingWindow(){framework.widget.floatingWindow.hide("help_floatingWindow");
}function getModuleHelpMessages(c){var b;var a="";switch(c){case"ship.module._headerHelp":b="Shipment Module <b style='color:#660099;'>Help</b> Message";break;case"other.module._headerHelp":b="Other Module <b style='color:#660099;'>Help</b> Message";break;case"grid.module._headerHelp":a="index.jsp";break;
default:b="No help for this module.";break;}if(a!=""){window.open(a,null,"resizable=no,scrollbars=yes,status=no,height=600,width=800");return"popup";}else{return b;}}function getMaxVisibleShipmentRow(){var a=49;for(i=0;i<=a;i++){if(byId("shipment_table"+i).style.display=="none"){return i;}}return a+1;
}function addShipmentRow(){var a=getMaxVisibleShipmentRow();byId("shipment_table"+a).style.display="block";if(a==49){byId("addRow_link").disabled=true;byId("addRow_link").className="morelinklongdisabled";framework.eventmodel.removeElementEvent("addRow_link",framework.EventType.CLICK,addShipmentRow);}if(byId("deleteRow_link").disabled==true){byId("deleteRow_link").disabled=false;
byId("deleteRow_link").className="lesslinklong";framework.eventmodel.addElementEvent("deleteRow_link",framework.EventType.CLICK,deleteShipmentRow);}}function deleteShipmentRow(){var a=getMaxVisibleShipmentRow();a-=1;byId("shipment_table"+a).style.display="none";removeAllOptions(byId("packagingUnits"+a));
clearShipmentRowValues(a);if(a==1){byId("deleteRow_link").disabled=true;byId("deleteRow_link").className="lesslinklongdisabled";framework.eventmodel.removeElementEvent("deleteRow_link",framework.EventType.CLICK,deleteShipmentRow);}if(byId("addRow_link").disabled==true){byId("addRow_link").disabled=false;
byId("addRow_link").className="morelinklong";framework.eventmodel.addElementEvent("addRow_link",framework.EventType.CLICK,addShipmentRow);}}function toggleCompany(a){companyType="";if(a=="FXF"){companyType="FXF";}else{}if(a=="FXF"){var c=byId("codCountry");for(var b=0;b<c.options.length;b++){if(c.options[b].value=="US"){c.selectedIndes=b;
c.style.display="none";byId("codCountryUSDefault").style.display="";}}byId("liftgateDeliveryPrepaid").disabled=false;byId("liftgatePickupPrepaid").disabled=false;byId("insideDeliveryPrepaid").disabled=false;byId("insidePickupPrepaid").disabled=false;byId("liftgateDeliveryCollect").disabled=false;byId("liftgatePickupCollect").disabled=false;
byId("insideDeliveryCollect").disabled=false;byId("insidePickupCollect").disabled=false;}else{framework.util.showElement("guar_service_module");framework.util.showElement("service_selection_module");setModuleSummary("guar_service_module");setModuleSummary("service_selection_module");var c=byId("codCountry");
for(var b=0;b<c.options.length;b++){c.style.display="";byId("codCountryUSDefault").style.display="none";}byId("liftgateDeliveryPrepaid").disabled=true;byId("liftgatePickupPrepaid").disabled=true;byId("insideDeliveryPrepaid").disabled=true;byId("insidePickupPrepaid").disabled=true;byId("liftgateDeliveryCollect").disabled=true;
byId("liftgatePickupCollect").disabled=true;byId("insideDeliveryCollect").disabled=true;byId("insidePickupCollect").disabled=true;}verifyCODOption();if(byId("radTermTypeP").checked){byId("liftgateDeliveryPrepaid").checked=true;byId("liftgatePickupPrepaid").checked=true;byId("insideDeliveryPrepaid").checked=true;
byId("insidePickupPrepaid").checked=true;byId("liftgateDeliveryCollect").checked=false;byId("liftgatePickupCollect").checked=false;byId("insideDeliveryCollect").checked=false;byId("insidePickupCollect").checked=false;byId("labelSize3by5").checked=true;byId("assignProNo").checked=false;byId("assignProYes").checked=true;
}else{if(byId("radTermTypeC").checked){byId("liftgateDeliveryCollect").checked=true;byId("liftgatePickupCollect").checked=true;byId("insideDeliveryCollect").checked=true;byId("insidePickupCollect").checked=true;byId("liftgateDeliveryPrepaid").checked=false;byId("liftgatePickupPrepaid").checked=false;
byId("insideDeliveryPrepaid").checked=false;byId("insidePickupPrepaid").checked=false;byId("labelSize4by6").checked=false;}}}function verifyGuaranteedOption(){var a=byId("codAmount").value;if(a!=0){byId("economyGuaranteeDay").checked=false;byId("economyGuaranteeDay").disabled=true;byId("economyGuaranteeAm").checked=false;
byId("economyGuaranteeAm").disabled=true;}else{byId("economyGuaranteeDay").disabled="";byId("economyGuaranteeAm").disabled="";}}function toggleGuaranteedService(){if(byId("fxnlGuaranteedServiceTimeOption").checked==false){byId("fxnlGuaranteedServiceTime").disabled="disabled";byId("fxnlGuaranteedServiceTime").value="";
byId("fxnlGuaranteedServiceTimeAM").disabled="disabled";byId("fxnlGuaranteedServiceTimeAM").checked=false;byId("fxnlGuaranteedServiceTimePM").disabled="disabled";byId("fxnlGuaranteedServiceTimePM").checked=false;}else{byId("fxnlGuaranteedServiceTime").disabled="";byId("fxnlGuaranteedServiceTimeAM").disabled="";
byId("fxnlGuaranteedServiceTimePM").disabled="";}verifyCODOption();}function verifyCODOption(){var a=byId("codAmount").value;if(a==0){if((byId("economyGuaranteeAm").checked==true)||(byId("economyGuaranteeDay").checked==true)){byId("codAmount").disabled="disabled";byId("codCertFunds").checked=false;byId("codCertFunds").disabled="disabled";
byId("codCompCheck").checked=false;byId("codCompCheck").disabled="disabled";byId("codPersCheck").checked=false;byId("codPersCheck").disabled="disabled";byId("codCountry").disabled="disabled";byId("codCity").disabled="disabled";byId("codState").disabled="disabled";byId("codZip").disabled="disabled";byId("codAddress").disabled="disabled";
byId("codRemitTo").disabled="disabled";byId("codPrepaid").disabled="disabled";byId("codPrepaid").checked=false;byId("codCollect").disabled="disabled";byId("codCollect").checked=false;byId("codPhone1").disabled="disabled";byId("codPhone2").disabled="disabled";byId("codPhone3").disabled="disabled";byId("codPhone4").disabled="disabled";
byId("codExt").disabled="disabled";framework.util.showElement("economy_cod_toggle");}else{byId("codAmount").disabled="";byId("codCertFunds").disabled="";byId("codCompCheck").disabled="";byId("codPersCheck").disabled="";byId("codCountry").disabled="";byId("codCity").disabled="";byId("codState").disabled="";
byId("codZip").disabled="";byId("codAddress").disabled="";byId("codRemitTo").disabled="";byId("codPrepaid").disabled="";byId("codCollect").disabled="";byId("codPhone1").disabled="";byId("codPhone2").disabled="";byId("codPhone3").disabled="";byId("codPhone4").disabled="";byId("codExt").disabled="";framework.util.hideElement("economy_cod_toggle");
}framework.widget.module.expand("shipment_options_module");}}function disableDependentModules(){framework.widget.module.collapse("shipper_type_module");framework.util.hideElement("shipper_type_module._headerEdit");clearShipperType();framework.widget.module.collapse("from_module");framework.util.hideElement("from_module._headerEdit");
framework.widget.module.collapse("to_module");framework.util.hideElement("to_module._headerEdit");framework.widget.module.collapse("thirdparty_module");framework.util.hideElement("thirdparty_module._headerEdit");framework.widget.module.collapse("shipment_details_module");framework.util.hideElement("shipment_details_module._headerEdit");
framework.widget.module.collapse("hazmat_phone_module");framework.util.hideElement("hazmat_phone_module._headerEdit");framework.widget.module.collapse("service_selection_module");framework.util.hideElement("service_selection_module._headerEdit");framework.widget.module.collapse("intl_shipment_module");
framework.util.hideElement("intl_shipment_module._headerEdit");framework.widget.module.collapse("shipment_options_module");framework.util.hideElement("shipment_options_module._headerEdit");byId("submitButton").disabled=true;}function enableShipperType(){framework.widget.module.expand("shipper_type_module");
initRoleForPostBack();}function enableDependentModules(){if(roleAndTermsSelected()){framework.widget.module.expand("from_module");changePhoneFormatAndDisable("shipperPhoneCountryCode","ShipperPhoneFormat","shipper");framework.widget.module.expand("to_module");changePhoneFormatAndDisable("consigneePhoneCountryCode","ConsigneePhoneFormat","consignee");
if(byId("radShipTypeB").checked==true){framework.widget.module.expand("thirdparty_module");}else{framework.util.showElement("thirdparty_module._headerEdit");framework.widget.module.collapse("thirdparty_module");}framework.widget.module.expand("shipment_details_module");framework.widget.module.expand("hazmat_phone_module");
framework.util.showElement("service_selection_module._headerEdit");framework.util.showElement("intl_shipment_module._headerEdit");framework.util.showElement("shipment_options_module._headerEdit");if(byId("radTermTypeP").checked){byId("liftgateDeliveryPrepaid").checked=true;byId("liftgatePickupPrepaid").checked=true;
byId("insideDeliveryPrepaid").checked=true;byId("insidePickupPrepaid").checked=true;byId("liftgateDeliveryCollect").checked=false;byId("liftgatePickupCollect").checked=false;byId("insideDeliveryCollect").checked=false;byId("insidePickupCollect").checked=false;byId("labelSize3by5").checked=true;byId("labelSize4by6").checked=false;
byId("assignProNo").checked=false;byId("assignProYes").checked=true;}else{byId("liftgateDeliveryCollect").checked=true;byId("liftgatePickupCollect").checked=true;byId("insideDeliveryCollect").checked=true;byId("insidePickupCollect").checked=true;byId("liftgateDeliveryPrepaid").checked=false;byId("liftgatePickupPrepaid").checked=false;
byId("insideDeliveryPrepaid").checked=false;byId("insidePickupPrepaid").checked=false;byId("labelSize3by5").checked=true;byId("labelSize4by6").checked=false;byId("assignProNo").checked=false;byId("assignProYes").checked=true;}document.getElementById("submitButton").disabled=false;}}function evalShipperTerms(a){switch(a){case"S":byId("radTermTypeP").disabled="";
byId("radTermTypeC").checked=false;byId("radTermTypeC").disabled="";byId("radTermType7").checked=false;byId("radTermType7").disabled="";break;case"C":byId("radTermTypeP").checked=false;byId("radTermTypeP").disabled="disabled";byId("radTermTypeC").disabled="";byId("radTermType7").checked=false;byId("radTermType7").disabled="";
break;case"B":byId("radTermTypeP").checked=true;byId("radTermTypeP").disabled="";byId("radTermTypeC").checked=false;byId("radTermTypeC").disabled="disabled";byId("radTermType7").checked=false;byId("radTermType7").disabled="disabled";enableDependentModules();break;}}function getAvailableProducts(){var f=byId("fromCountry").value;
var d=byId("fromState").value;var k=byId("fromCity").value;var e=byId("fromZip").value;var a=byId("toCountry").value;var l=byId("toState").value;var h=byId("toCity").value;var c=byId("toZip").value;if(f!=""&&d!=""&&k!=""&&e!=""&&a!=""&&l!=""&&h!=""&&c!=""&&validZipLength(e,f)&&validZipLength(c,a)){document.getElementById("shipperAddressSearchErr").style.display="none";
byId("consigneeAddressSearchErr").style.display="none";var j="addressValidation";var g="";var b="fromCountry="+f+"&fromState="+d+"&fromCity="+k+"&fromZip="+e+"&toCountry="+a+"&toState="+l+"&toCity="+h+"&toZip="+c;framework.http.loadUrl(j,"/servlet/cityStateValidation",b,"getAddressValidationSuccess","getAddressValidationFailure",getAjaxTimeout(),"/myAccountLanding.do");
}}function getAddressValidationFailure(){}function getAddressValidationSuccess(){var countResult=framework.http.getHttpCallResults("addressValidation");if(countResult.status==200){try{var countInfo=eval("("+countResult.responseText+")");var fromCount=countInfo.fromCount;var toCount=countInfo.toCount;
if(fromCount<=0||toCount<=0){if(fromCount<=0){byId("shipperAddressSearchErr").style.display="inline";}if(toCount<=0){byId("consigneeAddressSearchErr").style.display="inline";}}else{collectAvailableProducts();}}catch(err){getAddressValidationFailure();}}else{getAddressValidationFailure();}}function collectAvailableProducts(){var f=byId("fromCountry").value;
var d=byId("fromState").value;var k=byId("fromCity").value;var e=byId("fromZip").value;var a=byId("toCountry").value;var l=byId("toState").value;var h=byId("toCity").value;var c=byId("toZip").value;if(f!=""&&d!=""&&k!=""&&e!=""&&a!=""&&l!=""&&h!=""&&c!=""&&validZipLength(e,f)&&validZipLength(c,a)){var j="productResult";
var g="";var b="fromCountry="+f+"&fromState="+d+"&fromCity="+k+"&fromZip="+e+"&toCountry="+a+"&toState="+l+"&toCity="+h+"&toZip="+c;framework.http.loadUrl(j,"/servlet/productEligibility",b,"getProductListSuccess","getProductListFailure",getAjaxTimeout(),"/myAccountLanding.do");}}function getProductListFailure(){framework.widget.module.collapse("service_selection_module");
hideProductsNeedEligibilityCheck();}function getProductListSuccess(){var productList=framework.http.getHttpCallResults("productResult");if(productList.status==200){try{var prodArray=eval("("+productList.responseText+")");updateServiceSelectionModule(prodArray);}catch(err){getProductListFailure();}}else{getProductListFailure();
}}function updateServiceSelectionModule(a){framework.widget.module.expand("service_selection_module");hideProductsNeedEligibilityCheck();if(a.PRTY=="true"){byId("prty_toggle").style.display="block";framework.util.showElement("prty_toggle");}if(a.PRTD=="true"){byId("prty_guar_plus_toggle").style.display="block";
framework.util.showElement("prty_guar_plus_toggle");}if(a.PRTA=="true"){byId("prty_am_toggle").style.display="block";framework.util.showElement("prty_am_toggle");}if(a.ECON=="true"){byId("econ_toggle").style.display="block";framework.util.showElement("econ_toggle");}if(a.ECOD=="true"){byId("econ_guar_day_toggle").style.display="block";
framework.util.showElement("econ_guar_day_toggle");}if(a.ECOA=="true"){byId("econ_guar_am_toggle").style.display="block";framework.util.showElement("econ_guar_am_toggle");}}function hideProductsNeedEligibilityCheck(){byId("prty_toggle").style.display="none";framework.util.hideElement("prty_toggle");byId("prty_am_toggle").style.display="none";
framework.util.hideElement("prty_am_toggle");byId("prty_guar_plus_toggle").style.display="none";framework.util.hideElement("prty_guar_plus_toggle");byId("econ_toggle").style.display="none";framework.util.hideElement("econ_toggle");byId("econ_guar_am_toggle").style.display="none";framework.util.hideElement("econ_guar_am_toggle");
byId("econ_guar_day_toggle").style.display="none";framework.util.hideElement("econ_guar_day_toggle");}function validZipLength(b,a){if(a=="CA"){return b.length>5;}return b.length>4;}function setPRONumberActivation(){if(getValue("proNumber")!=""){byId("proNumber").value="";}byId("proNumber").disabled="disabled";
}function imposeMaxLength(b,a){return(b.value.length<=a);}
