 if(typeof CINEMOVIES=="undefined"){var CINEMOVIES={};}CINEMOVIES.namespace=function(){var a=arguments,o=null,i,j,d;for(i=0;i<a.length;++i){d=a[i].split(".");o=CINEMOVIES;for(j=(d[0]=="CINEMOVIES")?1:0;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}return o;};CINEMOVIES.log=function(_2,_3,_4){var l=CINEMOVIES.widget.Logger;if(l&&l.log){return l.log(_2,_3,_4);}else{return false;}};CINEMOVIES.extend=function(_6,_7,_8){var F=function(){};F.prototype=_7.prototype;_6.prototype=new F();_6.prototype.constructor=_6;_6.superclass=_7.prototype;if(_7.prototype.constructor==Object.prototype.constructor){_7.prototype.constructor=_7;}if(_8){for(var i in _8){_6.prototype[i]=_8[i];}}};CINEMOVIES.augment=function(r,s){var rp=r.prototype,sp=s.prototype,a=arguments,i,p;if(a[2]){for(i=2;i<a.length;++i){rp[a[i]]=sp[a[i]];}}else{for(p in sp){if(!rp[p]){rp[p]=sp[p];}}}};CINEMOVIES.namespace("util","widget","example");(function(){var Y=CINEMOVIES.util,getStyle,setStyle,id_counter=0,propertyCache={};var ua=navigator.userAgent.toLowerCase(),isOpera=(ua.indexOf('opera')>-1),isSafari=(ua.indexOf('safari')>-1),isGecko=(!isOpera&&!isSafari&&ua.indexOf('gecko')>-1),isIE=(!isOpera&&ua.indexOf('msie')>-1);var patterns={HYPHEN:/(-[a-z])/i};var toCamel=function(property){if(!patterns.HYPHEN.test(property)){return property;}if(propertyCache[property]){return propertyCache[property];}while(patterns.HYPHEN.exec(property)){property=property.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}propertyCache[property]=property;return property;};if(document.defaultView&&document.defaultView.getComputedStyle){getStyle=function(el,property){var value=null;var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[toCamel(property)];}return el.style[property]||value;};}else if(document.documentElement.currentStyle&&isIE){getStyle=function(el,property){switch(toCamel(property)){case'opacity':var val=100;try{val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){try{val=el.filters('alpha').opacity;}catch(e){}}return val/100;break;default:var value=el.currentStyle?el.currentStyle[property]:null;return(el.style[property]||value);}};}else{getStyle=function(el,property){return el.style[property];};}if(isIE){setStyle=function(el,property,val){switch(property){case'opacity':if(typeof el.style.filter=='string'){el.style.filter='alpha(opacity='+val*100+')';if(!el.currentStyle||!el.currentStyle.hasLayout){el.style.zoom=1;}}break;default:el.style[property]=val;}};}else{setStyle=function(el,property,val){el.style[property]=val;};}CINEMOVIES.util.Dom={get:function(el){if(!el){return null;}if(typeof el!='string'&&!(el instanceof Array)){return el;}if(typeof el=='string'){return document.getElementById(el);}else{var collection=[];for(var i=0,len=el.length;i<len;++i){collection[collection.length]=Y.Dom.get(el[i]);}return collection;}return null;},getStyle:function(el,property){property=toCamel(property);var f=function(element){return getStyle(element,property);};return Y.Dom.batch(el,f,Y.Dom,true);},setStyle:function(el,property,val){property=toCamel(property);var f=function(element){setStyle(element,property,val);};Y.Dom.batch(el,f,Y.Dom,true);},getXY:function(el){var f=function(el){if(el.parentNode===null||el.offsetParent===null||this.getStyle(el,'display')=='none'){return false;}var parentNode=null;var pos=[];var box;if(el.getBoundingClientRect){box=el.getBoundingClientRect();var doc=document;if(!this.inDocument(el)&&parent.document!=document){doc=parent.document;if(!this.isAncestor(doc.documentElement,el)){return false;}}var scrollTop=Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);var scrollLeft=Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);return[box.left+scrollLeft,box.top+scrollTop];}else{pos=[el.offsetLeft,el.offsetTop];parentNode=el.offsetParent;if(parentNode!=el){while(parentNode){pos[0]+=parentNode.offsetLeft;pos[1]+=parentNode.offsetTop;parentNode=parentNode.offsetParent;}}if(isSafari&&this.getStyle(el,'position')=='absolute'){pos[0]-=document.body.offsetLeft;pos[1]-=document.body.offsetTop;}}if(el.parentNode){parentNode=el.parentNode;}else{parentNode=null;}while(parentNode&&parentNode.tagName.toUpperCase()!='BODY'&&parentNode.tagName.toUpperCase()!='HTML'){if(Y.Dom.getStyle(parentNode,'display')!='inline'){pos[0]-=parentNode.scrollLeft;pos[1]-=parentNode.scrollTop;}if(parentNode.parentNode){parentNode=parentNode.parentNode;}else{parentNode=null;}}return pos;};return Y.Dom.batch(el,f,Y.Dom,true);},getX:function(el){var f=function(el){return Y.Dom.getXY(el)[0];};return Y.Dom.batch(el,f,Y.Dom,true);},getY:function(el){var f=function(el){return Y.Dom.getXY(el)[1];};return Y.Dom.batch(el,f,Y.Dom,true);},setXY:function(el,pos,noRetry){var f=function(el){var style_pos=this.getStyle(el,'position');if(style_pos=='static'){this.setStyle(el,'position','relative');style_pos='relative';}var pageXY=this.getXY(el);if(pageXY===false){return false;}var delta=[parseInt(this.getStyle(el,'left'),10),parseInt(this.getStyle(el,'top'),10)];if(isNaN(delta[0])){delta[0]=(style_pos=='relative')?0:el.offsetLeft;}if(isNaN(delta[1])){delta[1]=(style_pos=='relative')?0:el.offsetTop;}if(pos[0]!==null){el.style.left=pos[0]-pageXY[0]+delta[0]+'px';}if(pos[1]!==null){el.style.top=pos[1]-pageXY[1]+delta[1]+'px';}var newXY=this.getXY(el);if(!noRetry&&(newXY[0]!=pos[0]||newXY[1]!=pos[1])){this.setXY(el,pos,true);}};Y.Dom.batch(el,f,Y.Dom,true);},setX:function(el,x){Y.Dom.setXY(el,[x,null]);},setY:function(el,y){Y.Dom.setXY(el,[null,y]);},getRegion:function(el){var f=function(el){var region=new Y.Region.getRegion(el);return region;};return Y.Dom.batch(el,f,Y.Dom,true);},getClientWidth:function(){return Y.Dom.getViewportWidth();},getClientHeight:function(){return Y.Dom.getViewportHeight();},getElementsByClassName:function(className,tag,root){var method=function(el){return Y.Dom.hasClass(el,className);};return Y.Dom.getElementsBy(method,tag,root);},hasClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');var f=function(el){return re.test(el['className']);};return Y.Dom.batch(el,f,Y.Dom,true);},addClass:function(el,className){var f=function(el){if(this.hasClass(el,className)){return;}el['className']=[el['className'],className].join(' ');};Y.Dom.batch(el,f,Y.Dom,true);},removeClass:function(el,className){var re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,className)){return;}var c=el['className'];el['className']=c.replace(re,' ');if(this.hasClass(el,className)){this.removeClass(el,className);}};Y.Dom.batch(el,f,Y.Dom,true);},replaceClass:function(el,oldClassName,newClassName){if(oldClassName===newClassName){return false;}var re=new RegExp('(?:^|\\s+)'+oldClassName+'(?:\\s+|$)','g');var f=function(el){if(!this.hasClass(el,oldClassName)){this.addClass(el,newClassName);return;}el['className']=el['className'].replace(re,' '+newClassName+' ');if(this.hasClass(el,oldClassName)){this.replaceClass(el,oldClassName,newClassName);}};Y.Dom.batch(el,f,Y.Dom,true);},generateId:function(el,prefix){prefix=prefix||'yui-gen';el=el||{};var f=function(el){if(el){el=Y.Dom.get(el);}else{el={};}if(!el.id){el.id=prefix+id_counter++;}return el.id;};return Y.Dom.batch(el,f,Y.Dom,true);},isAncestor:function(haystack,needle){haystack=Y.Dom.get(haystack);if(!haystack||!needle){return false;}var f=function(needle){if(haystack.contains&&!isSafari){return haystack.contains(needle);}else if(haystack.compareDocumentPosition){return!!(haystack.compareDocumentPosition(needle)&16);}else{var parent=needle.parentNode;while(parent){if(parent==haystack){return true;}else if(!parent.tagName||parent.tagName.toUpperCase()=='HTML'){return false;}parent=parent.parentNode;}return false;}};return Y.Dom.batch(needle,f,Y.Dom,true);},inDocument:function(el){var f=function(el){return this.isAncestor(document.documentElement,el);};return Y.Dom.batch(el,f,Y.Dom,true);},getElementsBy:function(method,tag,root){tag=tag||'*';root=Y.Dom.get(root)||document;var nodes=[];var elements=root.getElementsByTagName(tag);if(!elements.length&&(tag=='*'&&root.all)){elements=root.all;}for(var i=0,len=elements.length;i<len;++i){if(method(elements[i])){nodes[nodes.length]=elements[i];}}return nodes;},batch:function(el,method,o,override){var id=el;el=Y.Dom.get(el);var scope=(override)?o:window;if(!el||el.tagName||!el.length){if(!el){return false;}return method.call(scope,el,o);}var collection=[];for(var i=0,len=el.length;i<len;++i){if(!el[i]){id=el[i];}collection[collection.length]=method.call(scope,el[i],o);}return collection;},getDocumentHeight:function(){var scrollHeight=(document.compatMode!='CSS1Compat')?document.body.scrollHeight:document.documentElement.scrollHeight;var h=Math.max(scrollHeight,Y.Dom.getViewportHeight());return h;},getDocumentWidth:function(){var scrollWidth=(document.compatMode!='CSS1Compat')?document.body.scrollWidth:document.documentElement.scrollWidth;var w=Math.max(scrollWidth,Y.Dom.getViewportWidth());return w;},getViewportHeight:function(){var height=self.innerHeight;var mode=document.compatMode;if((mode||isIE)&&!isOpera){height=(mode=='CSS1Compat')?document.documentElement.clientHeight:document.body.clientHeight;}return height;},getViewportWidth:function(){var width=self.innerWidth;var mode=document.compatMode;if(mode||isIE){width=(mode=='CSS1Compat')?document.documentElement.clientWidth:document.body.clientWidth;}return width;}};})();CINEMOVIES.util.Region=function(t,r,b,l){this.top=t;this[1]=t;this.right=r;this.bottom=b;this.left=l;this[0]=l;};CINEMOVIES.util.Region.prototype.contains=function(region){return(region.left>=this.left&&region.right<=this.right&&region.top>=this.top&&region.bottom<=this.bottom);};CINEMOVIES.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};CINEMOVIES.util.Region.prototype.intersect=function(region){var t=Math.max(this.top,region.top);var r=Math.min(this.right,region.right);var b=Math.min(this.bottom,region.bottom);var l=Math.max(this.left,region.left);if(b>=t&&r>=l){return new CINEMOVIES.util.Region(t,r,b,l);}else{return null;}};CINEMOVIES.util.Region.prototype.union=function(region){var t=Math.min(this.top,region.top);var r=Math.max(this.right,region.right);var b=Math.max(this.bottom,region.bottom);var l=Math.min(this.left,region.left);return new CINEMOVIES.util.Region(t,r,b,l);};CINEMOVIES.util.Region.prototype.toString=function(){return("Region {"+"top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};CINEMOVIES.util.Region.getRegion=function(el){var p=CINEMOVIES.util.Dom.getXY(el);var t=p[1];var r=p[0]+el.offsetWidth;var b=p[1]+el.offsetHeight;var l=p[0];return new CINEMOVIES.util.Region(t,r,b,l);};CINEMOVIES.util.Point=function(x,y){if(x instanceof Array){y=x[1];x=x[0];}this.x=this.right=this.left=this[0]=x;this.y=this.top=this.bottom=this[1]=y;};CINEMOVIES.util.Point.prototype=new CINEMOVIES.util.Region();CINEMOVIES.util.CustomEvent=function(_1,_2,_3,_4){this.type=_1;this.scope=_2||window;this.silent=_3;this.signature=_4||CINEMOVIES.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var _5="_YUICEOnSubscribe";if(_1!==_5){this.subscribeEvent=new CINEMOVIES.util.CustomEvent(_5,this,true);}};CINEMOVIES.util.CustomEvent.LIST=0;CINEMOVIES.util.CustomEvent.FLAT=1;CINEMOVIES.util.CustomEvent.prototype={subscribe:function(fn,_7,_8){if(this.subscribeEvent){this.subscribeEvent.fire(fn,_7,_8);}this.subscribers.push(new CINEMOVIES.util.Subscriber(fn,_7,_8));},unsubscribe:function(fn,_9){var _10=false;for(var i=0,len=this.subscribers.length;i<len;++i){var s=this.subscribers[i];if(s&&s.contains(fn,_9)){this._delete(i);_10=true;}}return _10;},fire:function(){var len=this.subscribers.length;if(!len&&this.silent){return true;}var _14=[],ret=true,i;for(i=0;i<arguments.length;++i){_14.push(arguments[i]);}var _15=_14.length;if(!this.silent){}for(i=0;i<len;++i){var s=this.subscribers[i];if(s){if(!this.silent){}var _16=s.getScope(this.scope);if(this.signature==CINEMOVIES.util.CustomEvent.FLAT){var _17=null;if(_14.length>0){_17=_14[0];}ret=s.fn.call(_16,_17,s.obj);}else{ret=s.fn.call(_16,this.type,_14,s.obj);}if(false===ret){if(!this.silent){}return false;}}}return true;},unsubscribeAll:function(){for(var i=0,len=this.subscribers.length;i<len;++i){this._delete(len-1-i);}},_delete:function(_18){var s=this.subscribers[_18];if(s){delete s.fn;delete s.obj;}this.subscribers.splice(_18,1);},toString:function(){return "CustomEvent: "+"'"+this.type+"', "+"scope: "+this.scope;}};CINEMOVIES.util.Subscriber=function(fn,obj,_20){this.fn=fn;this.obj=obj||null;this.override=_20;};CINEMOVIES.util.Subscriber.prototype.getScope=function(_21){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return _21;};CINEMOVIES.util.Subscriber.prototype.contains=function(fn,obj){if(obj){return (this.fn==fn&&this.obj==obj);}else{return (this.fn==fn);}};CINEMOVIES.util.Subscriber.prototype.toString=function(){return "Subscriber { obj: "+(this.obj||"")+", override: "+(this.override||"no")+" }";};if(!CINEMOVIES.util.Event){CINEMOVIES.util.Event=function(){var _22=false;var _23=[];var _24=[];var _25=[];var _26=[];var _27=0;var _28=[];var _29=[];var _30=0;return {POLL_RETRYS:200,POLL_INTERVAL:20,EL:0,TYPE:1,FN:2,WFN:3,OBJ:3,ADJ_SCOPE:4,isSafari:(/Safari|Konqueror|KHTML/gi).test(navigator.userAgent),isIE:(!this.isSafari&&!navigator.userAgent.match(/opera/gi)&&navigator.userAgent.match(/msie/gi)),_interval:null,startInterval:function(){if(!this._interval){var _31=this;var _32=function(){_31._tryPreloadAttach();};this._interval=setInterval(_32,this.POLL_INTERVAL);}},onAvailable:function(_33,_34,_35,_36){_28.push({id:_33,fn:_34,obj:_35,override:_36,checkReady:false});_27=this.POLL_RETRYS;this.startInterval();},onContentReady:function(_37,_38,_39,_40){_28.push({id:_37,fn:_38,obj:_39,override:_40,checkReady:true});_27=this.POLL_RETRYS;this.startInterval();},addListener:function(el,_42,fn,obj,_43){if(!fn||!fn.call){return false;}if(this._isValidCollection(el)){var ok=true;for(var i=0,len=el.length;i<len;++i){ok=this.on(el[i],_42,fn,obj,_43)&&ok;}return ok;}else{if(typeof el=="string"){var oEl=this.getEl(el);if(oEl){el=oEl;}else{this.onAvailable(el,function(){CINEMOVIES.util.Event.on(el,_42,fn,obj,_43);});return true;}}}if(!el){return false;}if("unload"==_42&&obj!==this){_24[_24.length]=[el,_42,fn,obj,_43];return true;}var _46=el;if(_43){if(_43===true){_46=obj;}else{_46=_43;}}var _47=function(e){return fn.call(_46,CINEMOVIES.util.Event.getEvent(e),obj);};var li=[el,_42,fn,_47,_46];var _50=_23.length;_23[_50]=li;if(this.useLegacyEvent(el,_42)){var _51=this.getLegacyIndex(el,_42);if(_51==-1||el!=_25[_51][0]){_51=_25.length;_29[el.id+_42]=_51;_25[_51]=[el,_42,el["on"+_42]];_26[_51]=[];el["on"+_42]=function(e){CINEMOVIES.util.Event.fireLegacyEvent(CINEMOVIES.util.Event.getEvent(e),_51);};}_26[_51].push(li);}else{this._simpleAdd(el,_42,_47,false);}return true;},fireLegacyEvent:function(e,_52){var ok=true;var le=_26[_52];for(var i=0,len=le.length;i<len;++i){var li=le[i];if(li&&li[this.WFN]){var _54=li[this.ADJ_SCOPE];var ret=li[this.WFN].call(_54,e);ok=(ok&&ret);}}return ok;},getLegacyIndex:function(el,_56){var key=this.generateId(el)+_56;if(typeof _29[key]=="undefined"){return -1;}else{return _29[key];}},useLegacyEvent:function(el,_58){if(!el.addEventListener&&!el.attachEvent){return true;}else{if(this.isSafari){if("click"==_58||"dblclick"==_58){return true;}}}return false;},removeListener:function(el,_59,fn){var i,len;if(typeof el=="string"){el=this.getEl(el);}else{if(this._isValidCollection(el)){var ok=true;for(i=0,len=el.length;i<len;++i){ok=(this.removeListener(el[i],_59,fn)&&ok);}return ok;}}if(!fn||!fn.call){return this.purgeElement(el,false,_59);}if("unload"==_59){for(i=0,len=_24.length;i<len;i++){var li=_24[i];if(li&&li[0]==el&&li[1]==_59&&li[2]==fn){_24.splice(i,1);return true;}}return false;}var _60=null;var _61=arguments[3];if("undefined"==typeof _61){_61=this._getCacheIndex(el,_59,fn);}if(_61>=0){_60=_23[_61];}if(!el||!_60){return false;}if(this.useLegacyEvent(el,_59)){var _62=this.getLegacyIndex(el,_59);var _63=_26[_62];if(_63){for(i=0,len=_63.length;i<len;++i){li=_63[i];if(li&&li[this.EL]==el&&li[this.TYPE]==_59&&li[this.FN]==fn){_63.splice(i,1);}}}}else{this._simpleRemove(el,_59,_60[this.WFN],false);}delete _23[_61][this.WFN];delete _23[_61][this.FN];_23.splice(_61,1);return true;},getTarget:function(ev,_65){var t=ev.target||ev.srcElement;return this.resolveTextNode(t);},resolveTextNode:function(_67){if(_67&&3==_67.nodeType){return _67.parentNode;}else{return _67;}},getPageX:function(ev){var x=ev.pageX;if(!x&&0!==x){x=ev.clientX||0;if(this.isIE){x+=this._getScrollLeft();}}return x;},getPageY:function(ev){var y=ev.pageY;if(!y&&0!==y){y=ev.clientY||0;if(this.isIE){y+=this._getScrollTop();}}return y;},getXY:function(ev){return [this.getPageX(ev),this.getPageY(ev)];},getRelatedTarget:function(ev){var t=ev.relatedTarget;if(!t){if(ev.type=="mouseout"){t=ev.toElement;}else{if(ev.type=="mouseover"){t=ev.fromElement;}}}return this.resolveTextNode(t);},getTime:function(ev){if(!ev.time){var t=new Date().getTime();try{ev.time=t;}catch(e){return t;}}return ev.time;},stopEvent:function(ev){this.stopPropagation(ev);this.preventDefault(ev);},stopPropagation:function(ev){if(ev.stopPropagation){ev.stopPropagation();}else{ev.cancelBubble=true;}},preventDefault:function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}},getEvent:function(e){var ev=e||window.event;if(!ev){var c=this.getEvent.caller;while(c){ev=c.arguments[0];if(ev&&Event==ev.constructor){break;}c=c.caller;}}return ev;},getCharCode:function(ev){return ev.charCode||ev.keyCode||0;},_getCacheIndex:function(el,_71,fn){for(var i=0,len=_23.length;i<len;++i){var li=_23[i];if(li&&li[this.FN]==fn&&li[this.EL]==el&&li[this.TYPE]==_71){return i;}}return -1;},generateId:function(el){var id=el.id;if(!id){id="yuievtautoid-"+_30;++_30;el.id=id;}return id;},_isValidCollection:function(o){return (o&&o.length&&typeof o!="string"&&!o.tagName&&!o.alert&&typeof o[0]!="undefined");},elCache:{},getEl:function(id){return document.getElementById(id);},clearCache:function(){},_load:function(e){_22=true;var EU=CINEMOVIES.util.Event;if(this.isIE){EU._simpleRemove(window,"load",EU._load);}},_tryPreloadAttach:function(){if(this.locked){return false;}this.locked=true;var _75=!_22;if(!_75){_75=(_27>0);}var _76=[];for(var i=0,len=_28.length;i<len;++i){var _77=_28[i];if(_77){var el=this.getEl(_77.id);if(el){if(!_77.checkReady||_22||el.nextSibling||(document&&document.body)){var _78=el;if(_77.override){if(_77.override===true){_78=_77.obj;}else{_78=_77.override;}}_77.fn.call(_78,_77.obj);delete _28[i];}}else{_76.push(_77);}}}_27=(_76.length===0)?0:_27-1;if(_75){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(el,_79,_80){var _81=this.getListeners(el,_80);if(_81){for(var i=0,len=_81.length;i<len;++i){var l=_81[i];this.removeListener(el,l.type,l.fn);}}if(_79&&el&&el.childNodes){for(i=0,len=el.childNodes.length;i<len;++i){this.purgeElement(el.childNodes[i],_79,_80);}}},getListeners:function(el,_83){var _84=[];if(_23&&_23.length>0){for(var i=0,len=_23.length;i<len;++i){var l=_23[i];if(l&&l[this.EL]===el&&(!_83||_83===l[this.TYPE])){_84.push({type:l[this.TYPE],fn:l[this.FN],obj:l[this.OBJ],adjust:l[this.ADJ_SCOPE],index:i});}}}return (_84.length)?_84:null;},_unload:function(e){var EU=CINEMOVIES.util.Event,i,j,l,len,index;for(i=0,len=_24.length;i<len;++i){l=_24[i];if(l){var _85=window;if(l[EU.ADJ_SCOPE]){if(l[EU.ADJ_SCOPE]===true){_85=l[EU.OBJ];}else{_85=l[EU.ADJ_SCOPE];}}l[EU.FN].call(_85,EU.getEvent(e),l[EU.OBJ]);delete _24[i];l=null;_85=null;}}if(_23&&_23.length>0){j=_23.length;while(j){index=j-1;l=_23[index];if(l){EU.removeListener(l[EU.EL],l[EU.TYPE],l[EU.FN],index);}j=j-1;}l=null;EU.clearCache();}for(i=0,len=_25.length;i<len;++i){delete _25[i][0];delete _25[i];}EU._simpleRemove(window,"unload",EU._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var dd=document.documentElement,db=document.body;if(dd&&(dd.scrollTop||dd.scrollLeft)){return [dd.scrollTop,dd.scrollLeft];}else{if(db){return [db.scrollTop,db.scrollLeft];}else{return [0,0];}}},_simpleAdd:function(){if(window.addEventListener){return function(el,_87,fn,_88){el.addEventListener(_87,fn,(_88));};}else{if(window.attachEvent){return function(el,_89,fn,_90){el.attachEvent("on"+_89,fn);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(el,_91,fn,_92){el.removeEventListener(_91,fn,(_92));};}else{if(window.detachEvent){return function(el,_93,fn){el.detachEvent("on"+_93,fn);};}else{return function(){};}}}()};}();(function(){var EU=CINEMOVIES.util.Event;EU.on=EU.addListener;if(document&&document.body){EU._load();}else{EU._simpleAdd(window,"load",EU._load);}EU._simpleAdd(window,"unload",EU._unload);EU._tryPreloadAttach();})();}/* Copyright (c) 2006, CINEMOVIES! Inc. All rights reserved.Code licensed under the BSD License:http://developer.CINEMOVIES.net/yui/license.txt */





CINEMOVIES.namespace("Top");

CINEMOVIES.Top.tabs = new Array();
CINEMOVIES.Top.panes = new Array();

CINEMOVIES.Top.getHeight = function(elm) {
  var h = CINEMOVIES.util.Dom.getStyle(elm, 'height');
  if (h == 'auto') {
    CINEMOVIES.util.Dom.setStyle(elm, "zoom", 1);
    h = elm.clientHeight + 'px';
  }
  return h;
}

CINEMOVIES.Top.tabsInit = function(tabsbase) {
	
	// get tab & pane handles
  CINEMOVIES.Top.tabs[tabsbase] = CINEMOVIES.util.Dom.getElementsByClassName("tab", "li", tabsbase);
  CINEMOVIES.Top.panes[tabsbase] = CINEMOVIES.util.Dom.getElementsByClassName("pane", "div", tabsbase);

  // hide all pane headers, get pane heights
  var paneMaxHeight = 0;

  for(i = 0; i < CINEMOVIES.Top.panes[tabsbase].length; i++) {
  
    var header = CINEMOVIES.util.Dom.getElementsByClassName("hd", "div", CINEMOVIES.Top.panes[tabsbase][i]);

    if (header && tabsbase != 'scoreboard') {
      CINEMOVIES.util.Dom.setStyle(header, "display", "none");
    }

    pane_body = CINEMOVIES.util.Dom.getElementsByClassName("bd", "div", CINEMOVIES.Top.panes[tabsbase][i]);

    if (pane_body.length) {
      rawheight = CINEMOVIES.Top.getHeight(pane_body[0]);
      paneMaxHeight = Math.max(paneMaxHeight, parseInt(rawheight));
    } else {
      rawheight = CINEMOVIES.Top.getHeight(CINEMOVIES.Top.panes[tabsbase][i]);
      paneMaxHeight = Math.max(paneMaxHeight, parseInt(rawheight));
    }
  }

	if (tabsbase != 'scoreboard') {
	  paneMaxHeight += 2; // IE
	  paneMaxHeight = paneMaxHeight + "px";
    
	  // set height of all panes to maxheight  
	  for(i = 0; i < CINEMOVIES.Top.panes[tabsbase].length; i++) {
	    pane_body = CINEMOVIES.util.Dom.getElementsByClassName("bd", "div", CINEMOVIES.Top.panes[tabsbase][i]);
	    
	    if (pane_body.length) {
	      CINEMOVIES.util.Dom.setStyle(pane_body, "height", paneMaxHeight);
	    } else {
	      CINEMOVIES.util.Dom.setStyle(CINEMOVIES.Top.panes[tabsbase][i], "height", paneMaxHeight);
	    }
	  }
	} 
	 
  // hook in tab handlers to show pane
  for(i = 0; i < CINEMOVIES.Top.panes[tabsbase].length; i++) {
    CINEMOVIES.util.Event.addListener(CINEMOVIES.Top.tabs[tabsbase][i], "click", CINEMOVIES.Top.showPane, {"tabsbase": tabsbase, "showPane": i});
  }
  
  // show first pane, hide others
  CINEMOVIES.Top.showPane(null, {"tabsbase": tabsbase, "showPane": 0});
}


CINEMOVIES.Top.showPane = function(e, oPane) {
  tabsbase = oPane.tabsbase;
  pane = oPane.showPane;

  for(i = 0; i < CINEMOVIES.Top.panes[tabsbase].length; i++) {
    if (i == pane) {
      CINEMOVIES.util.Dom.setStyle(CINEMOVIES.Top.panes[tabsbase][i], "display", "");
      CINEMOVIES.util.Dom.setStyle(CINEMOVIES.Top.panes[tabsbase][i], "visibility", "visible");
      CINEMOVIES.util.Dom.setStyle(CINEMOVIES.Top.panes[tabsbase][i], "position", "static");
      CINEMOVIES.util.Dom.addClass(CINEMOVIES.Top.tabs[tabsbase][i], "selected");      
    } else {
      CINEMOVIES.util.Dom.setStyle(CINEMOVIES.Top.panes[tabsbase][i], "display", "none");
      CINEMOVIES.util.Dom.removeClass(CINEMOVIES.Top.tabs[tabsbase][i], "selected");
    }
  }
}




CINEMOVIES.Top.Cookie = {
	"dc": document,
  a: {},
  c: {},
  site_vals: {},
  "cookie_name" : "spt_site",
  "expire" : 0,

  init: function (){
    this.expire = new Date();
    this.expire.setTime(this.expire.getTime() + 90 * 1000 * 60 * 60 * 24);

    if(this.dc.cookie.length>0){
      this.a = this.dc.cookie.split("; ");
      var cl = this.a.length;
      var ca = [];
      for(var i=cl-1; i>=0; i--){
        var j= this.a[i].indexOf('=');
        if(j===-1) {
          this.c[this.a[i]] = '';
        } else {
          this.c[this.a[i].substr(0,j)] = this.a[i].substr(j+1);
        }
      }
    }
    var site_cookie = unescape(this.c[this.cookie_name]);
    if (site_cookie) {
      if(site_cookie.length > 2) {
        var vals = site_cookie.split("&");
        for(var i = 0; i < vals.length; i++) {
          if (vals[i].type != 'undefined') {
            var t = vals[i].split('=');
            this.site_vals[t[0]] = t[1];
          }
        }
      }
    }
  },

	get: function(n){
    return(this.site_vals[n]) ? unescape(this.site_vals[n]) : null;
  },


	set: function(n,v,p,d,s){
    var today=new Date();
    this.site_vals[n] = v;
    var tv = this.serializeVals();
    var nv = this.cookie_name + "=" + tv;
    
    var str=nv+((this.expire)?"; expires="+this.expire:"")+((p)?"; path="+p:"")+((d)?"; domain="+d:"")+((s)?"; secure":"");
    if((n.length>0&&tv.length>0)&&(((this.expire)&&(this.expire>today))||(!this.expire))&&(nv.length<4000)){
      this.dc.cookie=str;
      this.a[this.a.length]=nv;
      this.c[n]=v;
      return 1;
    }
    else return 0;
	},

	remove: function(n,p,d){
		if(this.c[n]){
			this.dc.cookie=n+"="+((p)?"; path="+p:"")+((d)?"; domain="+d:"")+"; expires=Thu, 01-Jan-1970 00:00:01 GMT";
			for(var i=this.a.length-1;i>=0;i--){
        if(this.a[i].indexOf(n)!=-1)
          this.a.splice(i,1);
      }
      this.c[n]=null;
      return 1;
		}
    else return 0;
	},

  serializeVals: function () {
    var i = 0;
    var ret = new Array();
    for (var j in this.site_vals) {
      if (j && typeof(j) != 'undefined' && j != 'undefined') {
        ret[i] = escape(j + "=" + this.site_vals[j]);
        i++;
      }
    }
    return ret.join("&");
  }
}

CINEMOVIES.Top.SessionCookie = {
	"dc": document,
  a: {},
  c: {},
  site_vals: {},
  "cookie_name" : "spt_site_sess",
  "expire" : 0,

  init: function (){

    if(this.dc.cookie.length>0){
      this.a = this.dc.cookie.split("; ");
      var cl = this.a.length;
      var ca = [];
      for(var i=cl-1; i>=0; i--){
        var j= this.a[i].indexOf('=');
        if(j===-1) {
          this.c[this.a[i]] = '';
        } else {
          this.c[this.a[i].substr(0,j)] = this.a[i].substr(j+1);
        }
      }
    }
    var site_cookie = unescape(this.c[this.cookie_name]);
    if (site_cookie) {
      if(site_cookie.length > 2) {
        var vals = site_cookie.split("&");
        for(var i = 0; i < vals.length; i++) {
          if (vals[i].type != 'undefined') {
            var t = vals[i].split('=');
            this.site_vals[t[0]] = t[1];
          }
        }
      }
    }
  },

	get: function(n){
    return(this.site_vals[n]) ? unescape(this.site_vals[n]) : null;
  },


	set: function(n,v,p,d,s){
    var today=new Date();
    this.site_vals[n] = v;
    var tv = this.serializeVals();
    var nv = this.cookie_name + "=" + tv;
    
    var str=nv+((this.expire)?"; expires="+this.expire:"")+((p)?"; path="+p:"")+((d)?"; domain="+d:"")+((s)?"; secure":"");
    if((n.length>0&&tv.length>0)&&(((this.expire)&&(this.expire>today))||(!this.expire))&&(nv.length<4000)){
      this.dc.cookie=str;
      this.a[this.a.length]=nv;
      this.c[n]=v;
      return 1;
    }
    else return 0;
	},

	remove: function(n,p,d){
		if(this.c[n]){
			this.dc.cookie=n+"="+((p)?"; path="+p:"")+((d)?"; domain="+d:"")+"; expires=Thu, 01-Jan-1970 00:00:01 GMT";
			for(var i=this.a.length-1;i>=0;i--){
        if(this.a[i].indexOf(n)!=-1)
          this.a.splice(i,1);
      }
      this.c[n]=null;
      return 1;
		}
    else return 0;
	},

  serializeVals: function () {
    var i = 0;
    var ret = new Array();
    for (var j in this.site_vals) {
      if (j && typeof(j) != 'undefined' && j != 'undefined') {
        ret[i] = escape(j + "=" + this.site_vals[j]);
        i++;
      }
    }
    return ret.join("&");
  }
}

CINEMOVIES.Top.Cookie.init();
CINEMOVIES.Top.SessionCookie.init();
/**
 * DTK Carousel Component.
 * @description http://twiki.corp.CINEMOVIES.com/view/Media/DTKDaemonManager
 **/

(function(){

var $U = CINEMOVIES.util;
var $D = $U.Dom;
var $C = $U.CustomEvent;
var DTK = CINEMOVIES.namespace('Media.Dtk');
CINEMOVIES.namespace('Media.Dtk.util');

/**
 * spawn {function}
 * This function creates an object of type "cls", constructed with arguments in the "args" array.
 * spawn : new :: apply : call
 * Note: even though this function is private, you can still arbitrarily spawn unmanaged daemons using the public spawnDaemon method.
 * @private
 * @param cls {Class} The function constructor to use.
 * @param args {Array} The arguments to pass to the constructor.
 **/
var spawn = function(cls,args) {
	if(!args) args = [];
	else if(!args instanceof Array) args = [args];
	var f=function(){};
	f.prototype=cls.prototype;
	f.prototype.constructor = cls;
	var obj = new f();
	cls.apply(obj,args);
	return obj;
};

/**
 * CINEMOVIES.Media.Dtk.util.Manager
 * Daemon Manager Constructor
 * @public
 * @param daemonClass {Class} The constructor that will be used to create daemons.
 * If this daemonClass does not implement the getId or toString functions, or an "id" property, then generic versions will be added.
 **/
DTK.util.Manager = function(daemonClass) {

	var idCounter = [0];
	var p=daemonClass.prototype;
	
	if(typeof p.getId !== 'function') {
		p.getId = function(){
			if(this.id) {
				return this.id;
			}
			return (this.id = 'daemon_'+(idCounter[0]++));
		};
	}
	if(typeof p.toString !== 'function') {
		p.toString = function() {
			return 'Daemon ' + this.getId();
		};
	}
	/**
	 * onCreate {CustomEvent}
	 * Event that fires whenever a daemon is spawned.
	 * @privileged
	 **/
	this.onCreate = new $C('create',this);
	/**
	 * onDaemonEvent {CustomEvent}
	 * Event that fires whenever any daemon's custom event of any sort fires.
	 * As far as the listener is concerned, it will be just as if it was listening to the actual event that fired.
	 * @privileged
	 **/
	this.onDaemonEvent = new $C('daemonEvent'); // actual event time at firing time will likely be different.
	/**
	 * daemonClass
	 * The class that's used for daemons.
	 * @public
	 **/
	this.daemonClass = daemonClass;
	
	/**
	 * unload {function}
	 * A function to help with memory management in IE; called on window.unload.
	 * If daemonClass implements an unload method, then all managed daemons will be unloaded.
	 * Then the references to the daemons are nulled.
	 * @private
	 **/
	var unload = function(e){
		var s=this.stack;
		for(var i=s.length-1; i>-1; i--) {
			if(s[i]) {
				s[i].manager = null;
				if(typeof(s[i].unload) == 'function') {
					s[i].unload();
				}
				this.daemons[s[i].getId()] = null;
				s[i] = null;
			}
		}
	};
	$U.Event.addListener(window,'unload',unload,this,true);
};
DTK.util.Manager.prototype={
	/**
	 * daemons {object}
	 * A collection of all the managed daemons.  manager.daemons[daemon.getId()] == daemon
	 * @public
	 **/
	daemons:{},
	/**
	 * stack {Array}
	 * An array of all the managed daemons.  (Refers to the same objects as the daemons collection.)
	 * @public
	 **/
	stack:[],
	/**
	 * daemonEvents {Object}
	 * If any daemon implements any CustomEvents, then a correllary CustomEvent is created as a pass-through.
	 * As a result, assigning a listener to manager.daemonEvents.onFoo is the same as assigning a listener to all of the managed daemons' onFoo event.
	 * @public
	 **/
	daemonEvents:{},
	
	/**
	 * spawnDaemon {Function}
	 * method to create a daemon object.  Fires the onCreate event.
	 * manager.spawnDaemon('a','b') is equivalent to new manager.daemonClass('a','b'), except that the onCreate event will be fired.
	 * @params {Optional} Any parameters passed to this function will be sent to the daemon constructor.
	 * @public
	 **/
	spawnDaemon:function() {
		var obj = spawn(this.daemonClass,arguments)
		this.onCreate.fire(obj);
		return obj;
	},
	/**
	 * idString {String}
	 * String that identifies what kind of manager this object is.  Designed to be overwritten by the classes that extend the Manager class.
	 * @public
	 **/
	idString:'Generic Daemon Manager', // designed to be overwritten in classes that extend the Manager class.
	/**
	 * toString {function}
	 * Method to identify this object.  Uses the idString property.
	 * @public
	 **/
	toString:function(){
		var s=[this.idString,'{\n'];
		for(var c in this.daemons) {
			if(this.daemons[c] instanceof this.daemonClass) {
				s.push('\t',c,' : (',this.daemons[c].toString(),')\n');
			}
		}
		s.push('}');
		return s.join('');
	},
	/**
	 * init {Function}
	 * Create a single daemon and manage it.
	 * @params {Optional} Any parameters sent to this function will be passed to the daemon constructor.
	 * @return A reference to the created daemon object.
	 **/
	init:function() {
		var d=this.spawnDaemon.apply(this,arguments);
		
		if(d && d.manager != this) {
			var onDaemonEvent = this.onDaemonEvent;
			d.manager = this;
			this.daemons[d.getId()] = d;
			this.stack.push(d);
			for(var e in d){
				// walk through all the daemon's properties looking for customevents to watch for.
				// this implements a "bubbling" sort of functionality.
				if(d[e] instanceof $C) {
					if(!this.daemonEvents[e]) {
						this.daemonEvents[e]=new $C(d[e].type);
					}
					var evMgr = this.daemonEvents[e];
					var fn=function(type,data){
						// fire the manager's version of the child event, and the onDaemonEvent, as if they were the ones that happened in the first place -- same scope, same type, same everything.
						evMgr.scope=this;
						evMgr.fire.apply(evMgr,data);
						onDaemonEvent.scope=this;
						onDaemonEvent.type=type;
						onDaemonEvent.fire.apply(onDaemonEvent,data);
					};
					d[e].subscribe(fn);
				}
			}
		}
		return d;
	},
	/**
	 * initAll {Function}
	 * Run init() a bunch of times.
	 * Note: often overridden or extended in classes that extend the Manager class.
	 * @param finder {Function} Function that returns an array of objects that can be sent as the first argument to the daemon constructor.  For example, it could be a function that returns an array of DOM nodes.
	 * @params {Optional} Additional parameters are passes as additional arguments to the daemon constructor function.
	 * @return An array of references to the created daemon objects.
	 **/
	initAll:function(finder) {
		if(typeof(finder) != 'function') return [];
		var things = finder();
		var ret = [];
		var len = things.length;
		var args = [null];
		var arglen=arguments.length;
		for(var i=1;i<arglen;i++) {
			args.push(arguments[i]);
		}
		for(var i = 0; i < len; i++) {
			args[0] = things[i];
			var d=this.init.apply(this, args);
			if(d) {
				ret.push(d);
			}
		}
		return ret;
	},
	/**
	 * getDaemonById {Function}
	 * Get a reference to a certain daemon by its ID.
	 * @param id {string || HTMLElement} The ID of the daemon, or an HTML element with an id that is the id of the daemon.
	 * @return A reference to the daemon, or null if not found.
	 **/
	getDaemonById:function(id) {
		if(id.id) return this.getDaemonById(id.id);
		return this.daemons[id] || null;
	}
};

})();/**


Sally Carson: for the Fantasy nav drop down, in the "Fantasy Games" section down below, can we test out putting 2 really long game names next to each other? Here are the longest ones: College Football Pick'em  and  Fantasy Football Plus
Sally Carson: to see if having them side by side is too wide for the drop down?

*/
CINEMOVIES.Top.navInit = function() {

  if (!document.getElementById || !document.getElementsByTagName || !CINEMOVIES.Top.nav_flyouts) return;

	var timer = false;
	var current_fo = false;
	var open_msec = 125;
	var close_msec = 250;
	var sep_width = 9;
	var hit = null;		
	var outside_check = null;
	var fe = false;
	
	var bread = document.getElementById('yse-bread');
	var ft = document.createElement('div'); ft.className = "ft";			
	var fo = document.createElement('div'); fo.className = "yse-flyout"; ft.appendChild(fo);			
	var fo_hd = document.createElement('div'); fo_hd.className = "hd"; fo.appendChild(fo_hd);	fo_hd.appendChild(document.createElement('span'));	
	var fo_bd = document.createElement('div'); fo_bd.className = "bd"; fo.appendChild(fo_bd);				 	
	var fo_ft = document.createElement('div'); fo_ft.className = "ft"; fo.appendChild(fo_ft);			
	bread.appendChild(ft);		

	var bread_crumbs = CINEMOVIES.util.Dom.getElementsBy( function() { return true; }, 'em', bread);	
	if (bread_crumbs.length > 1) {
    bread_crumbs.pop(); //forgeddabout the last one
	}



	

	
	
	
	
	

	
	
	/* set listeners */
	CINEMOVIES.util.Event.addListener(bread_crumbs, "mouseover", getFlyout, this); //start individual mousemove on mouseover
	CINEMOVIES.util.Event.addListener(bread_crumbs, "mouseout", closeFlyout, this); //set close timer
 	
	CINEMOVIES.util.Event.addListener(fo, "mouseover", paintFlyout, this); //just kill close timer and return
	CINEMOVIES.util.Event.addListener(fo, "mouseout", closeFlyout, this); //set close timer 
		
	CINEMOVIES.util.Event.addListener(bread.getElementsByTagName('em'), "click", getHijackedLink, this);
	
	var fan_hit = CINEMOVIES.util.Dom.getElementsByClassName('last', 'li', document.getElementById('yse-sub-nav'))[0];
	//f_hit = f_hit.getElementsByTagName('a')[0];
	//console.log(f_hit.innerHTML);
	
	CINEMOVIES.util.Event.addListener(fan_hit, "mouseover", fantasyFlyout, this);
	CINEMOVIES.util.Event.addListener(fan_hit, "mouseout", closeFlyout, this);			


	
	
	
	
	
		
	
/* IE only stuff */
	var addIeTransparentPNG  = function() {
		if ( document.getElementById('yse-flyout-ie-rt')   ) removeIeTransparentPNG();

		var fly = CINEMOVIES.util.Dom.getElementsByClassName('yse-flyout')[0];
		var hd =  CINEMOVIES.util.Dom.getElementsByClassName('hd', 'div', fly)[0];
		
		var ie_lt = document.createElement('div'); 
		ie_lt.id = "yse-flyout-ie-lt"; 
		ft.appendChild(ie_lt); 

		var ie_lt_crnr = document.createElement('div'); 
		ie_lt_crnr.id = "yse-flyout-ie-lt-crnr"; 
		hd.appendChild(ie_lt_crnr); 

		var ie_rt = document.createElement('div'); 
		ie_rt.id = "yse-flyout-ie-rt"; 
		ft.appendChild(ie_rt);			
		
		var h = fly.parentNode.clientHeight; 
		h = (h%2) ? h-1 : h;
		document.getElementById('yse-flyout-ie-rt').style.height = h;
		document.getElementById('yse-flyout-ie-lt').style.height = h;

		var w = fly.parentNode.clientWidth;	

		w = (w%2) ? w-27 : w-26;
		w = ( navigator.userAgent.search('MSIE 7') != -1) ? w : w+5;

		fly.getElementsByTagName('span')[0].style.width = w;
		
		//hide page form elements/flash when fo is over them: IE
		if (!bread.getElementsByTagName('iframe')[0]) {
			var ifr = document.createElement('iframe');
			ifr.style.width= fly.parentNode.clientWidth-12;
			ifr.style.height= fly.parentNode.clientHeight;				
			bread.appendChild(ifr);
			var loc = CINEMOVIES.util.Dom.getXY(fo);
			CINEMOVIES.util.Dom.setXY( ifr, [loc[0]+4, loc[1]] );			
		}

	}
	
	var removeIeTransparentPNG  = function() {
		if (bread.getElementsByTagName('iframe')[0]) {
			bread.removeChild(bread.getElementsByTagName('iframe')[0]);
		}		
	
		if ( !document.getElementById('yse-flyout-ie-rt')  && 
					!document.getElementById('yse-flyout-ie-lt') && 
					!document.getElementById('yse-flyout-ie-lt-crnr') ) return; 
	
		if (document.getElementById('yse-flyout-ie-rt')){
			var fly = document.getElementById('yse-flyout-ie-rt').parentNode;
			 fly.removeChild( document.getElementById('yse-flyout-ie-rt')  );
			if (document.getElementById('yse-flyout-ie-lt')) fly.removeChild( document.getElementById('yse-flyout-ie-lt')  );
		}
		
		if (document.getElementById('yse-flyout-ie-lt-crnr')) {
			var fly_hd = document.getElementById('yse-flyout-ie-lt-crnr').parentNode;		
			fly_hd.removeChild( document.getElementById('yse-flyout-ie-lt-crnr')  );
		}
	}	
/* /IE only stuff */
		
};

//sports.init call moved to YSENavUtil

