
var imgIndex = 1;
var imgLoopID = 0;
var imgDirection = "left";


function fxn_EnlargeImage (imgURL )
{
   largeImage=window.open(imgURL,"_blank","height=600, location=no, menubar=no, resizable=no, scrollbars=no, status=no, titlebar=no, toolbar=no, width=550","true")
}


//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE COLORADO IMAGE STARTS -------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

function fxn_ControlLoopCOLORADO ( )
{
  if (document.getElementById("pauseCOLORADO").value == "Rotate")
      {
      document.getElementById("pauseCOLORADO").style.color = "#FF0000";
      document.getElementById("pauseCOLORADO").value = "Pause";
      imgLoopID = setInterval ( "fxn_LoopCOLORADO()", 1000 );
      }
  else
      {
      document.getElementById("pauseCOLORADO").style.color = "#000000";
      document.getElementById("pauseCOLORADO").value = "Rotate";
      clearInterval ( imgLoopID );
      }
}

function fxn_StartLoopCOLORADO ( )
{
      document.getElementById("pauseCOLORADO").style.color = "#FF0000";
      document.getElementById("pauseCOLORADO").value = "Pause";
      imgLoopID = setInterval ( "fxn_LoopCOLORADO()", 1000 );
}

function fxn_LoopCOLORADO ( )
{
  if (imgIndex == 8)
  {
      imgIndex = 1;
  }
  else
  {
      imgIndex = imgIndex + 1;
  }

  document.getElementById("img0").src = "http://www.chellgrove.co.uk/HomeImages/GGI-PS661ADJ-0" + imgIndex + ".jpg";

}

//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE COLORADO IMAGE ENDS ---------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE LARGE COLORADO IMAGE STARTS -------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

function fxn_ControlLoopCOLORADO_large ( )
{
  if (document.getElementById("pauseCOLORADO").value == "Rotate")
      {
      document.getElementById("pauseCOLORADO").style.color = "#FF0000";
      document.getElementById("pauseCOLORADO").value = "Pause";
      imgLoopID = setInterval ( "fxn_LoopCOLORADO_large()", 1000 );
      }
  else
      {
      document.getElementById("pauseCOLORADO").style.color = "#000000";
      document.getElementById("pauseCOLORADO").value = "Rotate";
      clearInterval ( imgLoopID );
      }
}

function fxn_StartLoopCOLORADO_large ( )
{
      document.getElementById("pauseCOLORADO").style.color = "#FF0000";
      document.getElementById("pauseCOLORADO").value = "Pause";
      imgLoopID = setInterval ( "fxn_LoopCOLORADO_large()", 1000 );
}

function fxn_LoopCOLORADO_large ( )
{
  if (imgIndex == 8)
  {
      imgIndex = 1;
  }
  else
  {
      imgIndex = imgIndex + 1;
  }

  document.getElementById("img0").src = "http://www.chellgrove.co.uk/HomeImages/GGI-PS661ADJ-0" + imgIndex + "-large.jpg";

}

//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE LARGE COLORADO IMAGE ENDS ---------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------


//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE SMALL COLORADO IMAGE STARTS -------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

function fxn_ControlLoopCOLORADO_small ( )
{
  if (document.getElementById("pauseCOLORADO").value == "Rotate")
      {
      document.getElementById("pauseCOLORADO").style.color = "#FF0000";
      document.getElementById("pauseCOLORADO").value = "Pause";
      imgLoopID = setInterval ( "fxn_LoopCOLORADO_small()", 1000 );
      }
  else
      {
      document.getElementById("pauseCOLORADO").style.color = "#000000";
      document.getElementById("pauseCOLORADO").value = "Rotate";
      clearInterval ( imgLoopID );
      }
}

function fxn_StartLoopCOLORADO_small ( )
{
      document.getElementById("pauseCOLORADO").style.color = "#FF0000";
      document.getElementById("pauseCOLORADO").value = "Pause";
      imgLoopID = setInterval ( "fxn_LoopCOLORADO_small()", 1000 );
}

function fxn_LoopCOLORADO_small ( )
{
  if (imgIndex == 8)
  {
      imgIndex = 1;
  }
  else
  {
      imgIndex = imgIndex + 1;
  }

  document.getElementById("img0").src = "http://www.chellgrove.co.uk/HomeImages/GGI-PS661ADJ-0" + imgIndex + "-small.jpg";

}

//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE SMALL COLORADO IMAGE ENDS ---------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------


//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE LARGE OBUS-ULTRA-PINK IMAGE STARTS ------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

function fxn_ControlLoop_OBUSUPink_large ( )
{
  if (document.getElementById("pause_OBUSUPink").value == "Rotate")
      {
      document.getElementById("pause_OBUSUPink").style.color = "#FF0000";
      document.getElementById("pause_OBUSUPink").value = "Pause";
      imgLoopID = setInterval ( "fxn_Loop_OBUSUPink_large()", 1000 );
      }
  else
      {
      document.getElementById("pause_OBUSUPink").style.color = "#000000";
      document.getElementById("pause_OBUSUPink").value = "Rotate";
      clearInterval ( imgLoopID );
      }
}

function fxn_StartLoop_OBUSUPink_large ( )
{
      document.getElementById("pause_OBUSUPink").style.color = "#FF0000";
      document.getElementById("pause_OBUSUPink").value = "Pause";
      imgLoopID = setInterval ( "fxn_Loop_OBUSUPink_large()", 1000 );
}

function fxn_Loop_OBUSUPink_large ( )
{
  if (imgDirection == "left")
  {
     if (imgIndex == 6)
     {
         imgDirection = "right";
         imgIndex = 5;
     }
     else
     {
         imgIndex = imgIndex + 1;
     }
  }
  else
  {
     if (imgIndex == 1)
     {
         imgDirection = "left";
         imgIndex = 2;
     }
     else
     {
         imgIndex = imgIndex - 1;
     }
  }

  document.getElementById("img0").src = "http://www.chellgrove.co.uk/HomeImages/GGI-OBUSULTRA-Pink-0" + imgIndex + "-large.jpg";

}

//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE LARGE OBUS-ULTRA-PINK IMAGE ENDS --------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE SMALL OBUS-ULTRA-PINK IMAGE STARTS ------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

function fxn_ControlLoop_OBUSUPink_small ( )
{
  if (document.getElementById("pause_OBUSUPink").value == "Rotate")
      {
      document.getElementById("pause_OBUSUPink").style.color = "#FF0000";
      document.getElementById("pause_OBUSUPink").value = "Pause";
      imgLoopID = setInterval ( "fxn_Loop_OBUSUPink_small()", 1000 );
      }
  else
      {
      document.getElementById("pause_OBUSUPink").style.color = "#000000";
      document.getElementById("pause_OBUSUPink").value = "Rotate";
      clearInterval ( imgLoopID );
      }
}

function fxn_StartLoop_OBUSUPink_small ( )
{
      document.getElementById("pause_OBUSUPink").style.color = "#FF0000";
      document.getElementById("pause_OBUSUPink").value = "Pause";
      imgLoopID = setInterval ( "fxn_Loop_OBUSUPink_small()", 1000 );
}

function fxn_Loop_OBUSUPink_small ( )
{
  if (imgDirection == "left")
  {
     if (imgIndex == 6)
     {
         imgDirection = "right";
         imgIndex = 5;
     }
     else
     {
         imgIndex = imgIndex + 1;
     }
  }
  else
  {
     if (imgIndex == 1)
     {
         imgDirection = "left";
         imgIndex = 2;
     }
     else
     {
         imgIndex = imgIndex - 1;
     }
  }

  document.getElementById("img0").src = "http://www.chellgrove.co.uk/HomeImages/GGI-OBUSULTRA-Pink-0" + imgIndex + "-small.jpg";

}

//---------------------------------------------------------------------------------------------------------------------
//-------------- ROTATE SMALL OBUS-ULTRA-PINK IMAGE ENDS --------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------

