// This script is Copyright (c) 2011 by Centre de Recherche Public Gabriel Lippmann, http://www.lippmann.lu
var crpgl=new function crpgl(){};crpgl.flashDispenserAddress="http://visilux.chd.lu/FlashDispenser";crpgl.flashList=new Array();crpgl.hasRegistedUnloadEvt=false;crpgl.addCustomEvt=function addCustomEvt(b,c){if(typeof window.addEventListener!="undefined"){window.addEventListener(b,c,false)}else{if(typeof document.addEventListener!="undefined"){document.addEventListener(b,c,false)}else{if(typeof window.attachEvent!="undefined"){window.attachEvent("on"+b,c)}else{if(typeof window["on"+b]=="function"){var a=window["on"+b];window["on"+b]=function(){a();c()}}else{window["on"+b]=c}}}}};crpgl.addUnloadEvt=function addUnloadEvt(){if(!crpgl.hasRegistedUnloadEvt){crpgl.hasRegistedUnloadEvt=true;crpgl.addCustomEvt("unload",function(){crpgl.onJsUnload()})}};crpgl.onJsUnload=function onJsUnload(){for(var a in crpgl.flashList){crpgl.flashList[a].onJsUnload()}};crpgl.flashLive=function flashLive(b,a,d){this.divName=b;var c={flashVar_autoStart:((a)?1:0),flashVar_extInt_popout:((d)?"crpgl.livePopout":"")};swfobject.embedSWF(crpgl.flashDispenserAddress+"/std_live/player.swf",this.divName,"100%","100%","9.0.124",crpgl.flashDispenserAddress+"/static/swf/expressInstall.swf",c,{allowFullScreen:"true",allowScriptAccess:"always",wmode:"opaque"})};crpgl.livePopout=function livePopout(){var a="http://visilux.chd.lu/LivePage/static/live.html";var b="width=564,height=327,resizable=yes,toolbar=no,menubar=no,directories=no,scrollbars=no,status=no,location=no";var c=window.open(a,"livePopUp",b);if(c){c.focus()}};crpgl.flashArchive=function flashArchive(d,a,c,g,b,f){this.divName=d;if(isNaN(a)){return}var h=a;if(!isNaN(c)&&(c>=0)){h+="_"+c}var e={flashVar_autoStart:((b)?1:0)};if(g){e.flashVar_backgroundImg=g}if(f){e.flashVar_noLetterBox4Bg=1}swfobject.embedSWF(crpgl.flashDispenserAddress+"/std_archive/"+h+".swf",this.divName,"100%","100%","9.0.124",crpgl.flashDispenserAddress+"/static/swf/expressInstall.swf",e,{allowFullScreen:"true",allowScriptAccess:"always"})};crpgl.flashLive.prototype.divName=crpgl.flashArchive.prototype.divName=null;crpgl.flashLive.prototype.player=crpgl.flashArchive.prototype.player=null;crpgl.flashLive.prototype.playerOnJsUnloadCbStr=crpgl.flashArchive.prototype.playerOnJsUnloadCbStr="onJsUnload";crpgl.flashLive.prototype.onJsUnload=crpgl.flashArchive.prototype.onJsUnload=function onJsUnload(){if(this.hasFunction(this.playerOnJsUnloadCbStr)){this.player[this.playerOnJsUnloadCbStr]()}};crpgl.flashLive.prototype.hasFunction=crpgl.flashArchive.prototype.hasFunction=function hasFunction(b){this.getPlayer();if(this.player!==null&&b!==null&&typeof this.player[b]==="function"){return true}return false};crpgl.flashLive.prototype.getPlayer=crpgl.flashArchive.prototype.getPlayer=function getPlayer(){if(this.player===null){this.player=document.getElementById(this.divName);if(this.player==="undefined"){this.player=null}}return this.player};crpgl.embedArchivePlayer=function embedArchivePlayer(d,a,c,f,b,e){crpgl.addUnloadEvt();crpgl.flashList.push(new (crpgl.flashArchive)(d,a,c,f,b,e))};crpgl.embedLivePlayer=function embedLivePlayer(b,a,c){crpgl.addUnloadEvt();crpgl.flashList.push(new (crpgl.flashLive)(b,a,c))};
