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("svc_selection_module",getModuleHelpMessagesNonSecBOL,"","afterModuleInit");framework.widget.module.init("shipper_type_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.init("from_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");populateLabels("fromStateLabel","fromZipLabel","US");populateStateDropDown("fromState","US");framework.widget.module.init("to_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
populateLabels("toStateLabel","toZipLabel","US");populateStateDropDown("toState","US");framework.widget.module.init("thirdparty_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");populateLabels("tpStateLabel","tpZipLabel","US");populateStateDropDown("thirdPartyState","US");framework.widget.module.init("shipment_details_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
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");showHideHazmatPhoneModule();framework.widget.module.init("addl_services_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.init("declared_value_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.init("cod_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");populateStateDropDown("codState","US");populateLabels("codStateLabel","codZipLabel","US");framework.widget.module.init("guar_service_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.init("intl_shipment_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.init("pro_num_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.init("submit_pickup_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.init("create_labels_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.init("email_notify_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");framework.widget.module.init("spec_instr_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");
framework.widget.module.init("custom_delivery_module",getModuleHelpMessagesNonSecBOL,"beforeModuleInit","afterModuleInit");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("pickupDate",c,"%mm/%dd/%yyyy","%sm %yyyy",framework.WidgetConstants.SUNDAY,true,"",null,null);
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("pickupDate._text").disabled=true;byId("pickupDate._icon").disabled=true;
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();
framework.util.hideElement("submit_pickup_module");document.getElementById("usShipperPhoneFormat").style.display="inline";document.getElementById("intlShipperPhoneFormat").style.display="none";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.busy.stop("svc_selection_module");}function accountSelected(){if(byId("fxf_account_select").checked==true||byId("fxnl_account_select").checked==true){return true;}return false;
}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"svc_selection_module":if(byId("fxf_account_select").checked!=false){b=byId("fxf_account_select").value;}else{if(byId("fxnl_account_select").checked!=false){b=byId("fxnl_account_select").value;
}else{b="Please select an account.";}}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("fromAttnTo")){b+=getValue("fromAttnTo")+", ";
}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("toAttnTo")){b+=getValue("toAttnTo")+", ";}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"addl_services_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"cod_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"declared_value_module":if(getValue("declValAmount")){b="USD "+getValue("declValAmount");}if(b==""){b="Please enter declared value information.";
}break;case"guar_service_module":if(byId("fxnlGuaranteedServiceDay").checked){b=byId("fxnlGuaranteedServiceDay").title;}if(byId("fxnlGuaranteedServiceAM").checked){b=byId("fxnlGuaranteedServiceAM").title;}if(byId("fxnlGuaranteedServiceTimeOption").checked){b=byId("fxnlGuaranteedServiceTimeOption").title;
}if(b==""){b="Please select guaranteed services.";}break;case"email_notify_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"submit_pickup_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");}else{b="Please enter a hazardous materials phone number.";}break;case"pro_num_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"create_labels_module":b=getValue("labelCount");}return b;}function showHideSpecialInstructionsModule(){if(byId("speclInstr").value!=""){framework.util.showElement("spec_instr_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"){framework.util.hideElement("submit_pickup_module");framework.util.hideElement("custom_delivery_module");
byId("fxnl_day_toggle").style.display="none";byId("fxnl_am_toggle").style.display="none";byId("fxnl_time_toggle").style.display="none";byId("fxnlGuaranteedServiceDay").checked=false;byId("fxnlGuaranteedServiceAM").checked=false;byId("fxnlGuaranteedServiceTimeOption").checked=false;byId("fxnlGuaranteedServiceTime").value="";
byId("fxnlGuaranteedServiceTimeAM").checked=false;byId("fxnlGuaranteedServiceTimePM").checked=false;setModuleSummary("guar_service_module");byId("fxnl_std_toggle").style.display="none";byId("fxnlGuaranteedServiceStd").checked=false;framework.util.hideElement("fxnl_std_toggle");byId("fxf_std_toggle").style.display="block";
byId("fxfGuaranteedServiceStd").checked=true;framework.util.showElement("fxf_std_toggle");byId("fxf_guar_plus_toggle").style.display="block";byId("fxnl_day_toggle").style.display="none";byId("fxnl_am_toggle").style.display="none";byId("fxnl_time_toggle").style.display="none";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("custom_delivery_module");byId("fxnl_day_toggle").style.display="block";
byId("fxnl_am_toggle").style.display="block";byId("fxnl_time_toggle").style.display="block";byId("fxf_guar_plus_toggle").style.display="none";setModuleSummary("guar_service_module");byId("fxf_std_toggle").style.display="none";byId("fxfGuaranteedServiceStd").checked=false;framework.util.hideElement("fxf_std_toggle");
byId("fxnl_std_toggle").style.display="block";byId("fxnlGuaranteedServiceStd").checked=true;framework.util.showElement("fxnl_std_toggle");byId("fxnlGuaranteedServiceStd").checked=true;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;}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;}}}function verifyGuaranteedOption(){if(document.getElementById("fxnl_account_select").checked){var a=byId("codAmount").value;
if(a!=0){byId("fxnlGuaranteedServiceDay").disabled="disabled";byId("fxnlGuaranteedServiceDay").checked=false;byId("fxnlGuaranteedServiceAM").disabled="disabled";byId("fxnlGuaranteedServiceAM").checked=false;byId("fxnlGuaranteedServiceTimeOption").disabled="disabled";byId("fxnlGuaranteedServiceTimeOption").checked=false;
framework.util.showElement("fxnl_guar_cod_toggle");}else{byId("fxnlGuaranteedServiceDay").disabled="";byId("fxnlGuaranteedServiceAM").disabled="";byId("fxnlGuaranteedServiceTimeOption").disabled="";framework.util.hideElement("fxnl_guar_cod_toggle");}}}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 c=byId("fxnl_account_select").value;var b=byId("fxf_account_select").value;var a=byId("codAmount").value;if(((c!="")||(b!=""))&&(a==0)){if((byId("fxnlGuaranteedServiceDay").checked==true)||(byId("fxnlGuaranteedServiceAM").checked==true)||(byId("fxnlGuaranteedServiceTimeOption").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("fxnl_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("fxnl_cod_toggle");}}}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("addl_services_module");framework.util.hideElement("addl_services_module._headerEdit");
framework.widget.module.collapse("declared_value_module");framework.util.hideElement("declared_value_module._headerEdit");framework.widget.module.collapse("cod_module");framework.util.hideElement("cod_module._headerEdit");framework.widget.module.collapse("guar_service_module");framework.util.hideElement("guar_service_module._headerEdit");
framework.widget.module.collapse("intl_shipment_module");framework.util.hideElement("intl_shipment_module._headerEdit");framework.widget.module.collapse("pro_num_module");framework.util.hideElement("pro_num_module._headerEdit");framework.widget.module.collapse("submit_pickup_module");framework.util.hideElement("submit_pickup_module._headerEdit");
framework.widget.module.collapse("create_labels_module");framework.util.hideElement("create_labels_module._headerEdit");framework.widget.module.collapse("email_notify_module");framework.util.hideElement("email_notify_module._headerEdit");framework.widget.module.collapse("spec_instr_module");framework.util.hideElement("spec_instr_module._headerEdit");
framework.widget.module.collapse("custom_delivery_module");framework.util.hideElement("custom_delivery_module._headerEdit");byId("submitButton").disabled=true;}function enableShipperType(){if(byId("fxf_account_select").checked!=false||byId("fxnl_account_select").checked!=false){framework.widget.module.expand("shipper_type_module");
}else{disableDependentModules();}initRoleForPostBack();}function enableDependentModules(){if(roleAndTermsSelected()){framework.widget.module.expand("from_module");framework.widget.module.expand("to_module");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("addl_services_module._headerEdit");framework.util.showElement("declared_value_module._headerEdit");framework.util.showElement("cod_module._headerEdit");
framework.util.showElement("guar_service_module._headerEdit");framework.util.showElement("intl_shipment_module._headerEdit");framework.util.showElement("pro_num_module._headerEdit");framework.util.showElement("submit_pickup_module._headerEdit");framework.util.showElement("create_labels_module._headerEdit");
framework.util.showElement("email_notify_module._headerEdit");framework.util.showElement("spec_instr_module._headerEdit");framework.util.showElement("custom_delivery_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;}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;
}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 getGAMD(d,b,c){if(companyType=="FXF"){var a="";queryString="pGamdCountry="+d+"&pGamdZip="+b+"&pGamdCity="+c;framework.http.loadUrl("gamdResult","/checkGAMD.do",queryString,"gamdCallSuccess","gamdCallFailure",10000,"/myAccountLanding.do");
}else{byId("fxf_gamd_toggle").style.display="none";framework.util.hideElement("fxf_gamd_toggle");}}function gamdCallFailure(a){byId("fxf_gamd_toggle").style.display="none";framework.util.hideElement("fxf_gamd_toggle");outErrorMsg="An error occurred while processing this BOL Zip code input, please try again later.";
document.getElementById("to_zip_input").innerHTML=outErrorMsg;}function gamdCallSuccess(){var gamdInfo;var gamdResponse=framework.http.getHttpCallResults("gamdResult");if(gamdResponse.status==200){gamdInfo=eval("("+gamdResponse.responseText+")");var gamdErrors=gamdInfo.errors;if(gamdErrors.indexOf("NONE")>-1){if(gamdInfo.bGAMD==true){byId("fxf_gamd_toggle").style.display="block";
framework.util.showElement("fxf_gamd_toggle");}else{byId("fxf_gamd_toggle").style.display="none";framework.util.hideElement("fxf_gamd_toggle");}}else{byId("fxf_gamd_toggle").style.display="none";framework.util.hideElement("fxf_gamd_toggle");outErrorMsg="An error occurred while processing this BOL Zip code input, please try again later. gamdInfo.errors: "+gamdInfo.errors;
document.getElementById("to_zip_input").innerHTML=outErrorMsg;}}else{byId("fxf_gamd_toggle").style.display="none";framework.util.hideElement("fxf_gamd_toggle");outErrorMsg="An error occurred while processing this BOL Zip code input, please try again later. gamdResponse.status: "+gamdResponse.status;document.getElementById("to_zip_input").innerHTML=outErrorMsg;
}}