/*************************************************************************

Ah ah ah ! :D
   
*************************************************************************/



    function action(){
    
    if (!document.getElementsByTagName) return;
    
    if (document.getElementById('action')){

    var objBody = document.getElementsByTagName("body").item(0);

    var clap = document.createElement("div");

    clap.setAttribute('id','clap');
    
    clap.className="scoper";
	  	
 	objBody.insertBefore(clap, objBody.lastChild);
 
 	if (document.getElementById('clap')){
 
 	var clap = document.getElementById('clap');
 	
 	clap.innerHTML = '<div id="ft0w" class="scop1"><div id="box" class="scop1a"></div></div><div class="scop2"><div id="box2" class="scop1a"></div></div>';
 
 	}
 	
 	
 	if (/WebKit/i.test(navigator.userAgent)) {
 	
 	if (document.getElementById('bg1i')){
    
     var imgW = document.getElementById("bg1");
     
     var img = document.getElementById("bg1i");
     
     var last = document.getElementById("clap");
     
	   if ( ( last ) && ( imgW.offsetHeight > 200 ) && ( img.offsetHeight > 200 ) ) {
			
	       soWhat(); return;
	       
	      }
				
	   }
	
	}
	
 	
 	var el = document.getElementById('bg1i');

    if (el) {
    
        var img = document.getElementById("bg1i");
            
        if (( img ) && ( img.complete )) {  //alert('complete');
        
                soWhat();
                
                }
                
        else if (( img ) && ( !img.complete )) {  //alert('NOT complete');
            
                 //soWhat();
            
            if ( img.readyState ) {
                img.onreadystatechange = function() {
                   if ( window.event.srcElement.readyState == 'complete' ) {
                      soWhat();
                   }
                };
            } else {
                img.onload = function() { soWhat();
                };
            }
        }
    }
}

    pli();
    
    }
    
    
function soWhat() {

if (!document.getElementById('nmf')){// this is a movie page

    //setTimeout('showflashplayer()', 100); //Moved below - 02062009 - Was showing flash player in Ie 2 times
    
    if (document.getElementById('ctentIE')){
    
    }
    
    else {
    
    setTimeout('showflashplayer()', 100);
    
    OpNM();
    
    }
    
    	if (!document.getElementById('frun')){// not fgo() or user will have to wait until the .mp3 is loaded completely
    	
    	if (document.getElementById('ctentIE')){
    
    	setTimeout('mygeckoisnotelgreco()', 1000);
    
    	}
    	
    	else {
    
    	setTimeout('mygeckoisnotelgreco()', 7000);
    	
    	}
    	
   		}
    
    }
    
    else {// No media in here skip flash routine
    
    setTimeout('soWhatD()', 500);
    
    }
    
 }

 
 
 function mygeckoisnotelgreco() {
 
 if (!document.getElementById('frun')){ // From first flash movie: fgo -- then onLoad frun
 
 	 //alert('mygeckoisnotelgreco');
 	 
 	 if (document.getElementById('ctentIE')){
     
     }
     
     else {
     
     OpNMMoveCheckerClear();// Either fired from within flash either after period.
     
     }
     
     fillflashplayer();// >> setTimeout('soWhatD()', 500);
 
     }
 
 }
 

function soWhatD() {

    $('loader-icon').addEvent('domready',function() {

			var fxli = new Fx.Style('loader-icon', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxliO = new Fx.Style('loader-icon', 'opacity', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){

	        soWhatBeG();
			
			}
			
			});
			
			var fxaa2h1s = new Fx.Style('aa2h1', 'opacity', {
			
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxaa2h2s = new Fx.Style('aa2h2', 'opacity', {
			
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			fxli.start(50);
			
			fxliO.start(1, 0);
			
			});
			
	if (document.getElementById('aa2h1')){
			
	$('aa2h1').addEvent('domready',function() {

			var fxaa2h1s = new Fx.Style('t', 'opacity', {
			
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxaa2h2s = new Fx.Style('st', 'opacity', {
			
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxscan = new Fx.Style('scan', 'marginLeft', {
			
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxscano = new Fx.Style('scan', 'opacity', {
			
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxbg2i = new Fx.Style('bg2i', 'opacity', {
			
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			fxaa2h1s.set(0);
			
			fxaa2h2s.set(0);
			
			fxbg2i.set(0);
			
			});
			
		}
    
 }
 
 
 function soWhatBeG() {

    setTimeout('soWhatBe()', 500);
    
 }
   

function soWhatBe() {

    place();
    
    reveal();
    
    soWhatGo();
    
 }


function m1(){// Img resizer not necessary due to layout used on home page...

if (!document.getElementsByTagName) return;

    if (document.getElementById('bg1i')){
    var bg1i = document.getElementById('bg1i');
    var siz = screen.width;
    bg1i.style.width = (siz + 'px');
    
    }

    }
    

function place() {
 
 if (!document.getElementsByTagName) return;
 
if (document.getElementById('action')){
 
 if (!document.getElementById('ctentIE6')){
 
 if (document.getElementById('bg1')){
    var bg1 = document.getElementById('bg1');
    bg1.style.bottom = "20%";
    
    }
    
 if (document.getElementById('bg2')){
    var bg2 = document.getElementById('bg2');
    bg2.style.bottom = "20%";
    
    }
    
    }
    
  if (document.getElementById('bg1i')){
    var bg1i = document.getElementById('bg1i');
    bg1i.style.bottom = "0";
    
    }
    
  if (document.getElementById('bg2i')){
    var bg2i = document.getElementById('bg2i');
    bg2i.style.bottom = "0";
    
    }
 
 if (document.getElementById('aa2h2')){
    var aa2h2 = document.getElementById('st');
    aa2h2.style.marginTop = "-37px";
    
  }
  
   if (document.getElementById('aa2h3')){
    var aa2h3 = document.getElementById('aa2h3');
    aa2h3.style.marginTop = "-30px";
    
  }

 
 if (document.getElementById('action')){
 
    var sl = document.getElementById('slhome');
    var anchors = sl.getElementsByTagName("li");
    
    for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    anchor.style.marginTop = "-40px";
  
    }
  
 }
 
 if (document.getElementById('sections')){
    var sl2 = document.getElementById('sections');
    sl2.style.marginTop = "-40px";
    sl2.style.top = "20%";
    
    }
    
  if (document.getElementById('bgwrp')){
    var bgw = document.getElementById('bgwrp');
    bgw.style.top = "20%";
    
    }

  if (document.getElementById('to')){
    var to = document.getElementById('to');
    to.style.visibility = "visible";
    
  }

 if (document.getElementById('ti')){
    var sl3 = document.getElementById('ti');
    sl3.style.marginTop = "0";
    
    }
    
    if (document.getElementById('nbh')){
    var nbh = document.getElementById('nbh');
    var nbw = document.getElementById('nbw');
    var nbhoh = document.getElementById("nbh").offsetHeight;
    var nbwoh = document.getElementById("nbw").offsetHeight;
	var nbhohneg = nbhoh; 
	nb = 0 - nbhohneg;
	var nbwohneg = nbwoh; 
	nw = nbwohneg; 
	
	nbw.style.bottom = "20%";
    nbh.style.marginBottom = (nb + 'px');

    var box2 = document.getElementById('box2');
    var box2h = document.getElementById("box2").offsetHeight;
    var box2m = box2h; 
	bb = box2m;
    
    nbw.style.bottom = "20%";
    
    nbw.style.display = "none";
    
    }
    
    // News, Contact, Bio, Credits
    
    if (!document.getElementById('front')){
    
    if (document.getElementById('nmf')){
    
    var film = document.getElementById('film');
    
    film.style.marginBottom = "20%";
    
    }
    
    }
    
    // Film

    if (!document.getElementById('front')){
    
    if (document.getElementById('nmf')){
    
    var action = document.getElementById('action');
    action.style.overflow = "visible";
    action.style.top = "20%";
    action.style.bottom = "20%";
    action.style.height = "50%";
    
    }
    
    else{
    
    var action = document.getElementById('action');
    action.style.overflow = "visible";
    action.style.top = "20%";
    action.style.bottom = "20%";
    action.style.height = "60%";
    
    }
    
    }
    
    if (document.getElementById('film')){
			
	var film = document.getElementById('film');
    film.style.height = "60%";
            
     }
    
    if (document.getElementById('filmW')){
    
    if (!document.getElementById('ctentIE')){
    
    var filmW = document.getElementById("filmW");
    filmW.style.top = "20%";
    filmW.style.marginTop = "0";
    
    }
    
    // Film description

    if (!document.getElementById('front') && document.getElementById('vslide')){
    
        
    if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
    
 	var ffversion=new Number(RegExp.$1) // capture x.x portion and store as a number
 	
 	if (ffversion<3){
  	
  		var vct = $$('#vslide .vct');
	
		vct.each(function(othervct, j) { othervct.addEvent('domready', function(event88){

				othervct.setStyle('display', 'block');
				
				othervct.setStyle('float', 'left');
				
	}); });
    
   }
   
   }
    
    var sl = document.getElementById('vslide');
    var anchors = sl.getElementsByTagName("div");
    var testc = $('vslide').getElement('img');
    
    if (testc.hasClass('reflected')){
    
    for (var i=0; i<anchors.length; i++) {
    
    var anchor2 = anchors[i];

    if(/vct/.test(anchors[i].className)){
    
    anchor2.style.overflow = "hidden";
    
    anchor2.style.height = "332px";
    
    }
    
    if(/vol/.test(anchors[i].className)){
    
    anchor2.style.height = "332px";
    
    anchor2.style.position = "absolute";
    
    //anchor2.style.right = "0";
    
    anchor2.style.left = "50%";
    
    anchor2.style.marginLeft = "-93px";
    
    }
    
    if(/ftech/.test(anchors[i].className)){
    
    anchor2.style.position = "absolute";
    
    //anchor2.style.right = "0";
    
    anchor2.style.left = "50%";
    
    anchor2.style.marginLeft = "-93px";
    
    anchor2.style.top = "362px";
    
    }
    
    }
    
    }
    
    
    if (testc.hasClass('reflect')){
    
    for (var i=0; i<anchors.length; i++) {
    
    var anchor2 = anchors[i];

    if(/vct/.test(anchors[i].className)){
    
    anchor2.style.overflow = "hidden";
    
    anchor2.style.height = "250px";
    
    }
    
    if(/vol/.test(anchors[i].className)){
    
    anchor2.style.height = "250px";
    
    anchor2.style.position = "absolute";
    
    //anchor2.style.right = "0";
    
    anchor2.style.left = "50%";
    
    anchor2.style.marginLeft = "-93px";
    
    }
    
    if(/ftech/.test(anchors[i].className)){
    
    anchor2.style.position = "absolute";
    
    //anchor2.style.right = "0";
    
    anchor2.style.left = "50%";
    
    anchor2.style.marginLeft = "-93px";
    
    anchor2.style.top = "280px";
    
    }
    
    }
    
    }

    
   }
   
    
    // Start ie specific content
    
    if (document.getElementById('ctentIE6')){
    
    var filmW = document.getElementById("filmW");
    filmW.style.top = "0";
    //filmW.style.bottom = "20%";
    filmW.style.marginTop = "0";
    
    }
    
    if (document.getElementById('ctentIE7')){
    
    var filmW = document.getElementById("filmW");
    filmW.style.top = "0";
    filmW.style.marginTop = "0";
    
    if (document.getElementById('article')){
    var artW = document.getElementById("article");
    artW.style.marginBottom = "20%";
    
    }
    
    }
    
    if (document.getElementById('ctentIE')){
    
    if (!document.getElementById('ctentIE6')){
    
    var objBody = document.getElementsByTagName("body").item(0);
    objBody.style.paddingBottom = "20%";
    objBody.style.overflow = "visible";
    objBody.className = "scrolldoc";
    
    
    }
    
    }
    
    if (!document.getElementById('ctentIE6')){
    
    var objBody = document.getElementsByTagName("body").item(0);
    objBody.style.paddingBottom = "20%";
    objBody.className = "scrolldoc";
    
    }
    
    if (document.getElementById('ctentIE6')){
    
    if (!document.getElementById('front')){
    
    var action = document.getElementById("action");
    action.style.overflow = "auto";
    action.style.top = "0";
    action.style.height = "100%";
    
    }
    
    
    }
    
    if (document.getElementById('ctentIE7')){
    
    if (!document.getElementById('front')){
    
    var action = document.getElementById("action");
    
    
    }
    
    }
    
    
    
    }
    
    if (document.getElementById('ctentIE')){
    
    var eng0 = document.getElementById("eng0");
    eng0.style.position = "static";
    
    var s0a = document.getElementById("s0a");
    s0a.style.position = "relative";
    
    }

  }
  
  
  if (!document.getElementById('front') && document.getElementById('vslide')){
  
  // Place iPhone detection here
  
  }
    
 }


 function reveal() {
    
    if (document.getElementById('action')){
    var action = document.getElementById('action');
    action.style.visibility = "visible";
    
    }
    
    if (document.getElementById('bg1')){
    var bg1 = document.getElementById('bg1');
    bg1.style.visibility = "visible";
    
    }
    
    if (document.getElementById('bg2')){
    var bg2 = document.getElementById('bg2');
    bg2.style.visibility = "visible";
    
    }
    
 }
 
  
 function soWhatGo() {
 
    if (document.getElementById('clap')){
    var claph = document.getElementById('clap');
    claph.style.backgroundColor = "transparent";
    
    }
    
    if (document.getElementById('loader-icon')){
    var li = document.getElementById('loader-icon');
    li.style.display = "none";
    
    }
        
    setTimeout('m12()', 850); //initial value
    
    if (!document.getElementById('nmf')){// this is a movie page
    
    m14();
    
    }
    
 }
 
 


function m12(){

    $('action').addEvent('domready', function() {
    
			
			var fxs0 = new Fx.Style('s0', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxs1 = new Fx.Style('s1', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});

			var fxs2 = new Fx.Style('s2', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxs3 = new Fx.Style('s3', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxs4 = new Fx.Style('s4', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxs5 = new Fx.Style('s5', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxs6 = new Fx.Style('s6', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxs7 = new Fx.Style('s7', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			if (document.getElementById('front')){
			
            fxaa2h1D.delay(600);
            
            }
            
            m13.delay(1500);// Avoid menu hooks when flowing down
            
            dest.delay(1500);// Avoid menu hooks when flowing down
            
            if (document.getElementById('film')){
            
            if (!document.getElementById('nmf')){// this is a movie page
            
            mxp.delay(1500);
            
            }
            
            }
            
			}
			
			});
			
			var fxfilm = new Fx.Style('film', 'left', {
			
			unit: '%',
			duration: 2000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			
			
			}
			
			});
			
			
			var fxaa2h1 = new Fx.Style('t', 'opacity', {
			
			duration: 4000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			fxaa2h2do.delay(1000);
			
			fxaa2h2d.delay(400);
			
			}
			
			});
			
			function fxaa2h1D(){
			
	        fxaa2h1.start(1);
			
			};
			
			var fxaa2h2 = new Fx.Style('st', 'marginTop', {
			
			duration: 2000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			function fxaa2h2d(){
			
	        fxaa2h2.start(0);
			
			};
			
			var fxaa2h2o = new Fx.Style('st', 'opacity', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			if (!document.getElementById('ctentIE')){
			
			fxscintF.delay(1000);
			
			fxscintEnd.delay(60000);
			
			}
			
			}
			
			});
			
			var fxscan = new Fx.Style('scan', 'marginLeft', {
			
			duration: 5000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			fxscandoright.delay(500);
			
			fxscandorighto.delay(4000);
			
			}
			
			});
			
			var fxscanr = new Fx.Style('scan', 'marginLeft', {
			
			duration: 2500, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			fxscandoleft.delay(2000);
			
			fxscandolefto.delay(2500);
			
			}
			
			});
			
			var fxscano = new Fx.Style('scan', 'opacity', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
						
			var fxscintr = new Fx.Style('bg2i', 'opacity', {// Halo
			
			duration: 1300, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
			var periodical;

			function fxscintF(){
			
			fxscintr.start(1, 0);
			
	        periodical = fxscintF2.periodical(5000);
	        
			};
			
			function fxscintF2(){
			
	        fxscintr.start(1, 0);
	        
			};
			
			function fxscintEnd(){
			
	        $clear(periodical);
	        
	        fxscintTrigger();
	       
			};
			
			function fxscintTrigger(){
			
	        $('aa2h1').addEvent('mouseenter', function() {
			
	        fxscintr.start(0, 1);
			
			});
			
	        $('aa2h1').addEvent('mouseleave', function() {
			
	        fxscintr.start(1, 0);
			
			});
			
			};
			
			function fxaa2h2do(){
					 
	        fxaa2h2o.start(1);
			
			};
			
			function fxscandoleft(){
			
	        fxscan.start(-7);
	        
			};
			
			function fxscandolefto(){
			
	        fxscano.start(1);
	        
			};
			
			function fxscandoright(){
			
	        fxscanr.start(435);
	        
			};
			
			function fxscandorighto(){
			
	        fxscano.start(0);
	        
			};
			
			
			fxsT();
			
			function fxsT(){
			
	        fxs0.start(0);
            
            fxs1T.delay(250);
            
            fxs2T.delay(500);
            
            fxs3T.delay(750);
            
            fxs4T.delay(1000);
            
            fxs5T.delay(1250);
            
            fxs6T.delay(1500);
            
            fxs7T.delay(1750);
			
			};
			
			function fxs0T(){
			
	        fxs0.start(0);
			
			};
			
			function fxs1T(){
			
	        fxs1.start(0);
			
			};
			
			function fxs2T(){
			
	        fxs2.start(0);
			
			};
			
			function fxs3T(){
			
	        fxs3.start(0);
			
			};
			
			function fxs4T(){
			
	        fxs4.start(0);
			
			};
			
			function fxs5T(){
			
	        fxs5.start(0);
			
			};
			
			function fxs6T(){
			
	        fxs6.start(0);
			
			};
			
			function fxs7T(){
			
	        fxs7.start(0);
			
			};
			
			});
			
	
}


function shhh(){


if (document.getElementById('bg2')){

    var bg2 = document.getElementById('bg2');
    bg2.style.display = "none";
    
    }

}

function noshhh(){

if (document.getElementById('bg2')){

    var bg2 = document.getElementById('bg2');
    bg2.style.display = "block";
    
    }

}


function m13(){

	var fxeng0 = new Fx.Style('eng0', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});

    $('s0a').addEvent('mouseenter', function() {

	        fxeng0.start(0); shhh();
			
			});
			
	$('s0a').addEvent('mouseleave', function() {
			
	        fxeng0.start(-25); noshhh();
			
			});
			
	var fxeng1 = new Fx.Style('eng1', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s1a').addEvent('mouseenter', function() {
			
	        fxeng1.start(0); shhh();
			
			});
			
	$('s1a').addEvent('mouseleave', function() {
			
	        fxeng1.start(-25); noshhh();
			
			});	
			
	var fxeng2 = new Fx.Style('eng2', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s2a').addEvent('mouseenter', function() {
			
	        fxeng2.start(0); shhh();
			
			});
			
	$('s2a').addEvent('mouseleave', function() {

	        fxeng2.start(-25); noshhh();
			
			});
						
	var fxeng3 = new Fx.Style('eng3', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s3a').addEvent('mouseenter', function() {
			
	        fxeng3.start(0); shhh();
			
			});
			
	$('s3a').addEvent('mouseleave', function() {

	        fxeng3.start(-25); noshhh();
			
			});
			
	var fxeng4 = new Fx.Style('eng4', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s4a').addEvent('mouseenter', function() {
			
	        fxeng4.start(0); shhh();
			
			});
			
	$('s4a').addEvent('mouseleave', function() {
			
	        fxeng4.start(-25); noshhh();
			
			});
			
	var fxeng5 = new Fx.Style('eng5', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s5a').addEvent('mouseenter', function() {
			
	        fxeng5.start(0); shhh();
			
			});
			
	$('s5a').addEvent('mouseleave', function() {
			
	        fxeng5.start(-25); noshhh();
			
			});
			
	var fxeng6 = new Fx.Style('eng6', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s6a').addEvent('mouseenter', function() {
			
	        fxeng6.start(0); shhh();
			
			});
			
	$('s6a').addEvent('mouseleave', function() {
			
	        fxeng6.start(-25); noshhh();
			
			});
			
	var fxeng7 = new Fx.Style('eng7', 'marginTop', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s7a').addEvent('mouseenter', function() {
			
	        fxeng7.start(0); shhh();
			
			});
			
	$('s7a').addEvent('mouseleave', function() {
			
	        fxeng7.start(-25); noshhh();
			
			});
			
	
}


function m14(){

    if (!document.getElementById('front')){
    
    m14a(); m14r(); m19();
    
    fbg();
	
   }
   
 }
 
 
 function m14a(){// Now that's a true crusty one...
	
	var vl = $$('#vslide .vct .vol');
	
	vl.each(function(other, j) { other.addEvent('click', function(event2){ mxp77();
	
				var fts1 = other.getNext();
				
				var fts2 = fts1.innerHTML;
    			
    			var mins2 = $('lbBottom');
    						
    			mins2.setHTML(fts2);
    			
    			var fts3 = mins2.getFirst();
				
				fts3.setStyle('padding-top', '0');

					var vli = $$('#lbBottom .ftc .vex a');
				
					vli.each(function(other2, k) { other2.addEvent('domready', function(event3){
					
					var vlicur = vli[0];
					
					vlicur.className = "und";
					
					other2.rel = other2.href;
					
					other2.href = "#";
					
					other2.setProperty('onclick', 'javascript:return false;');// Avoid hash page jump in Safari and Ie
					
					}); });
	
					vli.each(function(other2, k) { other2.addEvent('click', function(event3){
					
					vli.removeClass('und');
					
					var url = other2.rel;
					
					var url2 = url.substring( url.indexOf("/video/"));
					
					var prop0 = document.getElementById('flvvideo');
					
					
					if (document.getElementById('ctentIE')){
					
					var propie1 = document.getElementById('flvvideo');
					
					var propie2 = propie1.getElementsByTagName("PARAM").item(0);
					
					var propie3 = propie2.value;
					
					//alert(propie3);
					
					var prop = propie3;
					
					}
					
					else {
					
					var prop = document.getElementById('flvvideo').src;
					
					}
					
					//alert(prop);
				
					var prop2 = prop.substring( prop.indexOf("/video/"), prop.indexOf("&autostart"));
					
					var newurl = prop.replace(prop2, url2);
					
					var newurl2 = newurl.substring( newurl.indexOf("/pluginsv/"));
					
					var newurl3 = '..'+ newurl2;
					
					
					if (document.getElementById('ctentIE')){
					
					var propie1 = document.getElementById('flvvideo');
					
					var propie2 = propie1.getElementsByTagName("PARAM").item(0);
					
					propie2.value = '';
					
					propie2.value = newurl3;
					
					//alert(propie2.value);
					
					}
					
					else {
				
					document.getElementById('flvvideo').src = ''; // IMPORTANT Its really simple.. You cant $ a flash object (with mootools 1.11).
					
					document.getElementById('flvvideo').src = newurl3;
					
					}
					
					var propH1 = $('lbImage');
					
					var propH1a = propH1.innerHTML;
					
					propH1.innerHTML = '';
					
					propH1.setHTML(propH1a);
					
					vli.className = "";
						
					other2.addClass('und')
					
					
    				}); });
    				
    				
    				//mxp77();
    			
    }); });
    
    
    
   }
   
   
   function m19(){
    
    
    //var vlb = $$('#vslide .vct');
    
    
    //vlb.each(function(otherb, j) { otherb.addEvent('domready', function(event8){
    
    
    m19a();
    
    //m19a.delay(500);// avoid img shaking by adding a little delay for this - Was first 100 to watch 27052009
    
    
    	 //}); });
    	 
    	 
 }
 
    function m19out(){
    
    
    var vlb = $$('#vslide .vct');
    
    
   vlb.each(function(otherb, j) { otherb.addEvent('mouseleave', function(event8){
    
    
    //m20a(); //m19a();
    
    m20a.delay(500);// Added 8062009 - Same reason as above
    
    
    	 }); });
    	 
    	 
 }
   
   
    function m19a(){
    
    
    var vlb = $$('#vslide .vct .vol p a span img');
    
    
    vlb.each(function(otherbc, j) { otherbc.addEvent('mouseenter', function(event8){
    	
    	
    	var vl2 = otherbc;
    	
		var fxup1 = new Fx.Style(vl2, 'marginTop', {
			
		duration: 500,
		transition: Fx.Transitions.Sine.easeInOut,
		wait: false,
			
			onComplete: function(){
			
			m20a();

			}
			
		});
			
		fxup1.start(-20);
		
				if (document.getElementsByTagName("canvas")){
		
						var fxdw1 = new Fx.Style(vl2, 'paddingBottom', {
			
						duration: 500,
						transition: Fx.Transitions.Sine.easeInOut,
						wait: false,
			
						onComplete: function(){

							}
			
						});

						fxdw1.start(30);
			
				};
		
	 }); });
	 
	 
 }
 
 
 function m20a(){// Pasted above - To test if fast or slow - 12052009 -- Tested: slow > removed 13052009
    
    
    var vlb = $$('#vslide .vct .vol p a span img');
    
    
    vlb.each(function(otherbd, j) { otherbd.addEvent('mouseleave', function(event8){
    	
    	
    	var vl2 = otherbd;
    	
		var fxup1 = new Fx.Style(vl2, 'marginTop', {
			
		duration: 500,
		transition: Fx.Transitions.Sine.easeInOut,
		wait: false,
			
			onComplete: function(){

	        //fxup1.start(0);
			
			}
			
		});
			
		fxup1.start(0);
		
				if (document.getElementsByTagName("canvas")){
		
						var fxdw1 = new Fx.Style(vl2, 'paddingBottom', {
			
						duration: 500,
						transition: Fx.Transitions.Sine.easeInOut,
						wait: false,
			
			onComplete: function(){

	        //fxdw1.start(0);
			
			}
			
						});

						fxdw1.start(0);
			
				};
		
	 }); });
	 
 }
 
 
   function mxp(){
   
   
   var film = document.getElementById("film");
   
   
   var conw = document.createElement("div");

    conw.setAttribute('id','conw');
    
    film.insertBefore(conw, film.firstChild);
    
   
   if (document.getElementById('conw')){
   
   
    var expi = document.createElement("div");

    expi.setAttribute('id','exp');
    
 	conw.appendChild(expi);
 	
   
    var clo = document.createElement("div");

    clo.setAttribute('id','clo');
    
 	conw.appendChild(clo);


 	mxp1(); mxp1cl(); mxp2SL();
 	
 	}
 	
	
	}
	
	
	function mxp77(){
	
	if (document.getElementById('exp')){
	
	var expo = $('exp');
	
	if (expo.hasClass('open')){
		
	mxp2clo(); showa();
	
	}
	
	}
	
	}
 
 
  function mxp1(){
  
  
  	$('exp').addEvent('click', function(f) {
  	
  	//f = new Event(f).stop();
  	
  	var exph = document.getElementById("exp");
  	
  	exph.style.visibility ='hidden';
  	
  	$('exp').removeEvent('click');
  	
  	$('exp').addClass('open');
			
	        geta(); hida(); shiftdwn();
			
			});	
	
	 }
	 
	function mxp1cl(){
  
  
  	$('clo').addEvent('click', function(f) {
  	
  	//f = new Event(f).stop();
  	
    var cloh = document.getElementById("clo");
  	
  	cloh.style.visibility ='hidden';
  	
  	$('clo').removeEvent('click');
  	
	        mxp2clo(); showa();
			
			});	
	
	 }
	 
	 
	function shiftdwn(){
	
	var fxstdwn = new Fx.Scroll(window, { 
	
	wait: false, 
	
	duration: 1000,
	
	wait: false,
			
	onComplete: function(){
	
	mxp2();

	}
	
	});
	
	//var fxstdwn8 = new Fx.Scroll(window, {
	
	var objBody2 = document.getElementsByTagName("body").item(0);
	
	var fxstdwn8 = new Fx.Style(objBody2, 'paddingBottom', {
	
	wait: false, 
	
	duration: 1000,
	
	wait: false,
			
	onComplete: function(){
	
	//mxp2();

	}
	
	});
	
	//fxstdwn8.start(500);
	
    fxstdwn.scrollTo(0, 80);
	 	 
	}
	 
	 
  function mxp2(){
  
  
  	var mx = $$('#vslide .vct');
	
	    mx.each(function(othermx, j) { othermx.addEvent('domready', function(event8){
    	
    	var vl88 = othermx;
    	
    	var fxmx = new Fx.Style(vl88, 'height', {
		
		duration: 500,
		transition: Fx.Transitions.Sine.easeInOut,
		wait: false,
			
			onComplete: function(){
			
			mxp2SM();
			
			}
			
		});
		
		var ft = othermx.getFirst();
		
		var ft2 = ft.getNext();
		
		var ft3 = ft2.offsetHeight;
		
		ft2.setStyle('height', ft3);
		
		//alert(ft3);
		
		var testc = $('vslide').getElement('img');
		
		if (testc.hasClass('reflect')){
		
		var ft4 = ft3 + 250;
		
		}
		
		if (testc.hasClass('reflected')){
		
		var ft4 = ft3 + 332;
		
		}
		
 		fxmx.start(ft4);

		
	 }); });
	 
	 
	 }
	 
	 
	function mxp2clo(){  //showa();
	
	var exph = document.getElementById("exp");
  	
  	exph.style.visibility ='visible';
	
	$('exp').removeClass('open');
	
	var fxscrollup = new Fx.Scroll(window, { 
	
	duration: 1000,
	
	wait: false,
			
	onComplete: function(){
	
	mxp2clo2();

	}
	
	});
	
    fxscrollup.scrollTo(0, 0);
	 
	}


	 function mxp2clo2(){
  
  
  	var mx = $$('#vslide .vct');
	
	    mx.each(function(othermx, j) { othermx.addEvent('domready', function(event8){
    	
    	var vl88 = othermx;
    	
    	var fxmxcl = new Fx.Style(vl88, 'height', {
		
		duration: 500,
		transition: Fx.Transitions.Sine.easeInOut,
		wait: false,
			
			onComplete: function(){
			
			mxp2SL();
			
			}
			
		});
		
		fxmxcl.start(332);

		
	 }); });
	 
	 
	 }
	 
	  
	  
	function mxp2SL(){
  
  	var mxs = $('exp');
    	
    	var fxmxs = new Fx.Style(mxs, 'marginTop', {
		
		duration: 500,
		transition: Fx.Transitions.Sine.easeInOut,
		wait: false,
			
			onComplete: function(){
			
			}
			
		});
		
		fxmxs.start(0);
		
	}
	
	
	function mxp2SM(){
	
	var cloh = document.getElementById("clo");
  	
  	cloh.style.visibility ='visible';
  
  	var mxs = $('exp');
    	
    	var fxmxs = new Fx.Style(mxs, 'marginTop', {
		
		duration: 500,
		transition: Fx.Transitions.Sine.easeInOut,
		wait: false,
			
			onComplete: function(){
			
			}
			
		});
		
		fxmxs.start(-17);
		
	}
	
	
	
	function geta(){
  
  
  	var mxh = $$('#vslide .ftc h2');
  	
	    mxh.each(function(othermxh, p) { othermxh.addEvent('domready', function(event10){
	    
	    var vl21 = othermxh;
	    
    	var spanw = document.createElement("span");

    	vl21.insertBefore(spanw, vl21.firstChild);
    	
    	var vl23 = vl21.getText();
    	
    	//spanw.setText(vl23); Error in IE
    	
    	spanw.innerHTML = vl23;
    	
	 }); });
	 
	 
	 }
	 
	 
	function hida(){
  
  
  	var mxh = $$('#vslide .ftc h2 a');
  	
  	mxh.setStyle('display', 'none');

	
	}
	
	
	function showa(){
  
  
  	var mxh = $$('#vslide .ftc h2 a');
  	
  	mxh.setStyle('display', 'block');
  	
  	var mxh2 = $$('#vslide .ftc h2 span');
  	
  	mxh2.each(function(othermxh2, p) { othermxh2.addEvent('domready', function(event9){
	    
	 othermxh2.remove();
		
	 }); });
	 
	 
	}
 
 
 
 function m14r(){
	
		var lbbo = new Fx.Style('lbBottomContainer', 'opacity', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
		var lbbo2 = new Fx.Style('lbBottomContainer', 'opacity', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
			lbbo.set(0.5);
			
		$('lbBottomContainer').addEvent('mouseenter', function() {
			
	        lbbo2.start(0.8);
			
			});
			
		$('lbBottomContainer').addEvent('mouseleave', function() {
			
	        lbbo2.start(0.5);
			
			});
			
 }
 
 
 

function m14b(){

	var fts = $$('#vslide .fts');
	var mins2 = $$('#vslide .fts .min1');
	
	
    fts.each(function(element) {
    
        
    		var fx = new Fx.Styles(element, { transition: Fx.Transitions.Sine.easeInOut, duration: 500, wait: false, 
    		
    		onComplete: function(){
    		
    
    		mins2.each(function(element) {
    		
    		
    		var fx2 = new Fx.Styles(element, { transition: Fx.Transitions.Sine.easeInOut, duration: 500, wait: false, 
    		
    		onComplete: function(){
    		
    		//m15.delay(500);
    		
    		}
    		
    		
    		});
    		
    		element.addEvent('click', function(event2){
    		
    					fx2.start({
		
						'margin-top': 250
			
	     				});
    		
    				});
    		
    			});
    		
    		} 
    		
      });
    		
    
    element.addEvent('mouseenter', function(event){
    
    event.stop();
    
		fx.start({
		
			'padding-top': 0
			
	     });

	   });
    
    });
    
 }

 
 
function m15(){

	var fts = $$('#vslide .fts');
	var mins2 = $$('#vslide .fts .min1');
	
	
    fts.each(function(element) {
    
        
    		var fx = new Fx.Styles(element, { transition: Fx.Transitions.Sine.easeInOut, duration: 10, wait: false, 
    		
    		onComplete: function(){
    		
    
    		mins2.each(function(element) {
    		
    		
    		var fx2 = new Fx.Styles(element, { transition: Fx.Transitions.Sine.easeInOut, duration: 10, wait: false, 
    		
    		onComplete: function(){
    		
    		m15.delay(500);
    		
    		}
    		
    		
    		});
    		
    		element.addEvent('domready', function(event2){
    		
    					fx2.start({
		
						'margin-top': 0
			
	     				});
    		
    				});
    		
    			});
    		
    		} 
    		
      });
    		
    
    element.addEvent('domready', function(event){
    
    //event.stop();
    
		fx.start({
		
			'padding-top': 250
			
	     });

	   });
    
    });
    
 }


function news(){

	var fxnews = new Fx.Style('nbh', 'bottom', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	var fxnews2 = new Fx.Style('nbh', 'opacity', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});
			
	$('s6a').addEvent('mouseenter', function() {
	
		if (document.getElementById('nbh')){
	
			var nbh = document.getElementById('nbh');
			nbh.style.top="";
			
		}
			
	        fxnews2.start(0, 1);
			
			});
			
	$('s6a').addEvent('mouseleave', function() {
			
	        fxnews2.start(1, 0);
			
			});		
			
	
}

 /*********************************************************************************

News Fx
  
**********************************************************************************/


 
 
 function hbg(){

	var cwp = $$('#article .c0 .cwrp');
	
	var arttl = $$('#article .arttl');
	
    cwp.each(function(element) {
    
    		var fxcwp = new Fx.Styles(element, { 
    		
    		transition: Fx.Transitions.Sine.easeInOut, 
    		
    		duration: 500, 
    		
    		wait: false, 
    		
    		onComplete: function(){
    		
    
    		
    		} 
    		
      });
    		
    
    element.addEvent('mouseenter', function(event){
    
			fxcwp.start({
			
			'background-color': '#0e0e0e'
			
			});
			
			
			
			
    		arttl.each(function(element) {
    
    		var fxarttl = new Fx.Styles(element, { 
    		
    		transition: Fx.Transitions.Sine.easeInOut, 
    		
    		duration: 500, 
    		
    		wait: false, 
    		
    		onComplete: function(){
    		
    		} 
    		
      		});
    		
    		element.addEvent('mouseenter', function(event2){
    		
    					fxarttl.start({
			
						'color': '#305C92'
			
						});
    		
    				});
    				
    		
    			});
			
	   });
    
    });
    
 }

 
 
 /*********************************************************************************

Forms Fx
  
**********************************************************************************/
 
 
 function fbg(){
 
 if (document.getElementById('nsmWrapper')){
 
 var fxfbg = new Fx.Style('Message', 'backgroundColor', {
			
			duration: 500, 
			transition: Fx.Transitions.Sine.easeInOut,
			wait: false
			
			});

    $('Message').addEvent('click', function(event) {

	        fxfbg.start('#1e1e1e');
	        
	      });
	      
	$('Message').addEvent('blur', function(event) {

	        fxfbg.start('#0A0A0A');
	        
	      });
	      
var cwp2 = $$('#nsmWrapper input');
	
    cwp2.each(function(element) {
 
    		var fxcwp2 = new Fx.Styles(element, 'backgroundColor', { 
    		
    		transition: Fx.Transitions.Sine.easeInOut, 
    		
    		duration: 500, 
    		
    		wait: false, 
    		
    		onComplete: function(){
    		
    		} 
    		
      		});
    		
    
    element.addEvent('click', function(event){
    
			fxcwp2.start({
			
			'background-color': '#1e1e1e'
			
			});
			
	     });
	     
	     
	 element.addEvent('blur', function(event){
    
			fxcwp2.start({
			
			'background-color': '#0A0A0A'
			
			});
			
	     });
	   
	 });
		
	 }
			
 }

/*********************************************************************************

Transitions
  
**********************************************************************************/


function linkD(url){

setTimeout (function(){window.location.href=url}, 1000);// 1000 originally

}

function dest(){

    if (document.getElementById('s1a')){
    var s1a = document.getElementById('s1a');
    s1a.onclick = function(){linkD(this.href); transF(); maa(); return false;};
    
    }
    
    if (document.getElementById('s2a')){
    var s2a = document.getElementById('s2a');
    s2a.onclick = function(){linkD(this.href); transF(); mco(); return false;};
    
    }
    
    if (document.getElementById('s3a')){
    var s3a = document.getElementById('s3a');
    s3a.onclick = function(){linkD(this.href); transF(); mdra(); return false;};
    
    }
    
        if (document.getElementById('s0a')){
    var s3a = document.getElementById('s0a');
    s3a.onclick = function(){linkD(this.href); transF(); mho(); return false;};
    
    }
    
    
    if (document.getElementById('s4a')){
    var s3a = document.getElementById('s4a');
    s3a.onclick = function(){linkD(this.href); transF(); mbio(); return false;};
    
    }
    
    
    if (document.getElementById('s5a')){
    var s3a = document.getElementById('s5a');
    s3a.onclick = function(){linkD(this.href); transF(); mcont(); return false;};
    
    }
    
    
    if (document.getElementById('s6a')){
    var s3a = document.getElementById('s6a');
    s3a.onclick = function(){linkD(this.href); transF(); mnew(); return false;};
    
    }
    
    
    if (document.getElementById('s7a')){
    var s3a = document.getElementById('s7a');
    s3a.onclick = function(){linkD(this.href); transF(); mcre(); return false;};
    
    }


}

function transF(){

if (!document.getElementsByTagName) return;
    
    var objBody = document.getElementsByTagName("body").item(0);

    //var clap2 = document.createElement("div");

    //clap2.setAttribute('id','clap2');
    
    var clap3 = document.createElement("div");

    clap3.setAttribute('id','clap3');
    
    //objBody.insertBefore(clap2, objBody.lastChild);
	  	
 	objBody.insertBefore(clap3, objBody.lastChild);
 	
 	//clap3.innerHTML = '<div id="ft0w" class="scop1"><div id="box" class="scop1a"></div></div><div class="scop2"><div id="box2" class="scop1a"></div></div>';
    
    var arrayPageSize = getPageSize();
	    
    if (document.getElementById('clap2')){
    var clap2 = document.getElementById('clap2');
    clap2.style.filter = "alpha(opacity=50)";
    clap2.style.MozOpacity = "0.5";
    clap2.style.KHTMLOpacity = "0.5";
    clap2.style.opacity = "0.5";
    
    }
    
    if (document.getElementById('clap3')){
    
    var clap3 = document.getElementById('clap3');
    
    clap3.style.height = (arrayPageSize[3] + 'px');
    
    var fxclap3o = new Fx.Style('clap3', 'opacity', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			swoo.delay(500);
			
			}
			
			});
			
	var fxclap3mt = new Fx.Style('clap3', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			//fxclap3mt.start(-200);
			
			}
			
			});
			
	fxclap3o.set(0);
	
	fxclap3o.start(0, 1);

	fxclap3mt.set(100);
	
	fxclap3mt.start(0);
	
    }
}


function swoo(){

    var fxclap3o = new Fx.Style('clap3', 'opacity', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			}
			
			});
			
	var fxclap3mt = new Fx.Style('clap3', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut,
			
			onComplete: function(){
			
			
			}
			
			});
	
	fxclap3o.start(1, 0);

	fxclap3mt.start(-100);

}

function maa(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2maa";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermaa";
    
    }
    
 }
 
 
 function mco(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2mco";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermco";
    
    }
 
 }
 
 function mdra(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2mdra";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermdra";
    
    }
 
 }
 
 function mho(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2mho";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermho";
    
    }
 
 }
 
  function mbio(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2mbio";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermbio";
    
    }
 
 }
 
   function mcont(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2mcont";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermcont";
    
    }
 
 }
 
    function mnew(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2mnew";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermnew";
    
    }
 
 }
 
     function mcre(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('clap2')){

    var clap2 = document.getElementById('clap2');
    
    clap2.className="scoper2mcre";
    
    }
    
    if (document.getElementById('clap3')){

    var clap3 = document.getElementById('clap3');
    
    clap3.className="scopermcre";
    
    }
 
 }
 
  function maafad(){

    $('clap3').addEvent('domready', function() {
			
			var fxclap3 = new Fx.Style('clap3', 'opacity', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
			var fxclap3b = new Fx.Style('clap3', 'marginTop', {
			
			duration: 1000, 
			transition: Fx.Transitions.Sine.easeInOut
			
			});
			
	        fxclap3.start(1, 0);
	        fxclap3b.start(100);
			
			});
			
}



/*********************************************************************************

Audio player settings - audio-player.js - audio player v.1.2.3
  
**********************************************************************************/


var ap_instances = new Array();

function ap_stopAll(playerID) {
	for(var i = 0;i<ap_instances.length;i++) {
		try {
			if(ap_instances[i] != playerID) { document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 1);
			}
			else { document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 0);
			//var  bit = document.getElementById("audioplayer" + ap_instances[i].toString()).getBytesTotal();
			//alert(bit);
		
			}
		} catch( errorObject ) {
			// stop any errors
		}
	}
	
}


  


 function destroyflashplayer(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('action-and-adventure-action-et-aventure')){
    
    if (document.getElementById('flashplayer')){
    
        var ti = document.getElementById('ti');
    
        ti.innerHTML = '';
        
      }
      
      }
      
    if (document.getElementById('comedy-comedie')){
    
    if (document.getElementById('flashplayer')){
    
        var ti = document.getElementById('ti');
    
        ti.innerHTML = '';
        
      }
      
      }
      
    if (document.getElementById('drama-comedie-dramatique')){
    
    if (document.getElementById('flashplayer')){
    
        var ti = document.getElementById('ti');
    
        ti.innerHTML = '';
        
      
     }
     
    }
    
   }
   
      
 function toogleflashplayer(){
      
 if (!document.getElementById('flashplayer')){
    
        document.getElementById('ti');
    
        var ti = document.getElementById('ti');
        
        ti.innerHTML = '<div class="flashplayer" id="flashplayer" style="display: block;">'
        +'<a href="#" id="remote"><img src="http://www.alexandre-azaria.com/img/flashremote.gif" alt="" /></a>'
        +'</div>';
        
        var remote = document.getElementById('remote');
        
        remote.onclick = function(){fillflashplayer2();};

        
      }
      
  }
  
  
  function chkmoviecursor() {// Not used too heavy - Do this from within flash instead.

  if (document.getElementById("audioplayer1")){
    
  var ap1 = document.getElementById("audioplayer1");
  
  var buf = ap1.GetVariable("lastPosition");
  
  var buf2 = ap1.PercentLoaded();
  
  //alert(buf2);
  
  //ap1.GotoFrame(0);
  
  ap1.SetVariable('player.maxVolume', 0);
  
  //OpNM();
  
  }
  
}


var OpNMChk = false;

function OpNM() {

	if (OpNMChk) return;

	var OpNMChk = true;
	
	checker3.init();

}

checker3 = {};

var OpNMLoop = false;

checker3.init = function() {

    if (OpNMLoop) return;

	var OpNMLoop = true;

	var ti = document.getElementById("ti");

		if ( ti ) { //alert('running');

	interval3ID = setInterval(checker3.check3, 1000);
			
		}

}


checker3.check3 = function() { //alert('loop');
	
	var fgo2 = document.getElementById("fgo");
	
	var frun2 = document.getElementById("frun");

	if ( fgo2 && frun2 ) {
	
		OpNMMoveCheckerClear();
	
	}

}


function OpNMMoveCheckerClear() {
 
        if (interval3ID) { clearInterval(interval3ID); //alert('cleared');
        
            return false; }

        else { return false; }

}

function fgo(){ // First event being sent from with flash, berore fillflashplayer()
  
    var objBody = document.getElementsByTagName("body").item(0);

    var fgo = document.createElement("div");

    fgo.setAttribute('id','fgo');
    
 	objBody.insertBefore(fgo, objBody.lastChild);
 	
 	}
 	
 	
function showflashplayer(){ //alert('showflashplayer');

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('flashplayer')){

    var fa = document.getElementById('flashplayer');
    
    fa.style.display = "block";
    
    
    }
    
   
  }
  
  function hideflashplayer(){ //alert('hideflashplayer');

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('flashplayer')){

    var fa = document.getElementById('flashplayer');
    
    fa.style.display = "none";
    
    
    }
    
   
  }
  

function fillflashplayer2(){

  
 if (document.getElementById('remote')){
 
    
        if (document.getElementById('front')){
    
        ffp1();
        
        }
        
        if (document.getElementById('action-and-adventure-action-et-aventure')){
    
        ffp2();
        
        }
        
        if (document.getElementById('comedy-comedie')){
    
        ffp3();

        }
        
        if (document.getElementById('drama-comedie-dramatique')){
    
        ffp4();
        
        }
        
      }
      
  }

  
function fillflashplayer(){ //alert('frun'); // Fired from withing the first flash file when completely loaded, after fgo()

    var objBody = document.getElementsByTagName("body").item(0);

    var frun = document.createElement("div");

    frun.setAttribute('id','frun');
    
 	objBody.insertBefore(frun, objBody.lastChild);
  
  
 if (document.getElementById('frun')){
 
    
        if (document.getElementById('front')){
    
        setTimeout('ffp1()', 1800);
        
        }
        
        if (document.getElementById('action-and-adventure-action-et-aventure')){
    
        setTimeout('ffp2()', 1800);
        
        }
        
        if (document.getElementById('comedy-comedie')){
    
        setTimeout('ffp3()', 1800);

        }
        
        if (document.getElementById('drama-comedie-dramatique')){
    
        setTimeout('ffp4()', 1800);
        
        }
        
        setTimeout('soWhatD()', 100);
        
      }
      
  }
  
    function ffp1(){
    
     if (document.getElementById('flashplayer')){
    
        document.getElementById('flashplayer');
    
        var ti = document.getElementById('flashplayer');
        
        ti.innerHTML = '';
        
        hideflashplayer();
        
        if (document.getElementById('front')){
    
        ti.innerHTML = '<object type="application/x-shockwave-flash" data="http://www.alexandre-azaria.com/plugins/player.swf" id="audioplayer1" height="22" width="290">'
        +'<param name="movie" value="http://www.alexandre-azaria.com/plugins/player.swf"/>'
        +'<param name="FlashVars" value="playerID=1&amp;loop=no&amp;autostart=yes&amp;soundFile=http://www.alexandre-azaria.com/audio/intro.mp3"/>'
        +'<param name="quality" value="high"/>'
        +'<param name="menu" value="false"/>'
        +'<param name="wmode" value="transparent"/></object>';
        
        showflashplayer();
        
        }
        
      } 
    
    }
  
  
  function ffp2(){
    
     if (document.getElementById('flashplayer')){
    
        document.getElementById('flashplayer');
    
        var ti = document.getElementById('flashplayer');
        
        ti.innerHTML = '';
        
        hideflashplayer();
        
        if (document.getElementById('action-and-adventure-action-et-aventure')){
    
        ti.innerHTML = '<object type="application/x-shockwave-flash" data="http://www.alexandre-azaria.com/plugins/player.swf" id="audioplayer1" height="22" width="290">'
        +'<param name="movie" value="http://www.alexandre-azaria.com/plugins/player.swf"/>'
        +'<param name="FlashVars" value="playerID=1&amp;loop=no&amp;autostart=yes&amp;soundFile=http://www.alexandre-azaria.com/audio/action.mp3"/>'
        +'<param name="quality" value="high"/>'
        +'<param name="menu" value="false"/>'
        +'<param name="wmode" value="transparent"/></object>';
        
        showflashplayer();
        
        }
        
      } 
    
    }
    
    
  function ffp3(){
    
     if (document.getElementById('flashplayer')){
    
        document.getElementById('flashplayer');
    
        var ti = document.getElementById('flashplayer');
        
        ti.innerHTML = '';
        
        hideflashplayer();
        
        if (document.getElementById('comedy-comedie')){
    
        ti.innerHTML = '<object type="application/x-shockwave-flash" data="http://www.alexandre-azaria.com/plugins/player.swf" id="audioplayer1" height="22" width="290">'
        +'<param name="movie" value="http://www.alexandre-azaria.com/plugins/player.swf"/>'
        +'<param name="FlashVars" value="playerID=1&amp;loop=no&amp;autostart=yes&amp;soundFile=http://www.alexandre-azaria.com/audio/comedy.mp3"/>'
        +'<param name="quality" value="high"/>'
        +'<param name="menu" value="false"/>'
        +'<param name="wmode" value="transparent"/></object>';
        
        showflashplayer();
        
        }
        
      } 
    
    }
    
    
    function ffp4(){
    
     if (document.getElementById('flashplayer')){
    
        document.getElementById('flashplayer');
    
        var ti = document.getElementById('flashplayer');
        
        ti.innerHTML = '';
        
        hideflashplayer();
        
        if (document.getElementById('drama-comedie-dramatique')){
    
        ti.innerHTML = '<object type="application/x-shockwave-flash" data="http://www.alexandre-azaria.com/plugins/player.swf" id="audioplayer1" height="22" width="290">'
        +'<param name="movie" value="http://www.alexandre-azaria.com/plugins/player.swf"/>'
        +'<param name="FlashVars" value="playerID=1&amp;loop=no&amp;autostart=yes&amp;soundFile=http://www.alexandre-azaria.com/audio/drama.mp3"/>'
        +'<param name="quality" value="high"/>'
        +'<param name="menu" value="false"/>'
        +'<param name="wmode" value="transparent"/></object>';
        
        showflashplayer();
        
        }
        
      } 
    
    }
  
  function swp(){

if (!document.getElementsByTagName) return;
    
    if (document.getElementById('flashplayer')){

    var fa = document.getElementById('flashplayer');
    
    fa.style.display = "block";
    
    if (document.getElementById('to')){// Redundancy to watch
    
    var to = document.getElementById('to');
    
    to.style.visibility = "visible";
    
    }
    
   }
   
  }
  
  
/*********************************************************************************

Orchestration player settings - not used anymore
  
**********************************************************************************/


  function hideflashplayer_old(){
  
if (!document.getElementsByTagName) return;
    
    if (document.getElementById('flashplayer')){

    var ti = document.getElementById('ti');
    
    //ti.style.display = "none";
    
    ti.innerHTML = '';
	
    }

  }
  
  
function sendEvent(swf, typ, prm) {
    
    thisMovie(swf).sendEvent(typ, prm);
  
  }


function thisMovie(movieName) {

    if(navigator.appName.indexOf("Microsoft") != -1) {
		
		return window[movieName];
	
	} else {
	
		return document[movieName];
	}
}

  
function getUpdate(typ,pr1,pr2,swf) {

    if(typ == "time") {

        currentPosition = pr1;

        if (currentPosition==0) { 

        var rch = document.getElementById('orch');
            
	    rch.sendEvent('playpause');
    
       }
    }
}

  
  function playfD(){
  
  if (!document.getElementsByTagName) return;
    
    if (document.getElementById('orch')){
    
     setTimeout('playf()', 1000);
	  
	  }
	  
	}
	
	
  function playf(){
  
  if (!document.getElementsByTagName) return;
    
    if (document.getElementById('orch')){
      
      var orch = document.getElementById('orch');
            
	  sendEvent('orch','playpause');
	  
	  }
	  
	}
  
 
 function getf(){
   
   	if (!document.getElementsByTagName){ return; }

	var anchors = document.getElementsByTagName("a");

	for (var i=0; i<anchors.length; i++){

		var anchor = anchors[i];

		if (anchor.getAttribute("href") && (anchor.getAttribute("rev") == "mb")){

			anchor.onclick = function () {disablefDel();}

		}
		
	  }	

	}
	
 function disablefDel(){
 
 setTimeout('disablef()', 300);
 
 }
	
 
 function disablef(){
  
    var fa = document.getElementById('flashanimation');
    
    var ambw = document.getElementById('ambW');
    
    fa.style.display = "none";
    
    ambw.style.display = "none";
                
  
  }
  
  
/*********************************************************************************

Sizes
  
**********************************************************************************/
  
  
  
function getPageSize(){

	
	var xScroll, yScroll;

	
	if (window.innerHeight && window.scrollMaxY) {	

		xScroll = document.body.scrollWidth;

		yScroll = window.innerHeight + window.scrollMaxY;

	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac

		xScroll = document.body.scrollWidth;

		yScroll = document.body.scrollHeight;

	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari

		xScroll = document.body.offsetWidth;

		yScroll = document.body.offsetHeight;

	}


	var windowWidth, windowHeight;

	if (self.innerHeight) {	// all except Explorer

		windowWidth = self.innerWidth;

		windowHeight = self.innerHeight;

	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode

		windowWidth = document.documentElement.clientWidth;

		windowHeight = document.documentElement.clientHeight;

	} else if (document.body) { // other Explorers

		windowWidth = document.body.clientWidth;

		windowHeight = document.body.clientHeight;

	}	


	// for small pages with total height less then height of the viewport

	if(yScroll < windowHeight){

		pageHeight = windowHeight;

	} else { 

		pageHeight = yScroll;

	}

	// for small pages with total width less then width of the viewport

	if(xScroll < windowWidth){	

		pageWidth = windowWidth;

	} else {

		pageWidth = xScroll;

	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);

	return arrayPageSize;

}


/*********************************************************************************

Preload stuff
  
**********************************************************************************/


function pli() {

 	var imgtl = new Array('maab.png', 'mcob.png', 'mcdrab.png', 'mbio.png', 'mcnew.png', 'mcont.png', 'mcred.png', 'mho.png', 'nxpndov.png', 'xpndov.png', 'closeitov.png', 'submit.gif');
 	
 	var dir = '/img/';
 	
 	var ima = new Array();
 	
 	for (i=0;i<imgtl.length;i++) {
 	
  		ima[i] = new Image();
  		
  		ima[i].src = dir + imgtl[i];
  		
  	}
  	  		
}


/*********************************************************************************

  Multiple window.onload
  
**********************************************************************************/

// addLoadEvent()

// Adds event to window.onload without overwriting currently assigned onload functions.

// Function found at Simon Willison's weblog - http://simon.incutio.com/


function addLoadEvent(func)

{	

	var oldonload = window.onload;

	if (typeof window.onload != 'function'){

    	window.onload = func;

	} else {

		window.onload = function(){

		oldonload();

		func();

		}

	}

}




//addLoadEvent(m1);
