﻿function MarketSegmentProductSeriesMouseOver (ProductSeriesId) 
{
    document.getElementById("divOverLeft" + ProductSeriesId).style.visibility = 'visible';
    document.getElementById("divOverRight" + ProductSeriesId).style.visibility = 'visible';
    document.getElementById("icon" + ProductSeriesId).style.border = 'solid 2px #E83C38';
    document.getElementById("icon" + ProductSeriesId).style.margin = '0 0 0 0';
    
}

function MarketSegmentProductSeriesMouseOut (ProductSeriesId) 
{
    document.getElementById("divOverLeft" + ProductSeriesId).style.visibility = 'hidden'; 
    document.getElementById("divOverRight" + ProductSeriesId).style.visibility = 'hidden'; 
    document.getElementById("icon" + ProductSeriesId).style.border = 'solid 2px white';
    document.getElementById("icon" + ProductSeriesId).style.margin = '0px 0px 0px 0px';
    
}


function RotateImage(ImageCount)
{
    rotateImage (1,ImageCount)
    
    setTimeout('rotateImage(1,1)', 5000)
    setTimeout('rotateImage(1,1)', 5000)
    setTimeout('rotateImage(1,1)', 5000)
    setTimeout('rotateImage(1,1)', 5000)  
}

function PageLoad()
{
    
}

function wait(delay){
string="pauseforalert("+delay+");";
setTimeout(string,delay);
}

function rotateImage(index,count,delay)
{
    //alert("hey"+index+" "+count);
    
    
    
    for(var i=0;i<count;i++)
    {
        
        if (i==index)
        {
            document.getElementById("divRotatingImage" + i).style.visibility = 'visible'; 
        }
        else
        {
            document.getElementById("divRotatingImage" + i).style.visibility = 'hidden';
        }
        
    }
    
    index++;
    if (index>=count)
    {
        index=0;
    }
    
    setTimeout ('rotateImage('+index+','+count+','+delay+')',delay);
    
}
