var forceFlash=false;var URLparam=window.location.search.substring(1);var isLoginFail=(URLparam=="loginfail");function flashMovieEnded(b){showreel.endPlay()}var flashSWFReady=false;var flashMovieReady=false;function isReadyReturn(b){flashMovieReady=(b=="YES")}function swfReadyReturn(){flashSWFReady=true}var jsReady=false;function htmlIsReady(){return jsReady}var win1=null;function newwindow(g,h,f,e){LeftPosition=(screen.width)?(screen.width-f)/2:100;TopPosition=(screen.height)?(screen.height-e)/2:100;settings="width="+f+",height="+e+",top="+TopPosition+",left="+LeftPosition+",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes";win1=window.open(g,h,settings)}function getFlashMovie(c){var d=navigator.appName.indexOf("Microsoft")!=-1;return(d)?window[c]:document.getElementById(c)}function movieReady(b){if(typeof(b)=="undefined"){return false}if(b.readyState=="undefined"){return true}if(iDevice){return(b.readyState>=b.HAVE_CURRENT_DATA)}return(b.readyState>=b.HAVE_FUTURE_DATA)}function videoPlay(b){if(!b||!b.play){return}if(b.paused){b.play()}else{b.pause()}}function videoStop(b){if(!b||!b.pause){return}b.pause()}var messageDiv=document.getElementById("footerbar");var numberoffadeareas=5;var numberofhotareas=4;var theMainMovieMask=document.getElementById("mainMovieMask");var videoPending=false;var videoPlaying=false;var videoIndex=-1;var videoFrame=document.getElementById("mainV");var panel=new Array(numberoffadeareas);panel[0]=document.getElementById("rolloverDiv1");panel[1]=document.getElementById("rolloverDiv2");panel[2]=document.getElementById("rolloverDiv3");panel[3]=videoFrame;panel[4]=document.getElementById("slideshow");var hot=new Array(numberofhotareas);hot[0]=document.getElementById("mouseDiv1");hot[1]=document.getElementById("mouseDiv2");hot[2]=document.getElementById("mouseDiv3");hot[3]=document.getElementById("mouseDivMovie");var fade=new Array(numberoffadeareas);fade[0]=0;fade[1]=0;fade[2]=0;fade[3]=0;fade[4]=0;var opacitylevel=new Array(numberoffadeareas);opacitylevel[0]=0;opacitylevel[1]=0;opacitylevel[2]=0;opacitylevel[3]=0;opacitylevel[4]=0;var swf=getFlashMovie("flash1");var mainVideo=document.getElementById("video1");var doesPlayOgg=false;var doesPlayMP4=false;var doesPlayMPEG=false;var doesPlayM4V=false;var doesPlay3GP=false;var doesPlayFLV=detectFlash();try{doesPlayOgg=mainVideo.canPlayType('video/ogg; codecs="theora, vorbis"');doesPlay3GP=mainVideo.canPlayType('video/3gpp; codecs="avc1.42E13, mp4a.40.2"');doesPlayMP4=mainVideo.canPlayType('video/mp4; codecs="avc1.4D4040, mp4a.40.2"')}catch(err){forceFlash=doesPlayFLV}var availableVideoTypesString="Available formats: "+(doesPlayOgg?" OGG ":"")+(doesPlayOgg&&doesPlayMP4?" | ":"")+(doesPlayMP4?" MP4 | QT ":"")+((doesPlayOgg||doesPlayMP4)&&doesPlayMPEG?" | ":"")+(doesPlayMPEG?" MPEG ":"")+((doesPlayOgg||doesPlayMP4||doesPlayMPEG)&&doesPlay3GP?" | ":"")+(doesPlay3GP?" 3GP ":"")+((doesPlayOgg||doesPlayMP4||doesPlayMPEG||doesPlay3GP)&&doesPlayFLV?" | ":"")+(doesPlayFLV?"Flash ":"");var explorerVersion=-1;if(navigator.appName=="Microsoft Internet Explorer"){var ua=navigator.userAgent;var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(re.exec(ua)!=null){explorerVersion=parseFloat(RegExp.$1)}}if((explorerVersion>=0&&explorerVersion<9)||forceFlash){if(mainVideo){while(mainVideo.hasChildNodes()){mainVideo.removeChild(mainVideo.firstChild)}mainVideo.parentNode.removeChild(mainVideo)}mainVideo=0}var dummySwf=swf;if(mainVideo){if(swf&&swf.parentNode){swf.parentNode.removeChild(swf)}swf=0}if(mainVideo){messageDiv.innerHTML=availableVideoTypesString+"  -- Video format used will be "+videoFileNameExt}if(swf){messageDiv.innerHTML=availableVideoTypesString+" -- Video format used will be Flash"}var videofilenamebase=" ";var videomasksrc="FFMainInsertEncodeLiveMask.png";var movieStartTimer=0;var slideshowTimer=0;if(mainVideo){mainVideo.style.visibility="hidden";theMainMovieMask.style.visibility="hidden";videoFrame.style.visibility="hidden";mainVideo.style.zIndex=-98;theMainMovieMask.style.zIndex=-97;videoFrame.style.zIndex=-99;if(doesPlayMP4){videoFileNameExt=".mp4"}else{if(doesPlayOgg){videoFileNameExt=".ogv"}else{if(doesPlay3GP){videoFileNameExt=".3gp"}}}if(force3GP&&doesPlay3GP){videoFileNameExt=".3gp"}}if(swf){swf.style.zIndex=-98;theMainMovieMask.style.zIndex=-97;videoFrame.style.zIndex=-99;videoFileNameExt=".flv"}var playButtonOnScreen=false;function rollmain(d){if(mainMovieIsVisible()||videoPending||videoPlaying){return}if(d==1){videofilenamebase="360MediaMain";videomasksrc="FFMainInsertEncodeLiveMask.png"}else{if(d==2){videofilenamebase="VersionMediaMain";videomasksrc="FFMainInsertVersionLiveMask.png"}else{return}}videoIndex=d;theMainMovieMask.style.visibility="hidden";theMainMovieMask.style.backgroundImage="url('images/"+videomasksrc+"')";theMainMovieMask.style.backgroundSize="contain";videoPending=true;var c=videofilenamebase+videoFileNameExt;playButtonOnScreen=false;if(mainVideo){videoFrame.style.visibility="visible";mainVideo.style.visibility="visible";while(mainVideo.hasChildNodes()){mainVideo.removeChild(mainVideo.firstChild)}mainVideo.src="assets/"+c;if(typeof(mainVideo.load)=="function"){mainVideo.load()}messageDiv.innerHTML="Active video format: "+videoFileNameExt}kickOffideo(c)}var waitForSwfTimer=0;function kickOffideo(b){if(swf&&!flashSWFReady){waitForSwfTimer=setTimeout(kickOffideo,200);return}if(swf){swf.setFlashVideoSource(b);messageDiv.innerhtml="Active video format: Flash"}if(iPad&&!havePlayedMovie){showPlayButton()}else{movieStartTimer=setTimeout(tryToStartMovie,100)}}function showPlayButton(){var c=document.createElement("img");c.setAttribute("id","iPlayButton");c.setAttribute("src","images/play-button.png");c.style.zIndex=-2;videoFrame.appendChild(c);videoFrame.style.zIndex=97;videoFrame.style.visibility="visible";setFade(3,100);var d=document.getElementById("mouseDivMovie");d.addEventListener("click",tryToStartMovie,true);playButtonOnScreen=true}function removePlayButton(){var d=document.getElementById("mouseDivMovie");var c=document.getElementById("iPlayButton");if(c){c.parentNode.removeChild(c);d.removeEventListener("click",tryToStartMovie,true)}playButtonOnScreen=false}function makeMovieVisible(){setFade(3,100);theMainMovieMask.style.zIndex=99;mainVideo.style.zIndex=98;videoFrame.style.zIndex=97;videoFrame.style.visibility="visible";theMainMovieMask.style.visibility="visible";mainVideo.style.visibility="visible"}function tryToStartMovie(){removePlayButton();if(mainVideo&&(!movieReady(mainVideo)&&typeof(mainVideo.load)=="function")){mainVideo.load()}if(!videoPending||videoPlaying){return}if(mainVideo){if((movieReady(mainVideo)||iDevice)&&noFadesActive()){makeMovieVisible();mainVideo.play();videoPlaying=true;videoPending=false}else{movieStartTimer=setTimeout(tryToStartMovie,500)}}if(swf){if(noFadesActive()){setFade(3,100);swf.style.zIndex=98;videoFrame.style.zIndex=97;theMainMovieMask.style.zIndex=99;swf.style.visibility="visible";theMainMovieMask.style.visibility="visible";videoFrame.style.visibility="visible";swf.playFlash();videoPlaying=true;videoPending=false}else{movieStartTimer=setTimeout(tryToStartMovie,500)}}}function flashMovieEnded(b){endmain()}function endmain(){if(!videoPlaying){return}if(mainVideo){mainVideo.style.visibility="hidden";videoFrame.style.visibility="hidden";theMainMovieMask.style.visibility="hidden";videoStop(mainVideo);mainVideo.style.zIndex=-98;videoFrame.style.zIndex=-99;theMainMovieMask.style.zIndex=-97;messageDiv.innerHTML=availableVideoTypesString+"&nbsp;&nbsp;&nbsp;Active format: "+videoFileNameExt}if(swf){videoFrame.style.visibility="hidden";theMainMovieMask.style.visibility="hidden";swf.pause();swf.style.zIndex=-99;videoFrame.style.zIndex=-99;theMainMovieMask.style.zIndex=-99;messageDiv.innerHTML=availableVideoTypesString+"&nbsp;&nbsp;&nbsp;Active format: Flash"}videoPlaying=false;havePlayedMovie=true}for(var i=0;i<panel.length;i++){OpacityTo(panel[i],0);fade[i]=-2}if(mainVideo){mainVideo.addEventListener("ended",function(b){if(!b){b=window.event}endmain()},false)}if(swf){if(swf.attachEvent){swf.attachEvent("onended",endmain)}else{swf.addEventListener("ended",endmain,true)}}function extractToElement(f){var d=(typeof(window.event)!="undefined"?window.event:f);var e=(typeof(d.toElement)!="undefined"?d.toElement:d.relatedTarget);return e}hot[0].onmouseover=function(){rollover(0)};hot[0].onmouseout=function(b){rollout(extractToElement(b),0)};hot[1].onmouseover=function(){rollover(1)};hot[1].onmouseout=function(b){rollout(extractToElement(b),1)};hot[2].onmouseover=function(){rollover(2)};hot[2].onmouseout=function(b){rollout(extractToElement(b),2)};hot[3].onmouseover=function(){rollover(3)};hot[3].onmouseout=function(b){rollout(extractToElement(b),3)};function mainMovieIsVisible(){return opacitylevel[3]>0}function noFadesActive(){for(var b=0;b<fade.length;b++){if(opacitylevel[b]!=0&&opacitylevel[b]!=100){return false}}return true}var mouseRegion=-1;function setFadeUp(b){if(fade[b]<2){fade[b]=1}}function setFadeDown(b){if(fade[b]>-2){fade[b]=-1}}function haveActiveFades(){for(var b=0;b<fade.length;b++){if(fade[b]==1||fade[b]==-1){return true}}return false}function rollover(b){mouseRegion=b;if(mouseRegion==0){setFadeUp(0);setFadeUp(4)}if(mouseRegion==1){setFadeUp(1)}if(mouseRegion==2){setFadeUp(2)}if(mouseRegion==3&&fade[3]>-2){setFadeUp(3)}if(haveActiveFades()&&fadeTimer==0){timerTick()}}function rollout(f,d){if(d==mouseRegion){mouseRegion=-1}if(d==0){setFadeDown(0);setFadeDown(4)}if(d==1||d==2){setFadeDown(d);if(f!=hot[3]){setFadeDown(3)}}if(d==3){var e=true;if(videoIndex==1||videoIndex==2){if(f==hot[videoIndex]){e=false}}if(e){setFadeDown(3)}}if(haveActiveFades()&&fadeTimer==0){timerTick()}}function setFade(d,c){opacitylevel[d]=c;if(opacitylevel[d]>=100){opacitylevel[d]=100;fade[d]=2}if(opacitylevel[d]<=0){opacitylevel[d]=0;fade[d]=-2}OpacityToFrigged(panel[d],opacitylevel[d])}function fadeup(e,f){if(e!=3&&e!=videoIndex&&mainMovieIsVisible()){return}var d=f/10;opacitylevel[e]+=d;if(opacitylevel[e]>=100){opacitylevel[e]=100;fade[e]=2}OpacityToFrigged(panel[e],opacitylevel[e])}function fadedown(e,f){if(e==videoIndex&&mainMovieIsVisible()){return}var d=f/20;opacitylevel[e]-=d;if(opacitylevel[e]<=0){opacitylevel[e]=0;fade[e]=-2}OpacityToFrigged(panel[e],opacitylevel[e])}function OpacityToFrigged(c,d){if(iPad&&d>99&&c==videoFrame){d=99}c.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+d+")";c.style.filter="alpha(opacity ="+d+")";c.style.opacity=d/100}addLoadEvent(windowLoaded);function addLoadEvent(c){if(typeof window.addEventListener!="undefined"){window.addEventListener("load",c,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener("load",c,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("onload",c)}else{if(typeof window.onload=="function"){var d=window.onload;window.onload=function(){d();c()}}else{window.onload=c}}}}}function windowLoaded(){if(mainVideo){mainVideo.style.backgroundColor="white";mainVideo.controls=false}jsReady=true}function anim(l,j,m,g,h,k){this.animTimer=0;this.animTimeStamp=-1;this.start=j;this.end=m;this.increment=g;if(m<j){this.increment=(-this.increment)}this.value=j;this.tickFunction=h;this.completeFunction=k;this.animTick=function(){var a=new Date();var b=a.getTime();var d=0;if(this.animTimeStamp>0){d=b-this.animTimeStamp}this.animTimeStamp=b;this.value=this.value+(d*this.increment);var c=false;if(this.start<this.end){c=(this.value<this.end)}else{c=(this.value>this.end)}if(!c){this.value=this.end}h(this.value);if(c){this.animTimer=setTimeout(this.animTick,this.interval)}else{this.animTimer=0;this.animTimeStamp=-1;this.completeFunction()}};this.animTick()}var fadeTimer=0;var fadeTimeStamp=-1;function timerTick(){var k=new Date();var m=k.getTime();var j=0;if(fadeTimeStamp>0){j=m-fadeTimeStamp}fadeTimeStamp=m;var l=0;for(var o=0;o<fade.length;o++){var d=false;if(fade[o]==1){fadeup(o,j);d=true;l=1}var n=false;if(fade[o]==-1){fadedown(o,j);n=true;l=1}if(d&&(o==1||o==2)&&fade[o]==2){rollmain(o)}if(n&&o==3&&opacitylevel[o]==0){endmain();removePlayButton()}if(o==4&&fade[o]>-2&&!slideshowTimer){slideshowTimer=setTimeout(slideshowTick,4000)}}if(l){fadeTimer=setTimeout(timerTick,30)}else{fadeTimer=0;fadeTimeStamp=-1}}var contentView=document.getElementById("FabFilms-contentclip");var tab=new Array(3);tab[0]=document.getElementById("tab1");tab[1]=document.getElementById("tab2");tab[2]=document.getElementById("tab3");tab[0].onmouseup=function(){tabselect(0)};tab[1].onmouseup=function(){tabselect(1)};tab[2].onmouseup=function(){tabselect(2)};tab[0].onmouseover=function(){tabRollover(0)};tab[0].onmouseout=function(){tabRollout(0)};tab[1].onmouseover=function(){tabRollover(1)};tab[1].onmouseout=function(){tabRollout(1)};tab[2].onmouseover=function(){tabRollover(2)};tab[2].onmouseout=function(){tabRollout(2)};contentView.scrollLeft=0;var tabMouse=-1;var tabSelect=0;function tabRollover(b){tabMouse=b;if(!mainMovieIsVisible()){setTabColours()}}function tabRollout(b){if(tabMouse==b){tabMouse=-1}setTabColours()}var tabAnim=0;if(isLoginFail){tabselectdirect(2);var failMessage=document.getElementById("loginFailMessage");failMessage.style.visibility="visible"}function setTabColours(){if(0==tabSelect){tab[0].style.background="url(./images/FFTab1a.png)"}else{if(0==tabMouse&&!iDevice){tab[0].style.background="url(./images/FFTab1m.png)"}else{tab[0].style.background="url(./images/FFTab1.png)"}}if(1==tabSelect){tab[1].style.background="url(./images/FFTab2a.png)"}else{if(1==tabMouse&&!iDevice){tab[1].style.background="url(./images/FFTab2m.png)"}else{tab[1].style.background="url(./images/FFTab2.png)"}}if(2==tabSelect){tab[2].style.background="url(./images/FFTab3a.png)"}else{if(2==tabMouse&&!iDevice){tab[2].style.background="url(./images/FFTab3m.png)"}else{tab[2].style.background="url(./images/FFTab3.png)"}}}function tabselect(b){if(mainMovieIsVisible()){return}tabSelect=b;tabAnim=anim(30,contentView.scrollLeft,(789*tabSelect),2.63,tabSet,tabDone);if(tabSelect==1){if(fade[4]<2){fade[4]=1;if(fadeTimer==0){timerTick()}if(!slideshowTimer){slideshowTimer=setTimeout(slideshowTick,4000)}}}else{if(fade[4]>-2){fade[4]=-1;if(fadeTimer==0){timerTick()}}}}function tabselectdirect(b){tabSelect=b;tabSet(789*tabSelect);tabDone()}function tabSet(b){contentView.scrollLeft=b}function tabDone(){tabAnim=0;setTabColours();var b=document.getElementById("loginFailMessage");b.style.visibility=(isLoginFail?"visible":"hidden");isLoginFail=false}var rollTitle1=document.getElementById("rolltitle1");var rollTitle2=document.getElementById("rolltitle2");var rollTitle3=document.getElementById("rolltitle3");var pulseDelayTimer=setTimeout(textPulseDelayTimerTick,200);var textPulseDelayTimeStamp=-1;var pulseTimer=0;var textPulseTimeStamp=-1;var initialColour=130;var peakColour=0;var pulseRange=peakColour-initialColour;var pulseDuration=4000;var initialColourString=getRGBColour(initialColour,initialColour,initialColour);rollTitle1.style.color=initialColourString;rollTitle2.style.color=initialColourString;rollTitle3.style.color=initialColourString;function textPulseTimerTick(){var g=new Date();var o=g.getTime();var q=0;if(textPulseTimeStamp>0){q=o-textPulseTimeStamp}else{textPulseTimeStamp=o}var b=(2*q/pulseDuration)-1;if(b>1){b=1}var p=initialColour+((1-Math.abs(b))*pulseRange);var r=p;var n=p;var d=p;var s=getRGBColour(r,n,d);rollTitle1.style.color=s;rollTitle2.style.color=s;rollTitle3.style.color=s;if(b<1){pulseTimer=setTimeout(textPulseTimerTick,100)}else{pulseTimer=0;textPulseTimeStamp=-1;pulseDelayTimer=setTimeout(textPulseDelayTimerTick,800);textPulseDelayTimeStamp=-1}}function getRGBColour(e,f,b){return"rgb("+Math.floor(e).toString(10)+","+Math.floor(f).toString(10)+","+Math.floor(b).toString(10)+")"}function textPulseDelayTimerTick(){if((fade[0]!=-2)||(fade[1]!=-2)||(fade[2]!=-2)){pulseTimer=0;textPulseTimeStamp=-1;pulseDelayTimer=setTimeout(textPulseDelayTimerTick,1000);textPulseDelayTimeStamp=-1;return}var f=new Date();var d=f.getTime();var e=0;if(textPulseDelayTimeStamp>0){e=d-textPulseDelayTimeStamp}textPulseDelayTimeStamp=d;textPulseTimeStamp=-1;pulseTimer=setTimeout(textPulseTimerTick,100)}function detectFlash(){return checkSupport({mimeType:["application/x-shockwave-flash"],ActiveX:["ShockwaveFlash.ShockwaveFlash","ShockwaveFlash.ShockwaveFlash.3","ShockwaveFlash.ShockwaveFlash.4","ShockwaveFlash.ShockwaveFlash.5","ShockwaveFlash.ShockwaveFlash.6","ShockwaveFlash.ShockwaveFlash.7"]})}function checkSupport(g){var e=false;if(navigator.mimeTypes){for(var f=0;f<g.mimeType.length;f++){if(navigator.mimeTypes[g.mimeType[f]]&&navigator.mimeTypes[g.mimeType[f]].enabledPlugin){e=true}}}if(typeof ActiveXObject!="undefined"){for(var f=0;f<g.ActiveX.length;f++){try{new ActiveXObject(g.ActiveX[f]);e=true}catch(h){}}}return e}var slideshowstart=0;var slideshowend=100;var slideFadeTimer=0;var slideshowCount=0;var topFrame=document.getElementById("slideshowB");var bottomFrame=document.getElementById("slideshow");var slideFadeTimeStamp=-1;var frontOpacity=0;FrontOpacityTo(0);function FrontOpacityTo(h){var g=h/100;g=g*g*g*g;var k=g*120;if(k>100){k=100}var f=k/100;topFrame.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+k+")";topFrame.style.filter="alpha(opacity="+k+");";topFrame.style.opacity=f;if(g>1){g=1}var j=slideshowstart+(slideshowend*g);topFrame.style.left=j+"px"}function slideshowTick(){if(slideshowCount>=slideshowArray.length){slideshowCount=0}if(fade[4]>-2){frontOpacity=0;FrontOpacityTo(0);var b="url('"+slideshowArray[slideshowCount++]+"')";topFrame.style.backgroundImage=b;slideshowTimer=setTimeout(slideshowTick,4000);slideFadeTimer=setTimeout(slideFadeTimerTick,50)}else{slideshowTimer=0}}function slideFadeTimerTick(){var h=new Date();var d=h.getTime();var f=0;if(slideFadeTimeStamp>0){f=d-slideFadeTimeStamp}slideFadeTimeStamp=d;var g=f/30;frontOpacity+=g;if(frontOpacity>100){frontOpacity=100}FrontOpacityTo(frontOpacity);if(frontOpacity<100){slideFadeTimer=setTimeout(slideFadeTimerTick,50)}else{bottomFrame.style.backgroundImage=topFrame.style.backgroundImage;slideFadeTimeStamp=-1}}jsReady=true;
