if (top != self) top.location.replace(self.location.href);
window.onload = load;
window.defaultStatus = 'OblivionCC: Character Creation';
//---------------------------------------------------------------
// OblivionCC v5.0
// Coded by Matt Ditter (March 14, 2006)
// Feel free to copy/modify this code as long as credit is given.
//---------------------------------------------------------------
var x, f, t, chk, d = document, l = location,
 gN = new Array('Male','Female'),
 rN = new Array('Nord','Redguard','Breton','Imperial','Orc','Wood Elf (Bosmer)',
  'High Elf (Altmer)','Dark Elf (Dunmer)','Khajiit','Argonian'),
 sN = new Array('Apprentice','Atronach','Lady','Lord','Lover','Mage','Ritual','Serpent',
  'Shadow','Steed','Thief','Tower','Warrior'),
 spN = new Array('Combat','Magic','Stealth'),
 skN = new Array('Alchemy','Mysticism','Conjuration','Destruction','Alteration','Restoration',
  'Illusion','Mercantile','Speechcraft','Security','Sneak','Marksman','Athletics','Acrobatics',
  'Light Armor','Blunt','Blade','Hand to Hand','Block','Armorer','Heavy Armor'),
 skN2 = new Array('Athletics','Blunt','Blade','Hand to Hand','Block','Armorer','Heavy Armor',
  'Alchemy','Mysticism','Conjuration','Destruction','Alteration','Restoration','Illusion',
  'Mercantile','Speechcraft','Security','Sneak','Marksman','Acrobatics','Light Armor'),
 aN = new Array('Intelligence','Willpower','Personality','Agility','Speed','Strength',
  'Endurance','Luck');
function load() {
 f = d.forms[0];
 if (location.search == '') { spI(); return; }
 var stats = location.search;
 stats = stats.substring(1,stats.length);
 var s = new Array();
 s = stats.split('&');
 if (s.length < 15) { spI(); return; }
 else if (s.length > 15) {
  while (s.length > 15) s.splice(0,1);
 }
 for (x=2; x<15; x++) {
  if (s[x].length > 2) { spI(); return; }
 }
// ? Name & Class & M/F & Race & Sign & Spcl & Attr(2) & Skills(7)
// ? Joe  & Mama  & 0/1 & 0-9  & 0-12 & 0-2  &  0-6    &  0-20
 f.nm.value = s[0].replace(/%20/gi,' ').replace(/[<%&]/g,'');
 f.cl.value = s[1].replace(/%20/gi,' ').replace(/[<%&]/g,'');
 f.sx.selectedIndex = s[2];
 f.r[s[3]].checked = 1;
 f.s[s[4]].checked = 1;
 f.sp.selectedIndex = s[5];
 f.a[s[6]].checked = 1;
 f.a[s[7]].checked = 1;
 for (x=8; x<15; x++) {
  f.sk[s[x]].checked = 1;
 }
 var down = 1505;
 var na = navigator.userAgent;
 if (na.indexOf('Opera') > -1) down = 1495;
 spI();
 setTimeout('stats()',100);
 setTimeout('window.scrollTo(0,'+down+')',150);
}
function save() {
 var v = 0, s = new Array(), noName = (f.sx.selectedIndex == 0) ? 'John' : 'Jane';
 s[0] = f.nm.value.replace(/[<%&]/g,'');
 s[1] = f.cl.value.replace(/[<%&]/g,'');
 s[2] = f.sx.selectedIndex;
 if (s[0] == '') s[0] = noName+' Doe';
 if (s[1] == '') s[1] = 'Heroic Ex-con';
 for (x=0; x<10; x++) { if (f.r[x].checked) s[3] = x; }
 for (x=0; x<13; x++) { if (f.s[x].checked) s[4] = x; }
 s[5] = f.sp.selectedIndex;
 for (x=0; x<8; x++) {
  if (f.a[x].checked) { s[6+v] = x; v = 1; }
 }
 v = 0;
 for (x=0; x<21; x++) {
  if (f.sk[x].checked) { s[8+v] = x; v += 1; }
 }
 var win = top.window.location;
 var q = '&';
 if (l.search != '') {
  chk = l.search;
  var c = new Array();
  chk = chk.substring(1,chk.length);
  c = chk.split('&');
  if (c.length > 14) {
   c.length -= 15;
   if (c.length == 0) q = '?';
   else q = '?'+c.join('&')+'&';
   win.href = l.protocol + '//' + l.host + l.pathname + q + s.join('&');
  }
  else win.href = win.href + q + s.join('&');
 }
 else win.href = win.href + '?' + s.join('&');
}
function g(z1,z2,z3) {
 var o = d.getElementById(z1);
 if (!z2) return o;
 (z3) ? o.innerHTML += z2 : o.innerHTML = z2;
}
// push() function fix for IE 5, courtesy of QuirksMode.org
function Array_push() {
 var A_p = 0;
 for (A_p=0; A_p<arguments.length; A_p++) {
  this[this.length] = arguments[A_p]
 }
 return this.length
}
if (typeof Array.prototype.push == 'undefined') {
 Array.prototype.push = Array_push;
}
function rI() {
 var t, race, gndr;
 var gV = f.sx.selectedIndex;
 for (x=0; x<f.r.length; x++) {
  if (f.r[x].checked) race = rN[x];
 }
 gndr = gN[gV];
 if (race.indexOf('Elf') > -1) {
  gndr = gN[gV] +' '+ race.substring(race.length-7,race.length-1);
  race = race.substring(0,race.length-9);
 }
 t = '<div class="bHL">'+race+' ('+gndr+')</div>Attributes (base 40):<div>';
 switch(race) {
  case 'Nord':
   t += (gV == 1) ? '+10 Strength<br />-10 Intelligence and Personality</div>'
    : '+10 Strength and Endurance<br />-10 Intelligence, Willpower, and Personality</div>';
   t += 'Skills:<div>+10 Blade, Blunt, and Heavy Armor<br />+5 Armorer, Block, and '+
    'Restoration</div>Traits:<div>- Frost Damage (daily: 50 pt. Touch)<br />- Shield '+
    '(daily: 30 pt. Self for 1 min.)<br />- Resist Frost (constant: 50 pt. Self)</div>';
   break;
  case 'Redguard':
   t += (gV == 1) ? '+10 Endurance<br />-10 Intelligence and Willpower</div>'
    : '+10 Strength and Endurance<br />-10 Intelligence, Willpower, and Personality</div>';
   t += 'Skills:<div>+10 Blade, Blunt, and Athletics<br />+5 Light Armor, Heavy Armor, '+
    'and Mercantile</div>Traits:<div>- Adrenaline Rush (daily: Fortify Agi/Spd/Str/End 50'+
    ' pt.,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fortify Health 25 pt. for 1 min.)<br />- '+
    'Resist Poison/Disease (constant: 75 pt. Self)</div>';
   break;
  case 'Breton':
   t += (gV == 1) ? '+10 Intelligence and Willpower<br />-10 Strength, Agility, and Endurance</div>'
    : '+10 Intelligence and Willpower<br />-10 Agility, Speed, and Endurance</div>';
   t += 'Skills:<div>+10 Conjuration, Mysticism, and Restoration<br />+5 Alchemy, '+
    'Alteration, and Illusion</div>Traits:<br /><div>- Fortify Maximum Magicka (constant:'+
    ' 50 pt. Self)<br />- Resist Magicka (constant: 50 pt. Self)<br />- Shield (daily: 50'+
    ' pt. Self for 1 min.)</div>';
   break;
  case 'Imperial':
   t += (gV == 1) ? '+10 Personality<br />-10 Agility and Speed</div>'
    : '+10 Personality<br />-10 Agility and Willpower</div>';
   t += 'Skills:<div>+10 Mercantile and Speechcraft<br />+5 Blade, Blunt, Hand to Hand, '+
    'and Heavy Armor</div>Traits:<br /><div>- Absorb Fatigue (daily: 100 pt. Touch)<br />'+
    '- Charm (daily: 30 pt. Touch)</div>';
   break;
  case 'Orc':
   t += (gV == 1) ? '+10 Endurance<br />+5 Strength and Willpower<br />-15 Personality'+
    '<br />-10 Speed, -5 Agility</div>' : '+10 Willpower and Endurance<br />+5 Strength'+
    '<br />-10 Intelligence, Speed, and Personality<br />-5 Agility</div>';
   t += 'Skills:<div>+10 Armorer, Block, Blunt, and Heavy Armor<br />+5 Hand to '+
    'Hand</div>Traits:<br /><div class="noBtm">- Berserk (daily: Fortify Health 20 pt., '+
    'Fatigue 200 pt.,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Strength 50 pt., Drain Agility '+
    '100 pt. for 1 min.)<br />- Resist Magicka (constant: 25 pt. Self)</div>';
   break;
  case 'Wood Elf':
   t += (gV == 1) ? '+10 Agility and Speed<br />-10 Strength, Willpower, and Endurance</div>'
    : '+10 Agility and Speed<br />-10 Strength, Willpower, and Personality</div>';
   t += 'Skills:<div>+10 Alchemy, Marksman, and Sneak<br />+5 Acrobatics, '+
    'Alteration, and Light Armor</div>Traits:<br /><div>- Command '+
    'Creature (daily: 20 pt. Touch for 1 min.)<br />- Resist Disease (constant: 75 pt. '+
    'Self)</div>';
   break;
  case 'High Elf':
   t += (gV == 1) ? '+10 Intelligence<br />-10 Strength and Endurance</div>'
    : '+10 Intelligence<br />-10 Strength and Speed</div>';
   t += 'Skills:<div>+10 Alteration, Destruction, and Mysticism<br />+5 '+
    'Alchemy, Conjuration, and Illusion</div>Traits:<br /><div>- '+
    'Fortify Maximum Magicka (constant: 100 pt. Self)<br />- Resist Disease (constant: 75 '+
    'pt. Self)<br />- Weakness to Fire, Frost, and Shock (constant: 25 pt. Self)</div>';
   break;
  case 'Dark Elf':
   t += (gV == 1) ? '+10 Speed<br />-10 Willpower and Endurance</div>'
    : '+10 Speed<br />-10 Willpower and Personality</div>';
   t += 'Skills:<div>+10 Blade and Destruction<br />+5 Athletics, Blunt, '+
    'Light Armor, Marksman, and Mysticism</div>Traits:<br /><div>- '+
    'Summon Ghost (daily: for 1 min.)<br />- Resist Fire (constant: 75 pt. Self)</div>';
   break;
  case 'Khajiit':
   t += (gV == 1) ? '+10 Agility<br />-10 Willpower and Strength</div>'
    : '+10 Agility<br />-10 Willpower and Endurance</div>';
   t += 'Skills:<div>+10 Acrobatics and Hand to Hand<br />+5 Athletics, '+
    'Blade, Light Armor, Security, and Sneak</div>Traits:<br /><div>- '+
    'Demoralize (daily: 100 pt. Touch)<br />- Night-Eye (for 30 sec.)</div>';
   break;
  case 'Argonian':
   t += (gV == 1) ? '+10 Intelligence<br />-10 Endurance and Personality</div>'
    : '+10 Agility and Speed<br />-10 Willpower, Endurance, and Personality</div>';
   t += 'Skills:<div>+10 Athletics and Security<br />+5 Alchemy, Blade, Hand '+
    'to Hand, Illusion, and Mysticism</div>Traits:<br /><div>- Resist '+
    'Disease (constant: 75 pt. Self)<br />- Resist Poison (constant: 100 pt. Self)<br />'+
    '- Water Breathing (constant)</div>';
   break;
 }
 g('rI',t);
}
function sI() {
 var t, sign;
 for (x=0; x<f.s.length; x++) {
  if (f.s[x].checked) sign = sN[x];
 }
 t = '<div class="bHL">The '+sign+'</div>';
 switch(sign) {
  case 'Apprentice':
   t += 'Bonus:<div>- Fortify Maximum Magicka '+
    '(constant: 100 pt. Self)</div>Drawback:<div>- '+
    'Weakness to Magicka (constant: 100 pt. Self)</div>';
   break;
  case 'Atronach':
   t += 'Bonus:<div>- Fortify Maximum Magicka '+
    '(constant: 150 pt. Self)</div>Ability:<div>- '+
    'Spell Absorption (constant: 50 pt. Self)</div>Drawback:<div class="noBtm">- '+
    'Magicka regeneration disabled</div>';
   break;
  case 'Lady':
   t += 'Bonus:<div>- Fortify Willpower (constant: 10 pt. '+
    'Self)<br />- Fortify Endurance (constant: 10 pt. Self)</div>';
   break;
  case 'Lord':
   t += 'Ability:<div>- '+
    'Restore Health (6 pt. Self for 15 sec.)</div>Drawback:<div>- '+
    'Weakness to Fire (constant: 25 pt. Self)</div>';
   break;
  case 'Lover':
   t += 'Ability:<div>- '+
    'Paralyze (daily: Touch for 10 sec.)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'+
    'and lose 120 Fatigue</div>';
   break;
  case 'Mage':
   t += 'Bonus:<div>- Fortify Maximum Magicka '+
    '(constant: 50 pt. Self)</div>';
   break;
  case 'Ritual':
   t += 'Ability:<div>- '+
    'Restore Health (daily: 200 pt. Self)<br />- Turn Undead (100 pt. Touch '+
    'for 30 sec.)</div>';
   break;
  case 'Serpent':
   t += 'Ability:<div>- Serpent (daily: effects '+
    'below):<div>-- Damage Health (3 pt. Touch for 20 sec.)<br />-- '+
    'Dispel (90 pt. Self)<br />-- Cure Poison (Self)<br />-- Damage Fatigue (100 '+
    'pt. Self)</div></div>';
   break;
  case 'Shadow':
   t += 'Ability:<div>- '+
    'Invisibility (daily: Self for 1 min.)</div>';
   break;
  case 'Steed':
   t += 'Bonus:<div>- Fortify Speed (constant: '+
    '20 pt. Self)</div>';
   break;
  case 'Thief':
   t += 'Bonus:<div>- Fortify Agility (constant: '+
    '10 pt. Self)<br />- Fortify Speed (constant: 10 pt. Self)<br />- Fortify '+
    'Luck (constant: 10 pt. Self)</div>';
   break;
  case 'Tower':
   t += 'Ability:<div>- '+
    'Open Average Lock (daily)<br />- Reflect Damage (5 pt. Self for 2 min.)</div>';
   break;
  case 'Warrior':
   t += 'Bonus:<div>- Fortify Strength (constant: '+
    '10 pt. Self)<br />- Fortify Endurance (constant: 10 pt. Self)</div>';
   break;
 }
 g('sI',t);
}
function spI() {
 rI();
 sI();
 var t = 'Skills: ', s = f.sp.selectedIndex * 7;
 for (x=s; x<(s+7); x++) {
  t += (x == (s+6)) ? 'and '+skN2[x]+'.' : skN2[x]+', ';
 }
 g('spI',t);
}
function aI(z) {
 var aD = new Array('determines magicka (along with race/sign bonuses).','determines magicka regeneration and influences fatigue.',
  'influences the disposition of NPCs.','influences bow damage, fatigue, and chance to dodge.',
  'influences movement speed and jumping height.','determines encumbrance and influences melee damage and fatigue.',
  'determines health and influences fatigue.','provides skill bonuses and influences the outcome of many actions.');
 g('asI','<strong>'+aN[z]+'</strong> '+aD[z]);
}
function skI(z) {
 var skD = new Array('perks include increased ingredient effects and efficiency.',
  'spells include telekinesis, soul trap, dispel, and detection.','allows the summoning of weapons, armor, and creatures.',
  'spells include elemental attacks and stat/equipment damage.','spells include magic armor, (un)burden, water walking, and unlock.',
  'spells include heal, cure, fortify skill/attribute, and stat absorb.','spells include invisibility, silence, paralyze, and charm.',
  'perks include unrestricted selling and shop fund investment.','perks include disposition bonuses and easier persuasion of NPCs.',
  'perks include easier picking of locks.','perks include melee/bow damage multipliers and armor piercing.',
  'perks include a zoom feature, knockdown, and paralyzation.','perks include fatigue regeneration while running.',
  'perks include a rolling dodge and water jump.','perks include unencumbrance and a 50% bonus to armor rating.',
  'perks include power attacks with a chance to disarm/knockdown/paralyze.','','',
  'perks include reduced damage and a chance to knockback or disarm.',
  'perks include magic item repair and a raised repair limit (125%).','perks include reduced degradation and unencumbrance.');
 skD[16] = skD[15];
 skD[17] = skD[15];
 g('asI','<strong>'+skN[z]+'</strong> '+skD[z]);
}
function stats() {
 var name = f.nm.value, clss = f.cl.value, gV = f.sx.selectedIndex,
  race, sign, t, y, ab = new Array(), wk = new Array(), stat3 = new Array(0,0,0), maxLv = 0,
  skChk = 0, aChk = 0, spi = f.sp.selectedIndex, sp = spN[spi], myA = new Array(), mySk = new Array(),
  a = new Array(), sk = new Array(), aL = new Array(), skL = new Array(), qcR, qcS, raw, rawAb;
 for (x=0; x<aN.length; x++) { aL[x] = aN[x]; }
 for (x=0; x<skN.length; x++) { skL[x] = skN[x]; }
 // Set base stats
 for (x=0; x<21; x++) sk[x] = 5;
 for (x=0; x<8; x++) a[x] = 40;
 a[7] = 50;
 for (x=0; x<f.r.length; x++) {
  if (f.r[x].checked) { race = rN[x]; qcR = x; }
 }
 switch(race) {
  case 'Nord':
   a[5] += 10; a[0] -= 10; a[2] -= 10;
   if (gV == 0) { a[6] += 10; a[1] -= 10; }
   sk[16] += 10; sk[15] += 10; sk[20] += 10; sk[19] += 5; sk[18] += 5; sk[5] += 5;
   ab.push('<li>Frost Damage (daily: 50 pt. Touch)</li>');
   ab.push('<li>Shield (daily: 30 pt. Self for 1 min.)</li>');
   ab.push('<li>Resist Frost (constant: 50 pt. Self)</li>');
   break;
  case 'Redguard':
   a[6] += 10; a[0] -= 10; a[1] -= 10;
   if (gV == 0) { a[5] += 10; a[2] -= 10; }
   sk[16] += 10; sk[15] += 10; sk[12] += 10; sk[14] += 5; sk[20] += 5; sk[7] += 5;
   ab.push('<li>Adrenaline Rush (daily: effects below for 1 min.):<br />'+
    '&nbsp;-- Fortify Agility, Speed, Strength, and Endurance (50 pt. Self)<br />'+
    '&nbsp;-- Fortify Health (25 pt. Self)</li>');
   ab.push('<li>Resist Poison (constant: 75 pt. Self)</li>');
   ab.push('<li>Resist Disease (constant: 75 pt. Self)</li>');
   break;
  case 'Breton':
   a[0] += 10; a[1] += 10; a[3] -= 10; a[6] -= 10;
   (gV == 0) ? a[4] -= 10 : a[5] -= 10;
   sk[2] += 10; sk[1] += 10; sk[5] += 10; sk[0] += 5; sk[4] += 5; sk[6] += 5;
   stat3[1] += 50;
   ab.push('<li>Resist Magicka (constant: 50 pt. Self)</li>');
   ab.push('<li>Shield (daily: 50 pt. Self for 1 min.)</li>');
   break;
  case 'Imperial':
   a[2] += 10; a[3] -= 10;
   (gV == 0) ? a[1] -= 10 : a[4] -= 10;
   sk[7] += 10; sk[8] += 10; sk[16] += 5; sk[15] += 5; sk[17] += 5; sk[20] += 5;
   ab.push('<li>Absorb Fatigue (daily: 100 pt. Touch)</li>');
   ab.push('<li>Charm (daily: 30 pt. Touch)</li>');
   break;
  case 'Orc':
   a[6] += 10; a[5] += 5; a[4] -= 10; a[3] -= 5;
   if (gV == 0) { a[1] += 10; a[0] -= 10; a[2] -= 10; }
   else { a[1] += 5; a[2] -= 15; }
   sk[19] += 10; sk[18] += 10; sk[15] += 10; sk[20] += 10; sk[17] += 5;
   ab.push('<li>Berserk (daily: effects below for 1 min.):<br />'+
    '&nbsp;-- Fortify Health (25 pt. Self)<br />'+
    '&nbsp;-- Fortify Fatigue (200 pt. Self)<br />'+
    '&nbsp;-- Fortify Strength (50 pt. Self)<br />'+
    '&nbsp;-- Drain Agility (100 pt. Self)</li>');
   ab.push('<li>Resist Magicka (constant: 25 pt. Self)</li>');
   break;
  case 'Wood Elf (Bosmer)':
   a[3] += 10; a[4] += 10; a[5] -= 10; a[1] -= 10;
   (gV == 0) ? a[2] -= 10 : a[6] -= 10;
   sk[0] += 10; sk[11] += 10; sk[10] += 10; sk[13] += 5; sk[4] += 5; sk[14] += 5;
   ab.push('<li>Command Creature (daily: 20 pt. Touch for 1 min.)</li>');
   ab.push('<li>Resist Disease (constant: 75 pt. Self)</li>');
   break;
  case 'High Elf (Altmer)':
   a[0] += 10; a[5] -= 10;
   (gV == 0) ? a[4] -= 10 : a[6] -= 10;
   sk[4] += 10; sk[3] += 10; sk[1] += 10; sk[0] += 5; sk[2] += 5; sk[6] += 5;
   stat3[1] += 100;
   wk.push('<li>Weakness to Fire, Frost, and Shock (constant: 25 pt. Self)</li>');
   ab.push('<li>Resist Disease (constant: 75 pt. Self)</li>');
   break;
  case 'Dark Elf (Dunmer)':
   a[4] += 10; a[1] -= 10;
   (gV == 0) ? a[2] -= 10 : a[6] -= 10;
   sk[16] += 10; sk[3] += 10; sk[12] += 5; sk[15] += 5; sk[14] += 5; sk[11] += 5; sk[1] += 5;
   ab.push('<li>Summon Ghost (daily: for 1 min.)</li>');
   ab.push('<li>Resist Fire (constant: 75 pt. Self)</li>');
   break;
  case 'Khajiit':
   a[3] += 10; a[1] -= 10;
   (gV == 0) ? a[6] -= 10 : a[5] -= 10;
   sk[13] += 10; sk[17] += 10; sk[12] += 5; sk[16] += 5; sk[14] += 5; sk[9] += 5; sk[10] += 5;
   ab.push('<li>Demoralize (daily: 100 pt. Touch)</li>');
   ab.push('<li>Night-Eye (for 30 sec.)</li>');
   break;
  case 'Argonian':
   a[6] -= 10; a[2] -= 10;
   if (gV == 0) { a[3] += 10; a[4] += 10; a[1] -= 10; }
   else a[0] += 10;
   sk[12] += 10; sk[9] += 10; sk[0] += 5; sk[16] += 5; sk[17] += 5; sk[6] += 5; sk[1] += 5;
   ab.push('<li>Resist Disease (constant: 75 pt. Self)</li>');
   ab.push('<li>Resist Poison (constant: 100 pt. Self)</li>');
   ab.push('<li>Water Breathing (constant)</li>');
   break;
 }
/*       SKILLS
   Alch = 0   Mark = 11
   Myst = 1   Athl = 12
   Conj = 2   Acro = 13
   Dest = 3   LArm = 14
   Altr = 4   Blnt = 15
   Rest = 5   Bld  = 16
   Illu = 6   H2H  = 17
   Merc = 7   Blck = 18
   Spch = 8   Armr = 19
   Secu = 9   HArm = 20
   Snk  = 10  */
 for (x=0; x<f.s.length; x++) {
  if (f.s[x].checked) { sign = sN[x]; qcS = x; }
 }
 switch(sign) {
  case 'Apprentice':
   stat3[1] += 100;
   wk.push('<li>Weakness to Magicka (constant: 100 pt. Self)</li>');
   break;
  case 'Atronach':
   stat3[1] += 150;
   ab.push('<li>Spell Absorption (constant: 50 pt. Self)</li>');
   wk.push('<li>Magicka regeneration disabled</li>');
   break;
  case 'Lady':
   a[1] += 10;
   a[6] += 10;
   break;
  case 'Lord':
   ab.push('<li>Restore Health (6 pt. Self for 15 sec.)</li>');
   wk.push('<li>Weakness to Fire (constant: 25 pt. Self)</li>');
   break;
  case 'Lover':
   ab.push('<li>Paralyze (daily: Touch for 10 sec.) and lose 120 Fatigue</li>');
   break;
  case 'Mage':
   stat3[1] += 50;
   break;
  case 'Ritual':
   ab.push('<li>Restore Health (daily: 200 pt. Self)</li>');
   ab.push('<li>Turn Undead (100 pt. Touch for 30 sec.)</li>');
   break;
  case 'Serpent':
   ab.push('<li>Serpent (daily: effects below):<br />'+
    '&nbsp;-- Damage Health (3 pt. Touch for 20 sec.)<br />'+
    '&nbsp;-- Dispel (90 pt. Self)<br />'+
    '&nbsp;-- Cure Poison (Self)<br />'+
    '&nbsp;-- Damage Fatigue (100 pt. Self)</li>');
   break;
  case 'Shadow':
   ab.push('<li>Invisibility (daily: Self for 1 min.)</li>');
   break;
  case 'Steed':
   a[4] += 20;
   break;
  case 'Thief':
   a[3] += 10;
   a[4] += 10;
   a[7] += 10;
   break;
  case 'Tower':
   ab.push('<li>Open Average Lock (daily)</li>');
   ab.push('<li>Reflect Damage (5 pt. Self for 2 min.)</li>');
   break;
  case 'Warrior':
   a[5] += 10;
   a[6] += 10;
   break;
 }
/*   ATTRIBUTES
   0: Int  4: Spd
   1: Wil  5: Str
   2: Per  6: End
   3: Agi  7: Lck */
 if (spi == 0) y = 14;
 else if (spi == 1) y = 0;
 else y = 7;
 for (x=y; x<y+7; x++) {
  sk[x] += 5;
 if (x == 12) { sk[x] -= 5; sk[14] += 5; }
 else if (x == 14) { sk[x] -= 5; sk[12] += 5; }
 }
 for (x=0; x<f.a.length; x++) {
  if (f.a[x].checked) {
   myA.push(aN[x]);
   a[x] += 5;
   aChk += 1;
   aL[x] = '<span class="red">'+aL[x]+'</span>';
 } }
 if (aChk != 2) { alert('Please choose two attributes.'); return; }
 for (x=0; x<f.sk.length; x++) {
  if (f.sk[x].checked) {
   mySk.push(skN[x]);
   sk[x] += 20;
   maxLv += sk[x];
   skChk += 1;
   skL[x] = '<span class="red">'+skL[x]+'</span>';
 } }
 if (skChk != 7) { alert('Please choose seven major skills.'); return; }
 name = name.replace(/%20/gi,' ').replace(/[<%&]/g,'');
 clss = clss.replace(/%20/gi,' ').replace(/[<%&]/g,'');
 var noName = (gV == 0) ? 'John' : 'Jane';
 if (!name) name = noName+' Doe';
 if (!clss) clss = 'Heroic Ex-con';
 // Calculate Health/Magicka/Fatigue
 stat3[0] += a[6]*2;
 stat3[1] += a[0]*2;
 stat3[2] += a[5] + a[6] + a[1] + a[3];
 // Calculate Max Level: ((700 - maxLv) / 10) + 1
 maxLv = 71 - (maxLv / 10);
 raw = 'Name/Class: '+name+' / '+clss+'\nRace/Gender: '+race+' / '+gN[gV]+'\nBirthsign: '+
  'The '+sign+'\nSpecialization: '+sp+'\nAttributes: '+myA.join(", ")+'\nMajor Skills: '+
  mySk[0]+', '+mySk[1]+', '+mySk[2]+', '+mySk[3]+',\n   '+mySk[4]+', '+mySk[5]+', '+mySk[6]+
  '\n\nHealth/Magicka/Fatigue: '+stat3[0]+'/'+stat3[1]+'/'+stat3[2]+'\nMax Level: '+maxLv+
  '\nEncumbrance: '+a[5]*5+'\n\n';
 if (ab.length > 0) raw += 'Abilities:\n';
 for (x=0; x<ab.length; x++) {
  rawAb = ab[x].substring(4,ab[x].length-5);
  raw += '  - '+rawAb.replace(/<br ../gi,'\n  ')+'\n';
 }
 if (wk.length > 0) raw += '\nDrawbacks:\n';
 for (x=0; x<wk.length; x++) { raw += '  - '+wk[x].substring(4,wk[x].length-5)+'\n'; }
 raw += '\nStats:\n  INTELLIGENCE-'+a[0]+': Alchemy-'+sk[0]+', Mysticism-'+sk[1]+', '+
  'Conjuration-'+sk[2]+'\n  WILLPOWER-'+a[1]+': Destruction-'+sk[3]+', Alteration-'+sk[4]+
  ', Restoration-'+sk[5]+'\n  PERSONALITY-'+a[2]+': Illusion-'+sk[6]+', Mercantile-'+sk[7]+
  ', Speechcraft-'+sk[8]+'\n  AGILITY-'+a[3]+': Security-'+sk[9]+', Sneak-'+sk[10]+', '+
  'Marksman-'+sk[11]+'\n  SPEED-'+a[4]+': Athletics-'+sk[12]+', Acrobatics-'+sk[13]+
  ', Light Armor-'+sk[14]+'\n  STRENGTH-'+a[5]+': Blunt-'+sk[15]+', Blade-'+sk[16]+', '+
  'Hand to Hand-'+sk[17]+'\n  ENDURANCE-'+a[6]+': Block-'+sk[18]+', Armorer-'+sk[19]+', '+
  'Heavy Armor-'+sk[20]+'\n  LUCK-'+a[7];
 t = '<div id="qc" class="box" nowrap="nowrap"><strong>Quick Change:</strong>'+
  '&nbsp;&nbsp;&nbsp;Gender: <select name="qG" onchange="qc()"><option>Male</option>'+
  '<option>Female</option></select>&nbsp;&nbsp;&nbsp;Race: <select name="qR" '+
  'onchange="qc()"><option>Nord</option><option>Redguard</option><option>Breton</option>'+
  '<option>Imperial</option><option>Orc</option><option>Wood Elf</option><option>High '+
  'Elf</option><option>Dark Elf</option><option>Khajiit</option><option>Argonian</option>'+
  '</select>&nbsp;&nbsp;&nbsp;Sign: <select name="qS" onchange="qc()"><option>Apprentice'+
  '</option><option>Atronach</option><option>Lady</option><option>Lord</option><option>'+
  'Lover</option><option>Mage</option><option>Ritual</option><option>Serpent</option>'+
  '<option>Shadow</option><option>Steed</option><option>Thief</option><option>Tower'+
  '</option><option>Warrior</option></select>&nbsp;&nbsp;&nbsp;Spec: <select name="qSp" '+
  'onchange="qc()"><option>Combat</option><option>Magic</option><option>Stealth</option>'+
  '</select></div><br /><br /><h1>General Information:</h1><table cellpadding="0" '+
  'cellspacing="0" style="margin-bottom:35px"><tr><td style="width:140px">Max '+
  'Level: '+maxLv+' <span onmouseover="maxIn()" onmouseout="maxOut()" '+
  'style="font-size:11px;color:#900">(?)</span><br /><div id="max" class="box"><div '+
  'style="margin:0 0 6px 0"><span class="b" style="text-decoration:underline">Max Level'+
  '</span> <span style="font-size:11px">(45.5 - 53.5)</span></div>This is the level your '+
  'character will be when all seven major skills are maxed at 100. Higher levels can be '+
  'reached with quest rewards and exploits. Note that maxing all eight attributes will '+
  'prevent further leveling, with no known workaround.</div>Encumbrance: '+a[5]*5+'<br />'+
  '<br />Health: '+stat3[0]+'<br />Magicka: '+stat3[1]+'<br />Fatigue: '+stat3[2]+'<br />'+
  '<br /><a href="javascript:save()">Save URL</a><br /></td><td '+
  'style="width:117px;text-align:right">Name:<br />Class:<br />Gender:<br />Race:<br />'+
  'Birthsign:<br />Specialization:<br />Attributes:<br />Major Skills:<br /><br /></td>'+
  '<td style="padding-left:8px">'+name+'<br />'+clss+'<br />'+gN[gV]+'<br />'+race+
  '<br />The '+sign+'<br />'+sp+'<br />'+myA.join(", ")+'<br />'+mySk[0]+', '+mySk[1]+', '+
  mySk[2]+', '+mySk[3]+',<br />'+mySk[4]+', '+mySk[5]+', '+mySk[6]+'</td></tr><tr><td '+
  'colspan="3">';
 if (ab.length > 0) t += '<br />Abilities:<ul>'+ab.join('')+'</ul>';
 if (wk.length > 0) t += '<br />Drawbacks:<ul>'+wk.join('')+'</ul>';
 t += '</td></tr><tr><td colspan="3"><h1 style="margin-top:32px">'+
  'Attribute/Skill Stats:</h1><table id="stats" class="over" cellpadding="0" '+
  'cellspacing="0"><tr><td class="hl" colspan="2" style="padding-bottom:15px">'+aL[0]+': '+
  a[0]+'</td><td class="hl" colspan="2">'+aL[1]+': '+a[1]+'</td><td class="hl" '+
  'colspan="2">'+aL[2]+': '+a[2]+'</td><td class="hl" colspan="2">'+aL[3]+': '+a[3]+'</td>'+
  '</tr><tr><td class="rt">'+skL[0]+':<br />'+skL[1]+':<br />'+skL[2]+':</td>'+
  '<td class="lt">'+sk[0]+'<br />'+sk[1]+'<br />'+sk[2]+'</td><td class="rt">'+skL[3]+
  ':<br />'+skL[4]+':<br />'+skL[5]+':</td><td class="lt">'+sk[3]+'<br />'+sk[4]+'<br />'+
  sk[5]+'</td><td class="rt">'+skL[6]+':<br />'+skL[7]+':<br />'+skL[8]+':</td><td '+
  'class="lt">'+sk[6]+'<br />'+sk[7]+'<br />'+sk[8]+'</td><td class="rt">'+skL[9]+':<br />'+
  skL[10]+':<br />'+skL[11]+':</td><td class="lt">'+sk[9]+'<br />'+sk[10]+'<br />'+sk[11]+
  '</td></tr><tr id="bRow"><td class="hl" colspan="2">'+aL[4]+': '+a[4]+'</td><td '+
  'class="hl" colspan="2">'+aL[5]+': '+a[5]+'</td><td class="hl" colspan="2">'+aL[6]+': '+
  a[6]+'</td><td class="hl" colspan="2">'+aL[7]+': '+a[7]+'</td></tr><tr><td class="rt">'+
  skL[12]+':<br />'+skL[13]+':<br />'+skL[14]+':</td><td class="lt">'+sk[12]+'<br />'+
  sk[13]+'<br />'+sk[14]+'</td><td class="rt">'+skL[15]+':<br />'+skL[16]+':<br />'+
  skL[17]+':</td><td class="lt">'+sk[15]+'<br />'+sk[16]+'<br />'+sk[17]+'</td><td '+
  'class="rt">'+skL[18]+':<br />'+skL[19]+':<br />'+skL[20]+':</td><td class="lt">'+sk[18]+
  '<br />'+sk[19]+'<br />'+sk[20]+'</td></tr></table></td></tr><tr><td colspan="3"><h1 '+
  'style="margin-top:12px">Raw Text:</h1><div style="margin-left:35px"><textarea id="raw" '+
  'cols="82" rows="10">'+raw+'</textarea><div style="font-size:11px;color:#543">To print: '+
  "<a href=\"javascript:document.getElementById('raw').select()\">Select the raw text</a>,"+
  ' then copy/paste it into a text editor.</div></td></tr></table>';
 g('results',t);
 f.qG.selectedIndex = gV;
 f.qR.selectedIndex = qcR;
 f.qS.selectedIndex = qcS;
 f.qSp.selectedIndex = f.sp.selectedIndex;
}
function maxIn() { g('max').style.display = "block"; }
function maxOut() { g('max').style.display = "none"; }
function qc() {
 f.sx.selectedIndex = f.qG.selectedIndex;
 for (x=0; x<13; x++) {
  if (x == f.qS.selectedIndex) f.s[x].checked = 1;
  if (x < 10) { if (x == f.qR.selectedIndex) f.r[x].checked = 1; }
 }
 f.sp.selectedIndex = f.qSp.selectedIndex;
 spI(); stats();
}