  function NextImage( color , container )
  {
    container.style.display = 'none';
    descript   = get('description_'+color)
    files      = getFileList( color );
    colors     = getColorList( color );
    currentUrl = container.src;
    found      = false;

    for (url in files)
    {

       if ( found )
       {
         container.src = files[url];
         descript.innerHTML = colors[url];

         return;
       }

       if ( currentUrl.indexOf( files[url] ) > -1 )
       {
         found = true;
       }

    }

    container.src = files[0];
    descript.innerHTML = colors[0];
  }

  function PreviousImage( color , container )
  {
    container.style.display = 'none';

    descript   = get('description_'+color)
    files      = getFileList( color );
    colors     = getColorList( color );
    currentUrl = container.src;
    found      = false;

    for (url in files)
    {

       if ( currentUrl.indexOf( files[url] ) > -1 )
       {
         found = true;
         break;
       }

    }

    if ( found )
    {
       if ( url == 0 )
       {
         container.src      = files[files.length-1];
         descript.innerHTML = colors[files.length-1];
       }
       else
       {
         container.src      = files[url-1];
         descript.innerHTML = colors[url-1];
       }

       return;
    }
  }
  
    function NextGroupImage( color , container )
  {
    container.style.display = 'none';
    descript   = get('description_'+color)
    files      = getGroupFileList( color );
    colors     = getGroupColorList( color );
    currentUrl = container.src;
    found      = false;

    for (url in files)
    {

       if ( found )
       {
         container.src = files[url];
         descript.innerHTML = colors[url];

         return;
       }

       if ( currentUrl.indexOf( files[url] ) > -1 )
       {
         found = true;
       }

    }

    container.src = files[0];
    descript.innerHTML = colors[0];
  }

  function PreviousGroupImage( color , container )
  {
    container.style.display = 'none';

    descript   = get('description_'+color)
    files      = getGroupFileList( color );
    colors     = getGroupColorList( color );
    currentUrl = container.src;
    found      = false;

    for (url in files)
    {

       if ( currentUrl.indexOf( files[url] ) > -1 )
       {
         found = true;
         break;
       }

    }

    if ( found )
    {
       if ( url == 0 )
       {
         container.src      = files[files.length-1];
         descript.innerHTML = colors[files.length-1];
       }
       else
       {
         container.src      = files[url-1];
         descript.innerHTML = colors[url-1];
       }

       return;
    }
  }
