﻿// JScript File
// DNN Sux

// This is intended to provide the functionality for the Allen Comm DNN portal.


/**********************************************
**  Simply designed to unhide the Div containing the embedded flash
** and start it playing
**********************************************/
function showPortfolio()
{
    showWhiteOut();
    document.getElementById("FlashLayer").style.visibility = "visible";
    getFlashMovieObject("Portfolio").SetVariable("startPlay", true);
}

/*************************************
**   Hide the div containing the flash embed using the visibility option
*************************************/
function hidePortfolio()
{
    hideWhiteOut();
    document.getElementById("FlashLayer").style.visibility = "hidden";
}

/*************************************
**   This is the function for the white out that we would like to put in 
**  BEHIND the porrfolio when it opens 
*************************************/
function showWhiteOut()
{
    
    document.body.style.overflow="hidden";
    document.getElementById("WhiteoutLayer").style.visibility = "visible";
}

/***************************************
**   This function will hide the white out. 
***************************************/
function hideWhiteOut()
{
    document.body.style.overflow="visible";
    document.getElementById("WhiteoutLayer").style.visibility = "hidden";
}

/****************************************
**  looks like it fixed the embed crap depending on the browser - 
** I want to replace this...
*****************************************/
function getFlashMovieObject(movieName)
{
  if (window.document[movieName])
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
    {
      return document.embeds[movieName];
    }
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}