var vidply = null;
function playerReady(thePlayer) {
    vidply = window.document[thePlayer.id];
}

function playHomePageVideo()
{
    if (hasProductInstall == true)
    {
            if(document.getElementById('popupVideo'))
    {
         document.getElementById('popupVideo').style.display= 'block'; 
    }
    if(document.getElementById('part_imgCancel'))
    {
          document.getElementById('part_imgCancel').style.display = 'block';
    }
    if(document.getElementById('playvidlink')){
  document.getElementById('playvidlink').style.display = 'none';
  }
  hideTable();
      /*
      * new SWFObject("/js/player-licensed.swf","vidply","520","400","9","#000000"); 
      * hint: IE issues
      * The parameters have to be enclosed with double quotes instead of single quotes to enable them to be played in IE
      */ 
      var so = new SWFObject("/js/player-licensed.swf","vidply","520","293","9","#000000");
      so.addParam('allowfullscreen','true');
      so.addParam('allowscriptaccess','always');
      so.addParam('wmode','opaque');
      so.addVariable('file','/media/useruploads/video/Introduction_1000k.flv');
      so.addVariable('autostart','true');
      so.addVariable('screencolor','888888');
      so.addVariable('stretching', 'exactfit');  
      so.addVariable('image','/media/useruploads/video/thumbs/homepage.jpg');
      so.write('innervideo');
    }
    else
    {
        window.open("http://www.adobe.com/go/getflash/"); 
    }

}

function hide_Div_Video()
{
    if (vidply != undefined || vidply!=null){
            vidply.sendEvent('STOP');
    vidply = null;
    }
    if(document.getElementById('loading')){
        document.getElementById('loading').innerHTML = '';
        document.getElementById('loading').style.display = 'none';
    }
    if(document.getElementById('popupVideo')){
        document.getElementById('popupVideo').style.display = 'none';
    }
    if(document.getElementById('bkground')){
        document.getElementById('bkground').style.display = 'none';
    }
    if(document.getElementById('popupAudio')){
        document.getElementById('popupAudio').style.display = 'none';
    }
    if(document.getElementById('part_imgCancel')){
  document.getElementById('part_imgCancel').style.display = 'none';
  }
  if(document.getElementById('playvidlink')){
  document.getElementById('playvidlink').style.display = 'block';
  }
    if(document.getElementById('mod_table')){
  document.getElementById('mod_table').style.display = 'block';
  }
  
}

function showDiv()
{
    if(document.getElementById('playvidlink')){
  document.getElementById('playvidlink').style.display = 'block';
  }
  if(document.getElementById('mod_table')){
  document.getElementById('mod_table').style.display = 'block';
  }
}

function hideTable()
{
if(document.getElementById('mod_table')){
  document.getElementById('mod_table').style.display = 'none';
  }
}

