//WARNING: THIS IS A COMPRESSED FILE AND SHOULD NOT BE EDITED!!!
var frm;
function displayWelcomeMsg(blnAllowNSP) {
var strW = ""
var strWImg = ""
var strWMsg = ""
var objDate = new Date()
var intHr = objDate.getHours()
if (intHr < 11) {
strWMsg = 'Good morning and<br>welcome'
strWImg = '<img src="/images/hp_w1.gif" width="50" height="60" border="0">'
}
else if (intHr < 13) {
strWMsg = 'Welcome'
strWImg = '<img src="/images/hp_w2.gif" width="39" height="50" border="0">'
}
else if (intHr < 17) {
strWMsg = 'Good afternoon and<br>welcome'
strWImg = '<img src="/images/hp_w3.gif" width="60" height="43" border="0">'
}
else {
strWMsg = 'Good evening and<br>welcome'
strWImg = '<img src="/images/hp_w4.gif" width="46" height="39" border="0">'
}
strWMsg += ' to your site!<br>'
if (blnAllowNSP == 'False') {
strWMsg += 'You are logged on as'
strW += '<table cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">'
strW += strWImg + '</td><td align="left" valign="bottom">'
strW += '<font class="pgTxt2">' + strWMsg + '</font></td></tr><tr><td colspan="2" align="center"><font class="pgTxt2"><b>' + strCustName + '</b></font></td></tr></table>'
}
else {
strW += '<table cellpadding="0" cellspacing="0" border="0"><tr><td align="left" valign="top">'
strW += strWImg + '</td><td align="left" valign="bottom">'
strW += '<font class="pgTxt2">' + strWMsg + '</font></td></tr><tr><td colspan="2" align="center"></td></tr></table>'
}
document.write(strW)
}
function quickValidate(strFunction,blnTK) {
var strQuickToolQS = ''
switch (strFunction) {
case 'tr':
if (document.frmQuickTools.txtRef.value == '') {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a reference number.')
}
else {
if (document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value == 'A') {
if (!ValidABFPro(document.frmQuickTools.txtRef)) {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a valid ABF pro number.')
}
}
}
strQuickToolQS = '?hidSubmitted=Y&refno0='+document.frmQuickTools.txtRef.value+'&reftype0='+document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value
location.href = '/tools/trace/default.asp'+strQuickToolQS
break
case 'po':
if (document.frmQuickTools.txtRef.value == '') {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a reference number.')
}
else {
if (document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value == 'A')  {
if(!ValidABFPro(document.frmQuickTools.txtRef)) {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a valid ABF pro number.')
}
}
else {
if (document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value == 'K') {
return warnInvalid(document.frmQuickTools.cboTracePOD, 'POD can not be viewed using the Pickup Confirmation Number.')
}
}
}
strQuickToolQS = '?hidSubmitted=Y&cboDocType=DR&txtRefNum0='+document.frmQuickTools.txtRef.value+'&cboRefType='+document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value
location.href = '/tools/docret/default.asp'+strQuickToolQS
break
case 'fb':
if (document.frmQuickTools.txtRef.value == '') {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a reference number.')
}
else {
if (document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value == 'A') {
if(!ValidABFPro(document.frmQuickTools.txtRef)) {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a valid ABF pro number.')
}
}
else {
alert('You may only view an ABF invoice by the associated shipment pro number.')
return false
}
}
strQuickToolQS = '?strFormAction=GET&txtPro='+document.frmQuickTools.txtRef.value
location.href = '/tools/billreview/default.asp'+strQuickToolQS
break
case 'qu':
if (document.frmQuickTools.txtOrigZip.value == '') {
return warnInvalid(document.frmQuickTools.txtOrigZip, 'Please enter an Origin zip code.')
}
if (document.frmQuickTools.txtDestZip.value == '') {
return warnInvalid(document.frmQuickTools.txtDestZip, 'Please enter a Destination zip code.')
}
if (document.frmQuickTools.optAction[0].checked) {
validateQuote(blnTK,false);
}
else if (document.frmQuickTools.optAction[1].checked) {
if (document.frmQuickTools.optAction[1].value == 'U') {
validateQuote(false,true);
}
else {
validateTransitTime();
}
}
else if (document.frmQuickTools.optAction[2].checked) {
validateTransitTime();
}
else {
return warnInvalid(null, 'Please select an action.');
}
break
case 'ph':
if (document.frmQuickTools.txtRef.value == '') {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a reference number.')
}
else {
if (document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value == 'A') {
if(!ValidABFPro(document.frmQuickTools.txtRef)) {
return warnInvalid(document.frmQuickTools.txtRef, 'Please enter a valid ABF pro number.')
}
}
}
strQuickToolQS = '?hidSubmitted=Y&txtInputRefNo0='+document.frmQuickTools.txtRef.value+'&cboInputRefType0='+document.frmQuickTools.cboTracePOD.options[document.frmQuickTools.cboTracePOD.selectedIndex].value
location.href = '/tools/paidhistory/default.asp'+strQuickToolQS
break
case 'dr':
if (document.frmQuickTools.txtRefNum0.value == '') {
return warnInvalid(document.frmQuickTools.txtRefNum0, 'Please enter a reference number.')
}
else {
if (document.frmQuickTools.cboRefType.options[document.frmQuickTools.cboRefType.selectedIndex].value == 'A') {
if(!ValidABFPro(document.frmQuickTools.txtRefNum0)) {
return warnInvalid(document.frmQuickTools.txtRefNum0, 'Please enter a valid ABF pro number.')
}
}
}
strQuickToolQS = '?hidSubmitted=Y&txtRefNum0='+document.frmQuickTools.txtRefNum0.value+'&cboRefType='+document.frmQuickTools.cboRefType.options[document.frmQuickTools.cboRefType.selectedIndex].value+'&cboDocType='+document.frmQuickTools.cboDocType.options[document.frmQuickTools.cboDocType.selectedIndex].value
location.href = '/tools/docret/default.asp'+strQuickToolQS
break
case 'rs':
if (document.frmQuickTools.txtRsearchZip.value == '') {
return warnInvalid(document.frmQuickTools.txtRsearchZip, 'Please enter an zip code.')
}
if ((document.frmQuickTools.optSCLookup[0].checked) || (document.frmQuickTools.optSCLookup[1].checked)) {
validateRSearch();
}
else {
return warnInvalid(null, 'Please select an action.');
}
break
default:
return false
}
}
function validateQuote(blnTK,blnUPack) {
if (blnTK) { var strQuoteToolType = 'timekeeper' }
else { var strQuoteToolType = (blnUPack)?'upack':'ltlquotes'; }
strQuickToolQS = '?DataPassed=Y&FormAction=O'
if (ValidCAZip(document.frmQuickTools.txtOrigZip)) { strQuickToolQS += '&ShipCountry=CA' }
else { strQuickToolQS += '&ShipCountry=US' }
if (ValidCAZip(document.frmQuickTools.txtDestZip)) { strQuickToolQS += '&ConsCountry=CA' }
else { strQuickToolQS += '&ConsCountry=US' }
strQuickToolQS += '&ShipZip='+document.frmQuickTools.txtOrigZip.value+'&ConsZip='+document.frmQuickTools.txtDestZip.value
if (strQuoteToolType == 'upack') {
document.frmQuickTools.action = 'http://www.upack.com/moving-quotes/quote.asp?refnum=ABFLTLQUO&DataPassed=Y'+strNLOView+'&txtFromZip='+document.frmQuickTools.txtOrigZip.value+'&txtToZip='+document.frmQuickTools.txtDestZip.value;
document.frmQuickTools.submit();
}
else { location.href = '/tools/'+strQuoteToolType+'/default.asp'+strQuickToolQS; }
}
function validateTransitTime() {
var qs = '';
if (ValidCAZip(document.frmQuickTools.txtOrigZip)) { qs += '&cboAcctCountry=CA' }
else { qs += '&cboAcctCountry=US' }
if (ValidCAZip(document.frmQuickTools.txtDestZip)) { qs += '&cboAcctCountry=CA' }
else { qs += '&cboAcctCountry=US' }
qs += '&txtAcctZip='+document.frmQuickTools.txtOrigZip.value+'&txtAcctZip='+document.frmQuickTools.txtDestZip.value
var key = $.ajax({
url: "/tools/transit/QTRequest.asp?k="+qs,
async: false
}).responseText;
location.href = (key != 'error')?'/tools/transit/default.asp?k='+key+qs:'/tools/transit/default.asp';
}
function validateRSearch() {
strQuickToolQS = '?hidSubmitted=Y'
if (ValidCAZip(document.frmQuickTools.txtRsearchZip)) { strQuickToolQS += '&radCountry=CA' }
else { strQuickToolQS += '&radCountry=US' }
if (document.frmQuickTools.optSCLookup[0].checked) { strQuickToolQS += '&return_what=2' }
else { strQuickToolQS += '&return_what=1' }
strQuickToolQS += '&txtZipCode='+document.frmQuickTools.txtRsearchZip.value
location.href = '/tools/rsearch/default.asp'+strQuickToolQS;
}
function MakeHREF(count, queryString, rptName)
{
if ((count > 600) && (count < 4000))
{  var response = window.confirm("Based on the shipment count, your report could take between thirty seconds and four minutes to complete.  Specifying a date range or creating a custom report with specific shipment restrictions will ofen reduce this processing time significantly. Click 'OK' to continue processing the report, or click 'Cancel' to go to the Status Reports page and make modifications to these restrictions.")
if (response)
{
DisplayWait('Your report is processing.<BR>Please stand by.')
self.location = "/tools/reports/default.asp?" + queryString
}
else
{ self.location = "/tools/reports/default.asp?QS=Y&rptName=" + rptName }
}
if (count >= 4000)
{  var response = window.confirm("Based on the shipment count, this report is outside the limits of our reporting system.  Specifying a date range or creating a custom report with specific shipment restrictions will often overcome this limit.  Would you like to go to the Status Reports page to make these modifications?")
if (response)
{ self.location = "/tools/reports/default.asp?QS=Y&rptName=" + rptName }
}
if (count <= 600)
{  DisplayWait('Your report is processing.<BR>Please stand by.')
self.location = "/tools/reports/default.asp?" + queryString
}
}
function showMyReports(obj)
{
if (document.getElementById)
{  createMyReportsDIV()
setTimeout('loadCSSFile()', 500)
setTimeout('document.getElementById("myReports").innerHTML = getMyReportsGUI();', 500)
setTimeout('loadJScriptFile()', 500)
}
}
function createMyReportsDIV()
{
var objMyReportsDIV = document.getElementById("myReports")
if (objMyReportsDIV)
{  objMyReportsDIV.style.cursor = "wait"
objMyReportsDIV.innerHTML = writeMyReportWait()
objMyReportsDIV.className = 'visible'
}
else
{  var posX = 0
var posY = 0
var objEventElement = getEventElement()
posX += objEventElement.offsetWidth
posY += objEventElement.offsetHeight
while (objEventElement != null)
{  posX += objEventElement.offsetLeft
posY += objEventElement.offsetTop
objEventElement = objEventElement.offsetParent
}
var objElement = document.createElement("div")
objElement.name = "myReports"
objElement.id = "myReports"
objElement.style.position = "absolute"
objElement.style.width = "605"
objElement.style.cursor = "wait"
objElement.style.filter = "alpha(opacity=95)"
objElement.style.opacity = ".95"
objElement.innerHTML = writeMyReportWait()
document.frmHome.appendChild(objElement)
objElement.style.left = posX - objElement.offsetWidth
objElement.style.top = posY - objElement.offsetHeight
}
}
function writeMyReportWait()
{
var strHTML
strHTML = '<TABLE WIDTH="100%" HEIGHT="220" CLASS="sectionTable" BGCOLOR="#006044" CELLPADDING="0" CELLSPACING="1">'
strHTML += ' <TR>'
strHTML += '  <TD ALIGN="CENTER" CLASS="formCell">Retrieving reports...</TD>'
strHTML += ' </TR>'
strHTML += '</TABLE>'
return strHTML;
}
function getMyReportsGUI()
{
if ((navigator.appName != 'Microsoft Internet Explorer') || (navigator.userAgent.indexOf("Opera") > 0))
var httpRequest = new XMLHttpRequest();
else
var httpRequest = new ActiveXObject('Microsoft.XMLHTTP')
if (httpRequest)
{  httpRequest.open('GET', '/tools/reports/myreports.asp?ver=' + Math.random(), false);
httpRequest.send(null);
var gstrResponse = new String(httpRequest.responseText)
if (gstrResponse.slice(0,5) == 'ERROR')
{  alert("An error occurred while retrieving your report list.  Please try again.")
document.getElementById("myReports").className = "hidden"
return;
}
else
{  return httpRequest.responseText; }
}
else
{  alert("Unable to retrieve reports.  Please try again.")
document.getElementById("myReports").className = "hidden"
return;
}
}
function loadJScriptFile()
{
var objElement
objElement = document.createElement("SCRIPT");
objElement.src = "/include/reports/myrptdragdrop.js?V=1.01"
objElement.type = "text/javascript";
document.getElementsByTagName("HEAD")[0].appendChild(objElement);
document.getElementById("myReports").style.cursor = ""
}
function loadCSSFile()
{
var objElement
objElement = document.createElement("LINK");
objElement.href = "/include/reports/myreports.css"
objElement.rel = "stylesheet"
objElement.type = "text/css"
document.getElementsByTagName("HEAD")[0].appendChild(objElement);
}
function checkMyRptStatus()
{
var strLocation = new String(window.location)
strLocation = strLocation.toLowerCase()
if (strLocation.indexOf("#updatemyrpts") > -1)
{  window.location.replace("/default.asp")
strLocation = new String(window.location)
strLocation = strLocation.toLowerCase()
if ((!ie4) && (strLocation.indexOf("abfs.com/default.asp") > -1))
setTimeout('window.location.reload(true)', 100)
}
}
function SubmitForm()
{
frm.cmdLogon.click();
}
function init()
{
frm = document.frmQuickTools;
for(var i=0;i<frm.elements.length;i++)
{  if((frm.elements[i].name=="txtUserID") || (frm.elements[i].name=="txtPassword"))
{  rm.elements[i].onkeypress=checkKeyPress; }
}
}
function showCalReportWait()
{
createCalReportWait()
if (document.getElementById)
setTimeout('getCalReport();', 500)
}
function createCalReportWait()
{
var objCalReportDIV = document.getElementById("sectionReport")
if (objCalReportDIV)
{
document.getElementById("reportContainer").style.cursor = "wait"
objCalReportDIV.innerHTML = writeCalReportWait()
objCalReportDIV.className = 'visible'
}
}
function writeCalReportWait()
{
var strHTML
strHTML = '<TABLE WIDTH="100%" HEIGHT="100%" CLASS="sectionTable" BGCOLOR="#006044" CELLPADDING="0" CELLSPACING="1">'
strHTML += ' <TR>'
strHTML += '  <TD ALIGN="CENTER" CLASS="formCell">&nbsp;&nbsp;Retrieving Report...<BR><IMG SRC="/images/ani_wait_grey.gif"></TD>'
strHTML += ' </TR>'
strHTML += '</TABLE>'
return strHTML;
}
function getCalReport()
{
if ((navigator.appName != 'Microsoft Internet Explorer') || (navigator.userAgent.indexOf("Opera") > 0))
var httpRequest = new XMLHttpRequest();
else
var httpRequest = new ActiveXObject('Microsoft.XMLHTTP')
if (httpRequest)
{  strURL = updateReport()
httpRequest.onreadystatechange = function()
{  if (httpRequest.readyState == 4)
{  var gstrResponse = new String(httpRequest.responseText)
if (gstrResponse.indexOf("system error has occurred") > -1)
{  alert("An error occurred while retrieving your report. Please try again.")
cancelReport()
return;
}
else
{  var regExp = /navSL[BW]/gi;
document.getElementById("reportContainer").style.cursor = ""
document.getElementById("sectionReport").innerHTML = gstrResponse.replace(regExp, "nav")
}
}
}
httpRequest.open('GET', strURL, true);
httpRequest.send(null);
}
else
{  alert("Unable to retrieve report. Please try again.")
cancelReport()
return;
}
}
function cancelReport()
{
document.getElementById("reportContainer").style.cursor = ""
document.getElementById("reportContainer").className = "hidden"
document.getElementById("optionsReport").className = "hidden"
document.getElementById("sectionReport").innerHTML = ""
document.getElementById("tabCalendar").style.backgroundColor = '#C4C4C4'
document.getElementById("tabCalendar").style.color = '#000000'
document.getElementById("tabReport").style.backgroundColor = '#F3F3F3'
document.getElementById("tabReport").style.color = '#0000FF'
document.getElementById("sectionCalendar").className = "visible"
}
function updateReport()
{
var strReportURL;
var indexV
var ordV
var lstReport = document.getElementById("lstReport")
var strReportName = document.getElementById("hidReportName").value
if (strReportName > '')
{  indexV = indexFromName(strReportName)
lstReport.selectedIndex = indexV
document.getElementById("hidReportName").value = ''
}
else
{  if (lstReport.options[lstReport.options.selectedIndex].value == -1)
{  indexV = indexFromName("UNDELIVERED ONLY")
lstReport.selectedIndex = indexV
}
else
indexV = lstReport.options.selectedIndex;
}
ordV = lstReport.options[indexV].value;
strReportURL = "/tools/reports/Default.asp?runIt=Y&pv=Y&fromHP=Y"
strReportURL += "&rptName=" + escape(rptArray[ordV].name)
strReportURL += "&rptABF=" + rptArray[ordV].abfrpt
strReportURL += "&lstView=" + rptArray[ordV].outputType
strReportURL += "&chkInbound=" + rptArray[ordV].inbFlag
strReportURL += "&chkOutbound=" + rptArray[ordV].outFlag
strReportURL += "&chkTPB=" + rptArray[ordV].tpbFlag
strReportURL += "&chkTimekeeper=" + rptArray[ordV].timekeeperFlag
strReportURL += "&optRefNumSort=" + rptArray[ordV].sortType
strReportURL += "&chkGreenbar=" + rptArray[ordV].greenbar
strReportURL += "&chkPayment="
strReportURL += "&chkLinks=" + rptArray[ordV].smartLink
strReportURL += "&chkFullStatus=" + rptArray[ordV].fullStatus
strReportURL += "&chkPOLevel=" + rptArray[ordV].poLevelData
strReportURL += "&hidLimitAcct=" + rptArray[ordV].limitAcct
strReportURL += "&hidLimitLoc=" + rptArray[ordV].limitLoc
return strReportURL;
}
function indexFromName(name) {
for (var x = 0; x < document.getElementById("lstReport").options.length; x++) {
if (document.getElementById("lstReport").options[x].text == name)
return x;
}
return 0;
}
function setSnapshotReport()
{
var strSelectedReport = document.getElementById("lstReport").options[document.getElementById("lstReport").selectedIndex].text
if ((navigator.appName != 'Microsoft Internet Explorer') || (navigator.userAgent.indexOf("Opera") > 0))
var httpRequest = new XMLHttpRequest();
else
var httpRequest = new ActiveXObject('Microsoft.XMLHTTP')
if (httpRequest)
{  strURL = "/tools/reports/snapshotreport.asp?action=S&rptName=" + strSelectedReport
httpRequest.onreadystatechange = function()
{  if (httpRequest.readyState == 4)
{  var gstrResponse = new String(httpRequest.responseText)
if (gstrResponse.indexOf("system error has occurred") > -1)
{  alert("An error occurred while updating your options.  Please try again.")
return;
}
else
alert(strSelectedReport + ' has been set as your default report.')
}
}
httpRequest.open('GET', strURL, true);
httpRequest.send(null);
}
else
alert("Unable to save options. Please try again.")
return;
}
function setSnapshotView(view)
{
if ((navigator.appName != 'Microsoft Internet Explorer') || (navigator.userAgent.indexOf("Opera") > 0))
var httpRequest = new XMLHttpRequest();
else
var httpRequest = new ActiveXObject('Microsoft.XMLHTTP')
if (httpRequest)
{  strURL = "/tools/reports/snapshotreport.asp?action=V&snapView=" + view
httpRequest.open('GET', strURL, true);
httpRequest.send(null);
}
return;
}
function scheduleSnapshotReport() {
var indexV = document.getElementById("lstReport").options.selectedIndex;
var ordV = document.getElementById("lstReport").options[indexV].value;
var objRegExp = /\s/g
var strURL = new String('/tools/reports/inbox/scheduler.asp?ReportName=' + rptArray[ordV].name + '&Type=S')
strURL = strURL.replace(objRegExp, '%20')
upWinXY('scheduleWin',strURL, 620,530,false,false,false)
}
function printSnapshotReport()
{
var objReportDiv = document.getElementById("sectionReport")
var strOriginalHTML = objReportDiv.innerHTML
objReportDiv.innerHTML = "<SPAN ID=\"PageResults\">" + objReportDiv.innerHTML + "</SPAN>"
PrintPage()
objReportDiv.innerHTML = strOriginalHTML
}
function changeSnapshotReportOptions()
{
var indexV = document.getElementById("lstReport").options.selectedIndex;
var ordV = document.getElementById("lstReport").options[indexV].value;
var objRegExp = /\s/g
var strURL = new String('/tools/reports/default.asp?inbox=Y&qs=Y&rptName=' + rptArray[ordV].name)
strURL = strURL.replace(objRegExp, '%20')
window.location = strURL
}