var timerScroll = null;
var iLeft = 0;

/*! \brief  It takes the movie name as an argument.
 *
 *  \details It also makes the object of that specified flash file.
 *  \param movieName <c> passes movieName</c>.
 */
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);
  }
}

var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

/*! \brief This function is scrolling Thumbimages on left side.
 *  
 *  \details On clicking Left arrow, it goes forward.
 *  It calls the Flash function.
 *  \param iType <c> passes iType</c>,
 *  \param iTotalImages <c> passes Total images</c>.
 */
function func_scroll_left(iType, iTotalImages)
{
  var objFlashScroll = getFlashMovieObject("tryon_scrollbar");
  objFlashScroll.func_slide_images_ext(2);
}

/*! \brief This function is scrolling Thumbimages on right side.
 *  
 *  \details On clicking Left arrow, it goes backward.
 *  It calls the Flash function.
 *  \param iType <c> passes iType</c>.
 */
function func_scroll_right(iType)
{
  var objFlashScroll = getFlashMovieObject("tryon_scrollbar");
  objFlashScroll.func_slide_images_ext(1);
}

/*! \brief This function is for BIG Left - Right Arrows.
 *  
 *  \details On clicking Left arrow, it selects a image before current image and
 *   On clicking Right arrow, it select a image after current image.
 *  \param iType <c> passes iType</c>.
 */
function func_scroll_large(iType)
{
  var objFlashScroll = getFlashMovieObject("tryon_scrollbar");
  objFlashScroll.func_select_frame_ext(iType);
}

/*! \brief It ends scrolling.
 */
function func_mouseout_xxx()
{
  if (timerScroll != null) 
  { 
    clearTimeout(timerScroll);
  }
}

/*! \brief It overwrites the existing image to new image.
 *  \param objImage <c> passes objImage</c>,
 *  \param sImage <c> passes sImage</c> .
 */
function func_rollover(objImage, sImage)
{
  objImage.src = sImage;
}
