var Shadower={shadow:function(F){F=$(F);var M=Object.extend({distance:8,angle:130,opacity:0.7,nestedShadows:4,color:"#000000"},arguments[1]||{});var B=Element.getStyle(F,"position");var K=F.parentNode;if(!F.shadowZIndex){if(B!="absolute"&&B!="fixed"){var J=this.idSafeClone(F);J.id=null;K.insertBefore(J,F);Position.absolutize(F);Position.clone(J,F);F.style.margin="0";J.style.visibility="hidden";B="absolute"}F.shadowZIndex=new Number(Element.getStyle(F,"zIndex")?Element.getStyle(F,"zIndex"):1);F.style.zIndex=F.shadowZIndex+1+M.nestedShadows}if(arguments[2]){this.deshadow(F)}if(!F.shadows){F.shadows=new Array(M.nestedShadows);for(var G=0;G<M.nestedShadows;G++){var L=document.createElement("div");Element.hide(L);L.appendChild(document.createTextNode(" "));if(K){K.appendChild(L)}L.style.position=B;L.style.backgroundColor=M.color;Element.setOpacity(L,M.opacity/M.nestedShadows);L.style.zIndex=F.shadowZIndex+1+G;F.shadows[G]=L}}if((/msie/.test(String(navigator.userAgent).toLowerCase()))&&(!F.spuriousIframe)){var A=F.identify()+"_SIF";
var E='<iframe frameborder="0" id="'+A+'" style="opacity:0; filter:alpha(opacity=0); display:none; z-index: '+F.shadowZIndex+'; background-color: #000; width:10px; height: 10px; position:absolute;" src="Blank.htm"></iframe>';F.insert({after:E});F.spuriousIframe=$(A)}var I=this.getLegendHeight(F);Position.prepare();var D=Position.positionedOffset(F);var H=-Math.cos(-M.angle*Math.PI/180)*M.distance;var C=-Math.sin(-M.angle*Math.PI/180)*M.distance;F.shadows.each(function(O,N){O.style.top=Math.ceil(D[1]+H+N+(I/2))+"px";O.style.left=(D[0]+C+N)+"px";O.style.width=(F.offsetWidth-(2*N))+"px";O.style.height=(F.offsetHeight-(2*N)-(I/2))+"px";Element.show(O)});if(F.spuriousIframe){F.spuriousIframe.style.top=Math.ceil(D[1]+Math.min(0,H))+"px";F.spuriousIframe.style.left=(D[0]+Math.min(0,C))+"px";F.spuriousIframe.style.width=Math.ceil(F.offsetWidth+Math.abs(C))+"px";F.spuriousIframe.style.height=Math.ceil(F.offsetHeight+Math.abs(H))+"px";Element.show(F.spuriousIframe)}},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}if(A.spuriousIframe){Element.remove(A.spuriousIframe);A.spuriousIframe=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);var C=String(navigator.userAgent).toLowerCase();if(B==1){Element.setStyle(A,{opacity:(/gecko/.test(C)&&!/konqueror|safari|khtml/.test(C))?0.999999:null});if(/msie/.test(C)){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(C)){Element.setStyle(A,{filter:Element.getStyle(A,"filter").replace(/alpha\([^\)]*\)/gi,"")+"alpha(opacity="+B*100+")"})}}};