//  homepage.js : A .js file defining homepage
//    in the Miscellaneous Files project.
//
//  MICROSOFT CONFIDENTIAL.  DO NOT DISTRIBUTE.
//  Copyright © 2008 Microsoft Corp.  All rights reserved.

function setGenreImage(genreId)
{
    if (document.getElementById)
    {
        var image = document.getElementById('gotGameGenreImage');
        var imgName = 'other';
        
        if (image) 
        {
            // switch based on the genre id that came in
            switch (genreId) 
            {
                case 1:
                    imgName = 'action';
                    break;
                case 2:
                    imgName = 'cardandboard';
                    break;
                case 3:
                    imgName = 'coinopClassics';
                    break;
                case 4: 
                    imgName = 'educational';
                    break;
                case 5:
                    imgName = 'family';
                    break;
                case 6:
                    imgName = 'fighting';
                    break;
                case 7:
                    imgName = 'music';
                    break;
                case 8:
                    imgName = 'other';
                    break;
                case 9:
                    imgName = 'platformer';
                    break;
                case 10:
                    imgName = 'puzzleAndTrivia';
                    break;
                case 11:
                    imgName = 'racingAndFlying';
                    break;
                case 12:
                    imgName = 'rolePlaying';
                    break;
                case 13:
                    imgName = 'shooter';
                    break;
                case 14:
                    imgName = 'sportsAndRecreation';
                    break;
                case 15:
                    imgName = 'strategyAndSimulation';
                    break;
            }
            
            // now set the image
            image.style.backgroundImage = 'url(/assets/images/home/home/cco_home_gamegenre_' + imgName + '.jpg)';
        }
    }
}
