<!--

if (document.images) {
  var menuImg = new Array;
  var menuImgSrc = new Array;
  var raceImg = new Array;
  var raceImgSrc = new Array;
  var signup = new Array;
  var urlM = "images/menu/";
  var urlR = "images/races/";
  var ext = ".jpg";
  
  menuImg[0] = "forum";
  menuImg[1] = "news";
  menuImg[2] = "screens";
  menuImg[3] = "tutorials";
  menuImg[4] = "register";
  menuImg[5] = "login";
  
  raceImg[0] = "humans";
  raceImg[1] = "elves";
  raceImg[2] = "orcs";
  raceImg[3] = "dwarfs";
  
  for (var i = 0; i<6; i++) { //pentru meniu
    //normal
    menuImgSrc[i] = new Image();
    menuImgSrc[i].src = urlM + menuImg[i] + ext;
    //over
    menuImgSrc[i+6] = new Image();
    menuImgSrc[i+6].src = urlM + menuImg[i] + "_ovr" + ext;
    //pressed
    menuImgSrc[i+12] = new Image();
    menuImgSrc[i+12].src = urlM + menuImg[i] + "_prsd" + ext;
  }
  
  for (i = 0; i<4; i++) { //pentru rase
   //normal
    raceImgSrc[i] = new Image();
    raceImgSrc[i].src = urlR + raceImg[i] + ext;
    //over
    raceImgSrc[i+4] = new Image();
    raceImgSrc[i+4].src = urlR + raceImg[i] + "_ovr" + ext;
  }
  
  signup[0] = "images/sign_up" + ext;
  signup[1] = "images/sign_up" + "_ovr" + ext;
  signup[2] = "images/sign_up" + "_prsd" + ext;


}

var wTm;

function elementById(x) {
  if (document.getElementById) return document.getElementById(x);
    else if (document.all) return document.all[x];
    else if (document.layers) return document.layers[x];
    else return null;
}

function over(num,even) {
  if(document.images)
    if (even == 1) document.images[menuImg[num]].src = menuImgSrc[num+6].src;
    else if (even == 0) {
      document.images[raceImg[num]].src = raceImgSrc[num+4].src;
      changeCnt(num,1);
      if (wTm)  clearTimeout(wTm);
    } else if (even == 2) document.images["signup"].src = signup[1];
}

function out(num,even) {
  if(document.images)
    if (even == 1) document.images[menuImg[num]].src = menuImgSrc[num].src;
    else if (even == 0) {
      document.images[raceImg[num]].src = raceImgSrc[num].src;
      wTm = setTimeout("changeCnt(" + num + ",0);",500);
    } else if (even == 2) document.images["signup"].src = signup[0];
}

function press(num,even) {
  if(document.images)
    if (even == 1) document.images[menuImg[num]].src = menuImgSrc[num+12].src;
    else if (even == 2) document.images["signup"].src = signup[2];
}

// chng content

var content = new Array;
content[0] = "The humans , also known as the Order of the Ebony Shield , believe that they are the true kings of this world called Andor . Their duty is to protect everyone that is threatened by war . This is mostly the reason why many human and orc cities are at war for generations . Using heavy armors with thick plates sometimes even doubled by mail , they are sturdy warriors and skilled defenders. Weapons of choice are one handed swords , polearms and bludgeons while in the offhand they usually hold large shields . Even though their melee troops bring modest results on the battlefield , the human mounted troops are unmatced .";
content[1] = "The elves , also known as the Order of the Silver Dagger , believe in Tahidae . He is a spirit sent by the gods to save as many andorians as possible , when mighty Zhargamoth was mislead and ravaged half of the world . Tahidae is master of shadows , illusions and treachery while his followers are masters of camouflage and thieving . Te elves hardly match the strength of orcs or humans on the battlefield . They mostly prefer to have strong allies and use their marvelous camouflage skills to aid them in war . Weapons of choice are bows , daggers , throwing weapons and polearms for those who choose to ride . Their armors are often made by leather , cloth and rarely , mail . Without doubt , the reason why elves are so heated is because of their highly effective thieves .";
content[2] = "The Orcs , also known as the Order of the Ironfist , are the followers of Zhargamoth , a titan from ancient times . It is said , that he is so strong that not even the gods dare challenge him . The orcs believe that by dying on the battlefield , Zhargamoth shall let them join his Legion with which he will destroy those who banished him from the world of Andor . Orcs are half brutes , half intelligent creatures . With a high sense of honor , they help their allies and crush their enemies . Orcs are training hard since the first years of their lives and learn to fight with large weapons such as two handed axes , claymores and even polearms .They have minimum knowledge of ranged weapons but they boast as good riders .";
content[3] = "The dwarfs , also known as the Order of the Golden Crown , believe in Caelenyth . He was a mighty dwarf ruler that mislead Zhargamoth to lay waste to the elven part of Andor , in the hope that will stop them from stealing and terrorizing dwarf strongholds . Dwarfs are a friendly race and they dislike war, they prefer generating gold from trade . But some dwarf  tribes often decide to follow the path of the mercenary . They are masters at wielding two handed axes , bludgeon weapons or dual wielding one handed axes . Their armors are usually composed of leather and mail linked together by gold stitches or bolts . The dwarven units don't excel in any particular way but they are cheap and fast to train .";


function changeCnt(no,even) {
  if (even) {
    if (no != null) elementById("rDescription").innerHTML = "<p>&nbsp;&nbsp;&nbsp; " + content[no] + "</p>";
    elementById("rDescription").style.display = "block";
    if (wTm)  clearTimeout(wTm);
  } else { 
    elementById("rDescription").style.display = "none";
  }
}

function hide(even,id) {
  if (even) elementById(id).style.display = "block";
  else elementById(id).style.display = "none";
}


//-->