function ValidateTracking() { if (document.FormParcelTracking.TrackingNumber.value=='') { alert('Please fill in your Tracking Number.'); return false; } return true; } function isEmail(ParamString) { return (ParamString.indexOf("@")>0 && ParamString.lastIndexOf(".") > (ParamString.indexOf("@")+2) && ParamString.length > (ParamString.lastIndexOf(".")+2)); } function AddFavorites(ParamTitle, ParamURL) { if (document.all) window.external.AddFavorite(ParamURL, ParamTitle); else if (window.sidebar) window.sidebar.addPanel(ParamTitle, ParamURL, ''); } function ShowPopup(ParamEvent, ParamWidth, ParamHeight, ParamLayer, ParamVisible) { var box = document.getElementById(ParamLayer); var cleft = 0; var ctop = 0; var obj = ParamEvent; while (obj.offsetParent) { cleft += obj.offsetLeft; ctop += obj.offsetTop; obj = obj.offsetParent; } box.style.left = cleft + 'px'; ctop += ParamEvent.offsetHeight + 8; if (document.body.currentStyle && document.body.currentStyle['marginTop']) { ctop += parseInt( document.body.currentStyle['marginTop']); } box.style.top = ctop + 'px'; box.style.position = 'absolute'; box.style.border = '1px dashed #999999'; box.style.backgroundColor = 'LightYellow'; box.style.padding = '5px'; if (ParamWidth>0) box.style.width = ParamWidth + 'px'; if (ParamHeight>0) box.style.height = ParamHeight + 'px'; if (ParamVisible) { box.style.display='block'; } else { box.style.display='none'; } }