// method used by the jsp-content of the AOApprovedProducts application 

function Init()
{
   HideAll();
   if (document.getElementById("INNOVATION1"))
   {
      document.getElementById("INNOVATION1").style.display="";
   }
}

function Show(count)
{
   if (document.getElementById("INNOVATION" + count))
   {
      HideAll();
      if (document.getElementById("INNOVATION" + count))
      {
         document.getElementById("INNOVATION" + count).style.display="";
      }
   }
}

function HideAll()
{
   for (var i = 0; i < document.getElementsByTagName("TBODY").length; i++)
   {
      if (document.getElementById("INNOVATION" + i))
      {
         document.getElementById("INNOVATION" + i).style.display="none";
      }
   }
}

function ShowNext()
{
   var iCurrent = 0;
   var iLast = 0;

   for (var i=0; i < document.getElementsByTagName("TBODY").length; i++)
   {
      if (document.getElementById("INNOVATION" + i))
      {
         iLast = i;
         if (document.getElementById("INNOVATION" + i).style.display == "")
         {
            iCurrent = i;
         }
      }
   }
   if (iCurrent < iLast)
   {
      Show(iCurrent + 1);
   }
}

function ShowPrev()
{
   var iCurrent = 0;
   var iLast = 0;

   for (var i=0; i < document.getElementsByTagName("TBODY").length; i++)
   {
      if (document.getElementById("INNOVATION" + i))
      {
         iLast = i;
         if (document.getElementById("INNOVATION" + i).style.display == "")
         {
            iCurrent = i;
         }
      }
   }
   if (iCurrent > 0)
   {
      Show(iCurrent - 1);
   }
}

function Show_new(count)
{
   if (document.getElementById("INNOVATION" + count))
   {
      HideAll_new();
      if (document.getElementById("INNOVATION" + count))
      {
         document.getElementById("INNOVATION" + count).style.display="";
         document.getElementById("INNOVATION_SEL" + count).style.background="#F7D112";
         document.getElementById("INNOVATION_SEL" + count).color=rgb(0, 70, 133);
      }
   }
}

function HideAll_new()
{
   for (var i = 0; i < document.getElementsByTagName("TBODY").length; i++)
   {
      if (document.getElementById("INNOVATION" + i))
      {
         document.getElementById("INNOVATION" + i).style.display="none";
         document.getElementById("INNOVATION_SEL" + i).style.background="";
         document.getElementById("INNOVATION_SEL" + i).color="";
      }
   }
}

function ShowNext_new()
{
   var iCurrent = 0;
   var iLast = 0;

   for (var i=0; i < document.getElementsByTagName("TBODY").length; i++)
   {
      if (document.getElementById("INNOVATION" + i))
      {
         iLast = i;
         if (document.getElementById("INNOVATION" + i).style.display == "")
         {
            iCurrent = i;
         }
      }
   }
   if (iCurrent < iLast)
   {
      Show_new(iCurrent + 1);
   }
}

function ShowPrev_new()
{
   var iCurrent = 0;
   var iLast = 0;

   for (var i=0; i < document.getElementsByTagName("TBODY").length; i++)
   {
      if (document.getElementById("INNOVATION" + i))
      {
         iLast = i;
         if (document.getElementById("INNOVATION" + i).style.display == "")
         {
            iCurrent = i;
         }
      }
   }
   if (iCurrent > 0)
   {
      Show_new(iCurrent - 1);
   }
}
