
function skVoid(){}
function protectEmail(username,hostname,linktext){if(linktext==''||linktext==null){var linktext=username+"@"+hostname;}return"<a href="+"mail"+"to:"+username+"@"+hostname+">"+linktext+"</a>";}
function skEncode(input){var keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var output="";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;do{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+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);}while(i<input.length);return output;}
function skErase(el){if(thisEl=document.getElementById(el)){thisEl.style.display="none";thisEl.style.visibility="hidden";}}
var preloadFlag=false;function newImage(arg){if(document.images){rslt=new Image();rslt.src=arg;return rslt;}}
function is_numeric(mixed_var){return(typeof(mixed_var)==='number'||typeof(mixed_var)==='string')&&mixed_var!==''&&!isNaN(mixed_var);}
(function(jQuery){jQuery.each(['backgroundColor','borderBottomColor','borderLeftColor','borderRightColor','borderTopColor','color','outlineColor'],function(i,attr){jQuery.fx.step[attr]=function(fx){if(fx.state==0){fx.start=getColor(fx.elem,attr);fx.end=getRGB(fx.end);}
fx.elem.style[attr]="rgb("+[Math.max(Math.min(parseInt((fx.pos*(fx.end[0]-fx.start[0]))+fx.start[0]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[1]-fx.start[1]))+fx.start[1]),255),0),Math.max(Math.min(parseInt((fx.pos*(fx.end[2]-fx.start[2]))+fx.start[2]),255),0)].join(",")+")";}});function getRGB(color){var result;if(color&&color.constructor==Array&&color.length==3)
return color;if(result=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
return[parseInt(result[1]),parseInt(result[2]),parseInt(result[3])];if(result=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(color))
return[parseFloat(result[1])*2.55,parseFloat(result[2])*2.55,parseFloat(result[3])*2.55];if(result=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(color))
return[parseInt(result[1],16),parseInt(result[2],16),parseInt(result[3],16)];if(result=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(color))
return[parseInt(result[1]+result[1],16),parseInt(result[2]+result[2],16),parseInt(result[3]+result[3],16)];return colors[jQuery.trim(color).toLowerCase()];}
function getColor(elem,attr){var color;do{color=jQuery.curCSS(elem,attr);if(color!=''&&color!='transparent'||jQuery.nodeName(elem,"body"))
break;attr="backgroundColor";}while(elem=elem.parentNode);return getRGB(color);};var colors={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]};})(jQuery);(function($){$.fn.hoverIntent=function(f,g){var cfg={sensitivity:7,interval:100,timeout:0};cfg=$.extend(cfg,g?{over:f,out:g}:f);var cX,cY,pX,pY;var track=function(ev){cX=ev.pageX;cY=ev.pageY;};var compare=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);if((Math.abs(pX-cX)+Math.abs(pY-cY))<cfg.sensitivity){$(ob).unbind("mousemove",track);ob.hoverIntent_s=1;return cfg.over.apply(ob,[ev]);}else{pX=cX;pY=cY;ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}};var delay=function(ev,ob){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);ob.hoverIntent_s=0;return cfg.out.apply(ob,[ev]);};var handleHover=function(e){var p=(e.type=="mouseover"?e.fromElement:e.toElement)||e.relatedTarget;while(p&&p!=this){try{p=p.parentNode;}catch(e){p=this;}}if(p==this){return false;}var ev=jQuery.extend({},e);var ob=this;if(ob.hoverIntent_t){ob.hoverIntent_t=clearTimeout(ob.hoverIntent_t);}if(e.type=="mouseover"){pX=ev.pageX;pY=ev.pageY;$(ob).bind("mousemove",track);if(ob.hoverIntent_s!=1){ob.hoverIntent_t=setTimeout(function(){compare(ev,ob);},cfg.interval);}}else{$(ob).unbind("mousemove",track);if(ob.hoverIntent_s==1){ob.hoverIntent_t=setTimeout(function(){delay(ev,ob);},cfg.timeout);}}};return this.mouseover(handleHover).mouseout(handleHover);};})(jQuery);jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};jQuery.jPrintArea=function(el){var iframe=document.createElement('IFRAME');var doc=null;$(iframe).attr('style','position:absolute;width:0px;height:0px;left:-500px;top:-500px;');document.body.appendChild(iframe);doc=iframe.contentWindow.document;var links=window.document.getElementsByTagName('link');for(var i=0;i<links.length;i++)if(links[i].rel.toLowerCase()=='stylesheet')doc.write('<link type="text/css" rel="stylesheet" href="'+links[i].href+'"></link>');doc.write('<div class="'+$(el).attr("class")+'">'+$(el).html()+'</div>');doc.close();iframe.contentWindow.focus();iframe.contentWindow.print();alert('Printing...');document.body.removeChild(iframe);}
ypSlideOutMenu.Registry=[]
ypSlideOutMenu.aniLen=450
ypSlideOutMenu.hideDelay=500
ypSlideOutMenu.minCPUResolution=10
function ypSlideOutMenu(id,dir,left,top,width,height)
{this.ie=document.all?1:0
this.ns4=document.layers?1:0
this.dom=document.getElementById?1:0
if(this.ie||this.ns4||this.dom){this.id=id
this.dir=dir
this.orientation=dir=="left"||dir=="right"?"h":"v"
this.dirType=dir=="right"||dir=="down"?"-":"+"
this.dim=this.orientation=="h"?width:height
this.hideTimer=false
this.aniTimer=false
this.open=false
this.over=false
this.startTime=0
this.gRef="ypSlideOutMenu_"+id
eval(this.gRef+"=this")
ypSlideOutMenu.Registry[id]=this
var d=document
d.write('<style type="text/css">')
d.write('#'+this.id+'Container { visibility:hidden; ')
d.write('margin:0px; ')
d.write('left:'+left+'px; ')
d.write('top:'+top+'px; ')
d.write('overflow:hidden; }')
d.write('#'+this.id+'Container, #'+this.id+'Content { position:absolute; ')
d.write('width:'+width+'px; ')
d.write('height:'+height+'px; ')
d.write('}')
d.write('</style>')
this.load()}}
ypSlideOutMenu.prototype.load=function(){var d=document
var lyrId1=this.id+"Container"
var lyrId2=this.id+"Content"
var obj1=this.dom?d.getElementById(lyrId1):this.ie?d.all[lyrId1]:d.layers[lyrId1]
if(obj1)var obj2=this.ns4?obj1.layers[lyrId2]:this.ie?d.all[lyrId2]:d.getElementById(lyrId2)
var temp
if(!obj1||!obj2)window.setTimeout(this.gRef+".load()",100)
else{this.container=obj1
this.menu=obj2
this.style=this.ns4?this.menu:this.menu.style
this.homePos=eval("0"+this.dirType+this.dim)
this.outPos=0
this.accelConst=(this.outPos-this.homePos)/ypSlideOutMenu.aniLen/ypSlideOutMenu.aniLen
if(this.ns4)this.menu.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);this.endSlide()}}
ypSlideOutMenu.showMenu=function(id)
{var reg=ypSlideOutMenu.Registry
var obj=ypSlideOutMenu.Registry[id]
if(obj.container){obj.over=true
if(obj.hideTimer){reg[id].hideTimer=window.clearTimeout(reg[id].hideTimer)}
if(!obj.open&&!obj.aniTimer)reg[id].startSlide(true)}}
ypSlideOutMenu.hideMenu=function(id)
{var obj=ypSlideOutMenu.Registry[id]
if(obj.container){if(obj.hideTimer)window.clearTimeout(obj.hideTimer)
obj.hideTimer=window.setTimeout("ypSlideOutMenu.hide('"+id+"')",ypSlideOutMenu.hideDelay);}}
ypSlideOutMenu.hide=function(id)
{var obj=ypSlideOutMenu.Registry[id]
obj.over=false
if(obj.hideTimer)window.clearTimeout(obj.hideTimer)
obj.hideTimer=0
if(obj.open&&!obj.aniTimer)obj.startSlide(false)}
ypSlideOutMenu.prototype.startSlide=function(open){this[open?"onactivate":"ondeactivate"]()
this.open=open
if(open)this.setVisibility(true)
this.startTime=(new Date()).getTime()
this.aniTimer=window.setInterval(this.gRef+".slide()",ypSlideOutMenu.minCPUResolution)}
ypSlideOutMenu.prototype.slide=function(){var elapsed=(new Date()).getTime()-this.startTime
if(elapsed>ypSlideOutMenu.aniLen)this.endSlide()
else{var d=Math.round(Math.pow(ypSlideOutMenu.aniLen-elapsed,2)*this.accelConst)
if(this.open&&this.dirType=="-")d=-d
else if(this.open&&this.dirType=="+")d=-d
else if(!this.open&&this.dirType=="-")d=-this.dim+d
else d=this.dim+d
this.moveTo(d)}}
ypSlideOutMenu.prototype.endSlide=function(){this.aniTimer=window.clearTimeout(this.aniTimer)
this.moveTo(this.open?this.outPos:this.homePos)
if(!this.open)this.setVisibility(false)
if((this.open&&!this.over)||(!this.open&&this.over)){this.startSlide(this.over)}}
ypSlideOutMenu.prototype.setVisibility=function(bShow){var s=this.ns4?this.container:this.container.style
s.visibility=bShow?"visible":"hidden"}
ypSlideOutMenu.prototype.moveTo=function(p){this.style[this.orientation=="h"?"left":"top"]=this.ns4?p:(p)+"px"}
ypSlideOutMenu.prototype.getPos=function(c){return parseInt(this.style[c])}
ypSlideOutMenu.prototype.onactivate=function(){}
ypSlideOutMenu.prototype.ondeactivate=function(){}
grphcs=new Array(2)
Image0=new Image();Image0.src=grphcs[0]="http://images.treeawareness.com/images/w2/leaf_icon_left.png";Image1=new Image();Image1.src=grphcs[1]="http://images.treeawareness.com/images/w2/leaf_icon_right.png";Amount=5;Ypos=new Array();Xpos=new Array();Speed=new Array();Step=new Array();Cstep=new Array();document.write('<div style="position:absolute;top:0px;left:0px;z-index:100;"><div style="position:relative;z-index:100;">');for(i=0;i<Amount;i++){var P=Math.floor(Math.random()*grphcs.length);var leafScale=Math.floor((Math.random()*45))+5;rndPic=grphcs[P];if(jQuery.support.opacity){document.write('<img id="si'+i+'" src="'+rndPic+'" style="width:'+leafScale+'px;height:'+leafScale+'px;visibility:hidden;position:absolute;top:0px;left:0px;z-index:100;">');}else{document.write('<img id="si'+i+'" src="'+rndPic+'" style="width:'+leafScale+'px;height:'+leafScale+'px;zoom:1;visibility:hidden;position:absolute;top:0px;left:0px;z-index:100;filter:alpha(opacity=100);">');}}
document.write('</div></div>');WinHeight=$(window).height();WinWidth=$(window).width();for(i=0;i<Amount;i++){Ypos[i]=Math.round(Math.random()*WinHeight);Xpos[i]=Math.round(Math.random()*WinWidth);Speed[i]=Math.random()*5+3;Cstep[i]=0;Step[i]=Math.random()*0.1+0.05;}
var leafPass=0;function fall(){if(leafPass<=0){for(i=0;i<Amount;i++){document.getElementById("si"+i).style.visibility="visible";}}
if(leafPass<200){var WinHeight=$(window).height();var fadePoint=(WinHeight-200);var WinWidth=$(window).width();var hscrll=document.body.scrollTop;var wscrll=document.body.scrollLeft;for(i=0;i<Amount;i++){sy=Speed[i]*Math.sin(90*Math.PI/180);sx=Speed[i]*Math.cos(Cstep[i]);Ypos[i]+=sy;Xpos[i]+=sx;if(Ypos[i]>WinHeight){Ypos[i]=-60;Xpos[i]=Math.round(Math.random()*(WinWidth-50));Speed[i]=Math.random()*5+3;}
thisLeaf=document.getElementById("si"+i);thisLeaf.style.left=(Math.min((WinWidth-50),Xpos[i]))+"px";thisLeaf.style.top=(Ypos[i]+hscrll)+"px";if(Ypos[i]>fadePoint){if(jQuery.support.opacity){thisLeaf.style.opacity=((WinHeight-Ypos[i])/fadePoint);}else{if(thisLeaf.currentStyle.hasLayout){thisLeaf.filters[0].opacity=((WinHeight-Ypos[i])/fadePoint)*100;}}}else{if(jQuery.support.opacity){thisLeaf.style.opacity="1";}else{if(thisLeaf.currentStyle.hasLayout){thisLeaf.filters[0].opacity=100;}}}
Cstep[i]+=Step[i];}
leafPass=leafPass+1;leafRepeat=setTimeout('fall()',30);}else{for(i=0;i<Amount;i++){document.getElementById("si"+i).style.display="none";}
clearTimeout(leafRepeat);}}
$.fn.hoverClass=function(c){return this.each(function(){$(this).hover(function(){$(this).addClass(c);},function(){$(this).removeClass(c);});});};$(document).ready(function(){$(".yMenu1").mouseover(function(){ypSlideOutMenu.showMenu('menu1');}).mouseout(function(){ypSlideOutMenu.hideMenu('menu1');});$(".yMenu2").mouseover(function(){ypSlideOutMenu.showMenu('menu2');}).mouseout(function(){ypSlideOutMenu.hideMenu('menu2');});$(".yMenu3").mouseover(function(){ypSlideOutMenu.showMenu('menu3');}).mouseout(function(){ypSlideOutMenu.hideMenu('menu3');});if(slideShowContainer=document.getElementById("slideshow")){transm.add(document.getElementById("slideshow"),opts);setTimeout('fall()',5000);}
$(".sn_icon").mouseover(function(){$(this).animate({opacity:"0.5"},75);}).mouseout(function(){$(this).animate({opacity:"1.0"});});$(".logo").mouseover(function(){$(this).animate({opacity:"0.5"},75);}).mouseout(function(){$(this).animate({opacity:"1.0"});});if(weareonservicearea=document.getElementById("find_service_area")){$("#find_service_area").submit(function(){var sk_params="action=our-service-area&aj=1";if($("#sazipcode").attr("value").length){sk_params=sk_params+"&sazipcode="+$("#sazipcode").attr("value");}else if($("#sacity").attr("value").length){sk_params=sk_params+"&sacity="+$("#sacity").attr("value");}else{alert("Please enter either your City or Zip Code into the form.");return false;}return true;});}
if(contactFormCaptcha=document.getElementById("captcha_image")){var timeRaw=new Date();var timeStamp=timeRaw.getTime();contactFormCaptcha.innerHTML='<img src="/includes/modules/captcha/captcha.php?stamp='+timeStamp+'" border="0" width="250" />';}
if(smallServiceAreaForm=document.getElementById("smallContactForm")){$("#smallContactForm").validate({focusInvalid:true,submitHandler:function(form){$("#smallContactFormResponse").html('SUBMITTING... <img src="http://images.treeawareness.com/images/tinyloading.gif" border="0" alt="..." />');var skparams=$('#smallContactForm').serialize();$.ajax({type:"POST",url:$("#smallContactForm").attr("action"),data:"aj=1&"+skparams,success:function(msg){$("#smallContactFormResponse").html(msg);}});}});}
if(adSlider=document.getElementById("ta_ad_slider")){$("#ta_ad_slider").css({"visibility":"visible"});$("#ta_ad_slider").css({"backgroundColor":"transparent"});$("#ta_ad_slider").slideDown(2500);}});function strip_tags(str,allowed_tags){var key='',allowed=false;var matches=[];var allowed_array=[];var allowed_tag='';var i=0;var k='';var html='';var replacer=function(search,replace,str){return str.split(search).join(replace);};if(allowed_tags){allowed_array=allowed_tags.match(/([a-zA-Z0-9]+)/gi);}
str+='';matches=str.match(/(<\/?[\S][^>]*>)/gi);for(key in matches){if(isNaN(key)){continue;}
html=matches[key].toString();allowed=false;for(k in allowed_array){allowed_tag=allowed_array[k];i=-1;if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+'>');}
if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+' ');}
if(i!=0){i=html.toLowerCase().indexOf('</'+allowed_tag);}
if(i==0){allowed=true;break;}}
if(!allowed){str=replacer(html,"",str);}}
return str;}
