dojo.addOnLoad(function(){try{var B=window.parent.location;var C=new String(B)}catch(A){window.location="/errors/frame.asp"}});dojo.addOnLoad(function(){dojo.query("tbody tr[data-href]").forEach(function(D,B,A){var C=dojo.connect(D,"onclick",function(E){window.location=dojo.attr(D,"data-href")});dojo.query("a",D).connect("onmouseover",function(){console.log("disconnect eventHandle");dojo.disconnect(C)});dojo.query("a",D).connect("onmouseout",function(){console.log("reconnect eventHandle");dojo.connect(D,"onclick",function(E){window.location=dojo.attr(D,"data-href")})})})});function printPage(A){printPop=window.open(A+"&layout=printer","printWin","width=580, height=400, scrollbars=yes");printPop.focus();printPop.print()}function goURL(A){document.location.href=A}function loginRequestForm(){if(window.document.forms["forgotpassword"].pseudo.value==0&&window.document.forms["forgotpassword"].email.value==0){document.getElementById("formerror").innerHTML='<p class="errorText">A Username or Email Address must be entered.</p>';return false}}function loadSurveyResults(D){var A="pollVote"+D;var C="pollResults"+D;var B={url:"default.asp?do=pollResult&layout=ajax&id="+D,handleAs:"text",timeout:5000,load:function(F,E){dojo.byId(C).innerHTML=F;return F},error:function(F,E){dojo.byId(C).innerHTML="Survey results are currently unavailable.";return F}};dojo.byId(C).innerHTML="Loading votes ...";dojo.xhrGet(B)}function submitSurvey(D){var A="pollVote"+D;var C="pollResults"+D;var B={form:dojo.byId("pollVoteForm"+D),handleAs:"text",url:"default.asp?do=pollResult&layout=ajax&id="+D,timeout:5000,load:function(F,E){dojo.byId(A).innerHTML=F},error:function(F,E){dojo.byId(A).innerHTML="We are unable to save your vote."}};dojo.byId(C).innerHTML="Submitting vote ...";dojo.xhrPost(B)}function setCheckbox(A){dojo.byId(A).value=(dojo.byId(A).value=="off")?"on":"off"}function captcha(){dojo.byId("captcha").src="utils/captcha.asp?"+Date()}function onOff(B){var A=dojo.byId("cal"+B).value;if(A=="on"){dojo.byId("cal"+B).value="off";dojo.byId("cell"+B).className=""}else{dojo.byId("cal"+B).value="on";dojo.byId("cell"+B).className="on"}}function getCookie(A){if(document.cookie.length>0){c_start=document.cookie.indexOf(A+"=");if(c_start!=-1){c_start=c_start+A.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return null}function SetCookie(E,D,C){var B=new Date();var A=new Date();if(C==null||C==0){C=365}A.setTime(B.getTime()+3600000*24*C);document.cookie=escape(E)+"="+escape(D)+";expires="+A.toGMTString()}function DeleteCookie(A){document.cookie=A+"=; path=/; expires=-1;"}function adminLinks(C){objList=dojo.query("a.edit");for(var B=0,A=objList.length;B<A;B++){if(C==0){objList[B].style.display="none";dojo.byId("show").style.display="inline";dojo.byId("hide").style.display="none"}else{objList[B].style.display="inline-block";dojo.byId("show").style.display="none";dojo.byId("hide").style.display="inline"}}if(C==1){SetCookie("adminLink",1,0)}else{DeleteCookie("adminLink")}}function adminLinksCheck(){if(getCookie("adminLink")){dojo.byId("show").style.display="none";dojo.byId("hide").style.display="inline";objList=dojo.query("a.edit");for(var B=0,A=objList.length;B<A;B++){objList[B].style.display="inline-block"}}else{dojo.byId("show").style.display="inline";dojo.byId("hide").style.display="none"}}function calculateDuration(A,B){d=B-A;d=d.toString();if(d.indexOf("30")>=0&&d.indexOf("300")==-1){duration=(d.replace("30","50"))/100}else{if(d.indexOf("70")>=0&&d.indexOf("700")==-1){duration=(d.replace("70","50"))/100}else{duration=d/100}}if(A>0&&B>0){document.EventRes.duration.value=duration;if(B<A){alert("The End Time must occur after the Start Time")}}}function moreVehicles(B,A){dojo.byId(B).style.display="block";dojo.byId(A).style.display="none"}function showDialog(A){dijit.byId(A).show()}function hideDialog(A){dijit.byId(A).hide()}function checkPasswordStrength(H){var G=dojo.byId("strength_text");var C=dojo.byId("strength_id");var F=dojo.byId("progress_bar");var A=new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$","g");var B=new RegExp("^(?=.{6,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$","g");var D=new RegExp("(?=.{6,}).*","g");if(G==null){return }C.value=0;var E=H.length*10;if(H.length==0){G.innerHTML="&nbsp;";F.style.backgroundColor="#FFFFFF"}else{if(false==D.test(H)){G.innerHTML="Too short";F.style.backgroundColor="#DC143C"}else{if(A.test(H)){G.innerHTML="Strong";E=100;F.style.backgroundColor="#228B22";C.value=3}else{if(B.test(H)){G.innerHTML="Medium";E=70;F.style.backgroundColor="#FF8C30";C.value=2}else{E=60;G.innerHTML="Weak";F.style.backgroundColor="#FFD700";C.value=1}}}}F.style.width=E+"%";dojo.byId("password_strength").style.display=(H.length==0)?"none":""}function placeholderText(A,B){objVal=A.value;if(objVal==""){A.value=B;dojo.addClass(A,"placeholder")}if(objVal==B){A.value="";dojo.removeClass(A,"placeholder")}}TINY={};TINY.box=function(){var D,B,A,E,C,F=0;return{show:function(G){C={opacity:60,close:1,animate:1,fixed:1,mask:1,maskid:"",boxid:"",topsplit:2,url:0,post:0,height:0,width:0,html:0,iframe:0};for(s in G){C[s]=G[s]}if(!F){D=document.createElement("div");D.className="tbox";F=document.createElement("div");F.className="tinner";A=document.createElement("div");A.className="tcontent";B=document.createElement("div");B.className="tmask";E=document.createElement("div");E.className="tclose";E.v=0;document.body.appendChild(B);document.body.appendChild(D);D.appendChild(F);F.appendChild(A);B.onclick=E.onclick=TINY.box.hide;window.onresize=TINY.box.resize}else{D.style.display="none";clearTimeout(F.ah);if(E.v){F.removeChild(E);E.v=0}}F.id=C.boxid;B.id=C.maskid;D.style.position=C.fixed?"fixed":"absolute";if(C.html&&!C.animate){F.style.backgroundImage="none";A.innerHTML=C.html;A.style.display="";F.style.width=C.width?C.width+"px":"auto";F.style.height=C.height?C.height+"px":"auto"}else{A.style.display="none";if(!C.animate&&C.width&&C.height){F.style.width=C.width+"px";F.style.height=C.height+"px"}else{F.style.width=F.style.height="100px"}}if(C.mask){this.mask();this.alpha(B,1,C.opacity)}else{this.alpha(D,1,100)}if(C.autohide){F.ah=setTimeout(TINY.box.hide,1000*C.autohide)}else{document.onkeyup=TINY.box.esc}},fill:function(N,K,J,I,H,M){if(K){if(C.image){var L=new Image();L.onload=function(){H=H||L.width;M=M||L.height;TINY.box.psh(L,I,H,M)};L.src=C.image}else{if(C.iframe){this.psh('<iframe src="'+C.iframe+'" width="'+C.width+'" frameborder="0" height="'+C.height+'"></iframe>',I,H,M)}else{var G=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");G.onreadystatechange=function(){if(G.readyState==4&&G.status==200){F.style.backgroundImage="";TINY.box.psh(G.responseText,I,H,M)}};if(J){G.open("POST",N,true);G.setRequestHeader("Content-type","application/x-www-form-urlencoded");G.send(J)}else{G.open("GET",N,true);G.send(null)}}}}else{this.psh(N,I,H,M)}},psh:function(L,I,H,J){if(typeof L=="object"){A.appendChild(L)}else{A.innerHTML=L}var G=F.style.width,K=F.style.height;if(!H||!J){F.style.width=H?H+"px":"";F.style.height=J?J+"px":"";A.style.display="";if(!J){J=parseInt(A.offsetHeight)}if(!H){H=parseInt(A.offsetWidth)}A.style.display="none"}F.style.width=G;F.style.height=K;this.size(H,J,I)},esc:function(G){G=G||window.event;if(G.keyCode==27){TINY.box.hide()}},hide:function(){TINY.box.alpha(D,-1,0,3);document.onkeypress=null;if(C.closejs){C.closejs()}},resize:function(){TINY.box.pos();TINY.box.mask()},mask:function(){B.style.height=this.total(1)+"px";B.style.width=this.total(0)+"px"},pos:function(){var G;if(typeof C.top!="undefined"){G=C.top}else{G=(this.height()/C.topsplit)-(D.offsetHeight/2);G=G<20?20:G}if(!C.fixed&&!C.top){G+=this.top()}D.style.top=G+"px";D.style.left=typeof C.left!="undefined"?C.left+"px":(this.width()/2)-(D.offsetWidth/2)+"px"},alpha:function(H,I,G){clearInterval(H.ai);if(I){H.style.opacity=0;H.style.filter="alpha(opacity=0)";H.style.display="block";TINY.box.pos()}H.ai=setInterval(function(){TINY.box.ta(H,G,I)},20)},ta:function(H,G,J){var I=Math.round(H.style.opacity*100);if(I==G){clearInterval(H.ai);if(J==-1){H.style.display="none";H==D?TINY.box.alpha(B,-1,0,2):A.innerHTML=F.style.backgroundImage=""}else{if(H==B){this.alpha(D,1,100)}else{D.style.filter="";TINY.box.fill(C.html||C.url,C.url||C.iframe||C.image,C.post,C.animate,C.width,C.height)}}}else{var K=G-Math.floor(Math.abs(G-I)*0.5)*J;H.style.opacity=K/100;H.style.filter="alpha(opacity="+K+")"}},size:function(H,J,G){if(G){clearInterval(F.si);var I=parseInt(F.style.width)>H?-1:1,K=parseInt(F.style.height)>J?-1:1;F.si=setInterval(function(){TINY.box.ts(H,I,J,K)},20)}else{F.style.backgroundImage="none";if(C.close){F.appendChild(E);E.v=1}F.style.width=H+"px";F.style.height=J+"px";A.style.display="";this.pos();if(C.openjs){C.openjs()}}},ts:function(H,K,J,L){var G=parseInt(F.style.width),I=parseInt(F.style.height);if(G==H&&I==J){clearInterval(F.si);F.style.backgroundImage="none";A.style.display="block";if(C.close){F.appendChild(E);E.v=1}if(C.openjs){C.openjs()}}else{if(G!=H){F.style.width=(H-Math.floor(Math.abs(H-G)*0.4)*K)+"px"}if(I!=J){F.style.height=(J-Math.floor(Math.abs(J-I)*0.4)*L)+"px"}this.pos()}},top:function(){return document.documentElement.scrollTop||document.body.scrollTop},width:function(){return self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth},height:function(){return self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight},total:function(I){var G=document.body,H=document.documentElement;return I?Math.max(Math.max(G.scrollHeight,H.scrollHeight),Math.max(G.clientHeight,H.clientHeight)):Math.max(Math.max(G.scrollWidth,H.scrollWidth),Math.max(G.clientWidth,H.clientWidth))}}}();function checkform(C){if(!dojo.byId||!dojo.doc.createTextNode){return }var E="errormsg";var H="errorField";var G="One or more required fields are missing or invalid. All fields marked with a (*) are required.";var I="required";var B=C.id;if(dojo.byId(E)){var A=dojo.byId(E);A.parentNode.removeChild(A)}dojo.query("#"+B+" ."+H).forEach(function(L,K,J){dojo.removeClass(L,H)});dojo.query("#"+B+" ."+I).forEach(function(L,K,J){var N=L;var M=N.value.replace(/^\s+|\s+$/g,"");switch(N.type.toLowerCase()){case"text":if(dojo.hasClass(N,"email")){if(!D(M)){F(N)}}else{if(M==""){F(N)}}break;case"password":if(M==""){F(N)}break;case"textarea":if(M==""){F(N)}break;case"checkbox":if(!N.checked){F(N)}break;case"select-one":if(!N.selectedIndex&&N.selectedIndex==0){F(N)}break}});return !dojo.byId(E);function F(L){dojo.addClass(L,H);if(!dojo.byId(E)){var K=document.createElement("span");K.id=E;scroll(0,0);dojo.byId("formerror").innerHTML="<p class=errorText>"+G+"</p>";for(var J=0;J<C.getElementsByTagName("input").length;J++){if(/submit/i.test(C.getElementsByTagName("input")[J].type)){var M=C.getElementsByTagName("input")[J];break}}if(M){M.parentNode.insertBefore(K,M)}}}function D(J){return J.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/)}}
