// For use with embedded players
function octoPlayerInit(channel, x, y, variant){
  if(!octoOK()){
    frames['pluginFrame'].location.href="http://octoshape.com/hub/plugin.asp?vari="+variant
    document.getElementById("pluginHelper").style.zIndex = '2';
    octoLoop(channel, x, y);
  }
  else{
    octoLaunchEmbedded(channel, x, y);
  }
}

function octoLaunchEmbedded(channel, x, y){
    document.getElementById("pluginHelper").style.zIndex = '-2';
    octoPlayEmbedded(channel, 'OctoPlayer', x, y);
}

function octoLoop(channel, x, y){
  if(octoOK()){
    octoLaunchEmbedded(channel, x, y);
  }
  else{
    setTimeout("octoLoop('"+channel+"', "+x+", "+y+");", 2000);
  }
} 
