var isSafari=(navigator.appVersion.indexOf("Safari")==-1?false:true);var port=document.location.port;var host=document.location.protocol+"//"+document.domain+(port?":"+port:"")+"/";var propLabelPat=new RegExp("[^a-zA-Z!$%&*. ]");function canonQuotes(A){var C=/[\u0060\u2018\u2019\u201B]/g;var B=/[\u201C\u201D\u201F]/g;return A.replace(C,"'").replace(B,"\"")}function getFormValues(C){var A="";for(i=0;i<C.elements.length;i++){var B=C.elements[i];if(B.type=="checkbox"||B.type=="radio"){if(B.checked){A=A+B.name+"="+B.value+"&"}}else{if(B.disabled){if(B.disabledval!=null){A=A+B.name+"="+B.disabledval+"&"}}else{if(B.value&&B.name){A+=B.name+"="+B.value+"&"}}}}return encodeURI(canonQuotes(A))}function submitString(D,B){if(!D){return""}var A="";for(var C=0;C<D.elements.length;C++){if(D.elements[C].disabled){continue}else{if(D.elements[C].getAttribute("special")&&D.elements[C].value&&D.elements[C].name){var E=(B?B(D.elements[C]):encodeURIComponent(canonQuotes(D.elements[C])));if(E){A+=(A==""?"":"&")+E}}else{if(D.elements[C].type=="select-multiple"){A+=(A==""?"":"&")+D.elements[C].name+"="+getOptionValues(D.elements[C])}else{if(D.elements[C].type=="checkbox"||D.elements[C].type=="radio"){if(D.elements[C].checked){A+=(A==""?"":"&")+D.elements[C].name+"="+D.elements[C].value}}else{if(D.elements[C].name&&D.elements[C].value){A=A+(A==""?"":"&")+D.elements[C].name+"="+encodeURIComponent(canonQuotes(D.elements[C].value)).replace(/[\r\n]/g,"")}}}}}}return A}function getOptionValues(A){var D="";var B=A.options;for(var C=0;C<B.length;C++){if(B[C].selected&&B[C].value!=""){D+=(D==""?"":",")+B[C].value}}return D}function getElementValue(B,C){for(i=0;i<B.elements.length;i++){var A=B.elements[i];if(A.name==C){if(A.type=="checkbox"||A.type=="radio"){if(A.checked){return A.value}}else{return A.value}}}return null}function addSelections(D,C,B,F,E){for(var A=0;A<D.length;A++){if(D.options[A].selected){addOption(C,D.options[A]);D.options[A].selected=false;if(B){if(!E[D.options[A].value]){addElementUnique(F,D.options[A].value)}else{removeElement1(B,D.options[A].value)}}}}}function addOption(A,B,F,E,D){if(A.length>0&&A.options[0].value==0){while(A.length>0){A.remove(0)}}var C=arguments.length==2?new Option(B.text,B.value,B.defaultSelected,B.selected):new Option(B,F,E,D);if(document.all){A.options.add(C)}else{A.add(C,null)}}function removeSelections(A,C,E,D){var B=0;while(B<A.length){if(A.options[B].selected){if(C){if(D[A.options[B].value]){addElementUnique(C,A.options[B].value)}else{removeElement1(E,A.options[B].value)}}A.remove(B)}else{B++}}}function selectValuedOpt(A,B){for(var C=0;C<A.length;C++){if(A.options[C].value==B){A.options[C].selected=true}else{A.options[C].selected=false}}}function getAllValues(D,B){if(!B){B=";"}var A="";for(var C=0;C<D.options.length;C++){if(D.options[C].value&&D.options[C].value!=""){A+=B+D.options[C].value}}return A.substr(1)}function addHiddenElement(C,E,B,D){if(!B||B==""){return }var A=document.createElement("input");A.type="hidden";if(D){A.id=D}A.name=E;A.value=B;C.appendChild(A)}function addFormValues(C,B){for(i=0;i<C.elements.length;i++){var A=C.elements[i];if(A.getAttribute("multi")){continue}if(A.type=="checkbox"||A.type=="radio"){if(A.checked){addHiddenElement(B,A.name,A.value)}}else{if(A.disabled){if(A.disabledval){addHiddenElement(B,A.name,A.disabledval)}}else{if(A.value&&A.value!="Cancel"&&A.value!="Submit"){addHiddenElement(B,A.name,A.value)}}}}}function listOfEls(D){var C=document.getElementsByName(D);var A="";for(var B=0;B<C.length;B++){if(C[B].value&&C[B].value!=""&&!C[B].disabled){A+=(A.length>0?",":"")+C[B].value}C[B].disabled=true}return A}function addElement(A,B){if(!A||A==null){A=new Array()}A.splice(0,0,B);return A}function arrayContains(B,C,A){for(i=0;i<B.length;i++){if(!A){if(B[i]==C){return true}}else{if(B[i]!=C){return true}}}return false}function addElementUnique(A,B){if(A==null){return new Array(B)}else{if(arrayContains(A,B)){return A}else{A.splice(0,0,B);return A}}}function removeElement(A,B){if(A==null){return null}for(i=0;i<A.length;i++){if(A[i]==B){A.splice(i,1)}}if(A.length==0){return null}return A}function removeElement1(A,B){if(A==null){return null}for(i=0;i<A.length;i++){if(A[i]==B){A.splice(i,1)}}return A}function replaceElement(B,D,A){if(!B){if(D){return[D]}else{return null}}for(var C=0;C<B.length;C++){if(A&&A(B[C])||B[C]==D){if(D){B.splice(C,1,D)}else{B.splice(C,1)}return B}}B.splice(0,0,D);return B}function makeMultiValues(C){var A="";for(var B in C){if(C[B]!=null){A=B+"="+escape(C[B])+(A==""?"":"&")+A}}return A}function getFormMultiValues(C){var A="";var D=new Object();for(i=0;i<C.elements.length;i++){var B=C.elements[i];if(B.type=="checkbox"){if(B.checked){if(B.getAttribute("multi")){D[B.name]=addElement(D[B.name],B.value)}else{A=A+B.name+"="+B.value+"&"}}}else{A=A+B.name+"="+B.value+"&"}}return encodeURI(A+makeMultiValues(D))}function disableForms(B){var C=B.getElementsByTagName("INPUT");for(var A=0;A<C.length;A++){if(C[A].type=="BUTTON"){disable(C[A])}}}function addEvent(F,E,H,C,B,G,A,I){if(!I){I=newEventURL}var A=getInsideWindowWidth()/2;if(document.all){A-=215}H=parseInt(H);var D=window.open(I+"?startDT="+(E<10?"0":"")+E+"-"+(H<10?"0":"")+H+"-"+F+"&hour="+C,"ADD_EVENT_WINDOW","location=no,scrollbars=no,resizable=yes,status=no,menubar=no,width=500,height=500,top=0,left="+A,true);D.focus()}function makeAppt(){var B=getInsideWindowWidth()/2;if(document.all){B-=215}var A=window.open(makeApptURL,"MAKE_APPT_WINDOW","location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,top=200,width=430,height=500,left="+B,true);A.focus()}function report(){var B=getInsideWindowWidth()/2;if(document.all){B-=215}var A=window.open(reportURL,"REPORT_WIN","location=no,resizable=yes,status=no,scrollbars=no,menubar=no,top=0,width=100,height=100,left="+B,true);A.focus()}function controlPanel(){var B=getInsideWindowWidth()/2;if(document.all){B-=215}var A=window.open(adminURL+(arguments[0]?"?go="+arguments[0]:""),"ADMIN_WIN","location=no,resizable=yes,scrollbars=yes,status=no,menubar=no,top=0,width=470,height=100,left="+B,true);A.focus()}function groupCalendars(){var B=getInsideWindowWidth()/2;if(document.all){B-=215}var A=window.open(groupCalsURL,"cals_WIN","location=no,resizable=yes,scrollbars=yes,status=no,menubar=no,top=0,width=470,height=100,left="+B,true);A.focus()}function inputArt(){var B=getInsideWindowWidth()/2;if(document.all){B-=215}var A=window.open(inputArtURL,"INPUTART_WIN","location=no,resizable=yes,status=no,menubar=no,top=0,width=470,height=100,left="+B,true);A.focus()}function moderate(A){var C=getInsideWindowWidth()/2;if(document.all){C-=215}var B=window.open(A,"MODERATE_WIN","location=no,resizable=yes,status=no,scrollbars=yes,menubar=no,top=0,width=480,height=100,left="+C,true);B.focus()}function help(){var B=getInsideWindowWidth()/2;if(document.all){B-=250}var A=window.open("http://www.happyjacksoftware.com/help/helpportal.html","HELP_WINDOW");A.focus()}function editEvent(C,I,E,A,H,B){var G=0;var D;if(document.all){D=getInsideWindowWidth()/2-215}else{D=getInsideWindowWidth()/2}if(H){if(H.stopPropagation){H.stopPropagation()}H.cancelBubble=true}var F=window.open(editEventURL+"?eventID="+C+"&instanceID="+I+"&calendarID="+E+"&visibility="+B+"&instanceStartDT="+A,"EDIT_EVENT_WINDOW","location=no,status=no,scrollbars=no,resizable=yes,menubar=no,toolbar=no,width=500,height=500,top="+G+",left="+D,true);F.focus()}function deleteEvent(F,D,C,B,E,A){if(confirm("Are you sure you want to delete this event")){callServer(deleteEventURL+"?refresh=yes&eventID="+F)}}function deleteInstance(F,D,C,B,E,A){if(confirm("Are you sure you want to delete this instance")){callServer(deleteEventFromRecurURL+"?refresh=yes&exEventID="+F+"&exInstanceID="+D+"&exDT="+B)}}function copyEvent(C,J,E,A,H,B,I){var G=0;var D;if(document.all){D=getInsideWindowWidth()/2-215}else{D=getInsideWindowWidth()/2}if(H){if(H.stopPropagation){H.stopPropagation()}H.cancelBubble=true}var F=window.open(copyEventURL+"?eventID="+C+"&instanceID="+J+(I?"&instance=yes":"")+"&calendarID="+E+"&visibility="+B+"&instanceStartDT="+A,"EDIT_EVENT_WINDOW","location=no,status=no,scrollbars=no,resizable=yes,menubar=no,toolbar=no,width=500,height=500,top="+G+",left="+D,true);F.focus()}function copyInstance(F,D,C,B,E,A){copyEvent(F,D,C,B,E,A,true)}function advancedSearch(){var B=getInsideWindowWidth()/2;if(document.all){B-=215}var A=window.open(ASURL,"AS_WIN","location=no,resizable=yes,scrollbars=yes,status=no,menubar=no,top=0,width=470,height=100,left="+B,true);A.focus()}function newCalendar(){var A,B;var D=getInsideWindowWidth()/2;if(document.all){D-=225}var C=window.open(newCalendarURL,"NEW_CALENDAR_WINDOW","location=no,status=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=470,height=100,top=0,left="+D,true);C.focus()}function editCalendarByID(F,A){var B=document.all?"450":"500";var C="yes";var E=getInsideWindowWidth()/2;if(document.all){E-=225}var D;if(A){D=A.open(editCalendarURL+"?newEdit=yes&calendarID="+F,"EDIT_CALENDAR_WINDOW","location=no,status=no,resizable=yes,scrollbars="+C+",menubar=no,toolbar=no,width="+B+",height=900,top=0,left="+E,true)}else{D=window.open(editCalendarURL+"?newEdit=yes&calendarID="+F,"EDIT_CALENDAR_WINDOW","location=no,status=no,resizable=yes,scrollbars="+C+",menubar=no,toolbar=no,width="+B+",height=900,top=0,left="+E,true)}D.focus()}function subscribeCalendar(A){if(A==null||A==""){alert("You must provide a calendar name to use this feature.")}else{window.location.replace(subscribeCalendarURL+"?subscribeNames="+A)}}function deleteCalendar(A){window.location.replace(deleteCalendarURL+"?calendarID="+A)}function exportCalendar(A){window.location.replace(exportCalendarURL+"?calendarID="+A)}function exportCalendarCSV(A){window.location.replace(exportCalendarCsvURL+"?calendarID="+A)}function exportEvents(A){window.location.replace(exportCalendarURL+"?calendarID=0&tz="+A)}function pickColor(D,A,C){if(!document.all){A+=screenX;C+=screenY}var B=window.open(chooseColorURL+"?calendarID="+D,"PICK_COLOR_WINDOW","location=no,status=no,scrollbars=no,resizable=yes,menubar=no,toolbar=no,width=100,height=100,top="+C+",left="+A,true);B.focus()}var toggleCalImg;function toggleSync(A){toggleCalImg=A;callServer(toggleSyncURL+"?calendarID="+A.getAttribute("calendarID"))}function toggleSyncCont(){toggleCal.setAttribute("sync",toggleCal.getAttribute("sync")=="true"?"false":"true")}function makeSyncCal(A){callServer(makeSyncCalURL+"?calendarID="+A.getAttribute("calendarID"))}function searchCalendars(){var B=getInsideWindowWidth()/2;if(document.all){B-=325}var A=window.open(searchCalendarsURL,"SEARCH_RESULTS_WINDOW","location=no,status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,width=650,height=100,top=0,left="+B,true);A.focus()}function searchEvents(C){if(C=="Search Events"){return }var B=getInsideWindowWidth()/2;if(document.all){B-=325}var A=window.open(searchEventsURL+"?string="+C,"SEARCH_RESULTS_WINDOW","location=no,status=no,scrollbars=no,resizable=yes,menubar=no,toolbar=no,width=650,height=100,top=0,left="+B,true);A.focus()}function displayCategory(B,A){if(B!="#"){window.location.replace(A+"?categoryID="+B)}else{window.location.replace(A+"?categoryID=0")}}function moveEvent(A,B){callServer(changeEventURL+"?eventID="+A+"&calendarID="+B)}function activateONCR(A,B,C){if(A.keyCode==13){B(C,A)}}function displayURLs(){var B=getInsideWindowWidth()/2;if(document.all){B-=325}var A=window.open(myurlsURL,"MYURLS_WINDOW","location=no,status=no,scrollbars=no,resizable=yes,menubar=no,toolbar=no,width=460,height=100,top=50,left="+B,true);A.focus()}function toggleT(A,B){if(B=="h"){hide(A)}else{show(A)}}function toggleD(A,B){if(B=="h"){makeInvisible(A)}else{makeVisible(A)}}function makeInvisible(B){var A=this.document.getElementById(B);if(A){addClass(A,"displayNone")}}function makeVisible(B){var A=this.document.getElementById(B);if(A){removeClass(A,"displayNone")}}function getFormValue(C,A){for(i=0;i<C.elements.length;i++){var B=C.elements[i];if(B.name==A){return getFormElementValue(B)}}return null}function getFormElementValue(A){if(A.type=="select"){for(i=0;i<A.options.length;i++){if(A.options[i].selected){return A.options[i].value}}}else{return A.value}}function setText(A,B){if(document.all){getRawObject(A).innerHTML=B}else{if(document.layers){document.layers[A].innerHTML=B}else{if(document.getElementById){document.getElementById(A).innerHTML=B}}}}function defaultIsSelected(A){return A.options[A.selectedIndex].defaultSelected}var isCSS,isW3C,isIE4,isNN4,isIE6CSS;function initDHTMLAPI(){if(document.images){isCSS=(document.body&&document.body.style)?true:false;isW3C=(isCSS&&document.getElementById)?true:false;isIE4=(isCSS&&document.all)?true:false;isNN4=(document.layers)?true:false;isIE6CSS=(document.compatMode&&document.compatMode.indexOf("CSS1")>=0)?true:false}}function getObjectHeight(C){var B=getRawObject(C);if(!B||B.style.visibility=="hidden"){return 0}var A=0;if(B.offsetHeight){A=B.offsetHeight}else{if(B.clip&&B.clip.height){A=B.clip.height}else{if(B.style&&B.style.pixelHeight){A=B.style.pixelHeight}}}return parseInt(A)}function getRawObject(B){var A;if(typeof B=="string"){if(isW3C){A=document.getElementById(B)}else{if(isIE4){A=document.all(B)}else{if(isNN4){A=seekLayer(document,B)}}}}else{A=B}return A}function getObject(C){var A,B;A=B=getRawObject(C);if(A&&isCSS){A=A.style}if(A){A.getRaw=function(){return B}}return A}function shiftBy(E,B,A){var D=getObject(E);if(D){if(isCSS){var C=(typeof D.left=="string")?"px":0;D.left=getObjectLeft(E)+B+C;D.top=getObjectTop(E)+A+C}else{if(isNN4){D.moveBy(B,A)}}}}function shiftTo(D,A,E){var C=getObject(D);if(C){if(isCSS){var B=(typeof C.left=="string")?"px":0;C.left=A+B;C.top=E+B}else{if(isNN4){C.moveTo(A,E)}}}}function getObjectLeft(E){var C=getRawObject(E);var A=0;if(isIE4||isSafari){return C.offsetLeft}else{if(document.defaultView){var B=document.defaultView;var D=B.getComputedStyle(C,"");A=D.getPropertyValue("left")}else{if(C.currentStyle){A=C.currentStyle.left}else{if(C.style){A=C.style.left}else{if(isNN4){A=C.left}}}}}return parseInt(A)}function getObjectTop(E){var C=getRawObject(E);var A=0;if(isIE4||isSafari){return C.offsetTop}else{if(document.defaultView){var B=document.defaultView;var D=B.getComputedStyle(C,"");A=D.getPropertyValue("top")}else{if(C.currentStyle){A=C.currentStyle.top}else{if(C.style){A=C.style.top}else{if(isNN4){A=C.top}}}}}return parseInt(A)}function getObjectWidth(C){var B=getRawObject(C);var A=0;if(B.offsetWidth){A=B.offsetWidth}else{if(B.clip&&B.clip.width){A=B.clip.width}else{if(B.style&&B.style.pixelWidth){A=B.style.pixelWidth}}}return parseInt(A)}function getElemOffset(A){A=getRawObject(A);var C=A.offsetTop;var B=A.offsetLeft;A=A.offsetParent;while(A){C+=A.offsetTop;B+=A.offsetLeft;A=A.offsetParent}return{top:C,left:B}}function getInsideWindowWidth(){if(window.innerWidth){return window.innerWidth}else{if(isIE6CSS){return document.body.parentElement.clientWidth}else{if(document.body&&document.body.clientWidth){return document.body.clientWidth}}}return 0}function getInsideWindowHeight(){if(window.innerHeight){return window.innerHeight}else{if(isIE6CSS){return document.body.parentElement.clientHeight}else{if(document.body&&document.body.clientHeight){return document.body.clientHeight}}}return 0}function innerSettable(){if(!window.innerWidth){return false}var A=window.innerWidth;try{window.innerWidth++}catch(B){return false}if(window.innerWidth!=A){return true}return false}function setInsideSize(C,A){var B=0;if(A>window.screen.availHeight){A=window.screen.availHeight-60;document.body.scroll="yes";B=20}else{document.body.scroll="no"}if(innerSettable()){window.innerWidth=C+20;window.innerHeight=A+20}else{if(isIE6CSS){document.body.parentElement.clientWidth=C;document.body.parentElement.clientHeight=A}else{if(document.body&&document.body.clientWidth){resizeTo(C+10+B,A+80+B)}}}}function getElementPosition(D){var A=getRawObject(D);var C=0;var B=0;while(A){C+=A.offsetLeft;B+=A.offsetTop;A=A.offsetParent}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"){C+=parseInt(document.body.leftMargin);B+=parseInt(document.body.topMargin)}return{left:C,top:B}}function disable(B){var A=getRawObject(B);if(A){A.disabled=true}}function enable(B){var A=getRawObject(B);if(A){A.disabled=false}}function show(B){var A=getObject(B);if(A){A.visibility="visible"}}function hide(B){var A=getObject(B);if(A){A.visibility="hidden"}}function hideChildrenOfType(D,B){var A=getRawObject(D);if(!A){return null}var C=A.getElementsByTagName(B);for(i=0;i<C.length;i++){hide(C[i])}}function undisplayChildrenOfType(D,B){var A=getRawObject(D);if(!A){return null}var C=A.getElementsByTagName(B);for(i=0;i<C.length;i++){addClass(C[i],"displayNone")}}function findVisibleChildOfType(D,B){var A=getRawObject(D);var C=A.getElementsByTagName(B);for(i=0;i<C.length;i++){if(C[i].style.visibility=="visible"){return C[i]}}return null}function visibleHeightOfType(G,E){var B=getRawObject(G);var A=0;var F=B.getElementsByTagName(E);for(var D=0;D<F.length;D++){var C=getObject(F[D]);if(C.visibility=="visible"){A+=getObjectHeight(F[D])}}return A}function disableChildrenOfType(D,B){var A=getRawObject(D);var C=A.getElementsByTagName(B);for(i=0;i<C.length;i++){C[i].disabled=true}}function enableChildrenOfType(D,B){var A=getRawObject(D);var C=A.getElementsByTagName(B);for(i=0;i<C.length;i++){C[i].disabled=false}}function showByLink(B,D,A,F){if(document.layers&&document.layers[B]){document.layers[B].left=D.x+A;document.layers[B].top=D.y+F;document.layers[B].visibility="visible"}else{if(document.all){document.all[B].style.visibility="visible";if(document.all[B].myFlag==null){document.all[B].style.posLeft=document.all[B].offsetLeft+A;document.all[B].style.posTop=document.all[B].offsetTop+F}document.all[B].myFlag=true}else{if(document.getElementById){var C=document.getElementById(B);var E=getElementPosition(D);C.style.left=E.left+A;C.style.top=E.top+F;C.style.visibility="visible"}}}}function showAbsolute(C,A,D){if(getInsideWindowWidth()-A<40){A-=40}var B=getObject(C);if(!B){return }B.left=A;B.top=D;if(arguments[3]){removeClass(B.getRaw(),"displayNone")}else{B.visibility="visible"}}var timeoutID=0;function showCaption(B,A){displayToolTip(B,A,"caption")}function hideCaption(){hideToolTip("caption")}function toolTipFormat(A){return"<table id=\"divTable\"><tr><td "+(document.all?"nowrap=\"nowrap\"":"")+">"+A+"</td></tr></table>"}function helpFormat(A){return"<table width=\"300px\" id=\"divTable\" onclick=\"hideToolTip()\"><tr><td align=\"right\"><img src=\"images/close.gif\" onclick=\"hideToolTip()\"></td></tr><tr><td>"+A+"</td></tr></table>"}function displayToolTip(I,E,A,H){var B=A?0:1000;if(!A){A="tooltip"}if(!H){H=toolTipFormat}var F=E.clientX;var D=E.clientY;var C=0;var J=0;if(E.cancelBubble){return }if(this.document.layers&&this.document.layers[A]){this.document.layers[A].innerHTML=I;C=this.document.layers[A].offsetWidth;J=this.document.layers[A].offsetHeight}else{if(this.document.all){this.document.all[A].innerHTML=H.call(null,I);C=this.document.all[A].offsetWidth;J=this.document.all[A].offsetHeight;F+=this.document.body.scrollLeft;D+=this.document.body.scrollTop;E.cancelBubble=true}else{if(this.document.getElementById){var K=this.document.getElementById(A);K.innerHTML=H.call(null,I,F);C=K.offsetWidth;J=K.offsetHeight;if(!isSafari){F+=scrollX;D+=scrollY}E.stopPropagation()}}}D-=5;F+=10;var G=this.document.body.clientWidth-F;if(C>=0){if(F-10>G){F-=C+10}}if(J+D>=this.document.body.clientHeight){D-=J}if(B==0){showAbsolute(A,F,D)}else{timeoutID=setTimeout("showAbsolute('"+A+"',"+F+","+D+");",1000)}}function hideToolTip(A){if(!A){A="tooltip"}if(timeoutID!=0){clearTimeout(timeoutID)}if(document.layers&&document.layers[A]){document.layers[A].visibility="hidden"}else{if(document.all&&document.all[A]){document.all[A].style.visibility="hidden"}else{if(document.getElementById&&document.getElementById(A)){document.getElementById(A).style.visibility="hidden"}}}}function callServer(A){var D=document.getElementsByTagName("head").item(0);var B=document.getElementById("lastLoadedCmds");if(B){if(document.all){B.removeNode(true)}else{D.removeChild(B)}}var C=document.createElement("script");holdScript=C;C.src=A;C.type="text/javascript";C.defer=true;C.id="lastLoadedCmds";void (D.appendChild(C))}function callServerNoCache(A){callServer(A+"&"+(new Date()).getTime())}function DragObject(C){var E=0;var D=0;if(C){E=getObjectLeft(C);D=getObjectTop(C)}var B=null;var F=function(I){var H=I.button;if(H<=1){document.onmousemove=A;document.onmouseup=G;B.dragging=true}return true};var A=function(J){if(B.dragging==true){var I=isIE4?(window.event.clientX+document.body.scrollLeft):J.pageX;var H=isIE4?(window.event.clientY+document.body.scrollTop):J.pageY;B.style.left=(I-E-B.offsetWidth/2)+"px";B.style.top=(H-D-B.offsetHeight/2)+"px";return false}else{return true}};var G=function(H,I){B.dragging=false;callServer(moveClipartURL+"?move="+B.getAttribute("fname")+","+getObjectTop(B)+","+getObjectLeft(B));B=null;document.onmousemove=null;document.onmouseup=null;return true};this.allowDrag=function(H,I){B=H;F(I)}}function stop(A){if(!A){return }if(A.stopPropagation){A.stopPropagation()}else{A.cancelBubble=true}}function cap(A){return A.substr(0,1).toUpperCase()+A.substr(1)}function uncap(A){return A.substr(0,1).toLowerCase()+A.substr(1)}function displayObj(C){var B=window.open();for(var A in C){B.document.writeln(A+": "+C[A])}}function windowWidth(){if(window.innerWidth){return window.innerWidth}if(document.body.offsetWidth){return document.body.offsetWidth}}function windowHeight(){if(window.innerHeight){return window.innerHeight}if(document.body.offsetHeight){return document.body.offsetHeight}}function populateBubble(D,C){hide("bubble");hide("arrowmouth");getObject("bubble").width="400px";var B=getRawObject(D);B.innerHTML=B.text;var A=getObjectWidth(B.firstChild);if(A>400){getObject("bubble").width=A}}var bubbleDelay=1000;function displayInfo(D,K,H,M,I,G,C,F,P){if(!loaded){return }var B="bubble";var N="arrowmouth";var L=K.clientX;var J=K.clientY;if(K.cancelBubble){return }if(K.stopPropagation){K.stopPropagation()}var O="<table width=\"100%\">";for(var E in D){O+="<tr><td width=\"10%\">&nbsp;</td><td><b>"+E+":</b></td><td>"+D[E]+"</td></tr>"}for(var E in I){if(I[E].indexOf("__url")==0){O+="<tr><td width=\"10%\">&nbsp;</td><td colspan=\"2\"><b><a href=\""+I[E].substr(5)+"\" onclick=\"window.open(this.href); return false\">"+E+"</a></b></td></tr>"}else{O+="<tr><td width=\"10%\">&nbsp;</td><td><b>"+E+":</b></td><td>"+I[E]+"</td></tr>"}}if(userless){O+="</table><table><tr><td>Actions:</td><td><select class=\"login_style bubbleSelect\" onchange=\"if (this.value != '') {hide('bubble'); hide('arrowmouth'); eval(this.value) }\"><option value=\"\">none</option>"+(M?"<option value=\"editEvent"+H+"\">Edit event</option>":"")+(G?"<option value=\"deleteEvent"+H+"\">Delete event</option>"+(C?"<option value=\"deleteInstance"+H+"\">Delete instance</option>":""):"")+"<option value=\"copyEvent"+H+"\">Copy event</option>"+(C?"<option value=\"copyInstance"+H+"\">Copy instance</option>":"")+"</select></td></tr>"}if(!empty(appendableCals)&&M){O+="<tr><td>Move event to:</td><td><select class=\"login_style bubbleSelect\" onchange=\"if (this.value != '') {hide('bubble'); hide('arrowmouth'); moveEvent("+F+",this.value) }\">";O+="<option value=\"\">none</option>";for(var A in appendableCals){O+="<option value=\""+appendableCals[A]+"\">"+A+"</option>"}O+="</select></td></tr>"}O+="</table>";getRawObject(B+"Text").text=O;if(document.all){L+=document.body.scrollLeft;J+=document.body.scrollTop;K.cancelBubble=true}else{if(document.getElementById){if(!isSafari){L+=scrollX;J+=scrollY}}}if(bubbleDelay==0){document.getElementById("calPlace").innerHTML="("+P+")";populateBubble("bubbleText");showBubble("bubble","arrowmouth",L,J)}else{getRawObject(B).timeoutID=setTimeout("document.getElementById('calPlace').innerHTML = \"("+P+")\"; populateBubble('"+B+"Text'); showBubble('"+B+"','"+N+"',"+L+","+J+"); getRawObject('bubble').timeoutID = false;",bubbleDelay)}}function cancelInfo(){if(!loaded){return }var A=getRawObject("bubble");if(A.timeoutID){clearTimeout(A.timeoutID);A.timeoutID=false}}function Round(D,A,B){var C=getRawObject(D);if(C.firstChild.className=="rtop"){return }AddTop(C,A,B);AddBottom(C,A,B)}function AddTop(E,B,C){var D;var G=document.createElement("b");var H="r";var F=4;G.className="rtop";G.style.backgroundColor=B;for(D=1;D<=F;D++){var A=document.createElement("b");A.className=H+D;A.style.backgroundColor=C;G.appendChild(A)}E.insertBefore(G,E.firstChild)}function AddBottom(E,B,C){var D;var G=document.createElement("b");var H="r";var F=4;G.className="rbottom";G.style.backgroundColor=B;for(D=F;D>0;D--){var A=document.createElement("b");A.className=H+D;A.style.backgroundColor=C;G.appendChild(A)}E.appendChild(G,E.firstChild)}function showBubble(A,L,J,G){getObject(A).visibility="visible";getObject(L).visibility="visible";var C=getObjectWidth(A);var D=getObjectHeight(A);var B=C/2-45;var E=B-10;var M=J-(C-95)/2;var K=G-69-D;var I=J;var F=G-94;var H=M+C-getInsideWindowWidth()+20;if(H>0){M-=Math.min(H,E)}else{if(M<0){M+=Math.min(-M,B)}}if((document.all&&K<100)||(!document.all&&K<0)){F+=95;K=G+71;getRawObject("arrowmouth").className="arrowmouth3"}else{F=F+22;getRawObject("arrowmouth").className="arrowmouth2"}showAbsolute(L,I,F);showAbsolute(A,M,K)}function displayTourBubble(F,E){if(E instanceof Function){E=E()}var B=E.left;var H=E.top;hide("tourBubble");hide("arrowmouth");var G="tourBubble";var C="arrowmouth";var D=getRawObject(G);var A=getRawObject(G+"Text");A.innerHTML="<table><tr><td width=\"5%\">&nbsp;</td><td style=\"font-size:12pt\">"+F+"</td><td width=\"5%\">&nbsp;</td></tr></table>";if(document.all){B+=document.body.scrollLeft;H+=document.body.scrollTop}else{if(document.getElementById){B+=scrollX;H+=scrollY}}showBubble(G,C,B,H)}function doTour(B,C){if(!getRawObject("tourBubble")){var A=document.getElementsByTagName("body").item(0);var D=document.createElement("div");D.id="tourBubble";if(document.all){D.style.cssText="visibility:hidden;position:absolute;width:400;z-index:1000;background-color: #FFCCCC;"}else{D.setAttribute("style","visibility:hidden;position:absolute;width:400;z-index:1000;background-color: #FFCCCC;")}D.innerHTML="<table width=\"100%\"><tr height=\"25\"><td valign=\"top\" align=\"right\"><input type=\"button\" value=\"Stop tour\" onclick=\"stopTour();\"></td></tr></table><div id=\"tourBubbleText\" width=\"90%\"></div><table><tr height=\"16\"><td>&nbsp;</td></tr></table>";A.appendChild(D)}displayTourBubble(tourObj[B].text,tourObj[B].loc);if(B<tourObj.length-1){tourObj.timeoutID=setTimeout("doTour("+(B+1)+","+C+")",C)}else{tourObj.timeoutID=setTimeout("hide('tourBubble'); hide('arrowmouth');",C)}}function stopTour(){if(tourObj.timeoutID!=0){clearTimeout(tourObj.timeoutID)}hide("tourBubble");hide("arrowmouth")}function toCap(A){return A.substr(0,1).toUpperCase()+A.substr(1)}function chkInt(B){var A=B.value.match(/[^0-9]/);if(A){alerting=true;alert("Illegal character '"+A[0]+"' in number");alerting=false;B.value="";return false}return true}function chkString(B){var A=B.value.match(/[^a-zA-Z0-9&\-\/ ]/);if(A){alerting=true;alert("Illegal character in String '"+A[0]+"'");alerting=false;B.value="";return false}return true}function chkDigits(B){var A=B.value.match(/[^0-9]/);if(A){alerting=true;alert("Illegal character in currency amount '"+A[0]+"'");alerting=false;B.value="";return false}return true}function chkMapIt(A){var C=host+"calibrate/mapit/MapItCallback.html";var B=document.getElementById("mapit_frame");if(!B){return }B.src="http://www.happyjacksoftware.com/mapit/CheckLocation.html?loc="+encodeURIComponent(canonQuotes(A.value))+"&url="+encodeURIComponent(C)}function show_mapit(){removeClass(document.getElementById("mapit_div"),"displayNone")}function hide_mapit(){addClass(document.getElementById("mapit_div"),"displayNone")}function callDrawMap(){var E="http://www.happyjacksoftware.com/mapit/DrawMap.html";var A=document.createElement("iframe");A.src=E;var D=document.getElementById("frontHolder");var C=D.childNodes;for(var B=0;B<C.length;B++){D.removeChild(C[0])}D.appendChild(A)}function chkPhone(A){var B=A.value;B=B.replace(/[^0-9]/g,"");if(B.length!=10){alert("Phone number should have 10 digits.");A.value="";return false}else{A.value=B.slice(0,3)+"-"+B.slice(3,6)+"-"+B.slice(6)}return true}function disableChildren(A){if(A=getRawObject(A)){mapDOM(A,function(B){if(B.nodeName=="INPUT"){B.disabled=true}})}}function enableChildren(A){A=getRawObject(A);mapDOM(A,function(B){if(B.nodeName=="INPUT"){B.disabled=false}})}function mapDOM(C,B){B(C);for(var A=0;A<C.childNodes.length;A++){mapDOM(C.childNodes[A],B)}}function mapSibs(C,B,A){if(!C){return A}var D=B(C);if(D){A.push(D)}return mapSibs(C.nextSibling,B,A)}function previousNode(B,A){while(B=B.previousSibling){if(A(B)){return B}}}function nextNode(B,A){while(B=B.nextSibling){if(A(B)){return B}}}function noInterestingChildren(A){if(!A||!A.firstChild){return true}if(A.firstChild.nodeType!=3){return false}return !nextNode(A.firstChild,function(B){return B.nodeType!=3})}function map(A,C){if(A!=null){for(var B=0;B<A.length;B++){C.call(this,A[B])}}}function hasClass(C,B){var A=new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)");return A.test(C["className"])}function addClass(B,A){if(hasClass(B,A)){return }B["className"]=[B["className"],A].join(" ")}function removeClass(C,B){var A=new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)","g");if(!hasClass(C,B)){return }var D=C["className"];C["className"]=D.replace(A," ")}function replaceClass(D,B,A){var C=new RegExp("(?:^|\\s+)"+B+"(?:\\s+|$)","g");if(!hasClass(D,B)){addClass(D,A);return }D["className"]=D["className"].replace(C," "+A+" ")}function toggleCGroup(A,C,B){if(A.src.indexOf("plus")!=-1){A.src="images/minus.gif";C.parentNode.rows[C.rowIndex+1].firstChild.style.display=document.all?"inline":"table-cell";callServer("manageCals.do?showGroup="+B)}else{A.src="images/plus.gif";C.parentNode.rows[C.rowIndex+1].firstChild.style.display="none";callServer("manageCals.do?hideGroup="+B)}stripeTable("myCalendars")}function toggleCGroupView(C,D){var B=D.parentNode.rows[D.rowIndex+1];var A="";if(!C.checked){window.location.replace("changeCalView.do?unviewGroupID="+C.value)}else{window.location.replace("changeCalView.do?viewGroupID="+C.value)}}function toggleAllChecked(A){if(!A.checked){window.location.replace(changeCalViewURL+"?viewCalendarID=-1")}else{window.location.replace(changeCalViewURL+"?viewCalendarID=0")}}function stripeTable(G){var C="stripeOn";var F=document.getElementById(G).rows;for(var D=0;D<F.length;D++){var A=F[D].cells[0];if(hasClass(F[D],"submenu")){if(A.style.display!="none"){var E=A.childNodes[document.all?0:1].rows;for(var B=0;B<E.length;B++){E[B].cells[0].className=C;C=C=="stripeOff"?"stripeOn":"stripeOff"}}}else{A.className=C;C=C=="stripeOff"?"stripeOn":"stripeOff"}}}function setDefaultSyncID(E){var A=document.getElementById("syncInd");if(A){A.parentNode.removeChild(A)}var F=document.getElementById("myCalendars");var D=F.getElementsByTagName("SPAN");for(var C=0;C<D.length;C++){if(parseInt(D[C].getAttribute("calendarid"))==E){D[C].setAttribute("defaultsync","true");var B=document.createElement("IMG");B.id="syncInd";B.src="images/sync_indicator.gif";B.style.marginLeft="5px";D[C].parentNode.parentNode.cells[2].appendChild(B)}else{D[C].setAttribute("defaultsync","false")}}}function empty(A){for(var B in A){return false}return true}function loadStyleSheet(A,H,G){if(!G){G=document}if(!A){return }if(A.indexOf("http:")==-1&&A.indexOf("https:")==-1){var F=window.location.href.split("/");F.splice(F.length-1,1);A=F.join("/")+"/"+A}var D=G.getElementsByTagName("head").item(0);var B=G.getElementsByTagName("link");for(var C=0;C<B.length;C++){if(B[C].href==A){return }}var E=G.createElement("link");E.rel="stylesheet";E.type="text/css";if(H){E.id=H}E.href=A;void (D.appendChild(E))}function shade(C){var A=document.getElementById(C);if(!A){return }var B=document.createElement("<div>");B.innerHTML="<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\""+A.offsetWidth+"\" ><tr><td class=\"tbll\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td><td class=\"tblbot\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td><td class=\"tblr\"><img src=\"images/spacer.gif\" alt=\"\" width=\"8\" height=\"4\" /></td></tr></table>";A.parentNode.insertBefore(B,A.nextSibling)}function trim(A){if(!A){return""}A=A.replace(/^\s+/,"");A=A.replace(/\s+$/,"");return A}function copyText(B,A){if(!document.all){B.select();displayToolTip("Ctrl-C copies",A,"tooltip")}else{r=B.createTextRange();r.select();r.execCommand("copy");displayToolTip(" The url has<BR>been copied",A,"tooltip")}}function doScrollBar(E,A){var B=document.getElementById(E);if(!B){return }var C=(document.all?"scrollingIE":"scrolling");var D=B.parentNode;D.style.height=Math.min(B.offsetHeight,A);D.style.width=D.offsetWidth;if(B.offsetHeight>A){D.className=C}else{removeClass(D,C)}}function scrollBar(D,E){var A;if(document.all){A=document.documentElement.offsetHeight}else{A=document.body.clientHeight}var C;if(!E){if(document.all){C=document.body.scrollHeight}else{C=document.documentElement.offsetHeight}}else{C=document.getElementById(E).offsetHeight}var G=A-C;var I=document.getElementById(D);var B=document.getElementById(D).parentNode;var H=hasClass(B,(document.all?"scrollingIE":"scrolling"));var F;if(H){F=parseInt(B.style.height.replace(/px/,""))}else{F=I.offsetHeight}if((H&&G>0)||G<0){doScrollBar(D,F+G)}}function scrollIntoView(F){var I=F.parentNode.parentNode;var H=I.offsetParent;var E=H.parentNode;if(hasClass(E,document.all?"scrollingIE":"scrolling")){var C=E.offsetHeight;var B=E.scrollTop;var D=I.offsetTop;var G=F.offsetHeight;var A=30;if(D+G>C+B){E.scrollTop=D-A}else{if(B>D){E.scrollTop=D-A}}}}function xy(B){var C=0;var A=0;curr=B;while(curr!=null){C+=curr.offsetTop;A+=curr.offsetLeft;curr=curr.offsetParent}B.setAttribute("x",A);B.setAttribute("y",C)}function makeExportable(A,B){if(A.checked){callServer("makeExportable.do?action=add&eiID="+B)}else{callServer("makeExportable.do?action=drop&eiID="+B)}}function clearExportable(C){callServer("makeExportable.do?action=clear");var B=document.getElementsByName(C.getAttribute(document.all?"id":"name"));for(var A=0;A<B.length;A++){B[A].firstChild.checked=false}}function readCookie(B){var D=B+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(D)==0){return E.substring(D.length,E.length)}}return null}function createCookie(C,D,E){if(E){var B=new Date();B.setTime(B.getTime()+(E*24*60*60*1000));var A="; expires="+B.toGMTString()}else{var A=""}document.cookie=C+"="+D+A+"; path=/"}function eraseCookie(A){createCookie(A,"",-1)}