var LastToolTipBoxID = null;
function MM_ShowHideToolTipBox(id) { if (LastToolTipBoxID != null) MM_showHideLayers(LastToolTipBoxID, '', 'hide'); LastToolTipBoxID = id; MM_showHideLayers(LastToolTipBoxID, '', 'show'); }
function MM_showHideLayers() { var i, p, v, obj, args = MM_showHideLayers.arguments; for (i = 0; i < (args.length - 2); i += 3) if ((obj = MM_findObj(args[i])) != null) { v = args[i + 2]; if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; } obj.visibility = v; } }
function MM_findObj(n, d) { var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) { d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p); } if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n]; for (i = 0; !x && d.layers && id.layers.length; i++) x = MM_findObj(n, d.layers[i].document); if (!x && d.getElementById) x = d.getElementById(n); return x; }
function MM_swapImage() { var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3) if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; } }
function MM_swapImgRestore() { var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc; }
function clearText(controlID, defaultText) { if (document.getElementById(controlID).value == defaultText) { document.getElementById(controlID).value = ""; } }
function resetText(controlID, defaultText) { if (document.getElementById(controlID).value == "") { document.getElementById(controlID).value = defaultText; } }
function getCookie(pCookieName) { var str = ""; var pos = document.cookie.indexOf(pCookieName + "="); if (pos != -1) { var s = pos + pCookieName.length + 1; var e = document.cookie.indexOf(";", s); if (e == -1) { e = document.cookie.length; } str = document.cookie.substring(s, e); str = unescape(str); } return str; }
function setCookie(pCookieName, pCookieValue, pDaysTilExpire) { if (pDaysTilExpire == null) { document.cookie = pCookieName + "=" + pCookieValue + "; path=/"; } else { var dtm = new Date(); dtm.setDate(dtm.getDate() + pDaysTilExpire); document.cookie = pCookieName + "=" + pCookieValue + "; path=/; expires=" + dtm; } }
function setTimezoneCookie() { if (getTimezoneCookie() == "") { var dtm = new Date(); var off = (dtm.getTimezoneOffset() * -1) / 60; setCookie("TimeZoneOffset", off, 1); } }
function getTimezoneCookie() { return getCookie("TimeZoneOffset"); } AddEvent(window, "load", setTimezoneCookie);
function AddEvent(obj, evt, fxn) { if (obj.attachEvent) { obj.attachEvent('on' + evt, fxn); } else if (obj.addEventListener) { obj.addEventListener(evt, fxn, false); } }
function confirmApptCancel(pApptID, pName, pExtID, pDate) { var pth = encodeURIComponent(window.location.href); if (confirm('Are you sure you would like to cancel your appointment on ' + pDate + ' with ' + pName + ' .ext ' + pExtID + '?')) { window.location.href = '/appointment/cancel.aspx?apptid=' + pApptID + '&redirpath=' + pth; } return false; }
function confirmCancel(pName, pExtID) { var ans = confirm('Are you sure you want to cancel your Callback from ' + pName + ' ext. ' + pExtID + '?'); var pth = encodeURIComponent(window.location.href); if (ans) { window.location.href = '/outdial/cancel.aspx?extid=' + pExtID + '&redirpath=' + pth; } return false; }
function confirmCancelWithRedirect(pName, pExtID, pRedirectExtID) { var ans = confirm('Are you sure you want to cancel your Callback from ' + pName + ' ext. ' + pExtID + '?'); var pth = encodeURIComponent(window.location.href); if (ans) { window.location.href = '/outdial/cancel.aspx?redirextid=' + pRedirectExtID + '&extid=' + pExtID + '&redirpath=' + pth; } return false; }
function HideElement(id) { ChangeDisplay(id, 'none'); }
function ShowElement(id) { ChangeDisplay(id, 'block'); }
function TurnOnElement(id) { ChangeClass(id, 'on'); }
function TurnOffElement(id) { ChangeClass(id, 'off'); }
function ChangeDisplay(id, styleValue) { document.getElementById(id).style.display = styleValue; }
function ChangeClass(id, classValue) { var e = document.getElementById(id); if (e.className != 'hidden') { e.className = classValue; } }
function MM_goToURL() { var i, args = MM_goToURL.arguments; document.MM_returnValue = false; for (i = 0; i < (args.length - 1); i += 2) eval(args[i] + ".location='" + args[i + 1] + "'"); }