var ContentFlowGlobal={Flows:new Array,AddOns:{},scriptName:"contentflow.js",scriptElement:null,Browser:new function(){this.Opera=window.opera?true:false;this.IE=document.all&&!this.Opera?true:false;this.IE6=this.IE&&typeof window.XMLHttpRequest=="undefined"?true:false;this.IE8=this.IE&&typeof document.querySelectorAll!="undefined"?true:false;this.IE7=this.IE&&!this.IE6&&!this.IE8?true:false;this.WebKit=/WebKit/i.test(navigator.userAgent)?true:false,this.iPhone=/iPhone|iPod/i.test(navigator.userAgent)?true:false;this.Chrome=/Chrome/i.test(navigator.userAgent)?true:false;this.Safari=/Safari/i.test(navigator.userAgent)&&!this.Chrome?true:false;this.Konqueror=navigator.vendor=="KDE"?true:false;this.Konqueror4=this.Konqueror&&/native code/.test(document.getElementsByClassName)?true:false;this.Gecko=!this.WebKit&&navigator.product=="Gecko"?true:false;this.Gecko19=this.Gecko&&Array.reduce?true:false},getAddOnConf:function(a){if(this.AddOns[a])return this.AddOns[a].conf;else return{}},setAddOnConf:function(a,b){this.AddOns[a].setConfig(b)},getScriptElement:function(a){var b=new RegExp(a);var c=document.getElementsByTagName("script");for(var d=0;d<c.length;d++){if(c[d].src&&b.test(c[d].src))return c[d]}return""},getScriptPath:function(a,b){var c=new RegExp(b+".*");return a.src.replace(c,"")},addScript:function(a){if(this.Browser.IE||this.Browser.WebKit||this.Browser.Konqueror){document.write('<script type="text/javascript" src="'+a+'"></script>')}else{var b=document.createElement("script");b.src=a;b.setAttribute("type","text/javascript");document.getElementsByTagName("head")[0].appendChild(b)}},addScripts:function(a,b){for(var c=0;c<filename.length;c++)this.addScript(basepath+b[c])},addStylesheet:function(a){if(this.Browser.Gecko19){var b=document.createElement("link");b.setAttribute("rel","stylesheet");b.setAttribute("href",a);b.setAttribute("type","text/css");b.setAttribute("media","screen");document.getElementsByTagName("head")[0].appendChild(b)}else{document.write('<link rel="stylesheet" href="'+a+'" type="text/css" media="screen" />')}},addStylesheets:function(a,b){for(var c=0;c<filename.length;c++)this.addStylesheet(basepath+b[c])},initPath:function(){this.scriptElement=this.getScriptElement(this.scriptName);if(!this.scriptElement){this.scriptName="contentflow_src.js";this.scriptElement=this.getScriptElement(this.scriptName)}this.BaseDir=this.getScriptPath(this.scriptElement,this.scriptName);if(!this.AddOnBaseDir)this.AddOnBaseDir=this.BaseDir;if(!this.CSSBaseDir)this.CSSBaseDir=this.BaseDir},init:function(){this.addStylesheet(this.CSSBaseDir+"contentflow.css");this.addStylesheet(this.CSSBaseDir+"mycontentflow.css");this.loadAddOns=new Array;if(this.scriptElement.getAttribute("load")){var a=this.loadAddOns=this.scriptElement.getAttribute("load").replace(/\ +/g," ").split(" ");for(var b=0;b<a.length;b++){if(a[b]=="")continue;this.addScript(this.AddOnBaseDir+"ContentFlowAddOn_"+a[b]+".js")}}var c=this;if(document.addEventListener){if(this.Browser.WebKit){var d=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(d);c.onloadInit()}},10)}else{document.addEventListener("DOMContentLoaded",c.onloadInit,false)}}else if(this.Browser.IE){document.write("<script id=__ie_cf_onload defer src=javascript:void(0)></script>");var e=document.getElementById("__ie_cf_onload");e.onreadystatechange=function(){if(this.readyState=="complete"){c.onloadInit()}}}window.addEvent("load",c.onloadInit,false)},onloadInit:function(){if(arguments.callee.done)return;for(var a=0;a<ContentFlowGlobal.loadAddOns.length;a++){var b=ContentFlowGlobal.loadAddOns[a];if(!ContentFlowGlobal.AddOns[b]){var c=ContentFlowGlobal;window.setTimeout(c.onloadInit,10);return}}arguments.callee.done=true;if(window.Element&&Element.implement&&document.all&&!window.opera){for(var d in window.CFElement.prototype){if(!window.Element.prototype[d]){var e={};e[d]=window.CFElement.prototype[d];Element.implement(e)}}}for(var a=0;a<ContentFlowGlobal.Flows.length;a++){ContentFlowGlobal.Flows[a].init()}var f=document.getElementsByTagName("div");DIVS:for(var a=0;a<f.length;a++){if(f[a].className.match(/\bContentFlow\b/)){for(var g=0;g<ContentFlowGlobal.Flows.length;g++){if(f[a]==ContentFlowGlobal.Flows[g].Container)continue DIVS}var h=new ContentFlow(f[a],{},false);h.init()}}}};ContentFlowGlobal.initPath();var ContentFlowAddOn=function(a,b,c){if(typeof c=="undefined"||c!=false)ContentFlowGlobal.AddOns[a]=this;this.name=a;if(!b)b={};this.methods=b;this.conf={};if(this.methods.conf){this.setConfig(this.methods.conf);delete this.methods.conf}this.scriptpath=ContentFlowGlobal.AddOnBaseDir;if(b.init){var d=b.init.bind(this);d(this)}};ContentFlowAddOn.prototype={Browser:ContentFlowGlobal.Browser,addScript:ContentFlowGlobal.addScript,addScripts:ContentFlowGlobal.addScripts,addStylesheet:function(a){if(!a)a=this.scriptpath+"ContentFlowAddOn_"+this.name+".css";ContentFlowGlobal.addStylesheet(a)},addStylesheets:ContentFlowGlobal.addStylesheets,setConfig:function(a){for(var b in a){this.conf[b]=a[b]}},_init:function(a){if(this.methods.ContentFlowConf){a.setConfig(this.methods.ContentFlowConf)}}};var ContentFlowGUIElement=function(a,b){b.setDimensions=function(){this.dimensions=this.getDimensions();this.center={x:this.dimensions.width/2,y:this.dimensions.height/2};this.position=this.findPos()};b.addObserver=function(b,c){var d=this.eventMethod=c.bind(a);this.observedEvent=b;this.addEvent(b,d,false)};b.makeDraggable=function(a,b,c){this.stopDrag=function(b){if(!b)var b=window.event;if(this.Browser.iPhone){window.removeEvent("touchemove",a,false);if(!this.ontochmove){var d=b.target;if(d.firstChild)d=d.firstChild;var e=document.createEvent("MouseEvents");e.initEvent("click",true,true);d.dispatchEvent(e)}}else{window.removeEvent("mousemove",a,false)}c(b)}.bind(this);this.initDrag=function(a){if(!a)var a=window.event;var c=a;if(a.touches)c=a.touches[0];this.mouseX=c.clientX;this.mouseY=c.clientY;b(a)}.bind(this);this.startDrag=function(b){if(!b)var b=window.event;var c=this.stopDrag;if(this.Browser.iPhone){var d=this;d.ontouchmove=false;window.addEvent("touchmove",function(b){d.ontouchmove=true;a(b)},false);b.preventDefault();window.addEvent("touchend",c,false)}else{window.addEvent("mousemove",a,false);window.addEvent("mouseup",c,false)}if(b.preventDefault){b.preventDefault()}}.bind(this);var d=this.startDrag;if(this.Browser.iPhone){this.addEventListener("touchstart",d,false)}else{this.addEvent("mousedown",d,false)}};b.Browser=ContentFlowGlobal.Browser;$CF(b).setDimensions();return b};var ContentFlowItem=function(a,b,c){this.CFobj=a;this._activeElement=a.conf.activeElement;this.pre=null;this.next=null;this.clickItem=function(a){if(!a)var a=window.event;var b=a.target?a.target:a.srcElement;var c=b.itemIndex?b.itemIndex:b.parentNode.itemIndex;var d=this.items[c];if(this._activeItem==d){this.conf.onclickActiveItem(d)}else{if(this.conf.onclickInactiveItem(d)!=false)this.moveToIndex(c)}}.bind(a),this.setIndex=function(a){this.index=a;this.element.itemIndex=a};this.getIndex=function(){return this.index};if($CF(b).nodeName=="IMG"){var d=document.createElement("div");d.className="item";var e=b.parentNode.replaceChild(d,b);e.className="content";d.appendChild(e);if(b.title){var f=document.createElement("div");f.className="caption";f.innerHTML=b.title;d.appendChild(f)}b=d}this.element=$CF(b);this.item=b;if(typeof c!="undefined")this.setIndex(c);this.content=this.element.getChildrenByClassName("content")[0];this.caption=this.element.getChildrenByClassName("caption")[0];this.label=this.element.getChildrenByClassName("label")[0];if(this.content.nodeName=="IMG"){a._imagesToLoad++;var g=function(){a._imagesToLoad--;this.image=this.content;this.setImageFormat(this.image);if(a.conf.reflectionHeight>0){this.addReflection()}this.initClick();a._addItemCueProcess(true)}.bind(this);if(this.content.complete&&this.content.width>0)window.setTimeout(g,100);else{var h=this;var i=window.setInterval(function(){if(h.content.complete&&h.content.width>0){window.clearInterval(i);g()}},10)}}else{this.initClick();a._addItemCueProcess(true)}};ContentFlowItem.prototype={Browser:ContentFlowGlobal.Browser,makeActive:function(){this.element.addClassName("active");this.CFobj.conf.onMakeActive(this)},makeInactive:function(){this.element.removeClassName("active");this.CFobj.conf.onMakeInactive(this)},initClick:function(){var a=this.clickItem;this[this._activeElement].addEvent("click",a,false)},setImageFormat:function(a){if(this.Browser.IE6||this.Browser.IE7)a.style.width="auto";a.origProportion=a.width/a.height;a.setAttribute("origProportion",a.width/a.height);if(this.Browser.IE6||this.Browser.IE7)a.style.width="";if(a.origProportion<=1)a.addClassName("portray");else a.addClassName("landscape")},addReflection:function(){var a=this.CFobj;var b;var c=this.content;if(this.Browser.IE){var d="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";if(a._reflectionColorRGB){if(a.conf.reflectionColor=="transparent"){var e=b=this.reflection=document.createElement("img");b.src=c.src}else{b=this.reflection=document.createElement("div");var e=document.createElement("img");e.src=c.src;b.width=e.width;b.height=e.height;e.style.width="100%";e.style.height="100%";var f=a._reflectionColorRGB;b.style.backgroundColor="#"+f.hR+f.hG+f.hB;b.appendChild(e)}d+=" progid:DXImageTransform.Microsoft.Alpha(opacity=0, finishOpacity=50, style=1, finishX=0, startY="+a.conf.reflectionHeight*100+" finishY=0)"}else{var e=b=this.reflection=document.createElement("img");b.src=c.src}d+=" progid:DXImageTransform.Microsoft.Matrix(M11=1, M12=0, M21=0, M22="+1/a.conf.reflectionHeight+")";if(ContentFlowGlobal.Browser.IE6){if(c.src.match(/\.png$/)){c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c.src+"', sizingMethod=scale )";c.filterString="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c.src+"', sizingMethod=scale )";d+=" progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+c.src+"', sizingMethod=scale )";c.origSrc=c.src;c.src="img/blank.gif";e.src="img/blank.gif"}}b.filterString=d;e.style.filter=d}else{if(a._reflectionWithinImage)var g=this.canvas=$CF(document.createElement("canvas"));else var g=b=this.reflection=document.createElement("canvas");if(g.getContext){if(a._reflectionWithinImage){for(var h=0;h<c.attributes.length;h++){g.setAttributeNode(c.attributes[h].cloneNode(true))}}var i=g.getContext("2d");var j=a.maxHeight;var k=a._scaleImageSize(this,{width:j,height:j},j);var l=k.width;var m=k.height;if(a._reflectionWithinImage){g.width=l;g.height=m;this.setImageFormat(g);g.height=m*(1+a.conf.reflectionHeight+a.conf.reflectionGap)}else{g.width=l;g.height=m*a.conf.reflectionHeight}i.save();if(a._reflectionWithinImage){i.drawImage(c,0,0,l,m)}if(a._reflectionWithinImage){var n=m*(1+a.conf.reflectionGap/2)*2}else{var n=c.height}n-=1;i.translate(0,n);i.scale(1,-1);i.drawImage(c,0,0,l,m);i.restore();if(a._reflectionColorRGB){var o=i.createLinearGradient(0,0,0,g.height);var p=[0,.5,1];if(a._reflectionColor=="transparent"){i.globalCompositeOperation="destination-in";p=[1,.5,0]}var q=a._reflectionColorRGB.iR;var r=a._reflectionColorRGB.iG;var s=a._reflectionColorRGB.iB;if(a._reflectionWithinImage){o.addColorStop(0,"rgba("+q+","+r+","+s+","+p[0]+")");o.addColorStop(m/g.height,"rgba("+q+","+r+","+s+","+p[0]+")");o.addColorStop(m/g.height,"rgba("+q+","+r+","+s+","+p[1]+")")}else{o.addColorStop(0,"rgba("+q+","+r+","+s+","+p[1]+")")}o.addColorStop(1,"rgba("+q+","+r+","+s+","+p[2]+")");i.fillStyle=o;i.fillRect(0,0,g.width,g.height)}if(a._reflectionWithinImage){c.parentNode.replaceChild(g,c);this.content=g;this.origContent=g;delete this.image}}else{a._reflectionWithinImage=false;delete this.reflection}}if(b){b.className="reflection";this.element.appendChild(b);if(this.caption)this.element.appendChild(this.caption)}}};var ContentFlow=function(a,b){if(a){ContentFlowGlobal.Flows.push(this);this.Container=a;this._userConf=b?b:{};this.conf={};this._loadedAddOns=new Array}else{throw"ContentFlow ERROR: No flow container node or id given"}};ContentFlow.prototype={_imagesToLoad:0,_activeItem:0,_currentPosition:0,_targetPosition:0,_stepLock:false,_millisecondsPerStep:40,_reflectionWithinImage:true,Browser:ContentFlowGlobal.Browser,_defaultConf:{useAddOns:"all",biggestItemPos:0,loadingTimeout:3e4,activeElement:"content",maxItemHeight:0,scaleFactor:1,scaleFactorLandscape:1.33,scaleFactorPortrait:1,fixItemSize:false,relativeItemPosition:"top center",circularFlow:true,verticalFlow:false,visibleItems:-1,endOpacity:1,startItem:"center",scrollInFrom:"pre",flowSpeedFactor:1,flowDragFriction:1,scrollWheelSpeed:1,keys:{13:function(){this.conf.onclickActiveItem(this._activeItem)},37:function(){this.moveTo("pre")},38:function(){this.moveTo("visibleNext")},39:function(){this.moveTo("next")},40:function(){this.moveTo("visiblePre")}},reflectionColor:"transparent",reflectionHeight:.5,reflectionGap:0,onInit:function(){},onclickInactiveItem:function(a){},onclickActiveItem:function(a){var b,c;if(b=a.content.getAttribute("href")){c=a.content.getAttribute("target")}else if(b=a.element.getAttribute("href")){c=a.element.getAttribute("target")}else if(b=a.content.getAttribute("src")){c=a.content.getAttribute("target")}if(b){if(c)window.open(b,c).focus();else window.location.href=b}},onMakeInactive:function(a){},onMakeActive:function(a){},onReachTarget:function(a){},onMoveTo:function(a){},onDrawItem:function(a){},onclickPreButton:function(a){this.moveToIndex("pre");return Event.stop(a)},onclickNextButton:function(a){this.moveToIndex("next");return Event.stop(a)},calcStepWidth:function(a){var b=this.conf.visibleItems;var c=this.items.length;c=c==0?1:c;if(Math.abs(a)>b){if(a>0){var d=a-b}else{var d=a+b}}else if(b>=this.items.length){var d=a/c}else{var d=a*(b/c)}return d},calcSize:function(a){var b=a.relativePosition;var c=1/(Math.abs(b)+1);var d=c;return{width:d,height:c}},calcCoordinates:function(a){var b=a.relativePosition;var c=this.conf.visibleItems;var d=1-1/Math.exp(Math.abs(b)*.75);var e=a.side*c/(c+1)*d;var f=1;return{x:e,y:f}},calcZIndex:function(a){return-Math.abs(a.relativePositionNormed)},calcFontSize:function(a){return a.size.height},calcOpacity:function(a){return Math.max(1-(1-this.conf.endOpacity)*Math.sqrt(Math.abs(a.relativePositionNormed)),this.conf.endOpacity)}},_checkIndex:function(a){a=Math.max(a,0);a=Math.min(a,this.itemsLastIndex);return a},_setLastIndex:function(){this.itemsLastIndex=this.items.length-1},_getItemByIndex:function(a){return this.items[this._checkIndex(a)]},_getItemByPosition:function(a){return this._getItemByIndex(this._getIndexByPosition(a))},_getPositionByIndex:function(a){if(!this.conf.circularFlow)return this._checkIndex(a);var b=this._getIndexByPosition(this._currentPosition);var c=a-b;if(Math.abs(c)>c+this.items.length)c+=this.items.length;else if(Math.abs(c)>Math.abs(c-this.items.length))c-=this.items.length;return this._currentPosition+c},_getIndexByPosition:function(a){if(a<0)var b=0;else var b=1;var c=(Math.round(a)+b)%this.items.length;if(c>0)c-=b;else if(c<0)c+=this.items.length-b;else if(a<0)c=0;else c=this.items.length-1;return c},_getIndexByKeyWord:function(a,b,c){if(b)var d=b;else if(this._activeItem)var d=this._activeItem.index;else var d=0;if(isNaN(a)){switch(a){case"first":case"start":d=0;break;case"last":case"end":d=this.itemsLastIndex;break;case"middle":case"center":d=Math.round(this.itemsLastIndex/2);break;case"right":case"next":d+=1;break;case"left":case"pre":case"previous":d-=1;break;case"visible":case"visiblePre":case"visibleLeft":d-=this.conf.visibleItems;break;case"visibleNext":case"visibleRight":d+=this.conf.visibleItems;break;default:d=d}}else{d=a}if(c!=false)d=this._checkIndex(d);return d},_setCaptionLabel:function(a){if(this.Position&&!this.Slider.locked)this.Position.setLabel(a);this._setGlobalCaption()},getAddOnConf:function(a){return ContentFlowGlobal.getAddOnConf(a)},setAddOnConf:function(a,b){ContentFlowGlobal.setAddOnConf(a,b)},init:function(){if(this.isInit)return;this._init()},setConfig:function(a){if(!a)return;var b=this._defaultConf;for(var d in a){if(b[d]=="undefined")continue;switch(d){case"scrollInFrom":case"startItem":if(typeof a[d]=="number"||typeof a[d]=="string"){this.conf[d]=a[d]}break;default:if(typeof (b[d]==a[d])){if(typeof a[d]=="function"){this.conf[d]=a[d].bind(this)}else{this.conf[d]=a[d]}}}}switch(this.conf.reflectionColor){case this.conf.reflectionColor.search(/#[0-9a-fA-F]{6}/)>=0?this.conf.reflectionColor:this.conf.reflectionColor+"x":this._reflectionColorRGB={hR:this.conf.reflectionColor.slice(1,3),hG:this.conf.reflectionColor.slice(3,5),hB:this.conf.reflectionColor.slice(5,7),iR:parseInt(this.conf.reflectionColor.slice(1,3),16),iG:parseInt(this.conf.reflectionColor.slice(3,5),16),iB:parseInt(this.conf.reflectionColor.slice(5,7),16)};break;case"none":case"transparent":default:this._reflectionColor="transparent";this._reflectionColorRGB={hR:0,hG:0,hB:0,iR:0,iG:0,iB:0};break}if(this.items){if(this.conf.visibleItems<0)this.conf.visibleItems=Math.round(Math.sqrt(this.items.length));this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1)}if(this.conf.relativeItemPosition){var e={x:{left:function(a){return-1},center:function(a){return 0},right:function(a){return 1}},y:{top:function(a){return-1},center:function(a){return 0},bottom:function(a){return 1}}};var f=this.conf.relativeItemPosition;f=f.replace(/above/,"top").replace(/below/,"bottom");var g,h=null;g=f.match(/left|right/);h=f.match(/top|bottom/);c=f.match(/center/);if(!g){if(c)g="center";else g="center"}if(!h){if(c)h="center";else h="top"}var i=e.x[g];var j=e.y[h];this.conf.calcRelativeItemPosition=function(a){var b=i(a.size);var c=j(a.size);return{x:b,y:c}};this.conf.relativeItemPosition=null}if(this._reflectionType&&this._reflectionType!="clientside"){this.conf.reflectionHeight=0}},getItem:function(a){return this.items[this._checkIndex(Math.round(a))]},getActiveItem:function(){return this._activeItem},getNumberOfItems:function(){return this.items.length},resize:function(){this._initSizes();this._initStep()},moveToPosition:function(a,b){if(!this.conf.circularFlow)a=this._checkIndex(a);this._targetPosition=a;this.conf.onMoveTo(this._getItemByPosition(a));this._initStep(false,b)},moveToIndex:function(a){this._targetPosition=Math.round(this._getPositionByIndex(this._getIndexByKeyWord(a,this._activeItem.index,!this.conf.circularFlow)));this.conf.onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep()},moveToItem:function(a){var b;if(a.itemIndex)b=a.itemIndex;else b=a.index;this.moveToIndex(b)},moveTo:function(a){if(typeof a=="object")this.moveToItem(a);else if(isNaN(a)||a==Math.floor(a)&&a<this.items.length)this.moveToIndex(a);else this.moveToPosition(a)},_addItemCue:[],_addItemCueProcess:function(a){var b=this._addItemCue;if(a==true)b.shift();if(b.length>0&&!b[0].p){b[0].p=true;var c=this;var d=b.length>5?1:40;window.setTimeout(function(){c._addItem(b[0].el,b[0].i)},d)}},addItem:function(a,b){this._addItemCue.push({el:a,i:b,p:false});if(this._addItemCue.length==1)this._addItemCueProcess()},_addItem:function(a,b){if(typeof b=="string"){switch(b){case"first":case"start":b=0;break;case"last":case"end":b=isNaN(this.itemsLastIndex)?0:this.itemsLastIndex;b+=1;break;default:b=this._getIndexByKeyWord(b)}}b=Math.max(b,0);b=Math.min(b,this.itemsLastIndex+1);b=isNaN(b)?0:b;this.Flow.appendChild(a);var c=new ContentFlowItem(this,a,b);if(this.items.length==0){this.resize();if(this.conf.circularFlow){c.pre=c;c.next=c}}else{if(b==this.itemsLastIndex+1){c.pre=this.items[this.itemsLastIndex];c.next=c.pre.next}else{c.next=this.items[b];c.pre=c.next.pre}if(c.pre)c.pre.next=c;if(c.next)c.next.pre=c}this.items.splice(b,0,c);for(var d=b;d<this.items.length;d++){this.items[d].setIndex(d)}this._setLastIndex();if(this.conf.origVisibleItems<0){this.conf.visibleItems=Math.round(Math.sqrt(this.items.length))}this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1);if(Math.round(this._getPositionByIndex(b))<=Math.round(this._targetPosition)){this._targetPosition++;if(!this.conf.circularFlow)this._targetPosition=Math.min(this._targetPosition,this.itemsLastIndex)}if(this._getPositionByIndex(b)<=this._currentPosition){this._currentPosition++;if(!this.conf.circularFlow)this._currentPosition=Math.min(this._currentPosition,this.itemsLastIndex)}var e=this;window.setTimeout(function(){if(e.items.length==1){e._currentPosition=-.01;e._targetPosition=0;e.resize()}else{e._initStep()}},100);return b},rmItem:function(a){if(a=="undefined")a=this._activeItem.index;a=this._getIndexByKeyWord(a);if(!this.items[a])return null;var b=this.items[a];if(b.pre)b.pre.next=b.next;if(b.next)b.next.pre=b.pre;this.items.splice(a,1);for(var c=a;c<this.items.length;c++){this.items[c].setIndex(c)}this._setLastIndex();if(Math.round(this._getPositionByIndex(a))<Math.round(this._targetPosition)){this._targetPosition--;if(!this.conf.circularFlow)this._targetPosition=this._checkIndex(this._targetPosition)}if(this._getPositionByIndex(a)<this._currentPosition){this._currentPosition--;if(!this.conf.circularFlow)this._currentPosition=this._checkIndex(this._currentPosition)}this._activeItem=this._getItemByPosition(this._currentPosition);var d=b.element.parentNode.removeChild(b.element);var e=this;window.setTimeout(function(){e._initStep()},10);return d},_init:function(){if(typeof this.Container=="string"){var a=document.getElementById(this.Container);if(a){this.Container=a}else{throw"ContentFlow ERROR: No element with id '"+this.Container+"' found!";return}}$CF(this.Container).addClassName("ContentFlow");var b=$CF(this.Container).getChildrenByClassName("flow")[0];if(!b){throw"ContentFlow ERROR: No element with class'flow' found!";return}this.Flow=new ContentFlowGUIElement(this,b);var c=this.Container.getChildrenByClassName("scrollbar")[0];if(c){this.Scrollbar=new ContentFlowGUIElement(this,c);var d=this.Scrollbar.getChildrenByClassName("slider")[0];if(d){this.Slider=new ContentFlowGUIElement(this,d);var e=this.Slider.getChildrenByClassName("position")[0];if(e){this.Position=new ContentFlowGUIElement(this,e)}}}this.setConfig(this._defaultConf);this._initAddOns();this.setConfig(this._userConf);this._initSizes();var f=this.Flow.getChildrenByClassName("item");this.items=new Array;for(var g=0;g<f.length;g++){var h=this.items[g]=new ContentFlowItem(this,f[g],g);if(g>0){h.pre=this.items[g-1];h.pre.next=h}}this._setLastIndex();if(this.conf.circularFlow&&this.items.length>0){var i=this.items[0];i.pre=this.items[this.items.length-1];i.pre.next=i}this._initGUI();if(this._activeElement!="content")this._activeElement="element";this.conf.origVisibleItems=this.conf.visibleItems;if(this.conf.visibleItems<0){this.conf.visibleItems=Math.round(Math.sqrt(this.items.length))}this.conf.visibleItems=Math.min(this.conf.visibleItems,this.items.length-1);this._targetPosition=this._getIndexByKeyWord(this.conf.startItem,0);var j=this._getIndexByKeyWord(this.conf.scrollInFrom,this._targetPosition);switch(this.conf.scrollInFrom){case"next":case"right":j-=.5;break;case"pre":case"previous":case"left":j+=.5;break}this._currentPosition=j;var k=new Date;var l=this;var m=window.setInterval(function(){if(l._imagesToLoad==0||new Date-k>l._loadingTimeout){clearInterval(m);l._activeItem=l.getItem(l._currentPosition);if(l._activeItem){l._activeItem.makeActive();l._setCaptionLabel(l._activeItem.index)}l.Flow.style.visibility="visible";if(l.loadIndicator)l.loadIndicator.style.display="none";if(l.Scrollbar)l.Scrollbar.style.visibility="visible";l.resize();for(var a=0;a<l._loadedAddOns.length;a++){var b=ContentFlowGlobal.AddOns[l._loadedAddOns[a]];if(b.methods.afterContentFlowInit)b.methods.afterContentFlowInit(l)}l.conf.onInit()}},10);this.isInit=true},_initAddOns:function(){var a=[];if(this._userConf.useAddOns){if(typeof this._userConf.useAddOns=="string"){a=this._userConf.useAddOns.split(" ")}else if(typeof this._userConf.useAddOns=="array"){a=this._userConf.useAddOns}}else if(this.Container.getAttribute("useAddOns")){a=this.Container.getAttribute("useAddOns").split(" ")}else{a=this.conf.useAddOns.split(" ")}for(var b=0;b<a.length;b++){if(a[b]=="none"){a=new Array;break}else if(a[b]=="all"){a=new Array;for(var c in ContentFlowGlobal.AddOns)a.push(c);break}}for(var b=0;b<a.length;b++){var c=ContentFlowGlobal.AddOns[a[b]];if(c){this._loadedAddOns.push(a[b]);c._init(this);this.Container.addClassName("ContentFlowAddOn_"+c.name);if(c.methods.onloadInit)c.methods.onloadInit(this)}}},_initGUI:function(){var a=this.resize.bind(this);window.addEvent("resize",a,false);var b=this.Container.getElementsByTagName("div");for(var c=0;c<b.length;c++){if($CF(b[c]).hasClassName("preButton")){var d=b[c];var e=this.conf.onclickPreButton;d.addEvent("click",e,false)}else if(b[c].hasClassName("nextButton")){var f=b[c];var e=this.conf.onclickNextButton;f.addEvent("click",e,false)}}if(this.conf.scrollWheelSpeed!=0){var g=this._wheel.bind(this);if(window.addEventListener)this.Container.addEventListener("DOMMouseScroll",g,false);this.Container.onmousewheel=g}var h=this._keyStroke.bind(this);if(this.conf.keys&&!this.Browser.iPhone){if(document.addEventListener){if(!this.Browser.Opera){var i=document.createElement("div");i.addClassName("mouseoverCheckElement");this.Container.appendChild(i);if(this.Browser.WebKit){document.body.addEvent("keydown",function(a){if(i.offsetLeft>0)h(a)})}else{window.addEvent("keydown",function(a){if(i.offsetLeft>0)h(a)})}}else{this.Container.addEvent("keydown",h)}}else{this.Container.onkeydown=h}}if(this.conf.flowDragFriction>0){var j=function(a){var b=a;if(a.touches)b=a.touches[0];var c=b.clientX;var d=b.clientY;if(this.conf.verticalFlow){var e=d-this.Flow.mouseY;var f=this.Flow.dimensions.height}else{var e=c-this.Flow.mouseX;var f=this.Flow.dimensions.width}var g=e/f*(2*this.conf.visibleItems+1);var h=this._currentPosition-g*2*this.conf.visibleItems/this.conf.flowDragFriction;this.Flow.mouseX=c;this.Flow.mouseY=d;this.moveToPosition(h,true)}.bind(this);var k=function(){};var l=function(a){var b=Math.round(this._targetPosition);if(Math.abs(b-this._currentPosition)>.001)this.moveToPosition(b)}.bind(this);this.Flow.makeDraggable(j,k,l)}if(this.Scrollbar){var m=function(a){if(!a)var a=window.event;if(!this.Scrollbar.clickLocked){var b=a.clientX;var c=b-this.Scrollbar.position.left;var d=Math.round(c/this.Scrollbar.dimensions.width*this.itemsLastIndex);this.moveToIndex(d)}else this.Scrollbar.clickLocked=false}.bind(this);this.Scrollbar.addObserver("click",m)}if(this.Slider){if(this.Browser.IE6){var n=document.createElement("div");n.className="virtualSlider";this.Slider.appendChild(n)}this.Slider.setPosition=function(a){a=a-Math.floor(a)+this._getIndexByPosition(Math.floor(a));if(Math.round(a)<0)a=this.itemsLastIndex;else if(a<=0)a=0;else if(Math.round(a)>this.itemsLastIndex)a=0;else if(a>=this.itemsLastIndex)a=this.itemsLastIndex;if(this.items.length>1){var b=a/this.itemsLastIndex*this.Scrollbar.dimensions.width}else{var b=.5*this.Scrollbar.dimensions.width}this.Slider.style.left=b-this.Slider.center.x+"px";this.Slider.style.top=this.Scrollbar.center.y-this.Slider.center.y+"px"}.bind(this);var k=function(a){this.Scrollbar.clickLocked=true}.bind(this);var j=function(a){var b=a;if(a.touches)b=a.touches[0];var c=this._checkIndex((b.clientX-this.Scrollbar.position.left)/this.Scrollbar.dimensions.width*this.itemsLastIndex);this._targetPosition=this._getPositionByIndex(c);this.Slider.setPosition(c);if(this.Position)this.Position.setLabel(c);this._initStep(true,true)}.bind(this);var l=function(a){this._targetPosition=Math.round(this._targetPosition);this.conf.onMoveTo(this._getItemByPosition(this._targetPosition));this._initStep(true)}.bind(this);this.Slider.makeDraggable(j,k,l)}if(this.Position){this.Position.setLabel=function(a){a=this._checkIndex(Math.round(a));if(this.items&&this.items[a].label)this.Position.innerHTML=this.items[a].label.innerHTML;else this.Position.innerHTML=a+1}.bind(this)}this.globalCaption=this.Container.getChildrenByClassName("globalCaption")[0];this.loadIndicator=this.Container.getChildrenByClassName("loadIndicator")[0]},_initSizes:function(a){this._initMaxHeight();var b=this._initScrollbarSize();if(!this.conf.verticalFlow&&this.Container.style.height&&this.Container.style.height!="auto")this.maxHeight-=b;if(!this._activeItem)return;var c=this._findBiggestItem();var d=this.Flow.findPos();if(this.conf.verticalFlow){this.Flow.style.width=c.width.width+"px";this.Flow.style.height=3*c.width.width*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}else{this.Flow.style.height=c.height.height+(c.height.top-d.top)+"px"}var e=this.conf.verticalFlow?c.width.width:c.height.height;var f=e/(1+this.conf.reflectionHeight+this.conf.reflectionGap);this.Flow.style.marginBottom=-(e-f)+"px";this.Flow.dimensions=this.Flow.getDimensions();if(!this.Browser.IE6){if(this.conf.verticalFlow&&this.Container.clientWidth<this.Flow.dimensions.width){}else if(this.Container.clientHeight<this.Flow.dimensions.height){this.Container.style.height=this.Flow.dimensions.height+"px"}}if(this.conf.verticalFlow){this.Flow.center={x:this.Flow.dimensions.height/2,y:c.width.width/2}}else{this.Flow.center={x:this.Flow.dimensions.width/2,y:c.height.height/2}}},_initScrollbarSize:function(){var a;var b;var c;if(a=this.Scrollbar){a.setDimensions();var d=a.dimensions.height;if(b=this.Slider){b.setDimensions();d+=b.dimensions.height;if(c=this.Position){var e=c.innerHTML;var f=maxW=0;c.style.width="auto";if(this.items){for(var g=0;g<this.items.length;g++){var h=this.items[g];if(h.label){c.innerHTML=h.label.innerHTML}else{c.innerHTML=h.index}var i=c.clientHeight;var j=c.clientWidth;if(i>f)f=i;if(j>maxW)maxW=j}}else{c.innerHTML=" ";f=c.clientHeight;maxW=c.clientWidth}c.innerHTML=e;c.setDimensions();c.style.width=maxW+"px";c.style.left=(b.dimensions.width-maxW)/2+"px";var k=c.position.top-b.position.top;if(k>0){k+=-a.dimensions.height+f;a.style.marginBottom=k+"px"}else{k*=-1;a.style.marginTop=k+"px"}d+=k}}}else{d=0}return d},_initMaxHeight:function(){if(this.conf.verticalFlow){var a=screen.width/screen.height;var b=this.Container.style.width;var c=this.Container.clientWidth;var d=this.Flow.style.width;var e=this.Flow.clientWidth;var f=this.Flow.clientHeight}else{var a=screen.height/screen.width;var b=this.Container.style.height;var c=this.Container.clientHeight;var d=this.Flow.style.height;var e=this.Flow.clientHeight;var f=this.Flow.clientWidth}if(this.ContainerOldDim)b=this.ContainerOldDim;if(this.FlowOldDim)d=this.FlowOldDim;this.ContainerOldDim="auto";this.FlowOldDim="auto";if(this.conf.maxItemHeight<=0){this.maxHeight=f/3*a/1*this.conf.scaleFactor;if(this.conf.verticalFlow&&(this.maxHeight==0||this.maxHeight>e)){this.maxHeight=e}if(b&&b!="auto"){var g=this.conf.verticalFlow?0:this.conf.reflectionGap;var h=this.conf.verticalFlow?0:this.conf.reflectionHeight;this.maxHeight=c/(this.conf.scaleFactor*(1+h+g));this.ContainerOldDim=b}else if(d&&d!="auto"){var g=this.conf.verticalFlow?0:this.conf.reflectionGap;this.maxHeight=e/(this.conf.scaleFactor*(1+this.conf.reflectionHeight+g));this.FlowOldDim=d}}else{this.maxHeight=this.conf.maxItemHeight}},_findBiggestItem:function(){var a=this._activeItem;var b=a.pre;var c=a.next;var d=maxFlowSize={width:{width:0,left:0,height:0,top:0,item:null,rI:0},height:{width:0,left:0,height:0,top:0,item:null,rI:0}};var e=function(a,b){var c=a.element;c.style.display="block";var e=c.findPos();var f=c.clientHeight;var g=c.clientWidth;if(f+e.top>=d.height.height+d.height.top){d.height.height=f;d.height.top=e.top;d.height.item=a;d.height.rI=b}if(g+e.left>=d.width.width+d.width.left){d.width.width=g;d.width.left=e.left;d.width.item=a;d.width.rI=b}c.style.display="none"};var f=this._currentPosition;this._currentPosition=this.conf.visibleItems+1;for(var g=-this.conf.visibleItems;g<=this.conf.visibleItems;g++){a.element.style.display="none";this._positionItem(a,g);e(a,g)}var h=d.height.rI;for(var g=0;g<this.items.length;g++){var i=this.items[g];i.element.style.display="none";this._positionItem(i,h);e(i,h)}this._currentPosition=f;return d},_keyStroke:function(a){if(!a)var a=window.event;if(a.which){var b=a.which}else if(a.keyCode){var b=a.keyCode}if(this.conf.keys[b]){this.conf.keys[b].bind(this)();return Event.stop(a)}else{return true}},_wheel:function(a){if(!a)var a=window.event;var b=0;if(a.wheelDelta){b=a.wheelDelta/120}else if(a.detail){b=-a.detail/3}if(b){var c=this._targetPosition;if(b<0){c+=1*this.conf.scrollWheelSpeed}else{c-=1*this.conf.scrollWheelSpeed}this.moveToPosition(Math.round(c))}return Event.stop(a)},_setGlobalCaption:function(){if(this.globalCaption){this.globalCaption.innerHTML="";if(this._activeItem&&this._activeItem.caption)this.globalCaption.appendChild(this._activeItem.caption.cloneNode(true))}},_initStep:function(a,b){if(this.Slider){if(a){this.Slider.locked=true}else{this.Slider.locked=false}}this._holdPos=b==true?true:false;if(!this._stepLock){this._stepLock=true;this._step()}},_step:function(){var a=this._targetPosition-this._currentPosition;var b=Math.abs(a);if(b>.001){this._currentPosition+=this.conf.flowSpeedFactor*this.conf.calcStepWidth(a,b,this.items.length,this.conf.visibleItems);var c=this.items[this._getIndexByPosition(this._currentPosition)];if(c&&c!=this._activeItem){if(this._activeItem)this._activeItem.makeInactive();this._activeItem=c;this._activeItem.makeActive();this._setCaptionLabel(this._activeItem.index);if(Math.abs(this._targetPosition-this._currentPosition)<=.5)this.conf.onReachTarget(this._activeItem)}this._positionItems();var d=this._step.bind(this);window.setTimeout(d,this._millisecondsPerStep)}else if(!this._holdPos){if(this.Slider)this.Slider.locked=false;this._currentPosition=Math.round(this._currentPosition);if(this.Position&&!this.Slider.locked&&this._activeItem){this._setCaptionLabel(this._activeItem.index)}this._positionItems();this._stepLock=false}else{this._stepLock=false}if(this.Slider&&!this.Slider.locked){this.Slider.setPosition(this._currentPosition)}},_positionItems:function(){if(this._lastStart){var a=this._lastStart;while(a){a.element.style.display="none";a=a.next;if(a==this._lastStart)break;if(a&&a.pre==this._lastEnd)break}}else{this._lastStart=this._activeItem}if(!this._activeItem)return;var b=this._activeItem;var c=b.pre;var d=b.next;this._positionItem(b,0);for(var e=1;e<=this.conf.visibleItems&&2*e<this.items.length;e++){if(c){this._positionItem(c,-e);this._lastStart=c;c=c.pre}if(d){this._positionItem(d,e);this._lastEnd=d;d=d.next}}},_positionItem:function(a,b){var c=this.conf;var d=c.verticalFlow;var e=a.element.style;var f=a.position=this._currentPosition+b;var g=a.relativePosition=Math.round(f)-this._currentPosition;var h=a.relativePositionNormed=c.visibleItems>0?g/c.visibleItems:0;var i=g<0?-1:1;i*=g==0?0:1;a.side=i;var j=c.calcSize(a);j.height=Math.max(j.height,0);j.width=Math.max(j.width,0);if(a.content.origProportion)j=this._scaleImageSize(a,j);a.size=j;var k=a.coordinates=c.calcCoordinates(a);var l=a.relativeItemPosition=c.calcRelativeItemPosition(a);var m=a.zIndex=c.calcZIndex(a);var n=a.fontSize=c.calcFontSize(a);var o=a.opacity=c.calcOpacity(a);j.height*=this.maxHeight;j.width*=this.maxHeight;var p=d?j.height:j.width;var q=d?j.width:j.height;var r=this.Flow.center.x*(1+k.x)+(l.x-1)*p/2;var s=this.maxHeight/2*(1+k.y)+(l.y-1)*q/2;e.left=(d?s:r)+"px";e.top=(d?r:s)+"px";this._setItemSize(a,j);if(c.endOpacity!=1){this._setItemOpacity(a)}if(!this.Browser.IE)e.fontSize=n*100+"%";e.zIndex=32768+Math.round(m*this.items.length);c.onDrawItem(a);e.visibility="visible";e.display="block"},_scaleImageSize:function(a,b,c){var d=this.conf.scaleFactorLandscape;var e=this.conf.scaleFactorPortrait;var f=this.conf.verticalFlow;var g=a.content.origProportion;var h=b.width;var i=b.height;var j=a.content;if(f){if(g<=1){if(d!="max"&&d!=1){i*=d;h=Math.min(i*g,c?c:1)}i=h/g}else if(g>1){if(e=="max"){i=c?c:1}else if(e!=1){h*=e;i=Math.min(h/g,c?c:1)}else{i=h/g}h=i*g}}else{if(g>1){if(d!="max"&&d!=1){h*=d;i=Math.min(h/g,c?c:1)}h=i*g}else if(g<=1){if(e=="max"){h=c?c:1}else if(e!=1){i*=e;h=Math.min(i*g,c?c:1)}else{h=i*g}i=h/g}}i=isNaN(i)?0:i;h=isNaN(h)?0:h;if(!c&&this.conf.fixItemSize){var k=b.width/b.height;var c=Math.max(b.width,b.height);var l=this._scaleImageSize(a,{width:c,height:c},c);if(k<1){i=l.height/b.height;h=i*g/k}else{h=l.width/b.width;i=h/g*k}var m=i*100;var n=h*100;var o=(1-h)/2*100;var p=(1-i)/k*100*(f?.5:1);j.style.height=m+"%";if(a.reflection)a.reflection.style.height=m*this.conf.reflectionHeight+"%";j.style.width=n+"%";if(a.reflection)a.reflection.style.width=n+"%";j.style.marginLeft=o+"%";if(a.reflection)a.reflection.style.marginLeft=o+"%";j.style.marginTop=p+"%";a.element.style.overflow="hidden";return b}else{return{width:h,height:i}}},_setItemSize:function(){if(ContentFlowGlobal.Browser.IE){var a=function(a,b){if(!this.conf.fixItemSize){a.content.style.height=b.height+"px"}else if(ContentFlowGlobal.Browser.IE6){var c=parseInt(a.content.style.height)/100;a.content.style.height=b.height*c+"px";var d=parseInt(a.content.style.marginTop)/100;a.content.style.marginTop=b.height*d+"px"}if(a.reflection){var c=parseInt(a.content.style.height);a.reflection.style.height=c*this.conf.reflectionHeight+"px";a.reflection.style.marginTop=c*this.conf.reflectionGap+"px"}a.element.style.width=b.width+"px";a.element.style.height=b.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}}else{var a=function(a,b){if(a.reflection){a.element.style.height=b.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px";a.reflection.style.marginTop=b.height*this.conf.reflectionGap+"px"}else if(this._reflectionWithinImage){a.element.style.height=b.height*(1+this.conf.reflectionHeight+this.conf.reflectionGap)+"px"}else{a.element.style.height=b.height+"px"}a.element.style.width=b.width+"px"}}return a}(),_setItemOpacity:function(){if(ContentFlowGlobal.Browser.IE6){var a=function(a){if(a.content.origSrc&&a.content.origSrc.match(/\.png$/)){var b=a.content.src;a.content.src=a.content.origSrc;a.content.style.filter=a.content.filterString+" progid:DXImageTransform.Microsoft.BasicImage(opacity="+a.opacity+")";a.content.src=b}else{a.content.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity="+a.opacity+")"}if(a.reflection)a.reflection.style.filter=a.reflection.filterString+"progid:DXImageTransform.Microsoft.BasicImage(opacity="+a.opacity+")"}}else if(ContentFlowGlobal.Browser.IE){var a=function(a){a.element.style.filter="progid:DXImageTransform.Microsoft.BasicImage(opacity="+a.opacity+")"}}else{var a=function(a){a.element.style.opacity=a.opacity}}return a}()};if(!Function.bind){Function.prototype.bind=function(a){var b=this;return function(){return b.apply(a,arguments)}}}if(!Math.erf2){Math.erf2=function(a){var b=-(8*(Math.PI-3)/(3*Math.PI*(Math.PI-4)));var c=a*a;var d=1-Math.pow(Math.E,-c*(4/Math.PI+b*c)/(1+b*c));return d}}if(!Math._2PI05){Math._2PI05=Math.sqrt(2*Math.PI)}if(!Math.normDist){Math.normDist=function(a,b,c){if(!b)var b=1;if(!c)var c=0;if(!a)var a=-c;return 1/(b*Math._2PI05)*Math.pow(Math.E,-(a-c)*(a-c)/(2*b*b))}}if(!Math.normedNormDist){Math.normedNormDist=function(a,b,c){return this.normDist(a,b,c)/this.normDist(c,b,c)}}if(!Math.exp){Math.exp=function(a){return Math.pow(Math.E,a)}}if(!Math.ln){Math.ln=Math.log}if(!Math.log2){Math.log2=function(a){return Math.log(a)/Math.LN2}}if(!Math.log10){Math.log10=function(a){return Math.log(a)/Math.LN10}}if(!Math.logerithm){Math.logerithm=function(a,b){if(!b||b==Math.E)return Math.log(a);else if(b==2)return Math.log2(a);else if(b==10)return Math.log10(a);else return Math.log(a)/Math.log(b)}}if(!Event)var Event={};if(!Event.stop){Event.stop=function(a){a.cancelBubble=true;if(a.preventDefault)a.preventDefault();if(a.stopPropagation)a.stopPropagation();return false}}if(document.all&&!window.opera){window.$CF=function(a){if(typeof a=="string"){return window.$CF(document.getElementById(a))}else{if(CFElement.prototype.extend&&a&&!a.extend)CFElement.prototype.extend(a)}return a}}else{window.$CF=function(a){return a}}if(!window.HTMLElement){CFElement={};CFElement.prototype={};CFElement.prototype.extend=function(a){for(var b in this){if(!a[b])a[b]=this[b]}}}else{CFElement=window.HTMLElement}if(!CFElement.findPos){CFElement.prototype.findPos=function(){var a=this;var b=curtop=0;try{if(a.offsetParent){b=a.offsetLeft;curtop=a.offsetTop;while(a=a.offsetParent){b+=a.offsetLeft;curtop+=a.offsetTop}}}catch(c){}return{left:b,top:curtop}}}if(!CFElement.getDimensions){CFElement.prototype.getDimensions=function(){return{width:this.clientWidth,height:this.clientHeight}}}if(!CFElement.hasClassName){CFElement.prototype.hasClassName=function(a){return(new RegExp("\\b"+a+"\\b")).test(this.className)}}if(!CFElement.addClassName){CFElement.prototype.addClassName=function(a){if(!this.hasClassName(a)){this.className+=(this.className?" ":"")+a}}}if(!CFElement.removeClassName){CFElement.prototype.removeClassName=function(a){this.className=this.className.replace(new RegExp("\\b"+a+"\\b"),"").replace(/\s\s/g," ")}}if(!CFElement.toggleClassName){CFElement.prototype.toggleClassName=function(a){if(this.hasClassName(a)){this.removeClassName(a)}else{this.addClassName(a)}}}if(!CFElement.getChildrenByClassName){CFElement.prototype.getChildrenByClassName=function(a){var b=new Array;for(var c=0;c<this.childNodes.length;c++){var d=this.childNodes[c];if(d.nodeType==1&&$CF(d).hasClassName(a)){b.push(d)}}return b}}if(!CFElement.addEvent){CFElement.prototype.addEvent=function(a,b,c){if(this.addEventListener)this.addEventListener(a,b,c);else this.attachEvent("on"+a,b)}}if(!CFElement.removeEvent){CFElement.prototype.removeEvent=function(a,b,c){if(this.removeEventListener)this.removeEventListener(a,b,c);else this.detachEvent("on"+a,b)}}if(!window.addEvent){window.addEvent=function(a,b,c){if(this.addEventListener){this.addEventListener(a,b,c)}else{if(a!="load"&&a!="resize")document.attachEvent("on"+a,b);else this.attachEvent("on"+a,b)}}}if(!window.removeEvent){window.removeEvent=function(a,b,c){if(this.removeEventListener){this.removeEventListener(a,b,c)}else{if(a!="load"&&a!="resize")document.detachEvent("on"+a,b);else this.detachEvent("on"+a,b)}}}ContentFlowGlobal.init()
