/****************************************************
Translation from class and spec to token and back
****************************************************/

//  class => spec => urltoken
classtokens = new Object();

classtokens['deathknight'] = {'blood': '1', 'frost': '2', 'unholy': '3'};
classtokens['druid'] = {'balance': '4', 'feralcombat': '5', 'restoration': '6', 'feraltank': 'v'};
classtokens['hunter'] = {'beastmastery': '7', 'marksmanship': '8', 'survival': '9'};
classtokens['mage'] = {'arcane': 'a', 'fire': 'b', 'frost': 'c'};
classtokens['paladin'] = {'holy': 'd', 'protection': 'e', 'retribution': 'f'};
classtokens['priest'] = {'discipline': 'g', 'holy': 'h', 'shadow': 'i'};
classtokens['rogue'] = {'assassination': 'j', 'combat': 'k', 'subtlety': 'l'};
classtokens['shaman'] = {'elemental': 'm', 'enhancement': 'n', 'restoration': 'o'};
classtokens['warlock'] = {'affliction': 'p', 'demonology': 'q', 'destruction': 'r'};
classtokens['warrior'] = {'arms': 's', 'fury': 't', 'protection': 'u'};

// urltoken => 'class spec'
urltokens = new Object();

urltokens['1'] = 'deathknight blood';
urltokens['2'] = 'deathknight frost';
urltokens['3'] = 'deathknight unholy';
urltokens['4'] = 'druid balance';
urltokens['5'] = 'druid feralcombat';
urltokens['6'] = 'druid restoration';
urltokens['7'] = 'hunter beastmastery';
urltokens['8'] = 'hunter marksmanship';
urltokens['9'] = 'hunter survival';
urltokens['a'] = 'mage arcane';
urltokens['b'] = 'mage fire';
urltokens['c'] = 'mage frost';
urltokens['d'] = 'paladin holy';
urltokens['e'] = 'paladin protection';
urltokens['f'] = 'paladin retribution';
urltokens['g'] = 'priest discipline';
urltokens['h'] = 'priest holy';
urltokens['i'] = 'priest shadow';
urltokens['j'] = 'rogue assassination';
urltokens['k'] = 'rogue combat';
urltokens['l'] = 'rogue subtlety';
urltokens['m'] = 'shaman elemental';
urltokens['n'] = 'shaman enhancement';
urltokens['o'] = 'shaman restoration';
urltokens['p'] = 'warlock affliction';
urltokens['q'] = 'warlock demonology';
urltokens['r'] = 'warlock destruction';
urltokens['s'] = 'warrior arms';
urltokens['t'] = 'warrior fury';
urltokens['u'] = 'warrior protection';
urltokens['v'] = 'druid feraltank';


// urltoken => 'spec'
urltoken2name = new Object();

urltoken2name['1'] = 'Blood';
urltoken2name['2'] = 'Frost';
urltoken2name['3'] = 'Unholy';
urltoken2name['4'] = 'Balance';
urltoken2name['5'] = 'Feral Combat';
urltoken2name['6'] = 'Restoration';
urltoken2name['7'] = 'Beast Mastery';
urltoken2name['8'] = 'Marksmanship';
urltoken2name['9'] = 'Survival';
urltoken2name['a'] = 'Arcane';
urltoken2name['b'] = 'Fire';
urltoken2name['c'] = 'Frost';
urltoken2name['d'] = 'Holy';
urltoken2name['e'] = 'Protection';
urltoken2name['f'] = 'Retribution';
urltoken2name['g'] = 'Discipline';
urltoken2name['h'] = 'Holy';
urltoken2name['i'] = 'Shadow';
urltoken2name['j'] = 'Assassination';
urltoken2name['k'] = 'Combat';
urltoken2name['l'] = 'Subtlety';
urltoken2name['m'] = 'Elemental';
urltoken2name['n'] = 'Enhancement';
urltoken2name['o'] = 'Restoration';
urltoken2name['p'] = 'Affliction';
urltoken2name['q'] = 'Demonology';
urltoken2name['r'] = 'Destruction';
urltoken2name['s'] = 'Arms';
urltoken2name['t'] = 'Fury';
urltoken2name['u'] = 'Protection';
urltoken2name['v'] = 'Feral Tank';

// urltoken => 'spec main role'
urltoken2role = new Object();

urltoken2role['1'] = 'Tank';
urltoken2role['2'] = 'Melee DPS';
urltoken2role['3'] = 'Melee DPS';
urltoken2role['4'] = 'Ranged DPS';
urltoken2role['5'] = 'Melee DPS';
urltoken2role['6'] = 'Healer';
urltoken2role['7'] = 'Ranged DPS';
urltoken2role['8'] = 'Ranged DPS';
urltoken2role['9'] = 'Ranged DPS';
urltoken2role['a'] = 'Ranged DPS';
urltoken2role['b'] = 'Ranged DPS';
urltoken2role['c'] = 'Ranged DPS';
urltoken2role['d'] = 'Healer';
urltoken2role['e'] = 'Tank';
urltoken2role['f'] = 'Melee DPS';
urltoken2role['g'] = 'Healer';
urltoken2role['h'] = 'Healer';
urltoken2role['i'] = 'Ranged DPS';
urltoken2role['j'] = 'Melee DPS';
urltoken2role['k'] = 'Melee DPS';
urltoken2role['l'] = 'Melee DPS';
urltoken2role['m'] = 'Ranged DPS';
urltoken2role['n'] = 'Melee DPS';
urltoken2role['o'] = 'Healer';
urltoken2role['p'] = 'Ranged DPS';
urltoken2role['q'] = 'Ranged DPS';
urltoken2role['r'] = 'Ranged DPS';
urltoken2role['s'] = 'Melee DPS';
urltoken2role['t'] = 'Melee DPS';
urltoken2role['u'] = 'Tank';
urltoken2role['v'] = 'Tank';

// categorytooltip2providers =>  [list of provider specs] 
categorytooltip2providers = new Object();


//urltoken2categories['1'][] = category name.
urltoken2categories = new Object();


// GENERATED STUFF


categorytooltip2providers['#tooltip0'] = ['hunter beastmastery', 'shaman elemental', 'shaman enhancement', 'shaman restoration', 'mage arcane', 'mage fire', 'mage frost'];
categorytooltip2providers['#tooltip1'] = ['warrior arms', 'warrior fury', 'warrior protection', 'deathknight blood', 'deathknight frost', 'deathknight unholy', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'shaman elemental', 'shaman enhancement', 'shaman restoration'];
categorytooltip2providers['#tooltip2'] = ['paladin holy', 'paladin protection', 'paladin retribution', 'shaman elemental', 'shaman enhancement', 'shaman restoration'];
categorytooltip2providers['#tooltip3'] = ['deathknight blood', 'paladin holy', 'paladin protection', 'paladin retribution', 'hunter marksmanship', 'shaman enhancement'];
categorytooltip2providers['#tooltip4'] = ['shaman elemental', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'rogue subtlety', 'druid feralcombat', 'druid feraltank', 'warrior fury'];
categorytooltip2providers['#tooltip5'] = ['mage arcane', 'paladin retribution', 'hunter beastmastery'];
categorytooltip2providers['#tooltip6'] = ['mage arcane', 'mage fire', 'mage frost', 'warlock affliction', 'warlock demonology', 'warlock destruction'];
categorytooltip2providers['#tooltip7'] = ['paladin holy', 'paladin protection', 'paladin retribution', 'warlock affliction', 'warlock demonology', 'warlock destruction', 'shaman elemental', 'shaman enhancement', 'shaman restoration'];
categorytooltip2providers['#tooltip8'] = ['hunter survival', 'deathknight frost', 'shaman elemental', 'shaman enhancement', 'shaman restoration'];
categorytooltip2providers['#tooltip9'] = ['shaman restoration', 'priest holy', 'priest discipline'];
categorytooltip2providers['#tooltip10'] = ['paladin holy', 'paladin protection', 'paladin retribution', 'shaman elemental', 'shaman enhancement', 'shaman restoration'];
categorytooltip2providers['#tooltip11'] = ['paladin retribution', 'mage frost', 'druid restoration', 'warlock destruction', 'priest shadow'];
categorytooltip2providers['#tooltip12'] = ['priest shadow', 'druid balance', 'shaman elemental', 'shaman enhancement', 'shaman restoration'];
categorytooltip2providers['#tooltip13'] = ['mage arcane', 'mage fire', 'mage frost', 'warlock demonology', 'shaman elemental', 'shaman enhancement', 'shaman restoration', 'shaman elemental'];
categorytooltip2providers['#tooltip14'] = ['hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'shaman elemental', 'shaman enhancement', 'shaman restoration', 'paladin holy', 'paladin protection', 'paladin retribution', 'priest discipline', 'priest holy', 'priest shadow'];
categorytooltip2providers['#tooltip15'] = ['warlock affliction', 'warlock demonology', 'warlock destruction', 'warrior arms', 'warrior fury', 'warrior protection', 'priest discipline', 'priest holy', 'priest shadow', 'hunter beastmastery'];
categorytooltip2providers['#tooltip16'] = ['paladin holy', 'paladin protection', 'paladin retribution', 'hunter beastmastery', 'druid balance', 'druid feralcombat', 'druid restoration', 'druid feraltank'];
categorytooltip2providers['#tooltip17'] = ['rogue assassination', 'rogue combat', 'rogue subtlety', 'druid balance', 'druid feralcombat', 'druid restoration', 'druid feraltank', 'warrior arms', 'warrior fury', 'warrior protection', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival'];
categorytooltip2providers['#tooltip18'] = ['shaman elemental', 'shaman enhancement', 'shaman restoration', 'deathknight blood', 'deathknight frost', 'deathknight unholy', 'druid feraltank', 'paladin protection', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'warrior arms', 'warrior fury', 'warrior protection', 'rogue subtlety'];
categorytooltip2providers['#tooltip19'] = ['warrior arms', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'rogue subtlety', 'druid feralcombat', 'druid feraltank', 'hunter beastmastery'];
categorytooltip2providers['#tooltip20'] = ['warlock affliction', 'warlock demonology', 'warlock destruction', 'hunter beastmastery', 'rogue assassination', 'rogue combat', 'rogue subtlety', 'deathknight blood', 'deathknight frost', 'deathknight unholy', 'mage arcane', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival'];
categorytooltip2providers['#tooltip21'] = ['warrior fury', 'priest shadow', 'warlock demonology', 'hunter beastmastery', 'warrior arms', 'mage frost', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'rogue assassination', 'rogue combat', 'rogue subtlety'];
categorytooltip2providers['#tooltip22'] = ['warlock affliction', 'warlock demonology', 'warlock destruction', 'druid feraltank', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'warrior arms', 'warrior fury', 'warrior protection', 'deathknight blood', 'paladin protection'];
categorytooltip2providers['#tooltip23'] = ['hunter beastmastery', 'warrior arms', 'deathknight frost', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'rogue combat'];
categorytooltip2providers['#tooltip24'] = ['mage fire', 'warlock affliction', 'warlock demonology', 'warlock destruction'];
categorytooltip2providers['#tooltip25'] = ['warlock affliction', 'warlock demonology', 'warlock destruction', 'druid balance', 'deathknight unholy', 'hunter beastmastery', 'hunter marksmanship', 'hunter survival', 'hunter beastmastery', 'rogue assassination'];



urltoken2categories['7'] = ['category42', 'category25', 'category44', 'category17', 'category47', 'category26', 'category23', 'category1', 'category45', 'category9', 'category9', 'category33', 'category33', 'category21', 'category21', 'category46', 'category3', 'category3', 'category13', 'category13'];
urltoken2categories['m'] = ['category42', 'category25', 'category32', 'category44', 'category39', 'category4', 'category48', 'category10', 'category14', 'category14', 'category47', 'category45'];
urltoken2categories['n'] = ['category42', 'category25', 'category32', 'category7', 'category39', 'category4', 'category48', 'category10', 'category14', 'category47', 'category45'];
urltoken2categories['o'] = ['category42', 'category25', 'category32', 'category39', 'category4', 'category49', 'category48', 'category10', 'category14', 'category47', 'category45'];
urltoken2categories['a'] = ['category42', 'category17', 'category43', 'category14', 'category33'];
urltoken2categories['b'] = ['category42', 'category43', 'category14', 'category12'];
urltoken2categories['c'] = ['category42', 'category43', 'category34', 'category14', 'category21'];
urltoken2categories['s'] = ['category25', 'category26', 'category1', 'category45', 'category9', 'category21', 'category46', 'category3'];
urltoken2categories['t'] = ['category25', 'category44', 'category26', 'category1', 'category45', 'category21', 'category46'];
urltoken2categories['u'] = ['category25', 'category26', 'category1', 'category45', 'category46'];
urltoken2categories['1'] = ['category25', 'category7', 'category45', 'category33', 'category46'];
urltoken2categories['2'] = ['category25', 'category4', 'category45', 'category33', 'category3'];
urltoken2categories['3'] = ['category25', 'category45', 'category33', 'category13'];
urltoken2categories['8'] = ['category25', 'category7', 'category44', 'category47', 'category1', 'category45', 'category9', 'category33', 'category21', 'category46', 'category3', 'category13'];
urltoken2categories['9'] = ['category25', 'category44', 'category4', 'category47', 'category1', 'category45', 'category9', 'category33', 'category21', 'category46', 'category3', 'category13'];
urltoken2categories['d'] = ['category32', 'category7', 'category39', 'category48', 'category47', 'category23'];
urltoken2categories['e'] = ['category32', 'category7', 'category39', 'category48', 'category47', 'category23', 'category45', 'category46'];
urltoken2categories['f'] = ['category32', 'category7', 'category17', 'category39', 'category48', 'category34', 'category47', 'category23'];
urltoken2categories['l'] = ['category44', 'category1', 'category45', 'category9', 'category33', 'category21'];
urltoken2categories['5'] = ['category44', 'category23', 'category1', 'category9'];
urltoken2categories['v'] = ['category44', 'category23', 'category1', 'category45', 'category9', 'category46'];
urltoken2categories['p'] = ['category43', 'category39', 'category26', 'category33', 'category46', 'category12', 'category13'];
urltoken2categories['q'] = ['category43', 'category39', 'category14', 'category26', 'category33', 'category21', 'category46', 'category12', 'category13'];
urltoken2categories['r'] = ['category43', 'category39', 'category34', 'category26', 'category33', 'category46', 'category12', 'category13'];
urltoken2categories['h'] = ['category49', 'category47', 'category26'];
urltoken2categories['g'] = ['category49', 'category47', 'category26'];
urltoken2categories['6'] = ['category34', 'category23', 'category1'];
urltoken2categories['i'] = ['category34', 'category10', 'category47', 'category26', 'category21'];
urltoken2categories['4'] = ['category10', 'category23', 'category1', 'category13'];
urltoken2categories['j'] = ['category1', 'category33', 'category21', 'category13'];
urltoken2categories['k'] = ['category1', 'category33', 'category21', 'category3'];

