var global=this;var hand=(document.all?"hand":"pointer");var isSafari=(navigator.appVersion.indexOf("Safari")==-1?false:true);var isIE7=navigator.userAgent.indexOf("MSIE 7.0")!=-1;Date.prototype.toString=Date.prototype.toLocaleString;DomBuilder.apply(global);var port=document.location.port;var host=document.location.protocol+"//"+document.domain+(port?":"+port:"")+"/";function globally(B){return typeof global[B]!="undefined"}if(!globally("loginTxt")){global.loginTxt="Login";global.logoutTxt="Logout"}if(!globally("styleLoaded")){var styleLoaded={}}function require(C,G){if(!G){G=document}var B=document.getElementsByTagName("script");for(var F=0;F<B.length;F++){if(B[F].src==C){return }}var E=G.getElementsByTagName("head").item(0);var D=G.createElement("script");D.src=C;D.type="text/javascript";void (E.appendChild(D))}function Widget(B){this.loadStyleSheet=function(){if(!this.sheetLoaded){loadStyleSheet(this.cssurl);this.sheetLoaded=true}};this.getElementById=function(C){return getbyId(C,this.domNode)};this.getElementsById=function(C){return getsbyId(C,this.domNode)};this.getElements=function(C){return getEls(this.domNode,C,[])};this.notify=function(){};if(B&&B.id){global[B.id]=this}this.loadStyleSheet()}function ListWidgetWithCity(B){this.base=ListWidget;this.base(B);this.swapCityAndLocation=function(){for(var D=0;D<this.data.length;D++){var F=this.data[D];var C=F.id+0;if(!this.extras[C]||!this.extras[C]["City"]){continue}var E=F.Location;F.Location=this.extras[C]["City"];this.extras[C]["Location"]=E}for(var D=0;D<this.custProps.length;D++){if(this.custProps[D]=="City"){this.custProps[D]="Location"}}this.custProps.sort(function(H,G){if(H<G){return -1}else{if(H>G){return 1}else{return 0}}});this.locationLabel="City"}}function ListWidget(F){this.locationLabel="Location";this.addEl=function(O,P){if(O<0){return }this.data[O]=P};var N=function(O){O.innerHTML="<table class=\"nav\" style=\"margin:2px\"><tr style=\"color: blue\"><td class=\"navhdr\" onmouseover=\"this.style.cursor=hand\" nowrap=\"nowrap\" id=\"previousButton\">&laquo; previous</td><td class=\"navOn\">1</td><td onmouseover=\"this.style.cursor=hand\">2</td><td onmouseover=\"this.style.cursor=hand\">3</td><td onmouseover=\"this.style.cursor=hand\">4</td><td onmouseover=\"this.style.cursor=hand\">5</td><td>...</td><td onmouseover=\"this.style.cursor=hand\">500</td><td class=\"navhdr\" onmouseover=\"this.style.cursor=hand\" nowrap=\"nowrap\" id=\"nextButton\">next &raquo;</td></tr></table>";dojo.event.connect(O.firstChild,"onclick",function(P){return function(Q){var R=Q.target?Q.target:Q.srcElement;if(R&&hasClass(R,"navOff")){P.absolute((parseInt(R.innerHTML)-1)*P.displaysize)}else{if(R&&R.className=="navOn"){P.restoreData()}}}}(this))};var D=document.all?new Function("addClass(this,'black'); this.style.cursor = hand"):"addClass(this,'black'); this.style.cursor = hand";var M=document.all?new Function("removeClass(this,'black')"):"removeClass(this,'black')";var E=function(R){if(this.count<=this.displaysize){R.style.display="none"}else{R.style.display="block";var T=R.firstChild.firstChild.firstChild;while(!T.cells[1].id||T.cells[1].id!="nextButton"){T.deleteCell(1)}var Q=Math.floor(this.count/this.displaysize)+1;var V=this.currentIndex/this.displaysize+1;var S=V-2;if(S<3){S=1}else{if(Q-S<=5){S=Q<7?1:Q-4}}if(Q>7&&Q-V>3){var U=T.insertCell(1);U.setAttribute(document.all?"className":"class","navOff");U.setAttribute("onmouseover",D);U.setAttribute("onmouseout",M);U.innerHTML=Q.toString();U=T.insertCell(1);U.innerHTML="..."}var O=Q<7?Q:4;for(var P=O;P>=0;P--){if((P+S-1)*this.displaysize>=this.count){continue}var U=T.insertCell(1);if(P+S==V){U.setAttribute(document.all?"className":"class","navOn")}else{U.setAttribute(document.all?"className":"class","navOff");U.setAttribute("onmouseover",D);U.setAttribute("onmouseout",M)}U.innerHTML=(P+S).toString()}if(Q>7&&V>4){U=T.insertCell(1);U.innerHTML="...";var U=T.insertCell(1);U.setAttribute(document.all?"className":"class","navOff");U.setAttribute("onmouseover",D);U.setAttribute("onmouseout",M);U.innerHTML="1"}}};var J=function(U,S){if(!U){return""}var a=DIV();var W=true;for(var V=0;V<S.length;V++){var P=S[V];if(!U[P]||U[P]==""){continue}if(U[P].indexOf("__url")==0){var R=U[P].substr(5);if(!R){continue}a.appendChild(DIV({"class":"listentry"},SPAN({"class":"listhdr"},P,": ",A({href:U[P].substr(5),onclick:"window.open(this.href); return false"},R))));W=false}else{if(U[P].indexOf("__map")==0){var Q=U[P].substr(5);if(!Q){continue}a.appendChild(DIV({"class":"listentry"},SPAN({"class":"listhdr"},"Directions",": ",A({onmouseover:"this.style.cursor=hand",onclick:"getDirections(event, '"+U[P].substr(5).replace(/<br>/gi," ")+"')"},"get directions"))));W=false}else{if(P=="Future Dates"){W=false;var Y;var X;var Z=5;a.appendChild(DIV({"class":"listentry"},SPAN({"class":"listhdr","style":"display:block;float:left"},P,": "),SPAN({"class":"listitem","style":"display:block;float:left"},X=UL({"class":"futureDatesList","style":"margin-top:2px;margin-bottom:2px;list-style:none;padding-left:0px;margin-left:5px"}))));var O=U[P].split(";");for(var T=0;T<O.length&&T<Z;T++){X.appendChild(LI({"class":"futureDatesItem","style":"font-family:courier new"},O[T]))}if(O.length>Z){X.appendChild(LI({"class":"futureDatesItem","style":"text-align:right"},"...more"))}}else{W=false;a.appendChild(DIV({"class":"listentry"},SPAN({"class":"listhdr"},P,": "),SPAN({"class":"listitem"},U[P])))}}}}return W?"":a};var L=function(S,O){if(!S){return""}var Q="<div>";var R=true;for(var P=0;P<O.length;P++){var T=O[P];if(!S[T]||S[T]==""){continue}if(S[T].indexOf("__url")==0){Q+="<div class=\"listentry\"><span class=\"listhdr\">"+S[T].substr(5)+"</span></div>";R=false}else{R=false;Q+="<div class=\"listentry\"><span class=\"listhdr\">"+T+": <span class=\"listitem\">"+S[T]+"</span></div>"}}Q+="</div>";return R?"":Q};var B=function(P,O){return"<div class=\"listentry\"><span class=\"listhdr\" width=\"100%\">"+P+": </span><span class=\"listitem\">"+O+"</span></div>"};var G=function(U,R,S,P){var Q,T;var O=DIV({"class":"listentry"},S?Q=SPAN({"class":"noshow",style:"float:right"},IMG({src:host+"kalendi/portal/images/plus.gif",onmouseover:"this.style.cursor=hand"})):"",T=SPAN({"class":"listhdr",width:"100%"},U+": "),SPAN({"class":"listitem"},P?"":R));if(Q){Q.firstChild.onclick=function(V){stop(V||event);return S.addDetails(this)}}if(P){T.innerHTML+=R}return O};var K=function(P){var O=P.childNodes[P.childNodes.length-1];if(O.nodeName=="DIV"){return K(O)}return P};var I=function(P){var R,O=DIV({"class":"listentry"},SPAN({"class":"listhdr"},"Attachments: "),R=SPAN({"class":"listitem"}));R.appendChild(A({href:"../"+P[0]},P[0].substr(P[0].lastIndexOf("/")+1)));for(var Q=1;Q<P.length;Q++){R.appendChild(document.createTextNode(", "));R.appendChild(A({href:"../"+P[Q]},P[Q].substr(P[Q].lastIndexOf("/")+1)))}return O};var C=function(P){var O="<div class=\"listentry\"><span class=\"listhdr\">Attachments: </span><span class=\"listitem\">";for(var Q=1;Q<P.length;Q++){O+=P[Q];if(Q>0){O+=", "}}O+="</span></div>";return O};this.mkDescr=function(R){var P=R.split("<br>");if(P.length==1){return SPAN({"class":"listdesc"},R)}else{var Q=SPAN({"class":"listdesc"});for(var O=0;O<P.length;O++){Q.appendChild(document.createTextNode(P[O]));Q.appendChild(BR())}}return Q};this.populate=function(O){if(!this.url){return }callServer(this.url+(this.url.indexOf("?")!=-1?"&":"?")+"name="+this.domNode.id+"&batchSize="+this.batchSize+"&start="+this.batchOffset+(O?"&count=yes":""),"tableData")};this.renderData=function(){this.prevEnabled=this.currentIndex-this.displaysize>=0;map.call(this,this.prevButtons,function(T){if(!document.all){if(this.prevEnabled){T.style.opacity="1";T.style.filter="alpha(opacity=100)"}else{T.style.opacity=".3";T.style.filter="alpha(opacity=30)"}}else{if(this.prevEnabled){T.style.opacity="1";T.style.filter="alpha(opacity=100)"}else{T.style.opacity=".3";T.style.filter="alpha(opacity=30)"}}});this.nextEnabled=(this.count-(this.currentIndex+this.displaysize))>0;map.call(this,this.nextButtons,function(T){if(!document.all){if(this.nextEnabled){T.style.opacity="1";T.style.filter="alpha(opacity=100)"}else{T.style.opacity=".3";T.style.filter="alpha(opacity=30)"}}else{if(this.nextEnabled){T.style.opacity="1";T.style.filter="alpha(opacity=100)"}else{T.style.opacity=".3";T.style.filter="alpha(opacity=30)"}}});map.call(this,this.navs,E);this.bodyLoc.innerHTML="";this.allSelected=false;this.selectedEls=[];if(this.adsearchLoc){this.adsearchLoc.style.display=this.search!="n"?"block":"none"}if(this.selectAllLoc.value){this.selectAllLoc.value="Select All"}else{this.selectAllLoc.innerHTML="Select All"}if(this.data.length==0){this.selectAllLoc.style.display="none";this.bodyLoc.appendChild(DIV({"class":"calnodata"},"There are no events in the selected time period"))}else{this.selectAllLoc.style.display="inline";for(var P=this.currentIndex-this.batchOffset;P<Math.min(this.displaysize+this.currentIndex-this.batchOffset,this.count-this.batchOffset);P++){var S,O=null,Q=this.reminders[this.data[P].instanceID],R=null;this.bodyLoc.appendChild(S=DIV({"class":"eventback"},TABLE({width:"100%",border:"0","cellSpacing":"1","cellPadding":"3"},TBODY(TR((this.highlights[this.data[P].id]?TD({width:"75",valign:"top","rowSpan":"1","class":"imgback"},IMG({src:host+"calibrate_resources/hlimages/"+this.highlights[this.data[P].id]})):""),TD({"class":"ltblue mark"},TABLE({"class":"ltblue mark","cellSpacing":"0","cellPadding":"0",width:"100%"},TBODY(TR({"class":"capRow"},TD(SPAN({"class":"listcaption"},this.data[P].Caption)),TD({align:"right"},(Q?O=IMG({src:host+"kalendi/portal/images/timer.png",onmouseover:"this.style.cursor=hand"}):""),(this.data[P].Recurring!="No"?IMG({src:host+"kalendi/portal/images/RTRAN.png","style":"margin-left:10px"}):""))))),G("Date",this.formatDate(this.data[P].StartDate,this.data[P].EndDate,this.data[P].AllDay=="1"),this.hidedetails&&!this.data[P].Location?this:null),(this.data[P].Location?G(this.locationLabel,this.data[P].Location,this.hidedetails?this:null,true):""),this.hidedetails?"":G("Categories",this.categories[this.data[P].instanceID]),this.hidedetails?"":(this.attachments[this.data[P].instanceID]?I(this.attachments[this.data[P].instanceID]):""),this.hidedetails?"":J(this.extras[this.data[P].id],this.custProps))),this.hidedetails||this.data[P].Description==""?"":TR(R=TD({"class":"white mark"}))))));if(R){R.innerHTML=this.data[P].Description}S.elementID=this.data[P].instanceID;S.index=P;S.onclick=function(T){return function(U){T.handleListMark(this,U)}}(this);if(O){O.onclick=function(U,T,V){return function(W){displayInfo("Reminder on "+formatReminderDate(new Date(V))+", click <span onmouseover=\"this.style.cursor=hand\" style=\"text-decoration:underline\" onclick=\"deleteReminder('"+U+"',"+T+",this)\">here</span> to delete",W,0)}}(this.domNode.id,this.data[P].instanceID,Q)}}}};var H=new Function("this.style.cursor=hand");this.addDetails=function(R){var V=R.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;var O=V.index;V.expanded=true;var U=R.parentNode.parentNode.parentNode;U.appendChild(G("Categories",this.categories[this.data[O].instanceID]));if(this.attachments[this.data[O].instanceID]){U.appendChild(I(this.attachments[this.data[O].instanceID]))}var P=J(this.extras[this.data[O].id],this.custProps);if(P!=""){U.appendChild(P)}if(this.data[O].Description!=""){var T=R.parentNode.parentNode.parentNode.previousSibling;if(T&&T.nodeType!=3){T.rowSpan="2"}var S=null;var Q=TR(S=TD({"class":"white mark"}));if(S){S.innerHTML=this.data[O].Description}if(isSafari&&U.parentNode.parentNode.rows.length==2){U.parentNode.parentNode.rows[1].style.display="table-row"}else{U.parentNode.parentNode.appendChild(Q)}}R.src=host+"kalendi/portal/images/minus.gif";R.onclick=function(W){return function(X){stop(X||event);return W.removeDetails(this)}}(this)};this.addIEDetails=function(S,O){var T=S.getElementsByTagName("TD")[getNWAttr(S,"rowspan")?1:0];T.innerHTML+=B("Categories",this.categories[this.data[O].instanceID]);if(this.attachments[this.data[O].instanceID]){T.innerHTML+=C(this.attachments[this.data[O].instanceID])}var P=L(this.extras[this.data[O].id],this.custProps);if(P!=""){T.innerHTML+=P}if(this.data[O].Description!=""){var Q=T.parentNode.parentNode.parentNode;var R=Q.insertRow(Q.rows.length);T=R.insertCell(0);T.setAttribute("className","white mark");T.setAttribute("colSpan","2");T.innerHTML="<span class=\"listdesc\">"+this.data[O].Description+"</span>"}};this.removeDetails=function(P){var S=tdElem(P);S.parentNode.parentNode.parentNode.parentNode.expanded=false;if(S.parentNode.parentNode.rows.length==2){var R=P.parentNode.parentNode.parentNode.previousSibling;if(R&&R.nodeType!=3){R.rowSpan="1"}if(isSafari){S.parentNode.parentNode.rows[1].style.display="none"}else{S.parentNode.parentNode.deleteRow(1)}}var Q=S.childNodes[2].firstChild;var O=Q&&hasClass(Q,"noshow")?3:2;while(S.childNodes.length>O){S.removeChild(S.childNodes[O])}P.src=host+"kalendi/portal/images/plus.gif";P.onclick=function(T){return function(U){stop(U||event);return T.addDetails(this)}}(this)};this.next=function(){this.currentIndex+=this.displaysize;if(this.currentIndex>=this.batchOffset+this.batchSize){this.batchOffset=this.batchSize;this.populate()}else{this.renderData()}};this.previous=function(){this.currentIndex-=this.displaysize;if(this.currentIndex<this.batchOffset){this.batchOffset-=this.batchSize;this.populate()}else{this.renderData()}};this.absolute=function(O){this.currentIndex=O;if(this.currentIndex<this.batchOffset||this.currentIndex>=this.batchOffset+this.batchSize){this.batchOffset=Math.floor(this.currentIndex/this.batchSize)*this.batchSize;this.populate()}else{this.renderData()}};this.initData=function(){this.populate(true)};this.formatDate=function(Q,O,P){if(sameDay(Q,O)){return days[Q.getDay()]+", "+months[Q.getMonth()]+" "+Q.getDate()+", "+Q.getFullYear()+(P?"":(Q.getHours()==O.getHours()&&Q.getMinutes()==O.getMinutes()?" at "+makeTime(Q):" from "+makeTime(Q)+" to "+makeTime(O)))}else{return"From "+days[Q.getDay()]+", "+months[Q.getMonth()]+" "+Q.getDate()+", "+Q.getFullYear()+(P?"":(" at "+makeTime(Q)))+" to "+days[O.getDay()]+", "+months[O.getMonth()]+" "+O.getDate()+", "+O.getFullYear()+(P?"":(" at "+makeTime(O)))}};this.handleListMark=function(R,O,P){var Q=O?(O.target?O.target:O.srcElement):null;if(Q&&Q.nodeName=="A"){return }if(hasClass(R,"red")){if(P){return }removeClass(R,"red");unmark(R);if(R.elementID){remIf(this.selectedEls,function(S){return S==R.elementID})}}else{addClass(R,"red");mark(R);if(R.elementID){this.selectedEls.push(R.elementID)}}};this.unmark=function(O){if(hasClass(O,"red")){removeClass(O,"red");unmark(O);if(O.elementID){remIf(this.selectedEls,function(P){return P==O.elementID})}}};this.selectAll=function(){if(this.allSelected){this.allSelected=false;if(this.selectAllLoc.value){this.selectAllLoc.value="Select All"}else{this.selectAllLoc.innerHTML="Select All"}for(var O=0;O<this.bodyLoc.childNodes.length;O++){this.unmark(this.bodyLoc.childNodes[O])}}else{this.allSelected=true;if(this.selectAllLoc.value){this.selectAllLoc.value="Unselect All"}else{this.selectAllLoc.innerHTML="Unselect All"}for(var O=0;O<this.bodyLoc.childNodes.length;O++){this.handleListMark(this.bodyLoc.childNodes[O],null,true)}}};this.unselectAll=function(){this.allSelected=true;this.selectAll()};this.swapout=function(){};this.print=function(O){if(this.disabled){O=(O)?O:((event)?event:null);displayInfo("Switch to list mode to use this functionality.",O,0);return }var P=this.getElements(function(S){return hasClass(S,"red")});if(!P||P.length==0){alert("No events are selected")}else{var R=window.open("","PRINT","scrollbars=yes,resizable=yes,status=no,menubar=no,top=0,width=600,height=600",true);R.document.writeln("<html><head><title>Portal Events</title><script language='javascript'>var hand = 'pointer'</script></head><body></body></html>");R.document.close();var Q=R.document.createElement("LINK");Q.rel="stylesheet";Q.type="text/css";Q.href=host+"kalendi/portal/printlist.css";R.document.getElementsByTagName("head")[0].appendChild(Q);if(this.imgfile){R.document.body.innerHTML+="<div style=\"margin-bottom:10px\"><img src=\""+this.imgfile+"\"></div>"}map.call(this,P,function(T){var S;if(document.all){R.document.body.innerHTML+=T.outerHTML;S=R.document.body.lastChild}else{S=R.document.importNode(T,true);R.document.body.appendChild(S)}if(this.hidedetails&&!T.expanded){this.addIEDetails(S,T.index)}});mapDOM(R.document.body,function(S){if(S.nodeName=="A"){S.parentNode.replaceChild(R.document.createTextNode(S.href),S)}});if(document.all||isSafari){R.document.body.innerHTML+="<input class=\"noprint\" type=\"button\" value=\"Click to print\" onclick=\"window.print()\">"}else{R.document.body.appendChild(SCRIPT("window.print()"))}}};this.init=function(){this.reminders=[];this.batchSize=this.displaysize*this.dpb;this.navs=this.getElementsById("navLoc");this.adsearchLoc=this.getElementById("adsearchLoc");this.search="n";map.call(this,this.navs,N);this.bodyLoc=this.getElementById("bodyLoc");this.selectAllLoc=this.getElementById("selectAllLoc");this.selectAllLoc.onclick=function(O){return function(){O.selectAll.call(O)}}(this);this.prevButtons=this.getElementsById("previousButton");map(this.prevButtons,function(O){return function(P){dojo.event.connect(P,"onclick",function(){if(O.prevEnabled){O.previous()}})}}(this));this.nextButtons=this.getElementsById("nextButton");map(this.nextButtons,function(O){return function(P){dojo.event.connect(P,"onclick",function(){if(O.nextEnabled){O.next()}})}}(this))};this.cssurl=host+"kalendi/portal/list.css";this.currentIndex=0;this.movingCol=-1;this.batchOffset=0;this.displaysize=10;this.dpb=4;initAttributes(this,F.attributes);if(typeof this.displaysize=="string"){this.displaysize=parseInt(this.displaysize)}this.base=Widget;this.base(F);this.domNode=F;this.selectedEls=[];this.notify=function(){this.renderData()};this.init()}function CatSelectingListWidget(D,F,G,E,B,C){this.base=!C?ListWidget:C;this.base(D);this.mapWidget=null;this.getOnCats=function(){return F.onCategories};this.catsChanged=function(){return F.catsChanged()};this.getDateRange=function(){if(G){return G.getDateRange()}var H=new Date();return{start:H,end:new Date(H.getTime()+(30*86400000))}};this.setMapWidget=function(H){this.mapWidget=H;if(H){dojo.event.connect(H,"click",function(I){return function(J){if(I.disabled){displayInfo("Switch to list mode to use this functionality.",J,0);return }I.search="n";I.highlight=false;I.renew()}}(this))}};this.setCustPropSearchWidget=function(H){this["search"+H.propname+"Widget"]=H};this.populate=function(J){if(!this.url){return }showHourGlass(this);var K=this.mapWidget?this.mapWidget.getPropString():null;if(this.search=="a"){callServer(this.url+(this.url.indexOf("?")!=-1?"&":"?")+"name="+this.domNode.id+(this.timezone?"&zoneID="+this.timezone:"")+"&batchSize="+this.batchSize+"&start="+this.batchOffset+"&companyID="+F.companyID+(K?"&customProp="+K:"")+(J?"&count=yes":"")+"&"+this.qString,"tableData")}else{var H=this.getDateRange();var I=E?E.getSearchString():"";if(I&&I!=""){H.end=new Date(H.end.getTime()+(365*86400000))}if(this.getOnCats().length==0){this.data=[];this.notify()}else{callServer(this.url+(this.url.indexOf("?")!=-1?"&":"?")+"name="+this.domNode.id+(this.timezone?"&zoneID="+this.timezone:"")+"&batchSize="+this.batchSize+"&start="+this.batchOffset+(this.highlight||this.highlightalways?"&highlight=yes":"")+"&companyID="+F.companyID+"&catIDs="+this.getOnCats()+"&startDT="+gen_date(H.start)+"&endDT="+gen_date(H.end)+(I?"&searchString="+I:"")+(J?"&count=yes":"")+(this.catsChanged()?"&catsChanged=yes":"")+(K?"&customProp="+K:""),"tableData")}}};this.remarkReminders=function(){for(var I=0;I<this.bodyLoc.childNodes.length;I++){var L=null;mapDOM(this.bodyLoc.childNodes[I],function(M){if(hasClass(M,"capRow")){L=M}});if(!L){return }var J=L.cells[1].firstChild;if(this.reminders[this.bodyLoc.childNodes[I].elementID]){var K=this.reminders[this.bodyLoc.childNodes[I].elementID],H=null;if(!J||(J.nodeType==3&&J.data=="")){L.cells[1].insertBefore(H=IMG({src:"images/timer.png"}),L.cells[1].firstChild)}else{if(J.src&&J.src.indexOf("images/timer.png")==-1){L.cells[1].insertBefore(H=IMG({src:"images/timer.gif"}),L.cells[1].firstChild)}}}else{if(J&&J.src&&J.src.indexOf("images/timer.png")!=-1){L.cells[1].removeChild(L.cells[1].firstChild)}}if(H){H.onclick=function(N,M){return function(O){displayInfo("Reminder on "+formatReminderDate(new Date(K))+", click <span onmouseover=\"this.style.cursor=hand\" style=\"text-decoration:underline\" onclick=\"deleteReminder('"+N+"',"+M+",this)\">here</span> to delete",O,0)}}(this.domNode.id,this.bodyLoc.childNodes[I].elementID)}}this.unselectAll()};this.clearReminders=function(){this.reminders={};this.remarkReminders()};this.renew=function(){this.currentIndex=0;this.batchOffset=0;this.initData()};this.searchAdvanced=function(H){this.search="a";this.qString=H;this.renew()};dojo.event.connect(F,"click",function(H){return function(){H.highlight=false;H.search="n";H.renew()}}(this));if(G){dojo.event.connect(G,"click",function(H){return function(){H.highlight=false;H.search="n";H.renew()}}(this))}if(E){dojo.event.connect(E,"click",function(H){return function(){H.highlight=false;H.search="r";H.renew()}}(this))}if(B){dojo.event.connect(B,"onclick",function(H){return function(I){if(H.disabled){displayInfo("Switch to list mode to use this functionality.",I,0);return }H.search="n";H.highlight=true;H.renew()}}(this))}dojo.event.connect(F,"notify",function(H,I){return function(){H.custProps=I.custProps;H.initData()}}(this,F));this.domNode.appendChild(IMG({src:"images/hourglass_32.gif","style":"display:none"}))}function CatSelectingListWidgetWithFeaturedEvent(D,F,G,E,B,C){CatSelectingListWidget.call(this,D,F,G,E,B,C);this.base=CatSelectingListWidget;this.featuredLoc=this.getElementById("featuredLoc");this.addEl=function(H,I){if(H<0){this.featured=I}this.data[H]=I};this.renderData=function(H){return function(){H.call(this);var J=this.featured;if(!J||!this.featuredLoc){return }var I=J.Description?J.Description.split(/<BR>/i):[];var M=I.length>0?I[0]:null;var K="";for(var L=1;L<I.length;L++){K+=("<p class=\"displayNone featureditem\">"+I[L]+"</p>")}this.featuredLoc.innerHTML="<div class=\"featuredbg\"> <img src=\"/calibrate_resources/hlimages/"+J.featuredEventImage+"\" class=\"featuredimg\"><div class=\"featuredtitle\">Featured Event</div><div class=\"featuredentry\"><span class=\"featuredcaption\">"+J.Caption+"</span></div><div class=\"featuredentry\"><span class=\"featuredhdr\">Date:</span> <span class=\"featureditem\">"+this.formatDate(J.StartDate,J.EndDate,J.AllDay=="1")+"</span></div><div class=\"featuredentry\"><span class=\"featuredhdr\">Location:</span> <span class=\"featureditem\">"+J.Location+"</span></div>"+(M?"<div class=\"featuredentry\"><span class=\"featuredhdr\">Description:</span> <span class=\"featureditem\">"+M+(K.length>0?"<a href=\"#\" style=\"display:inline;font-decoration:underline\" onclick=\"var isMore = false; var more = this.nextSibling;while (more) {if (hasClass(more, 'displayNone')){isMore=true;removeClass(more, 'displayNone')}else {addClass(more, 'displayNone')} more = more.nextSibling}this.innerHTML = '...' + (isMore ? 'less' : 'more')\" onmouseover= \"this.style.cursor=hand\">...more</a>"+K:"")+"</span></div>":"")+"</div>";return }}(this.renderData);return }function BubbleWidget(D,B){this.base=Widget;loadStyleSheet(B||"bubble.css");this.base();if(!(document.getElementById("bubble"))){var C=DIV({id:"bubble",style:"visibility:hidden;position:absolute;width:400;z-index:900"});document.body.appendChild(C);C.innerHTML="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"bubblelt\"><img src=\"images/spacer.gif\" width=\"6px\" height=\"6px\"></td><td class=\"bubbleTop\"><img src=\"images/spacer.gif\" width=\"6px\" height=\"5px\"></td><td class=\"bubblert\"><img src=\"images/spacer.gif\" width=\"6px\" height=\"6px\"></td></tr></table></td></tr><tr><td><table width=\"100%\" class=\"bubbleBody\"><tr height=\"25\"><td valign=\"top\" align=\"right\"><img src=\"images/close.gif\" onclick=\"hideInfo();\"></td></tr></table></td></tr><tr><td class=\"bubbleBody\"><div id=\"bubbleText\" width=\"90%\">A bunch of text in the bubble to check out what it looks like.</div></td></tr><tr><td><table width=\"100%\" class=\"bubbleBody\"><tr height=\"16\"><td>&nbsp;</td></tr></table></td></tr><tr><td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td class=\"bubblelb\"><img src=\"images/spacer.gif\" width=\"6px\" height=\"6px\"></td><td class=\"bubbleBot\"><img src=\"images/spacer.gif\" width=\"6px\" height=\"5px\"></td><td class=\"bubblerb\"><img src=\"images/spacer.gif\" width=\"6px\" height=\"6px\"></td></tr></table></td></tr></table></div>";var E=DIV({id:"arrowmouth","style":"visibility:hidden;position:absolute;z-index:1000","class":"arrowmouth2"});document.body.appendChild(E);E.innerHTML="<img id=\"arrowimg\" src=\"images/spacer.gif\" width=\"98px\" height=\"73px\">"}D.displayInfo=function(G,F){if(!D.bubbleDisabled){displayInfo(G,F)}};D.hideInfo=cancelInfo}function CatSelectorWidget(B){this.base=Widget;initAttributes(this,B.attributes);this.base(B);this.domNode=B;this.click=function(C,D){this.change=true};this.catsChanged=function(){if(this.change){this.change=false;return true}else{return false}};this.populate=function(){callServer(this.url+"?name="+this.domNode.id+"&companyName="+this.companyname+(this.loggedincont?"&loggedInCont="+this.loggedincont:""),null)};this.notify=function(){var D=this.initialselection;if(D){for(var E in catSelector.catState){global[this.domNode.id].catState[E]="no"}D=D.split(",");for(var E=0;E<D.length;E++){var C=D[E].replace(/^[\s]+/,"");global[this.domNode.id].catState[C]="yes"}}this.renderData()};this.getInitCategories=function(){if(this.onCategories){return }this.onCategories=[];for(var C in this.catState){if(this.catState[C]=="yes"){this.onCategories.push(this.catID[C])}}};this.catsAreOrgCats=function(){for(var C in this.cat){if(this.cat[C].length!=1||this.cat[C][0]!=C){return false}}return true};this.setOnCats=function(C){this.onCategories=[];this.catState={};if(typeof C=="string"){var F=C.split(",");for(var E=0;E<F.length;E++){var D=parseInt(F[E]);this.onCategories.push(D);this.catState[this.catName[D]]="yes"}}};this.showRSSFeeds=function(D){var E=document.getElementById("_rssFeeds");if(!E){require(host+"kalendi/portal/drag.js");loadStyleSheet(D||host+"kalendi/portal/default_popups.css");E=DIV({id:"_rssFeeds","class":"calborder",style:"width:410px;height:400px;position:absolute;left:10px;top:10px;display:none;background:white;z-index:1000"});var C=window.document.getElementsByTagName("body").item(0);C.insertBefore(E,C.firstChild);dojo.event.connect(this,"click",this,"updateRSSFeeds")}E.innerHTML=this.makeRSSFeeds(this.getElements(function(F){return hasClass(F,"cat")}),this);E.style.display="block";E.scrollTop=0;E.style.left="150px";E.style.top="200px"};this.updateRSSFeeds=function(){var C=document.getElementById("_rssFeeds");if(C&&C.style.display!="none"){C.innerHTML=makeRSSFeeds(this.getElements(function(D){return hasClass(D,"cat")}),this)}};this.RSSCat=function(C){return C.childNodes[2].data};this.nodeOn=function(C){return C.firstChild.src.indexOf("click")!=-1};this.makeRSSFeeds=function(D,H){var G="<table class=\"main\" cellpadding=\"0px\" cellspacing=\"0px\" border=\"0px\" width=\"380\" ><tr onmousedown=\"dragger.allowDrag(this.parentNode.parentNode.parentNode, event)\" ondragstart=\"return false\", ondrag=\"return false\" ondragend=\"return false\"><td class=\"title_bar\">RSS Feeds</td><td class=\"title_bar_close\"><img src=\"images/spacer.gif\" width=\"73\" height=\"21\" onclick=\"document.getElementById('_rssFeeds').style.display='none'\"></td></tr><tr><td colspan=\"2\"><div style=\"overflow: scroll;width:410px;height:400px;\"><div style=\"margin-left:10px\" class=\"bold_text\"><br>If you have an RSS enabled browser, click one of the categories below. Or you can press the 'Select and Copy' button next to that category"+(document.all?"":", type Ctrl + c,")+" and paste the link in your RSS reader.<br>";var F="http://"+document.location.host+"/kalendi/eventData.rss?portal="+encodeURI(H.companyname)+"&numFuture=7&cats="+H.onCategories;G+="<br></div><table width=\"380\"><tr><td nowrap=\"nowrap\"><a href=\""+F+"\"><b>&nbsp;All Selected</b></a></td><td nowrap=\"nowrap\"><input type=\"button\" value=\"Select and Copy\" onclick=\""+copyFn+"\">&nbsp;<input type=\"text\" style=\"visibility:hidden\" size=\"1\" value=\""+F+"\"></td></tr>";for(var E=0;E<D.length;E++){if(this.nodeOn(D[E])){var C=this.RSSCat(D[E]);var F="http://"+document.location.host+"/kalendi/eventData.rss?portal="+encodeURI(H.companyname)+"&numFuture=7&cats="+H.catID[C];G+="<tr><td><a href=\""+F+"\"><b>&nbsp;"+C+"</b></a></td><td nowrap=\"nowrap\"><input type=\"button\" value=\"Select and Copy\" onclick=\""+copyFn+"\">&nbsp;<input type=\"text\" style=\"visibility:hidden\" size=\"1\" value=\""+F+"\"></td></tr>"}}G+="</table></div></td></tr></table>";return G};this.makeRSSLinks=function(D,G){var F=document.getElementsByTagName("head")[0];F.appendChild(LINK({rel:"alternate",type:"application/rss+xml",title:"Selected Categories",href:"http://"+document.location.host+"/kalendi/eventData.rss?portal="+encodeURI(G.companyname)+"&numFuture=7&cats="+G.onCategories}));for(var E=0;E<D.length;E++){var C=this.RSSCat(D[E]);F.appendChild(LINK({rel:"alternate",type:"application/rss+xml",title:C,href:"http://"+document.location.host+"/kalendi/eventData.rss?portal="+encodeURI(G.companyname)+"&numFuture=7&cats="+G.catID[C]}))}}}function PulldownCatSelector(B){this.base=CatSelectorWidget;this.base(B);this.selectableCats=[];this.renderData=function(){this.specialCase=this.catsAreOrgCats();if(this.on){map.call(this,this.on.split(","),function(H){this.catState[H]="yes"})}if(this.off){map.call(this,this.off.split(","),function(H){this.catState[H]="no"})}this.getInitCategories();this.domNode.innerHTML="";var D,G;this.domNode.appendChild(D=SELECT({style:"width:auto"}));D.appendChild(G=OPTION({name:"any",value:"any"},"Any Category"));for(var F=0;F<this.orgCats.length;F++){if(!this.specialCase){for(var E=0;E<this.cat[this.orgCats[F]].length;E++){var C=this.cat[this.orgCats[F]][E];this.selectableCats.push(C);D.appendChild(G=OPTION({name:C,value:C},C))}}dojo.event.connect(D,"onchange",function(H){return function(I){for(F=0,l=H.onCategories.length;F<l;F++){H.onCategories.pop()}if(D.value!="any"){var J=H.catID[D.value];H.onCategories.push(J)}else{for(J in H.catID){H.onCategories.push(H.catID[J])}}H.click(J,"on")}}(this))}};this.makeRSSFeeds=function(D,H){var G="<table class=\"main\" cellpadding=\"0px\" cellspacing=\"0px\" border=\"0px\" width=\"380\" ><tr onmousedown=\"dragger.allowDrag(this.parentNode.parentNode.parentNode, event)\" ondragstart=\"return false\", ondrag=\"return false\" ondragend=\"return false\"><td class=\"title_bar\">RSS Feeds</td><td class=\"title_bar_close\"><img src=\"images/spacer.gif\" width=\"73\" height=\"21\" onclick=\"document.getElementById('_rssFeeds').style.display='none'\"></td></tr><tr><td colspan=\"2\"><div style=\"overflow: scroll;width:410px;height:400px;\"><div style=\"margin-left:10px\" class=\"bold_text\"><br>If you have an RSS enabled browser, click one of the categories below. Or you can press the 'Select and Copy' button next to that category"+(document.all?"":", type Ctrl + c,")+" and paste the link in your RSS reader.<br>";var F="http://"+document.location.host+"/kalendi/eventData.rss?portal="+encodeURI(H.companyname)+"&numFuture=7&cats="+H.onCategories;G+="<br></div><table width=\"380\"><tr><td nowrap=\"nowrap\"><a href=\""+F+"\"><b>&nbsp;All Selected</b></a></td><td nowrap=\"nowrap\"><input type=\"button\" value=\"Select and Copy\" onclick=\""+copyFn+"\">&nbsp;<input type=\"text\" style=\"visibility:hidden\" size=\"1\" value=\""+F+"\"></td></tr>";for(var E=0;E<this.selectableCats.length;E++){var C=this.selectableCats[E];var F="http://"+document.location.host+"/kalendi/eventData.rss?portal="+encodeURI(H.companyname)+"&numFuture=7&cats="+H.catID[C];G+="<tr><td><a href=\""+F+"\"><b>&nbsp;"+C+"</b></a></td><td nowrap=\"nowrap\"><input type=\"button\" value=\"Select and Copy\" onclick=\""+copyFn+"\">&nbsp;<input type=\"text\" style=\"visibility:hidden\" size=\"1\" value=\""+F+"\"></td></tr>"}G+="</table></div></td></tr></table>";return G};this.populate()}function MidCatSelectorWidget(D){this.base=CatSelectorWidget;this.caton="caton.gif";this.catnoton="catnoton.gif";this.cathalf="cathalf.gif";this.bluestate="bluestate.gif";this.blueclickstate="blueclickstate.gif";this.cssurl=host+"kalendi/portal/catselector.css";this.base(D);dojo.event.connect(this.domNode,"onclick",function(E){return function(H){var G=H.target?H.target:H.srcElement;if(G.nodeName!="IMG"){return }var I=E.catID[G.nextSibling.nextSibling.data];var F=E.specialCase?G.src.indexOf("not")==-1:G.src.indexOf("click")!=-1;if(F){E.onCategories.push(I)}else{remIf(E.onCategories,function(J){return J==I})}E.click(I,F?"on":"off")}}(this));this.initOrgCats=function(E){map.call(this,E,function(I){var G=I.childNodes[1].data;var F=true,K=true;if(this.specialCase){F=this.catState[G]=="yes"}else{for(var H=1;H<I.parentNode.childNodes.length;H++){if(I.parentNode.childNodes[H].firstChild.src.indexOf("click")!=-1){K=false}else{F=false}}}var J;I.insertBefore(J=IMG({src:host+"kalendi/portal/images/"+(F?this.caton:(K?this.catnoton:this.cathalf)),style:"border:0;padding-right:3px"}),I.firstChild);J.onclick=function(M,L){if(M.specialCase){return function(N){this.src=host+"kalendi/portal/images/"+(this.src.indexOf("not")!=-1?M.caton:M.catnoton)}}else{return function(){if(C(this.parentNode)){M.setAllOff(this.parentNode)}else{M.setAllOn(this.parentNode)}}}}(this,this.catID[G])})};var C=function(F){for(var E=1;E<F.parentNode.childNodes.length;E++){if(F.parentNode.childNodes[E].firstChild.src.indexOf("click")==-1){return false}}return true};var B=function(F){for(var E=1;E<F.parentNode.childNodes.length;E++){if(F.parentNode.childNodes[E].firstChild.src.indexOf("click")!=-1){return false}}return true};this.setAllOn=function(F){F.firstChild.src=host+"kalendi/portal/images/"+this.caton;for(var E=1;E<F.parentNode.childNodes.length;E++){var G=F.parentNode.childNodes[E].firstChild;if(G.src.indexOf("click")==-1){G.src=host+"kalendi/portal/images/"+this.blueclickstate;var H=this.catID[G.parentNode.childNodes[2].data];this.onCategories.push(H)}}};this.setAllOff=function(F){F.firstChild.src=host+"kalendi/portal/images/"+this.catnoton;for(var E=1;E<F.parentNode.childNodes.length;E++){var G=F.parentNode.childNodes[E].firstChild;if(G.src.indexOf("click")!=-1){G.src=host+"kalendi/portal/images/"+this.bluestate;var H=this.catID[G.parentNode.childNodes[2].data];remIf(this.onCategories,function(I){return I==H})}}};this.renderData=function(){this.domNode.innerHTML="";var H="width:23%",J="width:22%";this.specialCase=this.catsAreOrgCats();if(this.on){map.call(this,this.on.split(","),function(L){this.catState[L]="yes"})}if(this.off){map.call(this,this.off.split(","),function(L){this.catState[L]="no"})}this.getInitCategories();if(this.orgCats.length<4){H="width:31%"}if(this.orgCats.length==1){H="width:100%"}for(var I=0;I<this.orgCats.length;I++){var F;this.domNode.appendChild(F=DIV({"class":"orgcatcell",style:((I+1)%4==0?J:H)},DIV({id:"orgcat","class":"orgcat"},(isIE?SPAN({style:"width:3px"}," "):""),this.orgCats[I])));if(!this.specialCase){for(var G=0;G<this.cat[this.orgCats[I]].length;G++){var E=this.cat[this.orgCats[I]][G];var K;F.appendChild(DIV({"class":"cat"},K=IMG({src:host+"kalendi/portal/images/"+(this.catState[E]=="yes"?this.blueclickstate:this.bluestate),style:"padding-right:1em;border:0"}),(isIE?" ":""),E));K.onclick=function(L){return function(){var M=this.parentNode.parentNode.firstChild;if(this.src.indexOf("click")==-1){this.src=host+"kalendi/portal/images/"+L.blueclickstate;if(C(M)){M.firstChild.src=host+"kalendi/portal/images/"+L.caton}else{M.firstChild.src=host+"kalendi/portal/images/"+L.cathalf}}else{this.src=host+"kalendi/portal/images/"+L.bluestate;if(B(M)){M.firstChild.src=host+"kalendi/portal/images/"+L.catnoton}else{M.firstChild.src=host+"kalendi/portal/images/"+L.cathalf}}}}(this)}}}this.domNode.appendChild(DIV({"class":"orgcatfooter"}," "));this.initOrgCats(this.getElementsById("orgcat"))};this.populate()}function SideCatSelectorWidget(C,B){this.base=CatSelectorWidget;loadStyleSheet(B||host+"kalendi/portal/sideselector.css");this.base(C);var D=function(F){var E=F.parentNode.nextSibling;if(hasClass(E,"hidden")){removeClass(E,"hidden");F.src=host+"kalendi/portal/images/minus.gif"}else{addClass(E,"hidden");F.src=host+"kalendi/portal/images/plus.gif"}};this.click=function(F,E){var G=this.catID[F.nextSibling.data];if(G){if(E=="off"){remIf(this.onCategories,function(H){return H==G})}else{this.onCategories.push(G)}this.change=true}};this.selectNode=function(E){if(E.nodeName=="IMG"){if(E.src.indexOf("large")==-1){E.src=host+"kalendi/portal/images/"+this.blueclickstate}else{E.src=host+"kalendi/portal/images/"+this.caton}}};this.isSelected=function(E){if(E.nodeName=="IMG"&&E.src.indexOf("on")!=-1){return true}return false};this.unselectNode=function(E){if(E.nodeName=="IMG"){if(E.src.indexOf("large")!=-1){E.src=host+"kalendi/portal/images/"+this.catnoton}else{E.src=host+"kalendi/portal/images/"+this.bluestate}}};this.initOrgCats=function(E){map.call(this,E,function(I){var G=I.innerHTML;var F=true,K=true;if(this.specialCase){F=this.catState[G]=="yes"}else{for(var H=1;H<I.parentNode.nextSibling.childNodes.length;H++){if(I.parentNode.nextSibling.childNodes[H].firstChild.src.indexOf("on")!=-1){K=false}else{F=false}}}var J=I.parentNode.firstChild;J.src=host+"kalendi/portal/images/"+(F?this.caton:(K?this.catnoton:this.cathalf))})};this.setAllOn=function(G){this.selectNode(G);var E=G.parentNode.nextSibling.childNodes;for(var F=0;F<E.length;F++){if(!this.isSelected(E[F].firstChild)){this.selectNode(E[F].firstChild);var H=this.catID[E[F].childNodes[1].data];this.onCategories.push(H)}}};this.setAllOff=function(G){this.unselectNode(G);var E=G.parentNode.nextSibling.childNodes;for(var F=0;F<E.length;F++){if(this.isSelected(E[F].firstChild)){this.unselectNode(E[F].firstChild);var H=this.catID[E[F].childNodes[1].data];remIf(this.onCategories,function(I){return I==H})}}};this.orgCatSelect=function(E){if(this.isSelected(E)){this.unselectNode(E);this.setAllOff(E);this.click(E,"off")}else{this.selectNode(E);this.setAllOn(E);this.click(E,"on")}};this.catSelect=function(E){if(this.isSelected(E)){this.unselectNode(E);this.click(E,"off");E.parentNode.parentNode.previousSibling.firstChild.src=host+(this.allOff.call(this,E)?"kalendi/portal/images/"+this.catnoton:"kalendi/portal/images/"+this.cathalf)}else{this.selectNode(E);E.parentNode.parentNode.previousSibling.firstChild.src=host+(this.allOn.call(this,E)?"kalendi/portal/images/"+this.caton:"kalendi/portal/images/"+this.cathalf);this.click(E,"on")}};this.allOff=function(F){for(var E=0;E<F.parentNode.parentNode.childNodes.length;E++){if(this.isSelected(F.parentNode.parentNode.childNodes[E].firstChild)){return false}}return true};this.allOn=function(F){for(var E=0;E<F.parentNode.parentNode.childNodes.length;E++){if(!this.isSelected(F.parentNode.parentNode.childNodes[E].firstChild)){return false}}return true};this.renderData=function(){this.specialCase=this.catsAreOrgCats();if(this.on){map.call(this,this.on.split(","),function(N){this.catState[N]="yes"})}if(this.off){map.call(this,this.off.split(","),function(N){this.catState[N]="no"})}this.getInitCategories();var M,E,K;C.innerHTML="";for(var I=0;I<this.orgCats.length;I++){C.appendChild(DIV({"class":"menu_"},K=IMG({style:"float:right;margin-top:2px",src:host+"kalendi/portal/images/"+this.caton}),!this.showcats?M=IMG({style:"margin-right:3px;margin-bottom:-1px",align:"bottom",src:host+"kalendi/portal/images/plus.gif"}):M=IMG({style:"margin-right:3px;margin-bottom:-1px",align:"bottom",src:host+"kalendi/portal/images/minus.gif"}),E=SPAN({id:"orgCat"},this.orgCats[I])));K.onclick=function(N){return function(){N.orgCatSelect(this)}}(this);if(M){M.onclick=function(){D(this)}}var H;if(!this.specialCase){C.appendChild(H=DIV({"class":!this.showcats?"submenu_ hidden":"submenu_"}));var J=true;for(var G=0;G<this.cat[this.orgCats[I]].length;G++){var L=this.cat[this.orgCats[I]][G];var F;H.appendChild(DIV({"class":"cat"},F=IMG({src:host+"kalendi/portal/images/"+this.bluestate,style:"margin-right:2px"}),L));F.onclick=function(N){return function(){N.catSelect(this)}}(this);if(this.catState[L]=="yes"){this.selectNode(F)}J=false}}}this.initOrgCats(this.getElementsById("orgCat"))};this.RSSCat=function(E){return E.childNodes[1].data};this.nodeOn=function(E){return E.childNodes[0].src.indexOf("on")!=-1};this.populate()}function CalWidget(C){var B=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];this.click=function(F,H,G,E){if(G=="range"){this.mode=G;this.year=H.getFullYear();this.month=H.getMonth();this.day=H.getDate();this.end=E}else{this[F]=H;if(G){this.mode=G;if(G=="month"||G=="year"){this.day=1}}}this.populate()};this.populate=function(){var J,F,I,L,K;var H=new Date();H.setFullYear(this.year,this.month,this.day);if(this.mode=="week"){this.nextWeek=new Date(this.week.getTime()+(7*86400000))}this.domNode.innerHTML="";this.domNode.appendChild(DIV({"class":"calhdr",style:"width:100%;text-align:center;border-top:1px solid white"},L=SPAN({"class":"calarrowback",onmouseover:"this.style.cursor=hand"})," ",this.year.toString()," ",K=SPAN({"class":"calarrowback",onmouseover:"this.style.cursor=hand"})));L.innerHTML="&laquo;";K.innerHTML="&raquo;";L.field=K.field="year";L.val=this.year-1;K.val=this.year+1;this.domNode.appendChild(DIV({style:"background-color:#DDDDDD"},TABLE({onmouseover:"this.style.cursor=hand","cellSpacing":"1","cellPadding":"0",width:"100%"},J=TBODY(F=TR()))));for(var G=0;G<6;G++){F.appendChild(I=TD({"class":(H.getMonth()==G?"calmonthon":"calmonth")},B[G]));I.mode=I.field="month";I.val=G}F=J.appendChild(TR());for(var G=6;G<12;G++){F.appendChild(I=TD({"class":(H.getMonth()==G?"calmonthon":"calmonth")},B[G]));I.mode=I.field="month";I.val=G}F=J.appendChild(TR());F.appendChild(TD({width:"16.66%","class":"caldayhdr"}," "));F.appendChild(TD({"colSpan":"5"},TABLE({width:"100%","cellSpacing":"1","cellPadding":"0"},TBODY(TR(TD({"class":"caldayhdr"},"S"),TD({"class":"caldayhdr"},"M"),TD({"class":"caldayhdr"},"T"),TD({"class":"caldayhdr"},"W"),TD({"class":"caldayhdr"},"T"),TD({"class":"caldayhdr"},"F"),TD({"class":"caldayhdr"},"S"))))));H.setDate(1);H.setDate(H.getDate()-H.getDay());while((H.getMonth()<=this.month&&H.getFullYear()<=this.year)||(this.month==0&&H.getMonth()==11)){J.appendChild(TR(TD({align:"right","class":"calday",style:"text-align:right;",title:"View week"},I=IMG({src:host+"kalendi/portal/images/btn_right_small.gif"})),TD({"colSpan":"5"},TABLE({width:"100%","cellSpacing":"1","cellPadding":"0"},TBODY(F=TR())))));I.mode=I.field="week";I.val=new Date(H.getTime());for(var G=0;G<7;G++){var E=(H.getMonth()!=this.month?"caldayout":(this.mode=="day"&&H.getDate()==this.day?"caldayon":(this.mode=="week"&&H>=this.week&&H<this.nextWeek?"caldayon":(this.mode=="range"&&H.getDate()>=this.day&&H<=this.end?"caldayon":"calday"))));F.appendChild(I=TD({"class":E,width:"13.28%"},H.getDate().toString()));if(H.getMonth()==this.month){I.mode=I.field="day";I.val=H.getDate()}H.setDate(H.getDate()+1)}}};this.getDateRange=function(){if(this.mode=="day"){return{start:new Date(this.year,this.month,this.day),end:new Date(this.year,this.month,this.day+1)}}else{if(this.mode=="week"){return{start:this.week,end:this.nextWeek}}else{if(this.mode=="range"){return{start:new Date(this.year,this.month,this.day),end:this.end}}else{return{start:new Date(this.year,this.month,1),end:new Date(this.year,this.month+1,1)}}}}};this.gotoToday=function(F){if(this.disabled){displayInfo("Switch to list mode to use this functionality.",F,0);return }var E=new Date();this.year=E.getFullYear();this.month=E.getMonth();this.click("day",E.getDate(),"day")};var D=[-2,4,3,2,1,0,-1];this.gotoWeekEnd=function(H,F){if(this.disabled){displayInfo("Switch to list mode to use this functionality.",H,0);return }var G=new Date();G.setTime(G.getTime()+(86400000*7*(F-1)));G.setTime(G.getTime()+(86400000*D[G.getDay()]));var E=new Date(G.getTime()+(86400000*2));this.click("range",G,"range",E)};this.gotoThisWeek=function(F){if(this.disabled){displayInfo("Switch to list mode to use this functionality.",F,0);return }var E=new Date();E.setTime(E.getTime()-(86400000*E.getDay()));this.year=E.getFullYear();this.month=E.getMonth();this.day=E.getDate();this.click("week",E,"week")};this.gotoThisWeekFromDay=function(F){if(this.disabled){displayInfo("Switch to list mode to use this functionality.",F,0);return }var E=new Date();this.year=E.getFullYear();this.month=E.getMonth();this.day=E.getDate();this.click("week",E,"week")};this.gotoNextWeek=function(F){if(this.disabled){displayInfo("Switch to list mode to use this functionality.",F,0);return }var E=new Date();E.setTime(E.getTime()-(86400000*E.getDay()));E.setTime(E.getTime()+(86400000*7));this.year=E.getFullYear();this.month=E.getMonth();this.day=E.getDate();this.click("week",E,"week")};this.gotoThisMonth=function(F){if(this.disabled){displayInfo("Switch to list mode to use this functionality.",F,0);return }var E=new Date();this.year=E.getFullYear();this.day=1;this.click("month",E.getMonth(),"month")};this.gotoMonth=function(F){var E=new Date();this.year=E.getFullYear();this.day=1;this.click("month",F,"month")};this.domNode=C;this.base=Widget;this.cssurl=host+"kalendi/portal/minical.css";this.mode="day";initAttributes(this,C.attributes);this.base(C);this.week=0;if(this.month){this.month=parseInt(this.month)}dojo.event.connect(this.domNode,"onclick",function(E){return function(F){if(E.disabled){displayInfo("Switch to list mode to use this functionality.",F,0);return }var G=(F.target)?F.target:F.srcElement;if(G.field&&(typeof G.val=="number"||G.val.constructor==Date)){E.click(G.field,G.val,G.mode)}}}(this));if(this.mode=="day"){this.gotoToday()}else{if(this.mode=="month"){if(this.month){this.gotoMonth(this.month)}else{this.gotoThisMonth()}}else{if(this.mode=="week"){this.gotoThisWeek()}else{if(this.mode=="weekFromDay"){this.gotoThisWeekFromDay()}}}}}function SearchWidget(C){this.base=Widget;this.cssurl=host+"kalendi/portal/default_popups.css";initAttributes(this,C.attributes);this.base(C);this.domNode=C;var D=this.getElementById("searchText");var B=this.getElementById("searchButton");this.click=function(E){this.searchString=E};require(host+"kalendi/portal/drag.js");require(host+"kalendi/calendar1.js");require(host+"kalendi/portal/advancedsearch.js");this.getSearchString=function(){var E=this.searchString;this.searchString=null;return E};this.doAdvanced=function(G,F,E){F=(F)?F:((event)?event:null);if(this.disabled){displayInfo("Switch to list mode to use this functionality",F,0)}else{if(!document.getElementById("_adsrch")){setupAS(E)}advancedSearch(F)}};dojo.event.connect(D,"onkeyup",function(E){return function(G){var F=(G.target)?G.target:G.srcElement;if(F){activateONCR(G,E.click,F.value)}}}(this));dojo.event.connect(B,"onclick",function(E){return function(F){if(E.disabled){displayInfo("Switch to list mode to use this functionality",F,0)}else{return E.click(D.value)}}}(this))}function CustPropSearchWidget(B){this.base=Widget;this.cssurl=host+"kalendi/portal/default_popups.css";initAttributes(this,B.attributes);this.base(B);this.domNode=B;this.selected=null;this.propname=B.id.substr(6);this.selector=this.getElementById(this.propname);this.reset=function(){this.change("#");this.selector.selectedIndex=0};this.change=function(C){this.selected=C=="#"?null:C};this.getPropString=function(){if(this.selected&&this.selected!=""){return this.propname+":"+this.selected}};this.addOptions=function(){this.selector.appendChild(OPTION({value:"#"},"<Any>"));for(var C=0;C<this.vals.length;C++){this.selector.appendChild(OPTION({value:this.vals[C]},this.vals[C]))}};dojo.event.connect(this.selector,"onchange",function(C){return function(D){if(C.disabled){displayInfo("Switch to list mode to use this functionality",D,0)}else{return C.change(C.selector.value)}}}(this))}function SearchCityWidget(C,B){this.base=CustPropSearchWidget;this.base(C);dojo.event.connect(this.selector,"onchange",function(D){return function(E){if(D.disabled){displayInfo("Switch to list mode to use this functionality",E,0)}else{B.reset();return D.change(D.selector.value)}}}(this))}function CalDisplayWidget(B){this.addEl=function(C,D){if(!this.data[C]){this.data[C]=[D]}else{this.data[C].push(D)}};this.click=function(D,C){this.firstDay=new Date(C,D,1);this.month=this.firstDay.getMonth();this.year=this.firstDay.getFullYear();this.populate()};this.populate=function(C){if(!this.url){return }var D=new Date(this.firstDay);D.setMonth(D.getMonth()+1);callServer(this.url+(this.url.indexOf("?")!=-1?"&":"?")+"name="+this.domNode.id+"&startDT="+gen_date(this.firstDay)+"&endDT="+gen_date(D)+"&cal=yes&catIDs=85,83,81,82,87,104,84,86,111,98,80,76,79,78,75,77,89,108,107,93,92,110,91,90,113,109,94,96,97,99,95,112","calData")};this.renderMonth=function(){this.bodyLoc.innerHTML="";var C=this.domNode.scrollWidth;var K=C/7,G,F;this.bodyLoc.appendChild(TABLE({width:C,border:"0","cellSpacing":"0","cellPadding":"0","class":"calborder"},TBODY(TR(TD({align:"center",height:"40px",valign:"middle","class":"title"},H1(G=IMG({"style":"vertical-align:text-bottom;cursor:"+hand,src:host+"kalendi/images/left_day.gif"}),months[this.firstDay.getMonth()]," ",this.firstDay.getFullYear().toString(),F=IMG({"style":"vertical-align:text-bottom;cursor:"+hand,src:host+"kalendi/images/right_day.gif"})))))));G.onclick=function(N){return function(){N.click(N.month-1,N.year)}}(this);F.onclick=function(N){return function(){N.click(N.month+1,N.year)}}(this);var I=TBODY();this.bodyLoc.appendChild(TABLE({width:C,border:"0","cellSpacing":"1","cellPadding":"2","class":"monthback"},I));I.appendChild(TR(TD({valign:"top",width:K,height:"12","class":"dateback"},CENTER({"class":"V9BOLD"},"Sun")),TD({valign:"top",width:K,height:"12","class":"dateback"},CENTER({"class":"V9BOLD"},"Mon")),TD({valign:"top",width:K,height:"12","class":"dateback"},CENTER({"class":"V9BOLD"},"Tues")),TD({valign:"top",width:K,height:"12","class":"dateback"},CENTER({"class":"V9BOLD"},"Wed")),TD({valign:"top",width:K,height:"12","class":"dateback"},CENTER({"class":"V9BOLD"},"Thurs")),TD({valign:"top",width:K,height:"12","class":"dateback"},CENTER({"class":"V9BOLD"},"Fri")),TD({valign:"top",width:K,height:"12","class":"dateback"},CENTER({"class":"V9BOLD"},"Sat"))));this.bodyLoc.appendChild(TABLE({width:C,border:"0","cellSpacing":"0","cellPadding":"0"},TBODY(TR(TD({"class":"tbll"},IMG({src:"images/spacer.gif",width:"8",height:"4"})),TD({"class":"tblbot"},IMG({src:"images/spacer.gif",width:"8",height:"4"})),TD({"class":"tblr"},IMG({src:"images/spacer.gif",width:"8",height:"4"}))))));var D=new Date(this.firstDay);D.setDate(D.getDate()-D.getDay());var J=new Date();while((D.getFullYear()<this.year)||(D.getMonth()<=this.month&&D.getFullYear()==this.year)){var M=TR();I.appendChild(M);for(var H=0;H<7;H++){var L=D.getMonth()==this.month&&D.getFullYear()==this.year?((D.getDate()==J.getDate()&&D.getMonth()==J.getMonth()&&D.getFullYear()==J.getFullYear())?"monthon":"monthreg"):"monthoff";var E;M.appendChild(E=TD({"class":L,width:K,height:K},DIV({"class":"psf",width:"100%",align:"right"},SPAN(D.getDate().toString()))));this.dayPtrs[gen_date(D)]=E;D.setDate(D.getDate()+1)}}};this.showEvents=function(){for(var E in this.data){var F=this.dayPtrs[E];if(!F){continue}var D=this.data[E];F.firstChild.className="psfU";F.firstChild.firstChild.style.cursor=hand;for(var C=0;C<D.length;C++){F.onclick=function(H,G){return function(I){displayInfo(function(){return eventInfoFn(H,G)},I,0)}}(D,this)}}};this.cssurl=host+"kalendi/portal/cal.css";this.firstDay=new Date();this.firstDay.setDate(1);this.month=this.firstDay.getMonth();this.year=this.firstDay.getFullYear();initAttributes(this,B.attributes);this.base=Widget;this.base(B);this.domNode=B;this.notify=function(){this.renderMonth();this.showEvents()};this.dayPtrs={};this.bodyLoc=this.getElementById("bodyLoc")}function CatSelectingCalWidget(C,E,D,B){this.base=CalDisplayWidget;this.base(C);this.getOnCats=function(){return E.onCategories};this.getDateRange=function(){var F=new Date(this.firstDay);F.setMonth(F.getMonth()+1);return{start:this.firstDay,end:F}};this.populate=function(H){if(!this.url){return }var F=this.getDateRange();var G=D?D.getSearchString():"";callServer(this.url+(this.url.indexOf("?")!=-1?"&":"?")+"cal=yes&name="+this.domNode.id+(this.highlight?"&highlight=yes&companyID="+E.companyID:"&catIDs="+this.getOnCats())+"&startDT="+gen_date(F.start)+"&endDT="+gen_date(F.end),"calData")}}function SwapperWidget(B,H,G,E,F,C,D){this.base=Widget;this.base();this.obj1=H;this.obj2=G;global[B]=this;this.swap=function(){if(H.domNode.style.display=="none"){H.domNode.style.display="block";G.domNode.style.display="none";if(E){E.call(H)}else{if(H.swapin){H.swapin.call(H)}}if(D){D.call(H)}else{if(G.swapout){G.swapout.call(G)}}}else{G.domNode.style.display="block";H.domNode.style.display="none";if(C){C.call(G)}else{if(G.swapin){G.swapin.call(G)}}if(F){F.call(H)}else{if(H.swapout){H.swapout.call(H)}}}}}function ReminderWidget(E,C,D,B,F){this.base=Widget;this.base(E);this.owner=C;E.onclick=function(H,G){return function(I){if(typeof _email!="undefined"&&_email!=""){H.addReminders(I,G)}else{displayInfo(RemindersDescr,I,0)}}}(this,B);if(D){D.onclick=function(G){if(typeof _email=="undefined"||_email==""){displayInfo(RemindersDescr,G,0)}else{if(!document.getElementById("_notes")){setupNotifications(F);require(host+"kalendi/portalNotifications.do");document.getElementById("addrtype").focus()}else{document.getElementById("_notes").style.display="block";var H=document.getElementById("contentTable");while(H.rows.length>0){H.deleteRow(0)}notes.addNotifications(H);document.getElementById("addrtype").focus()}}}}this.addReminders=function(J,H){var L=document.getElementById("_reminders");if(L){L.parentNode.removeChild(L)}var I=J||event;if(!this.owner.selectedEls||this.owner.selectedEls.length==0){alert("At least one event must be selected.")}else{var G=I.clientX;var K=I.clientY;if(document.all){G+=document.body.scrollLeft;K+=document.body.scrollTop;I.cancelBubble=true}else{if(document.getElementById){G+=scrollX;K+=scrollY}}setupReminders(this.owner.selectedEls,G,K,H)}}}function MapItWidget(C,B){this.base=Widget;this.base(C);this.owner=B;C.onclick=function(E){return function(F){E.mapIt(F)}}(this);this.getEvent=function(G){var F=this.owner.data;if(!F||F.length==0){return null}for(var E=0;E<F.length;E++){if(F[E].instanceID==G){return F[E]}}return null};function D(F){var E=listW.extras[F];for(l in E){if(E[l].indexOf("__map")==0){return E[l].substr(5)}}return null}this.mapIt=function(G){var E=G||F;if(!this.owner.selectedEls||this.owner.selectedEls.length==0){alert("One event must be selected.")}else{if(this.owner.selectedEls.length>1){alert("Only one event may be mapped at time.")}else{var H=this.owner.selectedEls[0];var F=this.getEvent(H);if(!F){alert("Error: missing eventId");return }var I=D(F.id);if(!I){alert("Unable to map this event.  A 'MapIt' property\r\nhas not been assigned.")}else{getDirections(G,I)}}}}}function DownloadWidget(C,B){this.base=Widget;this.base(C);this.owner=B;C.onclick=function(D){return function(E){D.download(E)}}(this);this.download=function(F){var E=F||event;if(!this.owner.selectedEls||this.owner.selectedEls.length==0){alert("At least one event must be selected.")}else{var D=E.clientX;var G=E.clientY;if(document.all){D+=document.body.scrollLeft;G+=document.body.scrollTop;E.cancelBubble=true}else{if(document.getElementById){D+=scrollX;G+=scrollY}}window.open(host+"kalendi/portalDownload.ics?ids="+this.owner.selectedEls+"&format=ics")}}}function MapWidget(E){this.base=Widget;initAttributes(this,E.attributes);this.base(E);this.domNode=E;this.selected=null;this.allBtn=this.getElementById("allBtn");if(this.allBtn.type=="checkbox"){this.allBtn.checked=true}this.imgEl=E.getElementsByTagName("IMG")[0];this.defaultImg=this.imgEl.src;this.click=function(){};var F=E.getElementsByTagName("AREA");for(var C=0;C<F.length;C++){var B=F[C].getAttribute("propValue");var D=F[C].getAttribute("imgVal");if(B){F[C].href="javascript:"+E.id+".selectArea('"+B+"','"+(D||"")+"')"}}this.selectArea=function(H,G){this.selected=H;if(this.allBtn.type=="checkbox"){this.allBtn.checked=false}if(G&&G!=""){this.imgEl.src=G}this.click()};this.unselectArea=function(){this.selected=null;this.imgEl.src=this.defaultImg;this.click()};this.getPropString=function(){if(this.selected&&this.selected!=""){return this.propname+":"+this.selected}};this.allBtn.onclick=function(G){return function(){G.unselectArea()}}(this)}function MapWidgetWithCity(D,B){this.base=MapWidget;this.base(D);this.searchCityWidget=new SearchCityWidget(B,this);var C=this.selectArea;this.selectArea=function(G,F){this.searchCityWidget.reset();C.call(this,G,F)};var E=this.getPropString;this.getPropString=function(){var F=this.searchCityWidget.getPropString();if(F){return F}return E.call(this)};this.reset=function(){this.unselectArea();this.allBtn.checked=false};this.allBtn.onclick=function(F){return function(){F.searchCityWidget.reset();F.unselectArea()}}(this)}function MultiCheckBoxWidget(C){this.base=Widget;initAttributes(this,C.attributes);this.base(C);this.domNode=C;this.allBtn=this.getElementById("allBtn");if(this.allBtn.type=="checkbox"){this.allBtn.checked=true}this.click=function(){};this.boxes=C.getElementsByTagName("INPUT");this.getPropString=function(){if(this.allBtn.checked){return""}var D="";for(var E=0;E<this.boxes.length;E++){if(this.boxes[E]!=this.allBtn&&this.boxes[E].checked){D+=(D.length>0?",":"")+this.boxes[E].value}}return this.allBtn.name+":"+D};this.allBtn.onclick=function(D){return function(){if(this.checked){for(var E=0;E<D.boxes.length;E++){if(D.boxes[E]!=D.allBtn){D.boxes[E].checked=false}}D.click()}else{this.checked=true}}}(this);this.noneChecked=function(){for(var D=0;D<this.boxes.length;D++){if(this.boxes[D]!=this.allBtn&&this.boxes[D].checked){return false}}return true};for(var B=0;B<this.boxes.length;B++){if(this.boxes[B]!=this.allBtn){this.boxes[B].onclick=function(D){return function(){if(this.checked){D.allBtn.checked=false}else{if(D.noneChecked()){D.allBtn.checked=true}}D.click()}}(this)}}}function hide(C){var B=document.getElementById(C);if(B){B.style.visibility="hidden"}}function getInsideWindowWidth(){if(window.innerWidth){return window.innerWidth}else{if(document.compatMode&&document.compatMode.indexOf("CSS1")>=0){return document.body.parentElement.clientWidth}else{if(document.body&&document.body.clientWidth){return document.body.clientWidth}}}return 0}function getObjectWidth(D){var C=typeof (D)=="string"?document.getElementById(D):D;var B=0;if(C.offsetWidth){B=C.offsetWidth}else{if(C.clip&&C.clip.width){B=C.clip.width}else{if(C.style&&C.style.pixelWidth){B=C.style.pixelWidth}}}return parseInt(B)}function getObjectHeight(D){var C=typeof (D)=="string"?document.getElementById(D):D;if(!C){return 0}var B=0;if(C.offsetHeight){B=C.offsetHeight}else{if(C.clip&&C.clip.height){B=C.clip.height}else{if(C.style&&C.style.pixelHeight){B=C.style.pixelHeight}}}return parseInt(B)}function showAbsolute(D,B,E){var C=document.getElementById(D).style;C.left=B+"px";C.top=E+"px";C.visibility="visible"}function populateBubble(F,E){hide("bubble");hide("arrowmouth");var B=document.getElementById("bubble");B.style.width="400px";var D=document.getElementById(F);D.style.height="auto";D.innerHTML=D.text;var C=getObjectWidth(D.firstChild);if(C>400){B.style.width=C}if(D.scrollHeight>400){D.style.height=400}}function eventInfoFn(C,E){var B="";for(var D=0;D<C.length;D++){if(B.length>0){B+="<hr>"}B+="<div class=\"caldcaption\">"+C[D].Caption+"</div><div class=\"calddate\">"+formatDate(C[D].StartDate,C[D].EndDate,C[D].AllDay=="1")+"</div><div><span class=\"caldhdr\">Categories:</span><span class=\"calditem\">"+E.categories[C[D].instanceID]+"</span></div>";var F=E.extras[C[D].id];for(var G in F){B+=F[G].indexOf("__url")==0?"<div class=\"calditem\"><a href=\""+F[G].substr(5)+"\" onclick=\"window.open(this.href); return false\">"+G+"</a></div>":"<div><span class=\"caldhdr\">"+G+":</span><span class=\"calditem\"> "+F[G]+"</span></div>"}if(C[D].Description){B+="<div class=\"calddesc\">"+C[D].Description+"</div>"}}return B}function displayInfo(E,C,D){C=C||event;if(D==null){D=500}if(!loaded){return }if(typeof E=="function"){E=E()}if(!E||E==""){hide("bubble");hide("arrowmouth");return }var B=C.clientX;var F=C.clientY;stop(C);document.getElementById("bubbleText").text="<table><tr><td width=\"5\">&nbsp;</td><td>"+E+"</td></tr></table>";if(document.all){B+=document.body.scrollLeft;F+=document.body.scrollTop;C.cancelBubble=true}else{if(document.getElementById){B+=scrollX;F+=scrollY}}if(D!=0){document.getElementById("bubble").timeoutID=setTimeout(function(G,H){return function(){populateBubble("bubbleText");showBubble("bubble","arrowmouth",G,H);document.getElementById("bubble").timeoutID=false}}(B,F),D)}else{populateBubble("bubbleText");showBubble("bubble","arrowmouth",B,F)}}function cancelInfo(){if(!loaded){return }var B=document.getElementById("bubble");if(B&&B.timeoutID){clearTimeout(B.timeoutID);B.timeoutID=false}}function hideInfo(){cancelInfo();hide("bubble");hide("arrowmouth")}function Round(E,B,C){var D=document.getElementById(E);if(D.firstChild.className=="rtop"){return }AddTop(D,B,C);AddBottom(D,B,C)}function AddTop(F,C,D){var E;var H=document.createElement("b");var I="r";var G=4;H.className="rtop";H.style.backgroundColor=C;for(E=1;E<=G;E++){var B=document.createElement("b");B.className=I+E;B.style.backgroundColor=D;H.appendChild(B)}F.insertBefore(H,F.firstChild)}function AddBottom(F,C,D){var E;var H=document.createElement("b");var I="r";var G=4;H.className="rbottom";H.style.backgroundColor=C;for(E=G;E>0;E--){var B=document.createElement("b");B.className=I+E;B.style.backgroundColor=D;H.appendChild(B)}F.appendChild(H,F.firstChild)}function showBubble(B,M,K,H){document.getElementById(B).style.visibility="visible";document.getElementById(M).style.visibility="visible";var D=getObjectWidth(B);var E=getObjectHeight(B);var C=D/2-45;var F=C-10;var N=K-(D-95)/2;var L=H-69-E;var J=K;var G=H-94;var I=N+D-getInsideWindowWidth()+20;if(I>0){N-=Math.min(I,F)}else{if(N<0){N+=Math.min(-N,C)}}if((document.all&&L<100)||(!document.all&&L<0)){G+=95;L=H+71;document.getElementById("arrowmouth").className="arrowmouth3"}else{G=G+22;document.getElementById("arrowmouth").className="arrowmouth2"}showAbsolute(M,J,G);showAbsolute(B,N,L)}function instanceOf(B,C){while(B!=null){if(B==C.prototype){return true}B=B.__proto__}return false}function getbyId(E,C){if(C.id&&C.id==E){return C}for(var B=0;B<C.childNodes.length;B++){var D=getbyId(E,C.childNodes[B]);if(D){return D}}return null}function getbyClass(B,D){if(hasClass(D,B)){return D}if(D.childNodes){for(var C=0;C<D.childNodes.length;C++){var E=getbyClass(B,D.childNodes[C]);if(E){return E}}}return null}function markElsWTag(B,D,F,E){if(D.nodeName&&D.nodeName==B){D[F]=E}for(var C=0;C<D.childNodes.length;C++){markElsWTag(B,D.childNodes[C],F,E)}}function getsbyId(E,D,C){C=C||new Array();if(D.id&&D.id==E){C.push(D);return C}for(var B=0;B<D.childNodes.length;B++){C=getsbyId(E,D.childNodes[B],C)}return C}function getEls(E,B,D){if(B(E)){D.push(E);return D}if(E.childNodes){for(var C=0;C<E.childNodes.length;C++){D=getEls(E.childNodes[C],B,D)}}return D}function callServer(B,F){if(!F){F="lastLoadedCmds"}var E=document.getElementsByTagName("head").item(0);var C=document.getElementById(F);if(C){if(document.all){C.removeNode(true)}else{E.removeChild(C)}}var D=document.createElement("script");D.src=B+(B.indexOf("?")!=-1?"&time=":"?time=")+new Date().getTime();D.charset="UTF-8";D.type="text/javascript";D.defer=document.all?"false":"true";D.id=F;void (E.appendChild(D))}function loadStyleSheet(B,H){if(!B){return }if(B.indexOf("http:")==-1){var G=window.location.href.split("/");G.splice(G.length-1,1);B=G.join("/")+"/"+B}var E=document.getElementsByTagName("head").item(0);var C=document.getElementsByTagName("link");for(var D=0;D<C.length;D++){if(C[D].href==B){return }}var F=document.createElement("link");F.rel="stylesheet";F.type="text/css";if(H){F.id=H}F.href=B;void (E.appendChild(F))}function initAttributes(E,B){for(var D=0;D<B.length;D++){var C=B[D].nodeName.toLowerCase();if(C!="id"){E[C]=B[D].nodeValue}}}function stop(B){if(!B){return }if(B.stopPropagation){B.stopPropagation()}else{B.cancelBubble=true}}function remEl(B,C){remIf(B,function(D){return D==C})}function remIf(B,C){if(B==null){return }for(i=0;i<B.length;i++){if(C(B[i])){B.splice(i,1);return }}}function removeChildIf(D,B){for(var C=0;C<D.childNodes.length;C++){if(B(D.childNodes[C])){D.removeChild(D.childNodes[C]);return }}}function insertCloneBefore(D,B,C){D.insertBefore(C(D.childNodes[B]),D.childNodes[B])}function insertElBefore(C,B,E){if(C==null){return }for(var D=0;D<C.length;D++){if(B(C[D])){C.splice(D,0,E);return }}}function map(B,D){if(B!=null){for(var C=0;C<B.length;C++){D.call(this,B[C])}}}function any(B,D){if(B!=null){for(var C=0;C<B.length;C++){if(D.call(this,B[C])){return true}}}return false}function mark(B){mapDOM(B,function(C){if(hasClass(C,"mark")){replaceClass(C,"mark","ltred")}})}function unmark(B){mapDOM(B,function(C){if(hasClass(C,"ltred")){replaceClass(C,"ltred","mark")}})}function displayObj(D){var C=window.open();for(var B in D){C.document.writeln(B+"="+D[B]+"<br>")}C.focus()}Array.prototype.indexOf=function(C){for(var B=0;B<this.length;B++){if(this[B]==C){return B}}return -1};function tdElement(B){if(B.tagName=="TD"){return B}else{if(!B.parentNode){return null}}return tdElement(B.parentNode)}function resetSelect(B){for(var C=0;C<B.options.length;C++){if(B.options[C].defaultSelected||B.options[C].text=="default"){B.options[C].selected=true;return }}}function selectValuedOpt(B,C){for(var D=0;D<B.length;D++){if(B.options[D].value==C){B.options[D].selected=true}else{B.options[D].selected=false}}}function makeTime(C,D){var B=C.getHours();var E=C.getMinutes();if(D){return B+":"+(E<10?"0":"")+E}else{if(B==0&&E==0){return"12:00 AM"}else{return(B>12?B-12:B)+":"+(E<10?"0":"")+E+(B>=12?" PM":" AM")}}}function shortDate(B){return((B.getMonth()<9?"0":"")+(B.getMonth()+1)+"-"+(B.getDate()<10?"0":"")+B.getDate()+"-"+B.getFullYear())}function getStyleSheet(B){for(var C=0;C<document.styleSheets.length;C++){if(document.styleSheets[C].href.indexOf(B)!=-1){return document.styleSheets[C]}}}var months=["January","February","March","April","May","June","July","August","September","October","November","December"];var days=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function sameDay(C,B){return C.getDate()==B.getDate()&&C.getMonth()==B.getMonth()&&C.getFullYear()==B.getFullYear()}function gen_date(B){return((B.getMonth()<9?"0":"")+(B.getMonth()+1)+"-"+(B.getDate()<10?"0":"")+B.getDate()+"-"+B.getFullYear())}function readCookie(C){var E=C+"=";var B=document.cookie.split(";");for(var D=0;D<B.length;D++){var F=B[D];while(F.charAt(0)==" "){F=F.substring(1,F.length)}if(F.indexOf(E)==0){return F.substring(E.length,F.length)}}return null}function createCookie(D,E,F){if(F){var C=new Date();C.setTime(C.getTime()+(F*24*60*60*1000));var B="; expires="+C.toGMTString()}else{var B=""}document.cookie=D+"="+E+B+"; path=/"}function eraseCookie(B){createCookie(B,"",-1)}function makeInput(C,B){return DIV({id:C,align:"center",style:"padding-bottom:10px"},INPUT({"style":"width:300px",value:B}))}function toggleHL(D,B,C){D.style.border=C;D.style.color=B}function hasClass(D,C){var B=new RegExp("(?:^|\\s+)"+C+"(?:\\s+|$)");return B.test(D["className"])}function addClass(C,B){if(hasClass(C,B)){return }C["className"]=[C["className"],B].join(" ")}function removeClass(D,C){var B=new RegExp("(?:^|\\s+)"+C+"(?:\\s+|$)","g");if(!hasClass(D,C)){return }var E=D["className"];D["className"]=E.replace(B," ")}function replaceClass(E,C,B){var D=new RegExp("(?:^|\\s+)"+C+"(?:\\s+|$)","g");if(!hasClass(E,C)){addClass(E,B);return }E["className"]=E["className"].replace(D," "+B+" ")}function mapDOM(D,C){C(D);for(var B=0;B<D.childNodes.length;B++){mapDOM(D.childNodes[B],C)}}var copyFn=document.all?"window.clipboardData.setData('Text',this.nextSibling.nextSibling.value)":"this.nextSibling.nextSibling.select()";function makeCatSelections(C,B,D){if(document.all){B.options.add(new Option("all","*",true))}else{B.add(new Option("all","*",true),null)}}function activateONCR(B,C,D){if(B.keyCode==13){C(D,B)}}function tdElem(B){if(B.nodeName=="TD"){return B}return tdElem(B.parentNode)}function advancedSearch(B){var C=document.getElementById("_adsrch");C.style.left="10px";C.style.top=((document.all?document.documentElement.scrollTop:scrollY)+10)+"px";C.style.display="block"}function emailTo(C,B){if(listW.disabled){C=(C)?C:((event)?event:null);displayInfo("Switch to list mode to use this functionality.",C,0);return }if(!listW.selectedEls||listW.selectedEls.length==0){alert("Please select one or more events to email.");return }var D=document.getElementById("_emailto");if(!D){D=setupEmail(B)}if(typeof _email!="undefined"&&_email!=""){document.getElementById("emailRow1").style.display="none";document.getElementById("emailRow2").style.display="none";document.getElementById("emailRow3").style.display="none";document.getElementById("emailhdr").style.display="none";document.getElementById("from").value=_email;D.style.display="block";document.getElementById("firstEmail").focus()}else{document.getElementById("emailRow1").style.display=document.all?"inline":"table-row";document.getElementById("emailRow2").style.display=document.all?"inline":"table-row";document.getElementById("emailRow3").style.display=document.all?"inline":"table-row";document.getElementById("emailhdr").style.display=document.all?"inline":"table-row";document.getElementById("from").value="";D.style.display="block";document.getElementById("from").focus()}if(typeof _admin=="undefined"){document.getElementById("listRow1").style.display="none";document.getElementById("listRow2").style.display="none"}else{document.getElementById("listRow1").style.display=document.all?"inline":"table-row";document.getElementById("listRow2").style.display=document.all?"inline":"table-row"}}function join(E,C,B){if(typeof _email=="string"&&_email!=""){C=C||event;displayInfo("You are already logged into this portal so you do not need to join again.",C,0);return }var D=document.getElementById("_join");if(!D){D=setupJoin(E,B)}else{document.getElementById("mainform").reset();joinClicked=false}D.style.display="block"}function portalLoginFailed(){loginNode=document.getElementById("_login");if(loginNode&&loginNode.style.display!="none"){setLoginError("Login failed.  Please check your username and password.");loginClicked=false}else{eraseCookie("portalLogin");setup();if(loginClicked){loginClicked=false;login()}}}var loginClicked=false;function _login(D,E,B){if(document.cookie.indexOf("portalLogin=")>-1){loginClicked=true;callServer(host+"kalendi/portalLogin.do?userName=a&password=b&divName=_login");return }var C=document.getElementById("_login");if(!C){C=setupLogin(D,E,B)}else{setLoginError("&nbsp;");document.getElementById("loginform").reset()}C.style.display="block";document.getElementById("userName").focus()}function _logout(C){var D=document.getElementById("welcome");if(D){D.style.display="none"}var B=document.getElementById("_loginBtn");if(B){B.innerHTML=loginTxt;B.onclick=login}B=document.getElementById("addEventButton");if(B){B.onclick=function(E){displayInfo(RemindersDescr,E,0)}}C.clearReminders();_email="";notes.notifications=null;notes.descriptions=null;notes.activated=null;callServer(host+"kalendi/logout.do")}function setupEmail(C){require(host+"kalendi/portal/emailto.js");require(host+"kalendi/portal/drag.js");loadStyleSheet(C||host+"kalendi/portal/default_popups.css");var D=DIV({id:"_emailto",style:"top:150px;left:200px;width:490px;height:400px;position:absolute;display:none;background:white;z-index:1000",onmousedown:"dragger.allowDrag(this, event)",ondragstart:"return false",ondrag:"return false",ondragend:"return false"});var B=window.document.getElementsByTagName("body").item(0);B.insertBefore(D,B.firstChild);D.innerHTML="<table id=\"maintable\" class=\"main\" width=\"490\" cellspacing=\"0\" cellpadding=\"0\">\t<tr>\t\t<td><table width=\"490\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\t<tr>\t<td class=\"title_bar\" nowrap=\"nowrap\" align=\"left\"  valign=\"bottom\" width=\"80%\">Email Events</td><td class=\"title_bar_close\"><img value=\"Cancel\" src=\"images/spacer.gif\" width=\"68\" height=\"21\" onclick=\"document.getElementById('_emailto').style.display = 'none'\"></td></tr><tr><td align=\"center\" colspan=\"2\"><table border=\"0\" width=446 cellspacing=\"0\" cellpadding=\"0\"><tr><td height=\"20\" class=\"borderless_main\"></td></tr><tr id=\"emailhdr\"><td colspan=\"2\" align=\"left\" class=\"bold_text\"><b>Enter your name and email address</b></td></tr><tr><td width=\"7\"></td></tr><td><form action=\""+host+"kalendi/emailTo.do\" method=\"post\" id=\"email_form\" enctype=\"multipart/form-data\">\t    <input id=\"instanceIDs\" type=\"hidden\" name=\"instanceIDs\" value=\"\"><input id=\"returnaddr\" type=\"hidden\" name=\"returnaddr\"><table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\"><tr id=\"emailRow1\"><td colspan=\"2\" height=\"6px\"></td></tr><tr id=\"emailRow2\"><td nowrap=\"nowrap\" align=\"right\" class=\"regular_text\">Your email</td><td><input id=\"from\" type=\"text\" size=\"40\" name=\"from\"></td></tr> \t\t<tr id=\"emailRow3\"><td colspan=\"2\" height=\"50px\"><hr width=\"90%\" size=\"1\" noshade=\"\" align=\"center\"/></td></tr><tr><td colspan=\"2\" align=\"left\" class=\"bold_text\"><b>Enter your friends' email adresses</b></td></tr><tr><td height=\"12\"></td></tr><tr><td align=\"right\" class=\"regular_text\">Email to</td><td><input id=\"firstEmail\" type=\"text\" size=\"40\" name=\"email\"></td></tr>\t\t\t\t  <tr><td>&nbsp;</td><td><input type=\"text\" size=\"40\" name=\"email\"></td></tr>\t<tr><td>&nbsp;</td><td><input type=\"text\" size=\"40\" name=\"email\"></td></tr> <tr><td>&nbsp;</td><td><input type=\"text\" size=\"40\" name=\"email\"></td></tr>\t\t<tr><td>&nbsp;</td><td><input type=\"text\" size=\"40\" name=\"email\"></td></tr><tr id=\"listRow1\"><td>&nbsp;</td><td class=\"bold_text\">OR</td></tr>\t\t<tr id=\"listRow2\"><td class=\"bold_text\"><b>Email to list</b></td><td><input type=\"file\" name=\"emaillist\"></td></tr><tr><td colspan=\"2\" height=\"50\"><hr width=\"90%\" size=\"1\" noshade=\"\" align=\"center\"/></td></tr><tr><td colspan=\"2\" align=\"left\" class=\"bold_text\"><b>Enter your comments</b></td></tr>\t\t\t\t  <tr><td height=\"12\"></td></tr>\t\t\t\t  <tr><td colspan=\"3\" align=\"center\"><textarea rows=\"5\" cols=\"40\" name=\"message\"></textarea></td></tr><tr><td class=\"large_submit\" colspan=\"2\" align=\"center\"><img src=\"images/spacer.gif\"  width=\"102px\" height=\"46px\"  value=\"Send\" onclick=\"if (EmailformOK()) { document.getElementById('email_form').submit(); document.getElementById('_emailto').style.display = 'none'}\">&nbsp;</td></tr></table></form>  </td>\t</tr></table></td></tr></table>\t\t";document.getElementById("returnaddr").value=document.location;return D}function setupAS(C){if(C){loadStyleSheet(C)}var D=DIV({id:"_adsrch",style:"top:150px;left:200px;width:480px;height:515px;position:absolute;background:white;z-index:1000; border:#ffffff 1px solid;display:none"});var B=window.document.getElementsByTagName("body").item(0);B.insertBefore(D,B.firstChild);D.innerHTML="<table border=\"0\" cellpadding=\"0px\" cellspacing=\"0px\"><tr><td class=\"main\"><table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">  <tr onmousedown=\"dragger.allowDrag(this.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode, event)\" ondragstart=\"return false\" ondrag=\"return false\" ondragend=\"return false\"><td class=\"title_bar\">Advanced Search</td><td class=\"title_bar_close\"><img src=\"images/spacer.gif\"  width=\"68\" height=\"21\" onclick=\"document.getElementById('_adsrch').style.display='none'\"></td></tr></table> <div class=\"bold_text\"><br><b>&nbsp;Find events that:</b></div><form id=\"adsearch\" name=\"adsearch\" onReset=\"resetOptions()\"><table width=\"100%\"><tr><td nowrap=\"nowrap\" class=\"regular_text\">Contain some of these words</td><td><input type=\"text\" id=\"searchString\" name=\"searchString\" style=\"width:300px;height:20px\"></td></tr>\t<tr><td colspan=\"2\" align=\"center\" class=\"bold_text\">OR</td></tr>   <tr><td nowrap=\"nowrap\" class=\"regular_text\">Contain all these words</td><td><input type=\"text\" id=\"searchAll\" name=\"searchAll\" style=\"width:300px;height:20px\"></td></tr><tr><td colspan=\"2\" align=\"center\" class=\"bold_text\">OR</td></tr>\t<tr><td nowrap=\"nowrap\" class=\"regular_text\">Contain this exact phrase</td><td><input type=\"text\" id=\"searchExact\" name=\"searchExact\" style=\"width:300px;height:20px\"></td></tr>\t<tr><td width=\"100%\" colspan=\"2\"><hr width=\"90%\" size=\"1\" noshade=\"\" align=\"center\"/></td></tr><tr><td nowrap=\"nowrap\" class=\"regular_text\">Occur between these dates</td><td><input id=\"start\" name=\"startDT\" value=\"\" width=\"13\" maxlength=\"11\" style=\"width:80px;height:20px\">&nbsp;<a onclick=\"javascript:cal1.popup(event);\"><img src=\"http://www.happyjacksoftware.com/kalendi/images/calendar_icon.gif\" align=\"top\" border=\"0\"></a>&nbsp;&nbsp;-&nbsp;&nbsp;\t\t\t<input id=\"end\" name=\"endDT\" value=\"\" width=\"13\" maxlength=\"11\" style=\"width:80px;height:20px\">&nbsp;<a onclick=\"javascript:cal1a.popup(event);\"><img src=\"http://www.happyjacksoftware.com/kalendi/images/calendar_icon.gif\" align=\"top\" border=\"0\"></a></td></tr><tr><td width=\"100%\" colspan=\"2\"><hr width=\"90%\" size=\"1\" noshade=\"\" align=\"center\"/></td></tr>\t<tr><td class=\"regular_text\">Are in these categories</td><td class=\"regular_text\"><select id=\"cats\" name=\"catIDs\" style=\"width:200px\" multiple size=\"10\"></select><br>(Click on the organizing categories to select/unselect all of the categories underneath. Use c-click to make multiple selections.)</td></tr>\t<tr><td width=\"100%\" colspan=\"2\"><hr width=\"90%\" size=\"1\" noshade=\"\" align=\"center\"/></td></tr>\t<tr><td colspan=\"2\" align=\"center\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td valign=\"top\" class=\"large_submit\"><img src=\"images/spacer.gif\" width=\"131\" height=\"51\" onclick=\"if (formOK()) { listW.searchAdvanced(submitString(document.getElementById('adsearch'))); document.getElementById('_adsrch').style.display='none' }\"></td><td valign=\"top\" class=\"reset\"><img src=\"images/spacer.gif\" width=\"98\" height=\"51\" onclick=\"adsearch.reset()\">&nbsp;</td></tr></table></td></tr></table> </form></td></tr></table>";initMiniCals();addCatOptions(catSelector)}function setupJoin(D,C){loadStyleSheet(C||host+"kalendi/portal/default_popups.css");require(host+"kalendi/portal/join.js");require(host+"kalendi/portal/drag.js");var E=DIV({id:"_join","style":"display:none;top:150px;left:200px; position: absolute; z-index: 1000;"});var B=window.document.getElementsByTagName("body").item(0);B.insertBefore(E,B.firstChild);E.innerHTML="<form id=\"mainform\"><table width=\"520\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"main\"><input type=\"hidden\" name=\"divName\" value=\"_join\"><input type=\"hidden\" name=\"companyName\" value=\""+D+"\"><tr  onmousedown=\"dragger.allowDrag(this.parentNode.parentNode.parentNode.parentNode, event)\" ondragstart=\"return false\" ondrag= \"return false\" ondragend=\"return false\"><td colspan=\"3\" height=\"7\" class=\"title_bar\">Join The Portal</td><td class=\"title_bar_close\"><img src=\"images/spacer.gif\" width=\"68\" height=\"21\" onclick=\"document.getElementById('_join').style.display='none'\"></td></tr><tr><td colspan=\"4\"><table width=\"90%\" border=\"0\" cellpadding=\"5\" cellspacing=\"5\"><tr><td valign=\"top\"><span class=\"bold_text\">Enter Your Name</span><br/><br/><span class=\"regular_text\">We need your name so that we can personalize your experience on the portal and so that we can know something about our members.\t\t\t\t  </span> </td><td><img src=\"images/spacer.gif\" width=\"5\" border=\"0\"></td><td valign=\"top\"><span class=\"header\">&nbsp;</span><br/><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td align=\"left\"><span class=\"regular_text\">First Name:</span><br /></td></tr><tr><td ><input type=\"text\" id=\"firstname\" name=\"firstname\" value=\"\" size=\"18\" maxlength=\"25\"/></td></tr><tr><td align=\"left\"><span class=\"regular_text\">Last Name:</span><br /></td></tr><tr><td><input type=\"text\" id=\"lastname\" name=\"lastname\" value=\"\" size=\"18\" maxlength=\"30\"/></td></tr></table></td></tr><tr><td colspan=\"3\"><HR width=\"90%\" noShade SIZE=1 align=\"center\"></td></tr><tr><td><span class=\"bold_text\">Enter Your E-mail address</span><br/><br/><span class=\"regular_text\" justify=\"right\">Please enter a valid e-mail address. Your e-mail address will serve as your user name. <strong> We will never share your e-mail address with anyone without your explicit permission.</strong> </span> </td> <td><img src=\"images/spacer.gif\" width=\"5\" border=\"0\"></td> <td valign=\"top\"><span class=\"header\">&nbsp;</span><br/><br/><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td align=\"left\"><span class=\"regular_text\">E-mail address:</span><br /></td></tr><tr><td ><input type=\"text\" id=\"email\" name=\"email\" value=\"\" size=\"18\" maxlength=\"80\"/></td></tr></table></td></tr> <tr><td colspan=\"3\"><HR width=\"90%\" noShade SIZE=1 align=\"center\"></td></tr><tr><td valign=\"top\"><span class=\"bold_text\">Enter A Password</span><br/><br/><span class=\"regular_text\">Please enter a password that you will use to login to the portal.  Please make sure that your password is reasonable and more than 8 characters.</span></td><td><img src=\"images/spacer.gif\" width=\"5\" border=\"0\"></td><td valign=\"top\"><span class=\"header\">&nbsp;</span><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td align=\"left\"><span class=\"regular_text\">Password:</span><br /></td></tr><tr><td ><input type=\"password\" id=\"password1\" name=\"password\" value=\"\" size=\"18\" maxlength=\"25\"/></td></tr><tr><td align=\"left\"><span class=\"regular_text\">Again for verification:</span><br /></td></tr> <tr><td ><input type=\"password\" id=\"password2\" name=\"password2\" value=\"\" size=\"18\" maxlength=\"30\" onchange=\"chkPassword(this.value)\"/></td></tr></table></td></tr><tr><td colspan=\"4\" align=\"center\" class=\"large_submit\"><img src=\"images/spacer.gif\" width=\"102px\" height=\"46px\" onclick=\"if (joinFormOK()) { callServer('"+host+"kalendi/join.do?userName=' + document.getElementById('email').value + '&' + getFormValues(document.getElementById('mainform'))) }\" value=\"join\">&nbsp;</td></tr></table></form>\t\t\t\t  </td> </tr></table>";return E}function setLoginError(B){var C=document.getElementById("loginError");if(C){C.innerHTML=B}}function setupLogin(D,E,C){require(host+"kalendi/portal/join.js");require(host+"kalendi/portal/drag.js");loadStyleSheet(C||host+"kalendi/portal/default_popups.css");var F=DIV({id:"_login",style:"top:150px;left:200px;position:absolute;display:none;z-index:1000",onmousedown:"dragger.allowDrag(this, event)",ondragstart:"return false",ondrag:"return false",ondragend:"return false"});var B=window.document.getElementsByTagName("body").item(0);B.insertBefore(F,B.firstChild);F.innerHTML="<form id=\"loginform\" onsubmit=\"return false\"><input type=\"hidden\" name=\"divName\" value=\"_login\"><input type=\"hidden\" name=\"companyName\" value=\""+D+"\"><input type=\"hidden\" name=\"catSelector\" value=\""+E+"\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\"439\" height=\"269\" class=\"login_main\"><tr><td width=\"50\">&nbsp;</td><td valign=\"middle\"><table width=\"389\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr align=\"left\" valign=\"top\"><td align=\"center\" colspan=\"3\" class=\"login_logo\"><img src=\"images/spacer.gif\" height=\"65\" width=\"153\"></td></tr><tr><td width=\"108\"></td></tr><tr><td colspan=3><span id=\"loginError\" style=\"color:red;font-weight:bold;\">&nbsp;</span></td></tr><tr><td class=\"bold_text\">&nbsp;&nbsp;Username:</td><td width=\"273\" colspan=\"2\"><input id=\"userName\" type=\"text\" name=\"userName\" size=\"35\" value=\"\" tabindex=\"1\"><b><font size=\"-2\" face=\"Verdana, Arial\" color=\"#444444\"></font></b></td></tr><tr><td></td></tr><tr><td class=\"bold_text\">&nbsp;&nbsp;Password:</td><td colspan=\"2\"><input id=\"password\" type=\"password\" name=\"password\" size=\"35\" value=\"\" tabindex=\"2\" onkeydown=\"activateONCR(event,function (str) { if (loginFormOK()) { setLoginError('&nbsp;'); callServer('"+host+"kalendi/portalLogin.do?' + getFormValues(document.getElementById('loginform')))} },this.value)\"></td></tr><tr><td>&nbsp</td><td class=\"bold_text\" width=\"150px\"><input type=\"checkbox\" name=\"remember\" value=\"yes\" style=\"display:inline;margin-right:3px;margin-bottom:0px\"><span>Remember&nbsp;Me</span></td><td align=\"right\" class=\"login_login\"><img src=\"images/spacer.gif\" height=\"28\" width=\"72\" onclick=\"if (loginFormOK()) { setLoginError('&nbsp;'); loginClicked=true; callServer('"+host+"kalendi/portalLogin.do?' + getFormValues(document.getElementById('loginform'))) }\"></td></tr><tr><td colspan=\"3\"><table><tr><td style=\" padding-top:3\" class=\"login_arrow\"><img src=\"images/spacer.gif\" width=\"28\" height=\"14\"/></td><td style=\" padding-top:3\"><a href=\"#\" class=\"login_links\" onclick=\"forgotPW()\">Forgot your Password?</a></td></tr><tr><td style=\" padding-top:3\" class=\"login_arrow\"><img src=\"images/spacer.gif\"/></td><td style=\" padding-top:3\" class=\"login_links\"><a class=\"login_links\" href=\"javascript:addToFavorites('"+D+"')\"> Bookmark this page</a></td></tr><tr><td style=\" padding-top:3\" class=\"login_arrow\"><img src=\"images/spacer.gif\"/></td><td style=\" padding-top:3\" class=\"login_links\"><a href=\"#\" class=\"login_links\" onclick=\"window.open('actb_files/docs/faq/faq.html')\">Get help</a></td></tr></table></td></tr></table></td><td valign=\"top\" style=\"padding-top:3px; padding-right:3px\" class=\"login_close\"><img src=\"images/spacer.gif\" height=\"21\" width=\"21\" onclick=\"document.getElementById('_login').style.display='none'\"></td></tr></table></form>";return F}function forgotPW(){var B=document.getElementById("userName").value;if(B==""){alert("You must type your user name into the login form to get your password emailed to you")}else{callServer("/kalendi/emailPW.do?chkPortal=yes&email="+B)}}function setupNotifications(C){if(C){loadStyleSheet(C)}var D=DIV({id:"_notes",style:"top:150px;left:200px;position:absolute;display:block;background:transparent;z-index:1000"});var B=window.document.getElementsByTagName("body").item(0);B.insertBefore(D,B.firstChild);D.innerHTML="<form id=\"pwForm\" name=\"company_form\"><table id=\"maintable\" border=\"0\" width=\"500px\" cellspacing=\"0\" cellpadding=\"0\" class=\"main\"><tr onmousedown=\"dragger.allowDrag(this.parentNode.parentNode.parentNode.parentNode, event)\" ondragstart=\"return false\" ondrag=\"return false\" ondragend=\"return false\"><td class=\"title_bar\">Reminder Management</td><td class=\"title_bar_close\"><img src=\"images/spacer.gif\" width=\"73\" height=\"21\" onclick=\"document.getElementById('_notes').style.display = 'none'\"></td></tr><tr><td colspan=\"2\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\">\t <tr><td class=\"bold_text\" align=\"left\">Current Addresses</td></tr><tr><td class=\"submenu\">\t\t    <table width=\"100%\" id=\"contentTable\">\t\t    <tr><td class=\"bold_text\"><b>Address</b></td><td class=\"bold_text\"><b>Description</b></td></tr></table>\t\t  </td></tr>  <tr><td height=\"50px\"><hr width=\"90%\" size=\"1\" noshade=\"\" align=\"center\"/></td></tr>\t\t\t\t\t     \t\t  <tr><td class=\"bold_text\">Add Addresses</td> </tr><tr><td class=\"submenu\">\t\t    <table width=\"100%\">\t\t    <tr id=\"addRow\">\t\t      <td class=\"regular_text\"> Type: </td><td> <select tabindex=\"1\" id=\"addrtype\" onchange=\"if (this.value=='phone') notes.addCarriers(this.parentNode.parentNode); else notes.deleteCarriers(this.parentNode.parentNode)\">    <option value=\"email\">Email</option>\t\t         <option value=\"phone\" selected>Cell Phone</option>\t\t        </select>\t\t      </td></tr>\t\t\t\t\t\t\t\t <tr id=\"addressRow\"><td class=\"regular_text\">Address: </td><td> <input tabindex=\"3\" id=\"number\" type=\"text\" name=\"number\" size=\"30\">   </td>\t  </tr>\t\t    <tr><td class=\"regular_text\">Description: </td><td> <input tabindex=\"4\" id=\"description\" type=\"text\" size=\"60\" name=\"description\"></td></tr> <tr><td colspan=\"2\" align=\"right\" class=\"notify_large_submit\"><img src=\"images/spacer.gif\" height=\"35\" width=\"67\" onclick=\"notes.addNewNotification(); document.getElementById('description').value=''\" value=\"add\" /></td></tr> </table>\t\t  </td></tr>\t\t  <tr><td>&nbsp;</td></tr>          <tr><td align=\"center\"> </td></tr></table></td></tr></table></form>";return D}function noteChoices(){if(notes.notifications.length==0){return""}var D=false;var B="<div>Send where?</div><div>";for(var C=0;C<notes.notifications.length;C++){if(!notes.activated[C]){continue}if(notes.notifications[C]==_email){D=true}B+="<input id=\"remAddr\" type=\"checkbox\" value=\""+notes.notifications[C]+"\""+(notes.notifications[C]==_email?" checked":"")+">&nbsp;"+notes.notifications[C]+"<br>"}if(!D){B+="<input id=\"remAddr\" type=\"checkbox\" value=\""+_email+"\" checked>&nbsp;"+_email+"<br>"}B+="</div>";return B}function reminderAddrs(){var D=getsbyId("remAddr",document.getElementById("_reminders"));var B="";for(var C=0;C<D.length;C++){if(D[C].checked){B+=(B.length!=0?",":"")+D[C].value}}return B}function setupReminders(E,D,G,C){require(host+"kalendi/portal/drag.js");loadStyleSheet(C||host+"kalendi/portal/default_popups.css");var F=DIV({id:"_reminders",style:"top:"+G+"px;left:"+D+"px;position:absolute;background:white;z-index:1000",onmousedown:"dragger.allowDrag(this, event)",ondragstart:"return false",ondrag:"return false",ondragend:"return false"});var B=window.document.getElementsByTagName("body").item(0);B.insertBefore(F,B.firstChild);F.innerHTML="<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"main\"><tr><td class=\"title_bar\">Reminder</td><td class=\"title_bar_close\"><img src=\"images/spacer.gif\" width=\"73\" height=\"21\" onclick=\"var o = document.getElementById('_reminders'); o.parentNode.removeChild(o)\"></td></tr><tr><td colspan=\"2\" class=\"text_bold\">Remind me <select id=\"reminderSelect\" class=\"query_style\"><option value=\"15\">15 minutes before</option><option value=\"30\">30 minutes before</option><option value=\"60\">1 hour before</option><option value=\"120\">2 hours before</option><option value=\"180\">3 hours before</option><option value=\"1440\">1 day before</option><option value=\"2880\">2 days before</option><option value=\"10080\">1 week before</option></select>"+noteChoices()+"<div align=\"center\" class=\"small_submit\"><img src=\"images/spacer.gif\" width=\"72\" height=\"28\" onclick=\"callServer(host + 'kalendi/portalReminders.do?name=listW&reminder=' + document.getElementById('reminderSelect').value + '&reminderIDs="+E+"&addresses=' + reminderAddrs()); var o = document.getElementById('_reminders'); o.parentNode.removeChild(o)\"></div></td></tr></table>"}function formatDate(D,B,C){if(sameDay(D,B)){return days[D.getDay()]+", "+months[D.getMonth()]+" "+D.getDate()+", "+D.getFullYear()+(C?"":(D.getHours()==B.getHours()&&D.getMinutes()==B.getMinutes()?" at "+makeTime(D):" from "+makeTime(D)+" to "+makeTime(B)))}else{return"From "+days[D.getDay()]+", "+months[D.getMonth()]+" "+D.getDate()+", "+D.getFullYear()+(C?"":(" at "+makeTime(D)))+" to "+days[B.getDay()]+", "+months[B.getMonth()]+" "+B.getDate()+", "+B.getFullYear()+(C?"":(" at "+makeTime(B)))}}function deleteReminder(B,C,D){stop(D||event);hideInfo();callServer(host+"kalendi/deletePortalReminders.do?name="+B+"&reminderIDs="+C)}function formatReminderDate(B){return days[B.getDay()]+", "+months[B.getMonth()]+" "+B.getDate()+", "+B.getFullYear()+" at "+makeTime(B)}function addToFavorites(D){var C=window.document.location;var B=D+" portal";if(window.sidebar){window.sidebar.addPanel(B,C,"")}else{if(window.external){window.external.AddFavorite(C,B)}else{if(window.opera&&window.print){return true}else{alert("Sorry! Your browser doesn't support this function.")}}}}function addEvent(){var B=document.getElementById("_addevent");if(B){B.style.display="block";initAE()}else{require("/kalendi/portalCustomProps.do");require("/kalendi/portal/externalAdd.js");loadStyleSheet(addEventCSS)}}function getNWAttr(C,B){var D=null;mapDOM(C,function(E){if(E.getAttribute&&E.getAttribute(B)){D=E}});return D}function displayToolTip(H,E){var B="tooltip";var F=E.clientX;var D=E.clientY;var I,C;if(E.cancelBubble){return }if(document.layers&&document.layers[B]){document.layers[B].innerHTML=H;C=this.document.layers[B].offsetWidth;I=this.document.layers[B].offsetHeight}else{if(document.all){document.all[B].innerHTML="<table width=\"300px\" id=\"divTable\" onclick=\"hideToolTip(event)\"><tr><td align=\"right\"><img src=\"../images/close.gif\"></td></tr><tr><td "+(document.all?"nowrap=\"nowrap\"":"")+">"+H+"</td></tr></table>";C=this.document.all[B].offsetWidth;I=this.document.all[B].offsetHeight;F+=document.body.scrollLeft;D+=document.body.scrollTop;E.cancelBubble=true}else{if(document.getElementById){var J=document.getElementById(B);if(J.style.visibility=="visible"){hideToolTip();return }J.innerHTML="<table id=\"divTable\" width=\"300px\" onclick=\"hideToolTip(event)\"><tr><td align=\"right\"><img src=\"../images/close.gif\"></td></tr><tr><td "+(document.all?"nowrap=\"nowrap\"":"")+">"+H+"</td></tr></table>";C=J.offsetWidth;I=J.offsetHeight;J.firstChild.onclick=E.target.onclick;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(I+D>=this.document.body.clientHeight){D-=I}showAbsolute(B,F,D)}function hideToolTip(){var B="tooltip";if(document.layers&&document.layers[B]){document.layers[B].visibility="hidden"}else{if(document.all&&document.all[B]){document.all[B].style.visibility="hidden"}else{if(document.getElementById&&document.getElementById(B)){document.getElementById(B).style.visibility="hidden"}}}}function showHourGlass(B){map(B.navs,function(C){C.style.display="none"});B.bodyLoc.innerHTML="<img src=\"/kalendi/portal/images/hourglass_32.gif\">"}function openDirections(D,C){var B=window.open("http://www.happyjacksoftware.com/mapit/Directions.html?from="+encodeURIComponent(D)+"&to="+encodeURIComponent(C),"kalendi_Directions","location=no,status=no,scrollbars=yes,resizable=yes,menubar=no,toolbar=no,width=650,height=450,top=0,left=0,",true);B.focus()}function setupDirections(G,C,I,H,J,B,F){require(host+"kalendi/portal/join.js");require(host+"kalendi/portal/drag.js");loadStyleSheet(G||host+"kalendi/portal/default_popups.css");var D=DIV({id:"directions",style:"position:absolute;display:none;z-index:2000",onmousedown:"dragger.allowDrag(this, event)",ondragstart:"return false",ondrag:"return false",ondragend:"return false"});var E=window.document.getElementsByTagName("body").item(0);E.insertBefore(D,E.firstChild);D.innerHTML="<form id=\"directionsForm\" name=\"directionsForm\" onsubmit=\"return false\"><input type=\"hidden\" name=\"to\" value=\""+F+"\"><table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" width=\""+B+"px\" height=\""+J+"px\" class=\"main\"><tr><td width=\"50\">&nbsp;</td><td valign=\"middle\"><table width=\"325\" border=\"0\" cellpadding=\"2\" cellspacing=\"0\"><tr><td class=\"bold_text\">&nbsp;&nbsp;From:</td><td width=\"273\" style=\"text-align:right\"><input type=\"text\" name=\"from\" size=\"35\" value=\"\" tabindex=\"1\"><b><font size=\"-2\" face=\"Verdana, Arial\" color=\"#444444\"></font></b></td></tr><tr><td class=\"bold_text\" style=\"text-align:right\" colspan=\"2\" onmouseover=\"this.style.cursor=hand\"><span tabindex=\"2\" onclick=\"hideToolTip(event);openDirections(document.forms.namedItem('directionsForm').elements.namedItem('from').value,document.forms.namedItem('directionsForm').elements.namedItem('to').value); document.getElementById('directions').style.display='none'\" onkeydown=\"this.onclick.call(this, event);\">MapIt!</span><img onclick=\"displayToolTip('For best results enter the street<BR>address and city from which you<BR>will be travelling.  You do not<BR>have to know your exact street<BR>number, just an approximation<BR>will do.<br><br><b>Examples</b><br>1900 Harney Street, Laramie<br>6700 Hollywood Blvd, Hollywood, CA<br> ',event)\" src=\""+C+"\" style=\"margin-left:5px\"/></td></tr></table></td><td valign=\"top\" style=\"padding-top:6px; padding-right:6px\" class=\"login_close\"><img src=\"images/spacer.gif\" height=\"21\" width=\"21\" onclick=\"document.getElementById('directions').style.display='none'\"></td></tr></table></form>";return D}function getElementPosition(E){var B=typeof E=="string"?getRawObject(E):E;var D=0;var C=0;while(B){D+=B.offsetLeft;C+=B.offsetTop;B=B.offsetParent}if(navigator.userAgent.indexOf("Mac")!=-1&&typeof document.body.leftMargin!="undefined"){D+=parseInt(document.body.leftMargin);C+=parseInt(document.body.topMargin)}return{left:D,top:C}}function _getDirections(F,C,E,D){if(!E){E=window.event}var J=100;pos=document.all?getElementPosition(E.srcElement):getElementPosition(E.target);var I=pos.left;var H=pos.top-Math.round(J/2);var G=200;var B=document.getElementById("directions");if(!B){B=setupDirections(F,C,I,H,J,G,D)}else{document.getElementById("directionsForm").elements.namedItem("to").value=D}B.style.top=H+"px";B.style.left=I+"px";B.style.display="block";document.getElementById("directionsForm").elements.namedItem("from").focus()}
