function addLoadEvent(a){var b=window.onload;if(typeof window.onload!="function"){window.onload=a}else{window.onload=function(){if(b){b()}a()}}}function concat_collection(f,e){var d;var a=new Array();var c=f.length;var b=e.length;for(d=0;d<c;d++){a.push(f[d])}for(d=0;d<b;d++){a.push(e[d])}return a}function SetOpacity(a,b){a.style.filter="alpha(opacity="+b+")";a.style.MozOpacity=b/100;a.style.opacity=b/100}function ChangeOpacity(h,g,b,f,e){var d=document.getElementById(h);var a=(new Date()).getTime();var c=f+(e-f)*(a-b)/g;if(c>=100){SetOpacity(d,100);d.timer=undefined}else{if(c<=0){SetOpacity(d,0);d.timer=undefined}else{SetOpacity(d,c);d.timer=window.setTimeout("ChangeOpacity('"+h+"',"+g+","+b+","+f+","+e+")",10)}}}function FadeInImage(e,g,a,d){var f=document.getElementById(e);if(f.timer){window.clearTimeout(f.timer)}if(a){var c=document.getElementById(a);if(c){if(c.src){f.src=c.src;SetOpacity(f,100)}c.src=g;c.style.backgroundImage="url("+g+")";c.style.backgroundRepeat="no-repeat";var b=(new Date()).getTime();f.timer=window.setTimeout("ChangeOpacity('"+e+"',"+d+","+b+",100,0)",10)}}else{f.src=g}}var slideCache=new Array();function RunSlideShow(h,c,i,f,e,g){var a=i.indexOf(";");var d=i.substring(0,a);if(slideCache[d]&&slideCache[d].loaded){FadeInImage(h,f+d,c,g);var b=i.substring(a+1,i.length)+";"+d;setTimeout("RunSlideShow('"+h+"','"+c+"','"+b+"','"+f+"',"+e+","+g+")",e*1000);a=b.indexOf(";");d=b.substring(0,a)}else{setTimeout("RunSlideShow('"+h+"','"+c+"','"+i+"','"+f+"',"+e+","+g+")",250)}if(slideCache[d]==null){slideCache[d]=new Image;slideCache[d].loaded=false;slideCache[d].onload=function(){this.loaded=true};slideCache[d].src=f+d}}function externalLinks(){if(!document.getElementsByTagName){return}var b=document.getElementsByTagName("a");var a=document.getElementsByTagName("area");var e=concat_collection(b,a);for(var d=0;d<e.length;d++){var c=e[d];if((c.rel=="externalLink")||(c.getAttribute("class")=="externalLink")){c.onclick=function(){if(this.href.match(/^http\:/i)){var f="/cgi-bin/awredir.pl?url=";window.location=f+this.href;return false}}}}}addLoadEvent(externalLinks);function myImagesEnlarge(d,c){var f=document.getElementById(d).getElementsByTagName("a");for(var e=0;e<f.length;e++){f[e].onclick=function(){document.getElementById(c).src=this.href;document.getElementById(c).alt=this.firstChild.alt;document.getElementById(c+"Caption").innerHTML=this.firstChild.alt;return false}}}function weatherHeights(){if(!document.getElementById("WeatherInfo")){return}var a=document.getElementById("WeatherInfo").getElementsByTagName("dd");var c=0;for(var b=0;b<a.length;b++){c=Math.max(c,a[b].offsetHeight)}for(var b=0;b<a.length;b++){if(a[b].getAttribute("class")=="ec"){continue}a[b].style.height=c+"px"}}addLoadEvent(weatherHeights);var TINY={};TINY.box=function(){var e,c,a,f,d,h=0;return{show:function(b){d={opacity:70,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 b){d[s]=b[s]}if(!h){e=document.createElement("div");e.className="tbox";h=document.createElement("div");h.className="tinner";a=document.createElement("div");a.className="tcontent";c=document.createElement("div");c.className="tmask";f=document.createElement("div");f.className="tclose";f.v=0;document.body.appendChild(c);document.body.appendChild(e);e.appendChild(h);h.appendChild(a);c.onclick=f.onclick=TINY.box.hide;window.onresize=TINY.box.resize}else{e.style.display="none";clearTimeout(h.ah);if(f.v){h.removeChild(f);f.v=0}}h.id=d.boxid;c.id=d.maskid;e.style.position=d.fixed?"fixed":"absolute";if(d.html&&!d.animate){h.style.backgroundImage="none";a.innerHTML=d.html;a.style.display="";h.style.width=d.width?d.width+"px":"auto";h.style.height=d.height?d.height+"px":"auto"}else{a.style.display="none";if(!d.animate&&d.width&&d.height){h.style.width=d.width+"px";h.style.height=d.height+"px"}else{h.style.width=h.style.height="100px"}}if(d.mask){this.mask();this.alpha(c,1,d.opacity)}else{this.alpha(e,1,100)}if(d.autohide){h.ah=setTimeout(TINY.box.hide,1000*d.autohide)}else{document.onkeyup=TINY.box.esc}},fill:function(p,m,l,j,g,o){if(m){if(d.image){var n=new Image();n.onload=function(){g=g||n.width;o=o||n.height;TINY.box.psh(n,j,g,o)};n.src=d.image}else{if(d.iframe){this.psh('<iframe src="'+d.iframe+'" width="'+d.width+'" frameborder="0" height="'+d.height+'"></iframe>',j,g,o)}else{var b=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP");b.onreadystatechange=function(){if(b.readyState==4&&b.status==200){h.style.backgroundImage="";TINY.box.psh(b.responseText,j,g,o)}};if(l){b.open("POST",p,true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.send(l)}else{b.open("GET",p,true);b.send(null)}}}}else{this.psh(p,j,g,o)}},psh:function(l,i,g,j){if(typeof l=="object"){a.appendChild(l)}else{a.innerHTML=l}var b=h.style.width,k=h.style.height;if(!g||!j){h.style.width=g?g+"px":"";h.style.height=j?j+"px":"";a.style.display="";if(!j){j=parseInt(a.offsetHeight)}if(!g){g=parseInt(a.offsetWidth)}a.style.display="none"}h.style.width=b;h.style.height=k;this.size(g,j,i)},esc:function(b){b=b||window.event;if(b.keyCode==27){TINY.box.hide()}},hide:function(){TINY.box.alpha(e,-1,0,3);document.onkeypress=null;if(d.closejs){d.closejs()}},resize:function(){TINY.box.pos();TINY.box.mask()},mask:function(){c.style.height=this.total(1)+"px";c.style.width=this.total(0)+"px"},pos:function(){var b;if(typeof d.top!="undefined"){b=d.top}else{b=(this.height()/d.topsplit)-(e.offsetHeight/2);b=b<20?20:b}if(!d.fixed&&!d.top){b+=this.top()}e.style.top=b+"px";e.style.left=typeof d.left!="undefined"?d.left+"px":(this.width()/2)-(e.offsetWidth/2)+"px"},alpha:function(g,i,b){clearInterval(g.ai);if(i){g.style.opacity=0;g.style.filter="alpha(opacity=0)";g.style.display="block";TINY.box.pos()}g.ai=setInterval(function(){TINY.box.ta(g,b,i)},20)},ta:function(g,b,j){var i=Math.round(g.style.opacity*100);if(i==b){clearInterval(g.ai);if(j==-1){g.style.display="none";g==e?TINY.box.alpha(c,-1,0,2):a.innerHTML=h.style.backgroundImage=""}else{if(g==c){this.alpha(e,1,100)}else{e.style.filter="";TINY.box.fill(d.html||d.url,d.url||d.iframe||d.image,d.post,d.animate,d.width,d.height)}}}else{var k=b-Math.floor(Math.abs(b-i)*0.5)*j;g.style.opacity=k/100;g.style.filter="alpha(opacity="+k+")"}},size:function(g,j,b){if(b){clearInterval(h.si);var i=parseInt(h.style.width)>g?-1:1,k=parseInt(h.style.height)>j?-1:1;h.si=setInterval(function(){TINY.box.ts(g,i,j,k)},20)}else{h.style.backgroundImage="none";if(d.close){h.appendChild(f);f.v=1}h.style.width=g+"px";h.style.height=j+"px";a.style.display="";this.pos();if(d.openjs){d.openjs()}}},ts:function(g,k,j,l){var b=parseInt(h.style.width),i=parseInt(h.style.height);if(b==g&&i==j){clearInterval(h.si);h.style.backgroundImage="none";a.style.display="block";if(d.close){h.appendChild(f);f.v=1}if(d.openjs){d.openjs()}}else{if(b!=g){h.style.width=(g-Math.floor(Math.abs(g-b)*0.6)*k)+"px"}if(i!=j){h.style.height=(j-Math.floor(Math.abs(j-i)*0.6)*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(j){var g=document.body,i=document.documentElement;return j?Math.max(Math.max(g.scrollHeight,i.scrollHeight),Math.max(g.clientHeight,i.clientHeight)):Math.max(Math.max(g.scrollWidth,i.scrollWidth),Math.max(g.clientWidth,i.clientWidth))}}}();function openBox(){if(!document.getElementById("picGallery")){return}var a=document.getElementById("picGallery").getElementsByTagName("a");for(var b=0;b<a.length;b++){a[b].onclick=function(){TINY.box.show({image:this.href});return false}}}addLoadEvent(openBox);
