function ismaxlength(n,t){n.value.length>t&&(n.value=n.value.substring(0,t),alert("Maximum text length is "+t+" characters."))}function openPopupWin(n,t,i,r,u,f,e){i==null&&(i=400);r==null&&(r=400);u==null&&(u="yes");f==null&&(f="no");e==null&&(e="no");var h=(screen.width-i)/2,c=(screen.height-r)/2,s="left="+h+",top="+c+", width="+i+",height="+r+", menubar="+f+",toolbar="+e+",location=no,status=no,scrollbars="+u+",resizable=yes",o=window.open("",t,s);o.focus==""&&o.close();o=window.open(n,t,s);o.focus()}function playAudio(n){var t=document.createElement("iframe");t.setAttribute("src",n);t.setAttribute("width","1px");t.setAttribute("height","1px");t.setAttribute("scrolling","no");t.style.border="0px";document.body.appendChild(t)}function GetQueryStringParamByName(n,t){t||(t=window.location.href);n=n.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+n+"(=([^&#]*)|&|#|$)"),i=r.exec(t);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null}function FormatDate(n,t,i){function r(n,t){var i=n+"";for(t=t||2;i.length<t;)i="0"+i;return i}var h=["\x00","January","February","March","April","May","June","July","August","September","October","November","December"],c=["\x01","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],l=["\x02","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a=["\x03","Sun","Mon","Tue","Wed","Thu","Fri","Sat"],v=i?n.getUTCFullYear():n.getFullYear(),o,y,u,p,w,b,f,s,k,e,d,nt,tt,g;return t=t.replace(/(^|[^\\])yyyy+/g,"$1"+v),t=t.replace(/(^|[^\\])yy/g,"$1"+v.toString().substr(2,2)),t=t.replace(/(^|[^\\])y/g,"$1"+v),o=(i?n.getUTCMonth():n.getMonth())+1,t=t.replace(/(^|[^\\])MMMM+/g,"$1"+h[0]),t=t.replace(/(^|[^\\])MMM/g,"$1"+c[0]),t=t.replace(/(^|[^\\])MM/g,"$1"+r(o)),t=t.replace(/(^|[^\\])M/g,"$1"+o),y=i?n.getUTCDate():n.getDate(),t=t.replace(/(^|[^\\])dddd+/g,"$1"+l[0]),t=t.replace(/(^|[^\\])ddd/g,"$1"+a[0]),t=t.replace(/(^|[^\\])dd/g,"$1"+r(y)),t=t.replace(/(^|[^\\])d/g,"$1"+y),u=i?n.getUTCHours():n.getHours(),t=t.replace(/(^|[^\\])HH+/g,"$1"+r(u)),t=t.replace(/(^|[^\\])H/g,"$1"+u),p=u>12?u-12:u==0?12:u,t=t.replace(/(^|[^\\])hh+/g,"$1"+r(p)),t=t.replace(/(^|[^\\])h/g,"$1"+p),w=i?n.getUTCMinutes():n.getMinutes(),t=t.replace(/(^|[^\\])mm+/g,"$1"+r(w)),t=t.replace(/(^|[^\\])m/g,"$1"+w),b=i?n.getUTCSeconds():n.getSeconds(),t=t.replace(/(^|[^\\])ss+/g,"$1"+r(b)),t=t.replace(/(^|[^\\])s/g,"$1"+b),f=i?n.getUTCMilliseconds():n.getMilliseconds(),t=t.replace(/(^|[^\\])fff+/g,"$1"+r(f,3)),f=Math.round(f/10),t=t.replace(/(^|[^\\])ff/g,"$1"+r(f)),f=Math.round(f/10),t=t.replace(/(^|[^\\])f/g,"$1"+f),s=u<12?"AM":"PM",t=t.replace(/(^|[^\\])TT+/g,"$1"+s),t=t.replace(/(^|[^\\])T/g,"$1"+s.charAt(0)),k=s.toLowerCase(),t=t.replace(/(^|[^\\])tt+/g,"$1"+k),t=t.replace(/(^|[^\\])t/g,"$1"+k.charAt(0)),e=-n.getTimezoneOffset(),d=i||!e?"Z":e>0?"+":"-",i||(e=Math.abs(e),nt=Math.floor(e/60),tt=e%60,d+=r(nt)+":"+r(tt)),t=t.replace(/(^|[^\\])K/g,"$1"+d),g=(i?n.getUTCDay():n.getDay())+1,t=t.replace(new RegExp(l[0],"g"),l[g]),t=t.replace(new RegExp(a[0],"g"),a[g]),t=t.replace(new RegExp(h[0],"g"),h[o]),t=t.replace(new RegExp(c[0],"g"),c[o]),t=t.replace(/\\(.)/g,"$1"),t.toUpperCase()}function FormatTime(n,t,i){if(n&&!IsValidTime(n)){var r=n.match(/(\d+)(?::(\d\d))?\s*(p?)/),u=new Date;return u.setHours(parseInt(r[1])+(r[3]?12:0)),u.setMinutes(parseInt(r[2])||0),FormatDate(u,t,i)}return n}function IsValidDate(){return Object.prototype.toString.call(d)==="[object Date]"?isNaN(d.getTime())?!1:!0:!1}function IsValidTime(n){return n.match(/^(0?[1-9]|1[012])(:[0-5]\d)[APap][mM]$/)}function emailPageLink(n){var t=n;window.location="mailto:?subject=CHIP/IRM notification – Please review&body="+t}$(function(){$.fn.autoGrow=function(){return this.each(function(){var i=this.cols,t=this.rows;i==null&&(i=100);t==null&&(t=2);var r=function(){n(this)},n=function(n,r){for(var u=0,e=n.value.split("\n"),f=e.length-1;f>=0;--f)u+=Math.floor(e[f].length/i+1);r&&u++;n.rows=u>t?u:t},u=function(n){var t=0,i=0,r=0,u=n.cols;return n.cols=1,i=n.offsetWidth,n.cols=2,r=n.offsetWidth,t=r-i,n.cols=u,t};$(this).keypress(function(t){t.which==13?n(this,!0):n(this,!1)});$(this).keyup(function(t){if(t.which==13)return!1;n(this,!1)});this.onfocus=r;this.onblur=r;n(this)})};$("textarea").autoGrow()})