
var aDivList = Array('screenshotDiv', 'streamingNSVDiv', 'streamingNSVAOLDiv', 'streamingMP4VLCDiv', 'streamingMP4QTDiv', 'streamingWMPDiv', 'streamingFlashPDiv');

var aPlayersList = Array();
aPlayersList[0] = '';
aPlayersList[1] = 'nsvplayx';
aPlayersList[2] = 'winampx';
if (BROWSER.substring(0, 17) == 'Internet Explorer') {
  aPlayersList[3] = 'vlcplayx';
} else {
  aPlayersList[3] = 'vlcembedplayx';
}
aPlayersList[4] = 'qtplayx';
aPlayersList[5] = 'wmvplayx';
aPlayersList[6] = 'flashplayx';

if (!minsize) var minsize = 10000;

function addvsmstat(id_prod, id_file) {
  var framename='';
  if (top.frames.length > 0) {
    for (var i=0; i<top.frames.length; i++) {
      try { framename = top.frames[i].name; } catch(er) { framename = ''; }
      if (framename == 'log_vod') {
        top.frames[i].location.href = staturl+'&id_prod='+id_prod+'&id_file='+id_file;
      }
    }
  }
}
function showLayer(layerName) {
  var index = 0;
  // on recherche l'index du layer a afficher
  for (var i=0; i<=6; i++) {
    if (aDivList[i] == layerName) index = i;
  }
  
  for (var i=0; i<=6; i++) {
    if (i != index) {
      
      // on stop la lecture de tous les autres players
      if (i != 6) {
        try {document.getElementById(aPlayersList[i]).stop();} catch(er) {}
      } else {
        try {document.getElementById(aPlayersList[i]).sendEvent('stop');} catch(er) {}
      }
      
      // on cache tous les autres layers
      var curDiv = document.getElementById(aDivList[i]);
      if (curDiv) {
        curDiv.style.display = 'none';
        if (i != 0) {
          curDiv.innerHTML = '';
          curDiv.title = '';
        }
      }

    // on affiche le layer
    //} else {
    //  div.style.display = 'block';
    }
  }
}


function shownsvPlayer(file, id_prod, id_file, sizex, sizey, vide) {
  var div = document.getElementById('streamingNSVDiv');
  if (!div) {return;} 
  if (div.title == file) {return;} 
  if (div.style.display == 'none') {
    showLayer('streamingNSVDiv');
    div.style.display = 'block';
  }
  if ((div.title == 'empty') || (navigator.appName!='Microsoft')) {
    var content = '<table><tr><td align=center>';
    if (nsvaudiocodec == 'mp3') {
      if (nsvvideocodec == 'vp6') classid='clsid:C5E28B9D-0A68-4B50-94E9-E8F6B4697516';
      if (nsvvideocodec == 'vp5') classid='clsid:C5E28B9D-0A68-4B50-94E9-E8F6B4697515';
      if (nsvvideocodec == 'vp3') classid='clsid:C5E28B9D-0A68-4B50-94E9-E8F6B4697514';
    } else if (nsvaudiocodec == 'aac') {
      if (nsvvideocodec == 'vp6') classid='clsid:C5E28B9D-0A68-4B50-94E9-E8F6B4697519';
      if (nsvvideocodec == 'vp5') classid='clsid:C5E28B9D-0A68-4B50-94E9-E8F6B4697518';
      if (nsvvideocodec == 'vp3') classid='clsid:C5E28B9D-0A68-4B50-94E9-E8F6B4697517';
    }
    content = content + '<object id=nsvplayx name=nsvplayx width='+sizex+' height='+sizey+' border=0 classid='+classid+' codeBase=http://www.nullsoft.com/nsv/embed/nsvplayx_'+nsvvideocodec+'_'+nsvaudiocodec+'.cab#Version=-1,-1,-1,-1>';
    content = content + '<param name="Location" value="' + file + '" ref>';
    content = content + '<param name="_Version" value="65536" ref>';
    content = content + '<param name="_ExtentX" value="9313" ref>';
    content = content + '<param name="_ExtentY" value="7620" ref>';
    content = content + '<param name="_StockProps" value="0" ref>';
    content = content + '<param name="Bandwidth" value="" ref>';
    content = content + '</object><br>';
      content = content + '<input type="button" class="nsvplayerplay" value="'+playlabel+'" onClick="if (document.getElementById(\'nsvplayx\')) document.getElementById(\'nsvplayx\').play();">';
      content = content + '<input type="button" class="nsvplayerstop" value="'+stoplabel+'" onClick="if (document.getElementById(\'nsvplayx\')) document.getElementById(\'nsvplayx\').stop();">';
      content = content + '<input type="button" class="nsvplayerpause" value="'+pauselabel+'" onClick="if (document.getElementById(\'nsvplayx\')) document.getElementById(\'nsvplayx\').pause();">';
      content = content + '<input type="button" class="nsvplayerfull" value="'+fullscreenlabel+'" onClick="if (document.getElementById(\'nsvplayx\')) document.getElementById(\'nsvplayx\').GoFullScreen();">';
    content = content + '</td></tr></table>';
    div.innerHTML = content;
  } else {
    try {nsvplayx.width=sizex; nsvplayx.height=sizey; nsvplayx.open(file);} catch(er) {div.title = 'empty'; showPlayer(file, id_prod, id_file, sizex, sizey);}
  }
  div.title = file;
  addvsmstat(id_prod, id_file);
}

  
  
function showaolPlayer(file, id_prod, id_file, sizex, sizey, vide) {
  var div = document.getElementById('streamingNSVAOLDiv');
  if (!div) {return;} 
  if (div.title == file) {return;} 
  if (div.style.display == 'none') {
    showLayer('streamingNSVAOLDiv');
    div.style.display = 'block';
  }
  if (leaktest) {
    winampx.width = sizex;
    winampx.height = sizey;
    winampx.ClearPlaylist();
    winampx.AppendFileToPlaylist( file );
    playnext();
    playitnow();
  }
  div.title = file;
  addvsmstat(id_prod, id_file);
}
        
        
// VIDEOLAN PLAYER
function showMP4VLCPlayer(file, id_prod, id_file, sizex, sizey, vide) {
//  if (div.title == 'streaming') {
  var content = '<table><tr><td align=center>';
  if (BROWSER.substring(0, 17) == 'Internet Explorer') {
    content = content + '<OBJECT id="vlcplayx" name="vlcplayx" width="'+sizex+'" height="'+sizey+'" classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="axvlc.cab" events="True">';
    content = content + '<param name="Src" value="'+file+'" />';
    content = content + '<param name="ShowDisplay" value="True" />';
    content = content + '<param name="Loop" value="False" />';
    content = content + '<param name="AutoPlay" value="True" />';
    content = content + '</OBJECT>';
    content = content + '<br>';
    content = content + '<input type="button" class="vlcplayerplay" value="'+playlabel+'" onClick="if (document.getElementById(\'vlcplayx\')) document.getElementById(\'vlcplayx\').play();">';
    content = content + '<input type="button" class="vlcplayerstop" value="'+stoplabel+'" onClick="if (document.getElementById(\'vlcplayx\')) document.getElementById(\'vlcplayx\').stop();">';
    content = content + '<input type="button" class="vlcplayerpause" value="'+pauselabel+'" onClick="if (document.getElementById(\'vlcplayx\')) document.getElementById(\'vlcplayx\').pause();">';
    content = content + '<input type="button" class="vlcplayerfull" value="'+fullscreenlabel+'" onClick="if (document.getElementById(\'vlcplayx\')) document.getElementById(\'vlcplayx\').fullscreen();">';
  } else {
    content = content + '<embed name="vlcembedplayx" id="vlcembedplayx" type="application/x-vlc-plugin"';
    content = content + ' AutoPlay="yes"';
    content = content + ' loop="no"';
    content = content + ' ShowDisplay="True"';
    content = content + ' width="'+sizex+'"';
    content = content + ' height="'+sizey+'"';
    content = content + ' target="'+file+'" />';
    content = content + '<br>';
    content = content + '<input type="button" class="vlcplayerplay" value="'+playlabel+'" onClick="if (document.getElementById(\'vlcembedplayx\')) document.getElementById(\'vlcembedplayx\').play();">';
    content = content + '<input type="button" class="vlcplayerstop" value="'+stoplabel+'" onClick="if (document.getElementById(\'vlcembedplayx\')) document.getElementById(\'vlcembedplayx\').stop();">';
    content = content + '<input type="button" class="vlcplayerpause" value="'+pauselabel+'" onClick="if (document.getElementById(\'vlcembedplayx\')) document.getElementById(\'vlcembedplayx\').pause();">';
    content = content + '<input type="button" class="vlcplayerfull" value="'+fullscreenlabel+'" onClick="if (document.getElementById(\'vlcembedplayx\')) document.getElementById(\'vlcembedplayx\').fullscreen();">';
  }
  content = content + '</td></tr></table>';
  //alert(content);
  if (sizex < minsize) {
    var div = document.getElementById('streamingMP4VLCDiv');
    if (!div) {return;} 
    if (div.title == 'vlc'+file) {return;} 
    if (div.style.display == 'none') {
      showLayer('streamingMP4VLCDiv');
      div.style.display = 'block';
    }
    div.innerHTML = content;
    div.title = file;
  } else {
    var div = document.getElementById('screenshotDiv');
    if (!div) {return;} 
    if (div.style.display == 'none') {
      showLayer('screenshotDiv');
      div.style.display = 'block';
    }
    caption = prodCaption;
    MOOdalBox.setContent(content, caption, (sizex+6)+' '+(sizey+42));
  }
  addvsmstat(id_prod, id_file);
}
  
  
  
// QUICKTIME PLAYER
function showMP4QTPlayer(file, id_prod, id_file, sizex, sizey, vide) {
  var content = '<table><tr><td align=center>';
  content = content + '<object id=qtplayx name=qtplayx width="'+sizex+'" height="'+(sizey+16)+'" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">';
  if (file[0]=='r' && file[1]=='t' && file[2]=='s' && file[3]=='p') {
    content = content + '<param name="src" value="'+qtimg+'" />';
    content = content + '<param name="qtsrc" value="'+file+'" />';
  } else {
    content = content + '<param name="src" value="'+file+'" />';
  }
  if (sizex < minsize) {
    content = content + '<param name="autoplay" value="true" />';
  } else {
    content = content + '<param name="autoplay" value="false" />';
  }
  content = content + '<param name="controller" value="true" />';
  content = content + '<param name="loop" value="false" />';
//  content = content + '<param name="kioskmode" value="False" />';
  content = content + '<param name="scale" value="aspect" />';
  content = content + '<embed type="video/quicktime" ';
  content = content + ' pluginspage="http://www.apple.com/quicktime/download/"';
  if (file[0]=='r' && file[1]=='t' && file[2]=='s' && file[3]=='p') {
    content = content + ' src="'+qtimg+'"';
    content = content + ' qtsrc="'+file+'"';
  } else {
    content = content + ' src="'+file+'"';
  }
  if (sizex < minsize) {
    content = content + ' autoplay="true"';
  } else {
    content = content + ' autoplay="false"';
  }
  content = content + ' controller="true"';
  content = content + ' width="'+sizex+'"';
  content = content + ' height="'+(sizey+16)+'"';
  content = content + ' loop="false"';
  content = content + ' scale="aspect"';
//  content = content + ' kioskmode="False">';
  content = content + '</embed></object>';
  content = content + '</td></tr></table>';
  //alert(content);
  //alert('sizex:'+sizex);
  if (sizex < minsize) {
    var div = document.getElementById('streamingMP4QTDiv');
    if (!div) {return;} 
    if (div.title == 'qt'+file) {return;} 
    if (div.style.display == 'none') {
      showLayer('streamingMP4QTDiv');
      div.style.display = 'block';
    }
    div.innerHTML = content;
    div.title = file;
  } else {
    //try (
    var div = document.getElementById('screenshotDiv');
    if (!div) {return;} 
    //if (div.title == 'qt'+file) {return;} 
    if (div.style.display == 'none') {
      showLayer('screenshotDiv');
      div.style.display = 'block';
    }
    //div.innerHTML = content;
    //div.title = file;
    //alert('ho'+content);
    caption = prodCaption;
    if (BROWSER.substring(0, 17) == 'Internet Explorer') {
      MOOdalBox.setContent(content, caption, (sizex+26)+' '+(sizey+52));
    } else {
      MOOdalBox.setContent(content, caption, (sizex+6)+' '+(sizey+32));
    }
    //)
  }
  addvsmstat(id_prod, id_file);
}
  			
  			
  			
// Windows media PLAYER
function showWMPlayer(file, id_prod, id_file, sizex, sizey, vide) {
  var content = '<table><tr><td align=center>';  
  content = content + '<object id="wmvplayx" ';
  content = content + 'codeBase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.&#13;&#10; cab#Version=5,1,52,701" ';
  content = content + 'type="application/x-oleobject" ';
  content = content + 'width="'+sizex+'" ';
  content = content + 'height="'+(sizey+36)+'" ';
  content = content + 'standby="Loading Microsoft Windows Media Player components..." ';
  content = content + 'classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E9">';
//  content = content + '<param NAME="AudioStream" VALUE="-1">';
  content = content + '<param NAME="AutoSize" VALUE="1">';
  content = content + '<param NAME="AutoStart" VALUE="1">';
//  content = content + '<param NAME=\"AnimationAtStart\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"AllowScan\" VALUE=\"-1\">';
  content = content + '<param NAME="AllowChangeDisplaySize" VALUE="-1">';
//  content = content + '<param NAME=\"AutoRewind\" VALUE=\"0\">';
//  content = content + '<param NAME=\"Balance\" VALUE=\"0\">';
//  content = content + '<param NAME=\"BaseURL\" VALUE=\"\">';
  content = content + '<param NAME="BufferingTime" VALUE="5">';
//  content = content + '<param NAME=\"CaptioningID\" VALUE=\"\">';
//  content = content + '<param NAME=\"ClickToPlay\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"CursorType\" VALUE=\"0\">';
//  content = content + '<param NAME=\"CurrentPosition\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"CurrentMarker\" VALUE=\"0\">';
//  content = content + '<param NAME=\"DefaultFrame\" VALUE=\"\">';
//  content = content + '<param NAME=\"DisplayBackColor\" VALUE=\"0\">';
//  content = content + '<param NAME=\"DisplayForeColor\" VALUE=\"16777215\">';
//  content = content + '<param NAME=\"DisplayMode\" VALUE=\"0\">';
//  content = content + '<param NAME=\"DisplaySize\" VALUE=\"4\">';
//  content = content + '<param NAME=\"Enabled\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"EnableContextMenu\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"EnablePositionControls\" VALUE=\"-1\">';
  content = content + '<param NAME="EnableFullScreenControls" VALUE="1">';
//  content = content + '<param NAME=\"EnableTracker\" VALUE=\"-1\">';
  content = content + '<param NAME="Filename" VALUE="' + file + '">';
//  content = content + '<param NAME=\"InvokeURLs\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"Language\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"Mute\" VALUE=\"0\">';
  content = content + '<param NAME="PlayCount" VALUE="1">';
//  content = content + '<param NAME=\"PreviewMode\" VALUE=\"0\">';
//  content = content + '<param NAME=\"Rate\" VALUE=\"1\">';
//  content = content + '<param NAME=\"SAMILang\" VALUE=\"\">';
//  content = content + '<param NAME=\"SAMIStyle\" VALUE=\"\">';
//  content = content + '<param NAME=\"SAMIFileName\" VALUE=\"\">';
//  content = content + '<param NAME=\"SelectionStart\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"SelectionEnd\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"SendOpenStateChangeEvents\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"SendWarningEvents\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"SendErrorEvents\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"SendKeyboardEvents\" VALUE=\"0\">';
//  content = content + '<param NAME=\"SendMouseClickEvents\" VALUE=\"0\">';
//  content = content + '<param NAME=\"SendMouseMoveEvents\" VALUE=\"0\">';
//  content = content + '<param NAME=\"SendPlayStateChangeEvents\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"ShowCaptioning\" VALUE=\"0\">';
  content = content + '<param NAME="ShowControls" VALUE="1">';
//  content = content + '<param NAME=\"ShowAudioControls\" VALUE=\"-1\">';
  content = content + '<param NAME="ShowDisplay" VALUE="0">';
//  content = content + '<param NAME=\"ShowGotoBar\" VALUE=\"0\">';
//  content = content + '<param NAME=\"ShowPositionControls\" VALUE=\"-1\">';
  content = content + '<param NAME="ShowStatusBar" VALUE="0">';
//  content = content + '<param NAME=\"ShowTracker\" VALUE=\"-1\">';
//  content = content + '<param NAME=\"TransparentAtStart\" VALUE=\"0\">';
  content = content + '<param NAME="VideoBorderWidth" VALUE="0">';
  content = content + '<param NAME="VideoBorderColor" VALUE="0">';
  content = content + '<param NAME="VideoBorder3D" VALUE="0">';
//  content = content + '<param NAME=\"Volume\" VALUE=\"0\">';
//  content = content + '<param NAME=\"WindowlessVideo\" VALUE=\"0\">';
  content = content + '<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"';
//  content = content + '  filename=\"' + file + '\"';
  content = content + '  src="' + file + '"';
  content = content + '  name="wmvplayx"';
  content = content + '  ShowControls="1"';
  content = content + '  ShowDisplay="0"';
  content = content + '  ShowStatusBar="0"';
  content = content + '  width="'+sizex+'"';
  content = content + '  height="'+(sizey+36)+'"';
  content = content + '  AutoSize="1"';
  content = content + '  AutoStart="1"';
  content = content + '  volume="1000">';
  content = content + ' </embed>';
  content = content + '</object>';
  content = content + '</td></tr></table>';
//  alert(content);
  if (sizex < minsize) {
    var div = document.getElementById('streamingWMPDiv');
    if (!div) {return;} 
    if (div.title == file) {return;} 
    if (div.style.display == 'none') {
      showLayer('streamingWMPDiv');
      div.style.display = 'block';
    }
    div.innerHTML = content;
    div.title = file;
  } else {
    var div = document.getElementById('screenshotDiv');
    if (!div) {return;} 
    if (div.style.display == 'none') {
      showLayer('screenshotDiv');
      div.style.display = 'block';
    }
    //if (BROWSER.substring(0, 17) == 'Internet Explorer') {
    caption = prodCaption;
    MOOdalBox.setContent(content, caption, (sizex+6)+' '+(sizey+32));
  }
  addvsmstat(id_prod, id_file);
}
  
  
  
// Flash PLAYER

if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


function showFlashPlayer(file, id_prod, id_file, sizex, sizey, streamer) {
  //var content = '<table><tr><td align=center>'; 
  var content = '<div id="FlashPlayerDiv"><p><a href="http://www.macromedia.com/go/getflashplayer">Get Flash</a> to see this player.</p></div>';

  //content = content + '<embed id="flashplayx" name="flashplayx" src="'+swfpath+'" width="'+sizex+'" height="'+(sizey+16)+'" flashvars="file='+file+'&autostart=true&showfsbutton=false" bgcolor="#FFFFFF" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
  //content = content + '</td></tr></table>';
  //alert(content);
	
  if (sizex < minsize) {
    var div = document.getElementById('streamingFlashPDiv');
    if (!div) {return;} 
    if (div.title == file) {return;} 
    if (div.style.display == 'none') {
      showLayer('streamingFlashPDiv');
      div.style.display = 'block';
    }
    div.innerHTML = content;

    var so = new SWFObject(swfpath,'flashplayx',sizex,(sizey+20),'8');
    so.addParam("allowfullscreen","true");
    if (streamer.length != 0) {
    	// player V4 so.addVariable("streamer",streamer);
    	// player V4 so.addVariable("file",file);
    	so.addVariable("id",file);
      so.addVariable("file",streamer);
    } else {
      so.addVariable("file",file);
  	}
  	//so.addVariable("displayheight",sizey);
    so.addVariable("width",sizex);
    so.addVariable("height",(sizey+20));
    so.addVariable('autostart','true');
    so.addVariable('bufferlength',10);
    so.addVariable('callback', escape(staturl+'&id_prod='+id_prod+'&id_file='+id_file));
    so.addVariable('recommendations', escape(recommendationsurl+'&id_prod='+id_prod+'&id_file='+id_file));
    so.addVariable('linktarget', '_self');
    so.write('FlashPlayerDiv');

    div.title = file;
  } else {
    
    var div = document.getElementById('screenshotDiv');
    if (!div) {return;} 
    if (div.style.display == 'none') {
      showLayer('screenshotDiv');
      div.style.display = 'block';
    }
    if (streamer.length != 0) {
    	// player V4 file = file+"&streamer="+streamer;
    	file = streamer+"&id="+file;
    }
    content2 = '<embed src="'+swfpath+'" width=\"'+sizex+'\" height=\"'+(sizey+16)+'\" allowfullscreen="true" flashvars="file='+file+'&autostart=true&repeat=false&displayheight='+(sizey)+'&bufferlength=6&fallback='+fallback+'&callback='+escape(staturl+'&id_prod='+id_prod+'&id_file='+id_file)+'&linktarget=_self&recommendations='+escape(recommendationsurl+'&id_prod='+id_prod+'&id_file='+id_file)+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    caption = prodCaption;
    //alert(content2);
    if (BROWSER.substring(0, 17) == 'Internet Explorer') {
      MOOdalBox.setContent(content2, caption, (sizex+20)+' '+(sizey+46));
    } else {
      MOOdalBox.setContent(content2, caption, (sizex)+' '+(sizey+26));
    }
  }
}

