﻿function refreshPage(confirmAction) { if (!confirmAction) { window.location.replace(window.location.href); } else { if (confirm("Are you sure you want to refresh this page? Any changes will be lost!")) { window.location.replace(window.location.href); } } }
function showHelp(s,e,c) { if (typeof (c) == "undefined") { alert("Sorry, there are no help items currently available for this section."); return; } e.processOnServer = false; var selectorShow = "#" + c.GetMainElement().id + " .helpText:hidden"; var selectorHide = "#" + c.GetMainElement().id + " .helpText:visible"; if ($(selectorShow).length != 0) { $(selectorShow).slideDown("fast"); return; } if ($(selectorHide).length != 0) { $(selectorHide).slideUp("fast"); return; } alert("Sorry, there are no help items currently available for this section."); }
function getCookie(sCookieName) { var sName = sCookieName + "=",ichSt,ichEnd; var sCookie = document.cookie; if (sCookie.length && (-1 != (ichSt = sCookie.indexOf(sName)))) { if (-1 == (ichEnd = sCookie.indexOf(";",ichSt + sName.length))) ichEnd = sCookie.length; return unescape(sCookie.substring(ichSt + sName.length,ichEnd)); } return null; }
function setCookie(sName,vValue) { var argv = setCookie.arguments,argc = setCookie.arguments.length; var sExpDate = (argc > 2) ? "; expires=" + argv[2].toGMTString() : ""; var sPath = (argc > 3) ? "; path=" + argv[3] : ""; var sDomain = (argc > 4) ? "; domain=" + argv[4] : ""; var sSecure = (argc > 5) && argv[5] ? "; secure" : ""; document.cookie = sName + "=" + escape(vValue,0) + sExpDate + sPath + sDomain + sSecure + ";"; }
function deleteCookie(sName) { document.cookie = sName + "=" + getCookie(sName) + "; expires=" + (new Date()).toGMTString() + ";"; }
function navigateContractHistory(sender,args) { var cn = sender.GetValue(); if (cn == null) return; var url = "/CustomerService/ViewEdit.aspx?n=" + cn; window.location.href = url; }
function showTime() { if (document.getElementById("liveclock") == null) return; var Digital = new Date(); var hours = Digital.getHours(); var minutes = Digital.getMinutes(); var seconds = Digital.getSeconds(); var dn = "PM"; if (hours < 12) dn = "AM"; if (hours > 12) hours = hours - 12; if (hours == 0) hours = 12; if (minutes <= 9) minutes = "0" + minutes; if (seconds <= 9) seconds = "0" + seconds; var myclock = hours + ":" + minutes + ":" + seconds + " " + dn; document.getElementById("liveclock").innerHTML = myclock; setTimeout("showTime()",1000); }
