var Wicked={version:"0.7.5",initFuncs:[]};Wicked.getElement=function(a){if(typeof a=="string"){return document.getElementById(a)}return a};Wicked.hasClassName=function(b,a){b=Wicked.getElement(b);if(b.className){var d=b.className.split(" ");for(var e=0;e<d.length;e++){if(d[e]==a){return true}}}return false};Wicked.getElementsByTypeAndClass=function(c,b){var d=[];var e=document.getElementsByTagName(c);for(var a=0;a<e.length;a++){if(Wicked.hasClassName(e[a],b)){d.push(e[a])}}return d};Wicked.addClassName=function(a,b){a=Wicked.getElement(a);if(!Wicked.hasClassName(a,b)){a.className+=" "+b}};Wicked.removeClassName=function(a,d){a=Wicked.getElement(a);if(a.className){var b=[];var e=a.className.split(" ");for(var f=0;f<e.length;f++){if(e[f]!=d){b.push(e[f])}}a.className=b.join(" ")}};Wicked.getElementPosition=function(a){a=Wicked.getElement(a);var c=0,b=0;do{c+=a.offsetTop||0;b+=a.offsetLeft||0;a=a.offsetParent}while(a);var d={top:c,left:b};return d};Wicked.setElementPosition=function(a,c,b){a=Wicked.getElement(a);if(b!=null){a.style.left=b+"px"}if(c!=null){a.style.top=c+"px"}};Wicked.getElementDimensions=function(c){c=Wicked.getElement(c);var d=c.style;var f={height:c.offsetHeight,width:c.offsetWidth};if(d.display==null||d.display=="none"){var a=d.visibility;var e=d.display;var b=d.position;d.visibility="hidden";d.position="absolute";d.display="block";f.height=c.clientHeight;f.width=c.clientWidth;d.display=e;d.position=b;d.visibility=a}return f};Wicked.getYouTubeVideo=function(e,c,a,d){var b='<div><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+c+'" height="'+a+'" id="YoutubeVideo">\n<param name="allowScriptAccess" value="sameDomain" /> <param name="wmode" value="transparent" /><param name="allowFullScreen" value="false" /> <param name="movie" value="http://www.youtube.com/v/'+e+"&hl=en&fs=1&autoplay="+d+'" /> <param name="quality" value="high" /> <param name="bgcolor" value="#313339" /> \n<embed src="http://www.youtube.com/v/'+e+"&hl=en&fs=1&autoplay="+d+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="'+c+'" height="'+a+'" name="YoutubeVideo" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object></div>';return b};Wicked.setElementOpacity=function(b,a){b=Wicked.getElement(b);if(b.style.filter!=null){b.style.filter="alpha(opacity="+(a*10)+")"}b.style.opacity=a/10};Wicked.registerInit=function(a){Wicked.initFuncs.push(a)};function W$(a){return Wicked.getElement(a)}function eitherOr(b,a){return(b)?b:a}var _originalOnLoad=window.onload;window.onload=function(){for(var a=0;a<Wicked.initFuncs.length;a++){Wicked.initFuncs[a](arguments)}if(_originalOnLoad){_originalOnLoad(arguments)}};Wicked.parseMediaTags=function(){var j=document.getElementsByTagName("p");for(var h=0;h<j.length;h++){var k=j[h];if(Wicked.hasClassName(k,"swf")){var e=k.innerHTML.split(":");var i=e[0];var c=e[1];var f=e[2];var d='<div><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+c+'" height="'+f+'" id="YoutubeVideo">\n<param name="allowScriptAccess" value="sameDomain" /> <param name="wmode" value="transparent" /><param name="allowFullScreen" value="false" /> <param name="movie" value="'+i+'" /> <param name="quality" value="high" /> <param name="bgcolor" value="#313339" /> \n<embed src="'+i+'" quality="high" wmode="transparent" bgcolor="#ffffff" width="'+c+'" height="'+f+'" name="Flash File" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object></div>';var a=document.createElement("div");a.innerHTML=d;k.innerHTML="";k.style.display="block";k.appendChild(a)}else{if(Wicked.hasClassName(k,"youtube")){var e=k.innerHTML.split(":");var b=e[0];var c=e[1];var f=e[2];var g=e[3];if(!g){g="0"}var d=Wicked.getYouTubeVideo(b,c,f,g);var a=document.createElement("div");a.innerHTML=d;k.innerHTML="";k.style.display="block";k.appendChild(a)}}}};Wicked.registerInit(Wicked.parseMediaTags);Wicked.formMonitors=[];Wicked.parseForms=function(){var a=document.getElementsByTagName("input");for(var c=0;c<a.length;c++){var b=a[c];if(Wicked.hasClassName(b,"f-monitor")){Wicked.formMonitors.push(b)}if(Wicked.hasClassName(b,"f-clear")){b.startValue=b.value;b.onfocus=function(){if(this.startValue&&this.startValue==this.value){this.value=""}}}}if(Wicked.formMonitors.length>0){setTimeout("Wicked.monitorForms()",500)}};Wicked.monitorForms=function(){for(var b=0;b<Wicked.formMonitors.length;b++){var a=Wicked.formMonitors[b];if(Wicked.hasClassName(a,"letters-only")){a.value=a.value.replace(/[^a-zA-Z]/g,"")}else{if(Wicked.hasClassName(a,"numbers-only")){a.value=a.value.replace(/[^0-9]/g,"")}else{if(Wicked.hasClassName(a,"letters-and-numbers")){a.value=a.value.replace(/[^a-zA-Z0-9]/g,"")}else{if(Wicked.hasClassName(a,"subdomain")){a.value=a.value.replace(/[^a-zA-Z0-9\-]/g,"")}}}}if(Wicked.hasClassName(a,"lowercase")){a.value=a.value.toLowerCase()}if(Wicked.hasClassName(a,"nospaces")){a.value=a.value.replace(/ /g,"")}}setTimeout("Wicked.monitorForms()",500)};Wicked.registerInit(Wicked.parseForms);Wicked.DROP_DOWN_HIDE_TIME=3;Wicked.DROP_DOWN_OFFSET_LEFT=0;Wicked.DROP_DOWN_OFFSET_TOP=0;Wicked.dropDownTimer=0;Wicked.activeDropDown=null;Wicked.DropDown=function(a){this.block=a.block;this.dropBottom=a.dropBottom;this.dropLeft=a.dropLeft;this.dropRight=a.dropRight;this.dropTop=a.dropTop};Wicked.parseDropDowns=function(){var c=document.getElementsByTagName("a");for(var b=0;b<c.length;b++){var d=c[b];if(Wicked.hasClassName(d,"wicked-drop-link")){var f=d.id;if(!f){throw new Error("No ID for link to "+d.href);return}var e=W$(f+"-drop");if(!e){throw new Error("Link "+f+" has no matching drop-down block ("+f+"-drop).");return}e.style.display="none";e.onmouseover=function(){Wicked.dropRefresh()};d.onmouseover=function(){Wicked.dropMenu(this)}}}};Wicked.dropMenu=function(f){var d=W$(f.id+"-drop");if(!d){throw new Error("Anchor "+f.id+" has lost its drop block!");return}if(Wicked.activeDropDown!=null&&Wicked.activeDropDown.id!=d.id){Wicked.activeDropDown.style.display="none";Wicked.activeDropDown=null}else{if(Wicked.activeDropDown!=null&&Wicked.activeDropDown.id==d.id){Wicked.dropRefresh();return}}var i=(Wicked.hasClassName(f,"wicked-drop-left"))?1:0;var j=(Wicked.hasClassName(f,"wicked-drop-right"))?1:0;var a=(Wicked.hasClassName(f,"wicked-drop-top"))?1:0;var b=Wicked.getElementDimensions(f);var c=Wicked.getElementPosition(f);var h=Wicked.getElementDimensions(d);var g=c.top+b.height+Wicked.DROP_DOWN_OFFSET_TOP;var e=c.left+Wicked.DROP_DOWN_OFFSET_LEFT;if(i){e=c.left-h.width+Wicked.DROP_DOWN_OFFSET_LEFT;g=c.top+Wicked.DROP_DOWN_OFFSET_TOP}else{if(j){e=c.left+b.width+Wicked.DROP_DOWN_OFFSET_LEFT;g=c.top+Wicked.DROP_DOWN_OFFSET_TOP}else{if(a){g=c.top-h.height+Wicked.DROP_DOWN_OFFSET_TOP}}}Wicked.setElementPosition(d,g,e);d.style.display="block";Wicked.activeDropDown=d;Wicked.dropDownTimer=Wicked.DROP_DOWN_HIDE_TIME;setTimeout("Wicked.dropHide()",1000)};Wicked.dropRefresh=function(){Wicked.dropDownTimer=Wicked.DROP_DOWN_HIDE_TIME};Wicked.dropHide=function(){if(Wicked.activeDropDown==null){return}Wicked.dropDownTimer--;if(Wicked.dropDownTimer<=0){Wicked.dropDownTimer=0;Wicked.activeDropDown.style.display="none";Wicked.activeDropDown=null;return}setTimeout("Wicked.dropHide()",1000)};Wicked.registerInit(Wicked.parseDropDowns);Wicked.SCROLL_SPEED=300;Wicked.SCROLL_REWIND_SPEED=600;Wicked.SCROLL_FPS=20;Wicked.SCROLL_AUTO_DELAY=3;Wicked.scrollElements=[];Wicked.scrollUID=0;Wicked.Scroller=function(b){var a=++Wicked.scrollUID;this.uid="wicked-scroller-"+a;this.wrapper=document.createElement("div");this.wrapper.id="wicked-scroller-wrapper-"+a;this.element=W$(b.element);this.index=0;this.autoTimer=0;this.numChildren=0;var c=Wicked.getElementDimensions(this.element);this.height=eitherOr(b.height,c.height);this.width=eitherOr(b.width,c.width);this.itemHeight=eitherOr(b.itemHeight,this.height);this.itemWidth=eitherOr(b.itemWidth,this.width);this.direction=eitherOr(b.direction,"horizontal");this.baseSpeed=eitherOr(b.speed,Wicked.SCROLL_SPEED);this.rewindSpeed=eitherOr(b.rewindSpeed,Wicked.SCROLL_REWIND_SPEED);this.autoScroll=eitherOr(b.autoScroll,0);this.noRewind=eitherOr(b.noRewind,0);this.speed=this.baseSpeed};Wicked.registerScroller=function(b){if(!b.element){throw new Error("An element must be passed to Wicked.registerScroller")}var a=new Wicked.Scroller(b);Wicked.scrollElements.push(a)};Wicked.renderScrollers=function(){if(Wicked.scrollElements.length<1){return}for(var n=0;n<Wicked.scrollElements.length;n++){var f=Wicked.scrollElements[n];var l=f.element.getElementsByTagName("li");var c=f.wrapper.style;var k=f.element.style;f.autoTimer=Wicked.SCROLL_AUTO_DELAY*Wicked.SCROLL_FPS;f.numChildren=l.length;if(f.noRewind){if(!l||l.length<2){throw new Error("Cannot use the noRewind option for a scroller with 1 or fewer elements");return}var g=l[0].cloneNode(true);var m=l[l.length-1].cloneNode(true);f.element.insertBefore(m,l[0]);f.element.appendChild(g);f.index=1;f.numChildren+=2}k.height=f.height+"px";k.width=(l.length*f.itemWidth)+"px";k.marginLeft="0px";k.marginTop="0px";c.height=f.height+"px";c.width=f.width+"px";f.wrapper.className="wicked-scroller-wrapper wicked-scroller-"+f.direction;f.element.parentNode.insertBefore(f.wrapper,f.element);f.wrapper.parentNode.removeChild(f.element);f.wrapper.appendChild(f.element);k.display="block";if(f.direction=="vertical"){}else{var a=document.createElement("div");a.className="wicked-scroller-button wicked-scroller-button-left";a.innerHTML="<span>&laquo;</span>";var e=document.createElement("div");e.className="wicked-scroller-button wicked-scroller-button-right";e.innerHTML="<span>&raquo;</span>";f.wrapper.appendChild(a);f.wrapper.appendChild(e);var h=Wicked.getElementDimensions(a);var b=Wicked.getElementDimensions(e);a.style.top=(-f.height/2-h.height/2)+"px";a.style.left=0;e.style.top=((-f.height/2-b.height/2)-h.height)+"px";e.style.left=(f.width-b.width)+"px";a.scroller=f;e.scroller=f;a.onclick=function(i){Wicked.slideScrollerLeft(this.scroller)};e.onclick=function(i){Wicked.slideScrollerRight(this.scroller)}}l=f.element.getElementsByTagName("li");for(var d=0;d<l.length;d++){var j=l[d];j.style.display="block";j.style.height=f.itemHeight+"px";j.style.width=f.itemWidth+"px"}if(f.noRewind){f.element.style.marginLeft=(f.index*-f.itemWidth)+"px"}}Wicked.animateScrollers()};Wicked.slideScrollerRight=function(a){if(a.index<a.numChildren-1){a.index++}else{a.index=0;a.speed=a.rewindSpeed}};Wicked.slideScrollerLeft=function(a){if(a.index>0){a.index--}else{a.index=a.numChildren-1;a.speed=a.rewindSpeed}};Wicked.animateScrollers=function(){try{for(var c=0;c<Wicked.scrollElements.length;c++){var b=Wicked.scrollElements[c];var i=parseInt(b.element.style.marginLeft);var d=b.index*-b.itemWidth;if(i!=d){var h=i-d;var a=(i>d)?-1:1;var g=b.speed/Wicked.SCROLL_FPS;if(Math.abs(h)<g){if(b.index>=b.numChildren-1){b.index=1}else{if(b.index==0){b.index=b.numChildren-2}}b.element.style.marginLeft=b.index*-b.itemWidth+"px"}else{b.element.style.marginLeft=(i+(a*g))+"px"}b.autoTimer=Wicked.SCROLL_AUTO_DELAY*Wicked.SCROLL_FPS}else{b.speed=b.baseSpeed}if(b.autoScroll){b.autoTimer--;if(b.autoTimer<=0){Wicked.slideScrollerRight(b);b.autoTimer=Wicked.SCROLL_AUTO_DELAY*Wicked.SCROLL_FPS}}}}catch(f){throw new Error(f)}setTimeout("Wicked.animateScrollers()",1000/Wicked.SCROLL_FPS)};Wicked.registerInit(Wicked.renderScrollers);