var Shadower={shadow:function(d){d=$(d);var l=Object.extend({distance:8,angle:130,opacity:0.7,nestedShadows:4,color:"#000000"},arguments[1]||{});var a=Element.getStyle(d,"position");var h=d.parentNode;if(!d.shadowZIndex){if(a!="absolute"&&a!="fixed"){var g=this.idSafeClone(d);g.id=null;h.insertBefore(g,d);Position.absolutize(d);Position.clone(g,d);d.style.margin="0";g.style.visibility="hidden";a="absolute"}d.shadowZIndex=new Number(Element.getStyle(d,"zIndex")?Element.getStyle(d,"zIndex"):1);d.style.zIndex=d.shadowZIndex+l.nestedShadows}if(arguments[2]){this.deshadow(d)}if(!d.shadows){d.shadows=new Array(l.nestedShadows);for(var e=0;e<l.nestedShadows;e++){var k=document.createElement("div");Element.hide(k);k.appendChild(document.createTextNode(" "));if(h){h.appendChild(k)}k.style.position=a;k.style.backgroundColor=l.color;Element.setOpacity(k,l.opacity/l.nestedShadows);k.style.zIndex=d.shadowZIndex+e;d.shadows[e]=k}}var j=this.getLegendHeight(d);Position.prepare();var c=Position.positionedOffset(d);var f=-Math.cos(-l.angle*Math.PI/180)*l.distance;var b=-Math.sin(-l.angle*Math.PI/180)*l.distance;d.shadows.each(function(n,m){n.style.top=Math.ceil(c[1]+f+m+(j/2))+"px";n.style.left=(c[0]+b+m)+"px";n.style.width=(d.offsetWidth-(2*m))+"px";n.style.height=(d.offsetHeight-(2*m)-(j/2))+"px";Element.show(n)})},idSafeClone:function(b){var c=b.cloneNode(false);if(c.hasAttribute&&c.hasAttribute("id")){c.removeAttribute("id")}var a=$A(b.childNodes).collect(this.idSafeClone.bind(this));a.each(function(d){c.appendChild(d)});return c},getLegendHeight:function(a){if(a.nodeName.toLowerCase()=="fieldset"){var b;$A(a.childNodes).each(function(c){if(c.nodeName.toLowerCase()=="legend"){b=c;throw $break}});if(b){return Element.getDimensions(b).height}}return 0},deshadow:function(a){a=$(a);if(a.shadows){a.shadows.each(Element.remove);a.shadows=null}},shadowWithClass:function(a,b){$$("."+a).each(function(c){this.shadow(c,b)}.bind(this))}};if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||parseFloat(Prototype.Version.split(".")[0]+"."+Prototype.Version.split(".")[1])<1.5){throw ("Shadower requires the Prototype JavaScript framework >= 1.5.0")}Element.getOpacity=function(b){var a;if(a=Element.getStyle(b,"opacity")){return parseFloat(a)}if(a=(Element.getStyle(b,"filter")||"").match(/alpha\(opacity=(.*)\)/)){if(a[1]){return parseFloat(a[1])/100}}return 1};Element.setOpacity=function(a,b){a=$(a);if(b==1){Element.setStyle(a,{opacity:(/Gecko/.test(navigator.userAgent)&&!/Konqueror|Safari|KHTML/.test(navigator.userAgent))?0.999999:null});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(a,{filter:Element.getStyle(a,"filter").replace(/alpha\([^\)]*\)/gi,"")})}}else{if(b<0.00001){b=0}Element.setStyle(a,{opacity:b});if(/MSIE/.test(navigator.userAgent)){Element.setStyle(a,{filter:Element.getStyle(a,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+b*100+")"})}}};