<!--Begin
function fileLinks(){var fileLink;var subTag;var isImage;if(document.getElementsByTagName('a'))
{for(var i=0;(fileLink=document.getElementsByTagName('a')[i]);i++)
{if(fileLink.href.substr(0,7).toLowerCase().indexOf('http://')!=-1)
{if(fileLink.href.substr(7,22).toLowerCase().indexOf('usgs.spokanecounty.org')==-1&&fileLink.href.substr(7,22).toLowerCase().indexOf('maps.spokanecounty.org')==-1&&fileLink.href.substr(7,21).toLowerCase().indexOf('www.spokanecounty.org')==-1&&fileLink.href.substr(7,17).toLowerCase().indexOf('spokanecounty.org')==-1&&fileLink.href.substr(7,4).toLowerCase().indexOf('wdev')==-1&&fileLink.href.substr(7,4).toLowerCase().indexOf('wpub')==-1&&fileLink.href.substr(7,22).toLowerCase().indexOf('www.spokanesheriff.org')==-1&&fileLink.href.substr(7,5).toLowerCase().indexOf('wdev1')==-1&&fileLink.href.substr(7,25).toLowerCase().indexOf('spokane.searchimprove.com')==-1&&fileLink.href.substr(1,1).toLowerCase().indexOf('#')==-1)
{if(fileLink.getElementsByTagName('img')[0]==null)
{fileLink.setAttribute('target','_blank');fileLink.className='externalLink';}}}
if(fileLink.href.substr(fileLink.href.length-4,4).toLowerCase().indexOf('.pdf')!=-1)
{if(fileLink.getElementsByTagName('img')[0]==null)
{fileLink.setAttribute('target','_blank');fileLink.className='pdfLink';}}
if(fileLink.href.substr(fileLink.href.length-4,4).toLowerCase().indexOf('.doc')!=-1)
{if(fileLink.getElementsByTagName('img')[0]==null)
{fileLink.setAttribute('target','_blank');fileLink.className='docLink';}}
if(fileLink.href.substr(fileLink.href.length-4,4).toLowerCase().indexOf('.zip')!=-1)
{if(fileLink.getElementsByTagName('img')[0]==null)
{fileLink.setAttribute('target','_blank');fileLink.className='zipLink';}}
if(fileLink.href.substr(fileLink.href.length-4,4).toLowerCase().indexOf('.ppt')!=-1)
{if(fileLink.getElementsByTagName('img')[0]==null)
{fileLink.setAttribute('target','_blank');fileLink.className='pptLink';}}}}}
window.onload=function(){fileLinks();}
function protectmail(name,domain)
{document.write('<a href="mailto:'+name+'@'+domain+'">'+name+"@"+domain+'</a>');}
function ClearIt(what)
{switch(what.value)
{case"search for...":what.value="";break;case"Enter your request here...":what.value="";break;case"Enter your suggestion here...":what.value="";break;case"anonymous":what.value="";break;case"(optional)":what.value="";break;default:return;}}
function ShowHide(what)
{if(document.getElementById(what).style.overflow=="auto")
document.getElementById(what).style.overflow="hidden";else
document.getElementById(what).style.overflow="auto";}
function ShowMoreLinks(what)
{alert(document.getElementById(what));}
function textAreaOnBlur(elementRef)
{if(elementRef.maxCharacters==null)
return;var maxCharacters=parseFloat(elementRef.maxCharacters);if((isNaN(maxCharacters)==true)||(maxCharacters<=0))
return;var charCount=elementRef.value.length;if(elementRef.value.length>maxCharacters)
{alert('You have exceeded the maximum number of characters allowed ('+maxCharacters+').');elementRef.value=elementRef.value.substr(0,maxCharacters);elementRef.focus();elementRef.select();}}
function PopupPicker(ctl,w,h)
{var PopupWindow;settings='width='+w+',height='+h+',left=450,top=180';PopupWindow=window.open('DatePicker.aspx?Ctl='+ctl,'DatePicker',settings);PopupWindow.focus();}
function ScrollIt(){window.scrollTo(document.form.PageX.value,document.form.PageY.value);}
function setcoords(){var myPageX;var myPageY;if(document.all){myPageX=document.body.scrollLeft;myPageY=document.body.scrollTop;}
else{myPageX=window.pageXOffset;myPageY=window.pageYOffset;}
document.form.PageX.value=myPageX;document.form.PageY.value=myPageY;}
function popUpSuggestionWindow(URL)
{id="SuggestionWindow";eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300,left=200,top=200');");}<!--Begin

function URLEncode(clearString){var output='';var x=0;clearString=clearString.toString();var regex=/(^[a-zA-Z0-9_.]*)/;while(x<clearString.length){var match=regex.exec(clearString.substr(x));if(match!=null&&match.length>1&&match[1]!=''){output+=match[1];x+=match[1].length;}else{if(clearString[x]==' ')output+='+';else{var charCode=clearString.charCodeAt(x);var hexVal=charCode.toString(16);output+='%'+(hexVal.length<2?'0':'')+hexVal.toUpperCase();}x++;}}return output;}
function SubmitOnEnter(myfield,e){var keycode;if(window.event)keycode=window.event.keyCode;else if(e)keycode=e.which;else return true;if(keycode==13&&myfield.id=="q"&&myfield.value!=("search for...")){SearchSite();return false;} else return true;}
function SearchSite(){document.location.href='http://spokane.searchimprove.com/search.aspx?pc=&pckid=789045745&aid=1303182&pt=6018936&addid=&sw='+document.getElementById('q').value+'&filetype=&swtype=all';}
      
function checkLength(o,n,min,max){if(o.val().length>max||o.val().length<min){o.addClass('ui-state-error');updateTips("Length of "+n+" must be between "+min+" and "+max+".");return false;}
else{return true;}}
function checkRegexp(o,regexp,n){if(!(regexp.test(o.val()))){o.addClass('ui-state-error');updateTips(n+".");return false;}else{return true;}}
      
//Slimbox 2.03 code
/*
	Slimbox v2.03 - The ultimate lightweight Lightbox clone for jQuery
	(c) 2007-2009 Christophe Beyls <http://www.digitalia.be>
	MIT-style license.
*/
(function(w){var E=w(window),u,g,F=-1,o,x,D,v,y,L,s,n=!window.XMLHttpRequest,e=window.opera&&(document.compatMode=="CSS1Compat")&&(w.browser.version>=9.3),m=document.documentElement,l={},t=new Image(),J=new Image(),H,a,h,q,I,d,G,c,A,K;w(function(){w("body").append(w([H=w('<div id="lbOverlay" />')[0],a=w('<div id="lbCenter" />')[0],G=w('<div id="lbBottomContainer" />')[0]]).css("display","none"));h=w('<div id="lbImage" />').appendTo(a).append(q=w('<div style="position: relative;" />').append([I=w('<a id="lbPrevLink" href="#" />').click(B)[0],d=w('<a id="lbNextLink" href="#" />').click(f)[0]])[0])[0];c=w('<div id="lbBottom" />').appendTo(G).append([w('<a id="lbCloseLink" href="#" />').add(H).click(C)[0],A=w('<div id="lbCaption" />')[0],K=w('<div id="lbNumber" />')[0],w('<div style="clear: both;" />')[0]])[0]});w.slimbox=function(O,N,M){u=w.extend({loop:false,overlayOpacity:0.8,overlayFadeDuration:400,resizeDuration:400,resizeEasing:"swing",initialWidth:250,initialHeight:250,imageFadeDuration:400,captionAnimationDuration:400,counterText:"Image {x} of {y}",closeKeys:[27,88,67],previousKeys:[37,80],nextKeys:[39,78]},M);if(typeof O=="string"){O=[[O,N]];N=0}y=E.scrollTop()+((e?m.clientHeight:E.height())/2);L=u.initialWidth;s=u.initialHeight;w(a).css({top:Math.max(0,y-(s/2)),width:L,height:s,marginLeft:-L/2}).show();v=n||(H.currentStyle&&(H.currentStyle.position!="fixed"));if(v){H.style.position="absolute"}w(H).css("opacity",u.overlayOpacity).fadeIn(u.overlayFadeDuration);z();k(1);g=O;u.loop=u.loop&&(g.length>1);return b(N)};w.fn.slimbox=function(M,P,O){P=P||function(Q){return[Q.href,Q.title]};O=O||function(){return true};var N=this;return N.unbind("click").click(function(){var S=this,U=0,T,Q=0,R;T=w.grep(N,function(W,V){return O.call(S,W,V)});for(R=T.length;Q<R;++Q){if(T[Q]==S){U=Q}T[Q]=P(T[Q],Q)}return w.slimbox(T,U,M)})};function z(){var N=E.scrollLeft(),M=e?m.clientWidth:E.width();w([a,G]).css("left",N+(M/2));if(v){w(H).css({left:N,top:E.scrollTop(),width:M,height:E.height()})}}function k(M){w("object").add(n?"select":"embed").each(function(O,P){if(M){w.data(P,"slimbox",P.style.visibility)}P.style.visibility=M?"hidden":w.data(P,"slimbox")});var N=M?"bind":"unbind";E[N]("scroll resize",z);w(document)[N]("keydown",p)}function p(O){var N=O.keyCode,M=w.inArray;return(M(N,u.closeKeys)>=0)?C():(M(N,u.nextKeys)>=0)?f():(M(N,u.previousKeys)>=0)?B():false}function B(){return b(x)}function f(){return b(D)}function b(M){if(M>=0){F=M;o=g[F][0];x=(F||(u.loop?g.length:0))-1;D=((F+1)%g.length)||(u.loop?0:-1);r();a.className="lbLoading";l=new Image();l.onload=j;l.src=o}return false}function j(){a.className="";w(h).css({backgroundImage:"url("+o+")",visibility:"hidden",display:""});w(q).width(l.width);w([q,I,d]).height(l.height);w(A).html(g[F][1]||"");w(K).html((((g.length>1)&&u.counterText)||"").replace(/{x}/,F+1).replace(/{y}/,g.length));if(x>=0){t.src=g[x][0]}if(D>=0){J.src=g[D][0]}L=h.offsetWidth;s=h.offsetHeight;var M=Math.max(0,y-(s/2));if(a.offsetHeight!=s){w(a).animate({height:s,top:M},u.resizeDuration,u.resizeEasing)}if(a.offsetWidth!=L){w(a).animate({width:L,marginLeft:-L/2},u.resizeDuration,u.resizeEasing)}w(a).queue(function(){w(G).css({width:L,top:M+s,marginLeft:-L/2,visibility:"hidden",display:""});w(h).css({display:"none",visibility:"",opacity:""}).fadeIn(u.imageFadeDuration,i)})}function i(){if(x>=0){w(I).show()}if(D>=0){w(d).show()}w(c).css("marginTop",-c.offsetHeight).animate({marginTop:0},u.captionAnimationDuration);G.style.visibility=""}function r(){l.onload=null;l.src=t.src=J.src=o;w([a,h,c]).stop(true);w([I,d,h,G]).hide()}function C(){if(F>=0){r();F=x=D=-1;w(a).hide();w(H).stop().fadeOut(u.overlayFadeDuration,k)}return false}})(jQuery);

// AUTOLOAD CODE BLOCK (MAY BE CHANGED OR REMOVED)
if (!/android|iphone|ipod|series60|symbian|windows ce|blackberry/i.test(navigator.userAgent)) {
	jQuery(function($) {
		$("a[rel^='lightbox']").slimbox({/* Put custom options here */}, null, function(el) {
			return (this == el) || ((this.rel.length > 8) && (this.rel == el.rel));
		});
	});
}

/**
*
*  Base64 encode / decode
*  http://www.webtoolkit.info/
*
**/
 
var Base64 = {
 
	// private property
	_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
 
	// public method for encoding
	encode : function (input) {var output = "";var chr1, chr2, chr3, enc1, enc2, enc3, enc4;var i = 0;input = Base64._utf8_encode(input);while (i < input.length) {chr1 = input.charCodeAt(i++);chr2 = input.charCodeAt(i++);chr3 = input.charCodeAt(i++);enc1 = chr1 >> 2;enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);enc4 = chr3 & 63;if (isNaN(chr2)) {enc3 = enc4 = 64;} else if (isNaN(chr3)) {enc4 = 64;}output = output +this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);}return output;},
 
	// public method for decoding
	decode : function (input) {var output = "";var chr1, chr2, chr3;var enc1, enc2, enc3, enc4;var i = 0;input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");while (i < input.length) {enc1 = this._keyStr.indexOf(input.charAt(i++));enc2 = this._keyStr.indexOf(input.charAt(i++));enc3 = this._keyStr.indexOf(input.charAt(i++));enc4 = this._keyStr.indexOf(input.charAt(i++));chr1 = (enc1 << 2) | (enc2 >> 4);chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);chr3 = ((enc3 & 3) << 6) | enc4;output = output + String.fromCharCode(chr1);if (enc3 != 64) {output = output + String.fromCharCode(chr2);}if (enc4 != 64) {output = output + String.fromCharCode(chr3);}}output = Base64._utf8_decode(output);return output;},
 
	// private method for UTF-8 encoding
	_utf8_encode : function (string) {string = string.replace(/\r\n/g,"\n");var utftext = "";for (var n = 0; n < string.length; n++) {var c = string.charCodeAt(n);if (c < 128) {utftext += String.fromCharCode(c);}else if((c > 127) && (c < 2048)) {utftext += String.fromCharCode((c >> 6) | 192);utftext += String.fromCharCode((c & 63) | 128);}else {utftext += String.fromCharCode((c >> 12) | 224);utftext += String.fromCharCode(((c >> 6) & 63) | 128);utftext += String.fromCharCode((c & 63) | 128);}}return utftext;},
 
	// private method for UTF-8 decoding
	_utf8_decode : function (utftext) {var string = "";var i = 0;var c = c1 = c2 = 0;while ( i < utftext.length ) {c = utftext.charCodeAt(i);if (c < 128) {string += String.fromCharCode(c);i++;}else if((c > 191) && (c < 224)) {c2 = utftext.charCodeAt(i+1);string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));i += 2;}else {c2 = utftext.charCodeAt(i+1);c3 = utftext.charCodeAt(i+2);string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));i += 3;}}return string;}}

//-->
