CREDITS_SCROLL_RATE_REWIND = -160;
CREDITS_SCROLL_RATE_PAUSE = 0;
CREDITS_SCROLL_RATE_PLAY = 40;
CREDITS_SCROLL_RATE_FASTFORWARD = 160;

CREDITS_SCROLL_RATE = 40;
CREDITS_FADE_RATE = 0.4;
--CREDITS_MAX_ALPHA = 0.7;
NUM_CREDITS_ART_TEXTURES_WIDE = 4;
NUM_CREDITS_ART_TEXTURES_HIGH = 2;
CACHE_WAIT_TIME = 0.5;

CreditsArtInfo = {};
CreditsArtInfo[1] = {};
CreditsArtInfo[1][1] = { file="Acrest", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][2] = { file="Tauren", w=640, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][3] = { file="Centaur", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][4] = { file="HordeBanner", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][5] = { file="Naga", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.4 };
CreditsArtInfo[1][6] = { file="NightsHollow", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][7] = { file="Ocean", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][8] = { file="Orc", w=256, h=512, offsetx=192, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][9] = { file="Strangle", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][10] = { file="Troll", w=640, h=512, offsetx=0, offsety=0, maxAlpha=0.6 };
CreditsArtInfo[1][11] = { file="TrollBanner", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][12] = { file="Zepplin", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][13] = { file="drake", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][14] = { file="DwarfCrest", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][15] = { file="Dwarfhunter", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.6 };
CreditsArtInfo[1][16] = { file="gargoyle", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][17] = { file="NightelfCrest", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][18] = { file="Nightelves", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][19] = { file="Orccamp", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][20] = { file="DragonIsles", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][21] = { file="tauren_hunter", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][22] = { file="Darnasis", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][23] = { file="ForsakenCrest", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][24] = { file="ShootingDwarf", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.6 };
CreditsArtInfo[1][25] = { file="Thunderbluff", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][26] = { file="tolbarad", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][27] = { file="TaurenCrest", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][28] = { file="razorfen", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][29] = { file="swampofsorrows", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][30] = { file="Desolace", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][31] = { file="SouthernDesolace", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][32] = { file="undeadcrest", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[1][33] = { file="TirisfallGlades", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][34] = { file="ThousandNeedles", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][35] = { file="Elemental", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][36] = { file="Badlands", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][37] = { file="BlastedLands", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][38] = { file="Fellwood", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[1][39] = { file="OrcShield", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[2] = {};
CreditsArtInfo[2][1] = { file="BD", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][2] = { file="Wrathguard", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][3] = { file="WOW_BloodElves", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][4] = { file="ZulAman", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][5] = { file="Arakkoa", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][6] = { file="Hellfire_Concept", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][7] = { file="Auchindoun", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][8] = { file="Auchindoun_1H", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][9] = { file="1H_Axes", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][10] = { file="BE_Building", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][11] = { file="BE_Building_Two", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][12] = { file="BladesEdge", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][13] = { file="BladesEdgeMountains", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][14] = { file="Blood_Elf_One", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][15] = { file="The_Broken", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][16] = { file="BloodElf_Icon", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][17] = { file="BloodElf_Priestess_Master", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][18] = { file="BloodElf_Two", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][19] = { file="BloodElf_Webimage", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][20] = { file="Clefthoof_3_horn", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][21] = { file="1000px-Coilfangpaintover", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][22] = { file="Dark_Portal", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][23] = { file="Ddraenei_Start", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][24] = { file="Demon_Chamber", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][25] = { file="Draenei", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][26] = { file="Draenei_Character", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][27] = { file="Draenei_CityInt", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][28] = { file="Draenei_Crest", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][29] = { file="Draenei_Female", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][30] = { file="Draenei_Paladin", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][31] = { file="Draenei_Three", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][32] = { file="Draenei_Two", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][33] = { file="Dranei_F_Hair", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][34] = { file="Dranei_M_Hair", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][35] = { file="Elekk", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][36] = { file="Female_BloodElf", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][37] = { file="FungalGiant", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][38] = { file="Arcane_Golem", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][39] = { file="Human_Mage", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][40] = { file="HumanMale", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][41] = { file="Hunter", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][42] = { file="Illidan", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][43] = { file="Illidan_Concept", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][44] = { file="Outland", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][45] = { file="MilitaryOrcBoss", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][46] = { file="Naaru_CrashSite", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][47] = { file="Naaru_Ship", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][48] = { file="Ogre_Lord", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][49] = { file="Shivan", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][50] = { file="L60ETC", w=512, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][51] = { file="RazorfenDowns", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][52] = { file="RidingDrake", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][53] = { file="Shattrath", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][54] = { file="Tier4_Druid", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][55] = { file="Silvermoon_Day", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][56] = { file="Silvermoon_Tower", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][57] = { file="Tempest_Keep", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][58] = { file="Terrokkar", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[2][59] = { file="Photos", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3] = {};
CreditsArtInfo[3][1] = { file="Azol0", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][2] = { file="BoreanTun", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][3] = { file="Axe2Drak", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][4] = { file="BoreanTundra2", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][5] = { file="AxeDrak", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][6] = { file="CinSnow01TGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][7] = { file="ColdarraNexTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][8] = { file="CrystalSong1TGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][9] = { file="DalaranDomeTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][10] = { file="DalaranTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][11] = { file="DeathKnight20", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][12] = { file="DeathKnight30", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][13] = { file="DeathKnight40", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][14] = { file="DeathKnight50", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][15] = { file="EpicSwordTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][16] = { file="Frostwyrm01TGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][17] = { file="GateTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][18] = { file="Geist_ConTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][19] = { file="Grizzlemaw2TGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][20] = { file="GrizzlemawTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][21] = { file="GrizzlyHills2TGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][22] = { file="GrizzlyHills3TGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][23] = { file="GrizzlyHillsTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][24] = { file="HallwayTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][25] = { file="Hunter01TGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][26] = { file="ID_TownTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][27] = { file="IronDwarfTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][28] = { file="Knife1HTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][29] = { file="LeatherSunwellTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][30] = { file="LichKingTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][31] = { file="Mace1HTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][32] = { file="MaginnisTGA", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][33] = { file="Magnataur", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][34] = { file="Magnataur2", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][35] = { file="Mergul01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][36] = { file="NerubianArch", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][37] = { file="NexusFire", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][38] = { file="NorthGiant", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][39] = { file="NorthrendComp", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][40] = { file="OrcTower", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][41] = { file="Penguin", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][42] = { file="Powersource", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][43] = { file="Revanent", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][44] = { file="Revanent2", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][45] = { file="Rocket", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][46] = { file="Sanctification", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][47] = { file="SeaVrykul", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][48] = { file="Shol", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][49] = { file="Shol02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][50] = { file="ShovelTusk", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][51] = { file="Sword_1H", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][52] = { file="Titan1", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][53] = { file="TrollFacade", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][54] = { file="Turtle01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][55] = { file="Tuskar House", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][56] = { file="TuskarGuy", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][57] = { file="TuskarGuy2", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][58] = { file="Uld_Hall", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][59] = { file="ValgardeDragon", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][60] = { file="ValgardeForge", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][61] = { file="Vamp", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][62] = { file="VryFem", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][63] = { file="VrykDoor", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][64] = { file="Vrykul_Undead", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][65] = { file="VrykulBuild", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][66] = { file="VrykulFace", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][67] = { file="Zombie", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[3][68] = { file="ZulDrak", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4] = { path="CATACLYSM\\" };
CreditsArtInfo[4][1] = {  file="Goblin_Physique_M03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][2] = {  file="Greymane City Block01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][3] = {  file="Greymane City Damage01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][4] = {  file="Goblin Trade Prince Mansion01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][5] = {  file="LesserElemental_earth_02a", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][6] = {  file="Greymane City Map01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][7] = {  file="Camel_01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][8] = {  file="Goblin Bank02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][9] = {  file="Chimera01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][10] = { file="Greymane Graveyard01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][11] = { file="LesserElemental_fire_03b", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][12] = { file="Goblin Buildings05_color", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][13] = { file="seahorse_00", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][14] = { file="greymane_lighthouse_003", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][15] = { file="Shapeless_color01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][16] = { file="Goblin Freeway01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][17] = { file="Skardyn02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][18] = { file="gus_tornforest", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][19] = { file="Greymane_Manor01_CR", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][20] = { file="Tier11_Warrior01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][21] = { file="Goblin Buildings06", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][22] = { file="Goblin Port02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][23] = { file="Tier11_Hunter01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][24] = { file="worgencastle_wendy1_copy", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][25] = { file="Worgen_Caravan_04", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][26] = { file="Worgen_Human_M03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][27] = { file="Twilights Hammer Wall02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][28] = { file="Twilght Ascendant01a", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][29] = { file="TwilightHighlands_WildhammerDwarfBurialCairn", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][30] = { file="Twilights Hammer Ramparts01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][31] = { file="Twilights Hammer Buildings07", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][32] = { file="DB_Turtledragon", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][33] = { file="Goblin_Inn01a", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][34] = { file="Kezan Garage01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][35] = { file="Kezan Map01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][36] = { file="Kezan Swing Bridge01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][37] = { file="Kezan Toxic Town01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][38] = { file="Pygmy Drum01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][39] = { file="Maelstrom01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][40] = { file="Tol_Vir_architecture03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][41] = { file="UldumTolVir1", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][42] = { file="Uldum Sphinx01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][43] = { file="UldumMummyArea1", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][44] = { file="UldumTomb1", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][45] = { file="White Widows01a", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][46] = { file="Wildhammer_Buildings01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][47] = { file="Wildhammer Long House01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][48] = { file="Wildhammer_Roost01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][49] = { file="Firelands gorge01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][50] = { file="Gilneas Lamps01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][51] = { file="GPlatner_Worgen03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][52] = { file="Greymane_Manor02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][53] = { file="Goblin Slum Buildings01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][54] = { file="Tol Barad07", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][55] = { file="Tol Barad02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][56] = { file="Tol Barad Details01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[4][57] = { file="Tol Barad Gun01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5] = { path="Pandaria\\" };
CreditsArtInfo[5][1] = {  file="Mogu_Monk_Concept", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][2] = {  file="MoguRaid_InteriorColor", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][3] = {  file="Mushan_concept", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][4] = {  file="SkyTown", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][5] = {  file="interior_temple_color", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][6] = {  file="Library03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][7] = {  file="Bamboo House01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][8] = {  file="challenge_rogue", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][9] = {  file="Chiming Tower01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][10] = { file="foodog_002b", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][11] = { file="challenge_rogue_notused", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][12] = { file="crane01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][13] = { file="Dragon Bridge01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][14] = { file="Tier13_Shaman01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][15] = { file="dragon_bridge", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][16] = { file="DruidChallenge", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][17] = { file="East Temple Ext01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][18] = { file="ENV_004_BambooForest", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][19] = { file="Rabbit", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][20] = { file="easttemple_paintover2a", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][21] = { file="ENV_015_ValleyEternal01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][22] = { file="Female_Pandaren", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][23] = { file="foodog_creature", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][24] = { file="forestsprite02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][25] = { file="Goat", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][26] = { file="horde Pandaren", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][27] = { file="koi_03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][28] = { file="Landscape_02Color", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][29] = { file="Library02", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][30] = { file="koiman01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][31] = { file="LionMan", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][32] = { file="Shadow Pan01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][33] = { file="Mantid Knife_colour01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][34] = { file="Tier14_DeathKnight01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][35] = { file="Mantid_Raid_Interior", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][36] = { file="Pandaren Flying Mount03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][37] = { file="Mantis_01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][38] = { file="Mogu_MainTemple", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][39] = { file="Mantis_03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][40] = { file="MoguRaid_Dungeon", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][41] = { file="Pandaren Monastery01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][42] = { file="easttemple_paintover1", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][43] = { file="Monkey_01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][44] = { file="Mountains_Colors", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][45] = { file="panda01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][46] = { file="Sha_misc_02a", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][47] = { file="PandaClass1", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][48] = { file="Tier14_Monk01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][49] = { file="Pandaren Clans01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][50] = { file="Mantid Tree Fortress03", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][51] = { file="Pandaren Lamp Post01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][52] = { file="Mogu_BossConcept_New", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][53] = { file="Panderan_Brewery", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][54] = { file="Panderan_StreetMart", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][55] = { file="Mantis_04", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][56] = { file="Quilin_concept", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][57] = { file="Tier13_Priest01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][58] = { file="Salamander", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][59] = { file="Pandaren Turtle01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][60] = { file="Sha Brethren01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][61] = { file="Panderan_lantern_house", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][62] = { file="Sha_01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][63] = { file="Shadow Pan Sanctum01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][64] = { file="Tier13_DeathKnight01a", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][65] = { file="Panderan_GhostBrewery", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][66] = { file="Tier14_Rogue01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][67] = { file="trip_turtle_city", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][68] = { file="waterdragon_01", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][69] = { file="Pandaria", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[5][70] = { file="YaunkaConcept1", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[6] = { };
CreditsArtInfo[6][1] = { file="Orc", w=256, h=512, offsetx=192, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[6][2] = { file="Orccamp", w=768, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };
CreditsArtInfo[6][3] = { file="OrcShield", w=512, h=512, offsetx=128, offsety=0, maxAlpha=0.5 };
CreditsArtInfo[6][4] = { file="MilitaryOrcBoss", w=1024, h=512, offsetx=0, offsety=0, maxAlpha=0.7 };

function CreditsFrame_OnShow(self)
	CreditsFrame_Update(self);
end

function CreditsFrame_Update(self)
	CreditsLogo:SetTexture(EXPANSION_LOGOS[CreditsFrame.creditsType-1]);

	CreditsFrame_SetSpeed(CREDITS_SCROLL_RATE_PLAY);
	CreditsScrollFrame:SetVerticalScroll(0);
	CreditsScrollFrame.scroll = 0;
	CreditsScrollFrame.scrollMax = CreditsScrollFrame:GetVerticalScrollRange() + 768;
	self.artCount = getn(CreditsArtInfo[CreditsFrame.creditsType]);
	self.currentArt = 0;
	self.fadingIn = nil;
	self.fadingOut = nil;
	self.cacheArt = 0;
	self.cacheIndex = 1;
	self.cacheElapsed = 0;
	self.alphaIn = 0;
	self.alphaOut = 0;
	
	for i=1, NUM_CREDITS_ART_TEXTURES_HIGH, 1 do
		for j=1, NUM_CREDITS_ART_TEXTURES_WIDE, 1 do
			_G["CreditsArtAlt"..(((i - 1) * NUM_CREDITS_ART_TEXTURES_WIDE) + j)]:Hide();
			_G["CreditsArtCache"..(((i - 1) * NUM_CREDITS_ART_TEXTURES_WIDE) + j)]:SetAlpha(0.005);
		end
	end

	CreditsFrame_CacheTextures(self, 1);

	-- Set Credits Text
	CreditsText:SetText(GetCreditsText(CreditsFrame.creditsType));

	-- Set Switch Button Text
	local creditsType = CreditsFrame.creditsType;
	if ( creditsType < CreditsFrame.maxCreditsType ) then
		CreditsFrameSwitchButton1:Show();
		CreditsFrameSwitchButton1:SetText(CREDITS_TITLES[creditsType + 1]);
		CreditsFrameSwitchButton1:SetID(creditsType + 1);
	else
		CreditsFrameSwitchButton1:Hide();
	end
	if ( creditsType > 1 ) then
		CreditsFrameSwitchButton2:Show();
		CreditsFrameSwitchButton2:SetText(CREDITS_TITLES[creditsType - 1]);
		CreditsFrameSwitchButton2:SetID(creditsType - 1);
	else
		CreditsFrameSwitchButton2:Hide();
	end
end

function CreditsFrame_Switch(self, buttonID)
	PlaySound("igMainMenuOptionCheckBoxOff");
	CreditsFrame.creditsType = buttonID;
	CreditsFrame_Update(self);
	SetGlueScreen("credits");	
end

function CreditsFrame_Show(self, returnTo)
	self.returnTo = returnTo;
	SetGlueScreen("credits");
end

function CreditsFrame_SetArtTextures(self,textureName, index, alpha)
	local info = CreditsArtInfo[self.creditsType][index];
	if ( not info ) then
		return;
	end
	local path = CreditsArtInfo[self.creditsType].path;
	if ( not path ) then
		path = "";
	end

	local texture;
	local texIndex = 1;
	local width, height;
	_G[textureName..1]:SetPoint("TOPLEFT", "CreditsFrame", "TOPLEFT", info.offsetx, info.offsety - 128);
	for i=1, NUM_CREDITS_ART_TEXTURES_HIGH, 1 do
		height = info.h - ((i - 1) * 256);
		if ( height > 256 ) then
			height = 256;
		end
		for j=1, NUM_CREDITS_ART_TEXTURES_WIDE, 1 do
			texture = _G[textureName..(((i - 1) * NUM_CREDITS_ART_TEXTURES_WIDE) + j)];
			width = info.w - ((j - 1) * 256);
			if ( width > 256 ) then
				width = 256;
			end
			if ( (width <= 0) or (height <= 0) ) then
				texture:Hide();
			else
				texture:SetTexture("Interface\\Glues\\Credits\\"..path..info.file..texIndex);
				texture:SetWidth(width);
				texture:SetHeight(height);
				texture:SetAlpha(alpha);
				texture:Show();
				texIndex = texIndex + 1;
			end
		end
	end
end

function CreditsFrame_CacheTextures(self, index)
	self.cacheArt = index;
	self.cacheIndex = 1;
	self.cacheElapsed = 0;

	local info = CreditsArtInfo[CreditsFrame.creditsType][index];
	if ( not info ) then
		return;
	end
	local path = CreditsArtInfo[CreditsFrame.creditsType].path;
	if ( not path ) then
		path = "";
	end

	CreditsArtCache1:SetTexture("Interface\\Glues\\Credits\\"..path..info.file.."1");
end

function CreditsFrame_UpdateCache(self)
	if ( self.cacheIndex >= (NUM_CREDITS_ART_TEXTURES_WIDE * NUM_CREDITS_ART_TEXTURES_HIGH) ) then
		return;
	end
	if ( self.cacheElapsed < CACHE_WAIT_TIME ) then
		return;
	end

	self.cacheElapsed = self.cacheElapsed - CACHE_WAIT_TIME;
	self.cacheIndex = self.cacheIndex + 1;

	local info = CreditsArtInfo[self.creditsType][self.cacheArt];
	if ( not info ) then
		return;
	end
	local path = CreditsArtInfo[self.creditsType].path;
	if ( not path ) then
		path = "";
	end

	_G["CreditsArtCache"..self.cacheIndex]:SetTexture("Interface\\Glues\\Credits\\"..path..info.file..self.cacheIndex);
end

function CreditsFrame_UpdateArt(self, index, elapsed)
	if (index > (self.currentArt + 1) ) then
		return;
	end

	if ( index == self.currentArt ) then
		if ( self.fadingOut ) then
			self.alphaOut = max(self.alphaOut - (CREDITS_FADE_RATE * elapsed), 0);

			for i=1, NUM_CREDITS_ART_TEXTURES_HIGH, 1 do
				for j=1, NUM_CREDITS_ART_TEXTURES_WIDE, 1 do
					_G["CreditsArtAlt"..(((i - 1) * NUM_CREDITS_ART_TEXTURES_WIDE) + j)]:SetAlpha(self.alphaOut);
				end
			end

			if ( self.alphaOut <= 0 ) then
				self.fadingOut = nil;
				CreditsFrame_CacheTextures(self, self.currentArt + 1);
			end
		end

		if ( self.fadingIn ) then
			local maxAlpha = CreditsArtInfo[self.creditsType][self.currentArt].maxAlpha;
			self.alphaIn = min(self.alphaIn + (CREDITS_FADE_RATE * elapsed), maxAlpha);
			for i=1, NUM_CREDITS_ART_TEXTURES_HIGH, 1 do
				for j=1, NUM_CREDITS_ART_TEXTURES_WIDE, 1 do
					_G["CreditsArt"..(((i - 1) * NUM_CREDITS_ART_TEXTURES_WIDE) + j)]:SetAlpha(self.alphaIn);
				end
			end

			if ( self.alphaIn >= maxAlpha ) then
				self.fadingIn = nil;
			end
		end
		return;
	end

	if ( self.currentArt > 0 ) then
		self.fadingOut = 1;
		self.alphaOut = CreditsArtInfo[self.creditsType][self.currentArt].maxAlpha;
		CreditsFrame_SetArtTextures(self, "CreditsArtAlt", self.currentArt, self.alphaOut);
	end

	self.fadingIn = 1;
	self.alphaIn = 0;
	self.currentArt = index;
	CreditsFrame_SetArtTextures(self, "CreditsArt", index, self.alphaIn);
end

function CreditsFrame_SetSpeed(speed)
	PlaySound("igMainMenuOptionCheckBoxOff");
	CREDITS_SCROLL_RATE = speed;
	CreditsFrame_UpdateSpeedButtons();
end

function CreditsFrame_SetSpeedButtonActive(button, active)
	if ( active ) then
		button:LockHighlight();
		button:GetHighlightTexture():SetAlpha(0.5);
	else
		button:UnlockHighlight();
		button:GetHighlightTexture():SetAlpha(1);
	end
end

function CreditsFrame_UpdateSpeedButtons()
	local activeButton;
	if ( CREDITS_SCROLL_RATE == CREDITS_SCROLL_RATE_REWIND ) then
		activeButton = CreditsFrameRewindButton;
	elseif ( CREDITS_SCROLL_RATE == CREDITS_SCROLL_RATE_PAUSE ) then
		activeButton = CreditsFramePauseButton;
	elseif ( CREDITS_SCROLL_RATE == CREDITS_SCROLL_RATE_PLAY ) then
		activeButton = CreditsFramePlayButton;
	elseif ( CREDITS_SCROLL_RATE == CREDITS_SCROLL_RATE_FASTFORWARD ) then
		activeButton = CreditsFrameFastForwardButton;
	end
	
	CreditsFrame_SetSpeedButtonActive(CreditsFrameRewindButton, activeButton == CreditsFrameRewindButton);
	CreditsFrame_SetSpeedButtonActive(CreditsFramePauseButton, activeButton ==  CreditsFramePauseButton);
	CreditsFrame_SetSpeedButtonActive(CreditsFramePlayButton, activeButton == CreditsFramePlayButton);
	CreditsFrame_SetSpeedButtonActive(CreditsFrameFastForwardButton, activeButton == CreditsFrameFastForwardButton);
end

function CreditsFrame_OnUpdate(self, elapsed)
	if ( not CreditsScrollFrame:IsShown() ) then
		return;
	end

	CreditsScrollFrame.scroll = CreditsScrollFrame.scroll + (CREDITS_SCROLL_RATE * elapsed);
	CreditsScrollFrame.scroll = max(CreditsScrollFrame.scroll, 1);
	
	if ( CreditsScrollFrame.scroll >= CreditsScrollFrame.scrollMax ) then
		SetGlueScreen(self.returnTo);
		return;
	end

	self.cacheElapsed = self.cacheElapsed + elapsed;
	CreditsFrame_UpdateCache(self);

	CreditsScrollFrame:SetVerticalScroll(CreditsScrollFrame.scroll);
	CreditsFrame_UpdateArt(self, ceil(self.artCount * (CreditsScrollFrame.scroll / CreditsScrollFrame.scrollMax)), elapsed);
end

function CreditsFrame_OnScrollRangeChanged()
	CreditsScrollFrame.scrollMax = CreditsScrollFrame:GetVerticalScrollRange() + 768;
end

function CreditsFrame_OnKeyDown(key)
	if ( key == "ESCAPE" ) then
		SetGlueScreen(CreditsFrame.returnTo);
	elseif ( key == "PRINTSCREEN" ) then
		Screenshot();
	end
end