/*
 * 
 * Copyright © 2006 Ole Markus With
 * 
 */

var news;
var albums;
var band;

function init() {
	preload();

	
	news = document.getElementById("newslinks");
	document.getElementById("newssection").addEventListener("mouseover", displaynews, false);
	news.addEventListener("mouseout", displaynone, false);
	
	albums = document.getElementById("albumslinks");
	document.getElementById("albumssection").addEventListener("mouseover", displayalbums, false);
	albums.addEventListener("mouseout", displaynone, false);
	
	band = document.getElementById("bandlinks");
	document.getElementById("bandsection").addEventListener("mouseover", displayband, false);
	band.addEventListener("mouseout", displaynone, false);
	
	misc = document.getElementById("misclinks");
	document.getElementById("miscsection").addEventListener("mouseover", displaymisc, false);
	misc.addEventListener("mouseout", displaynone, false);
	
	site = document.getElementById("sitelinks");
	site.addEventListener("mouseout", displaynone, false);
	document.getElementById("sitesection").addEventListener("mouseover", displaysite, false);
	
	displaynone();
}

function displaynone() {
	
	band.style.display = "none";
	albums.style.display = "none";
	news.style.display = "none";
	misc.style.display = "none";
	site.style.display = "none";
}

function displaynews() {
	displaynone();
	news.style.display = "block";
	news.className="linkslist2";
	news.style.left = "450px";
}	

function displayalbums() {
	displaynone();
	albums.style.display = "block";
	albums.className = "linkslist2";
	albums.style.left = "520px";
}		
function displayband() {
	
	displaynone();
	band.style.display = "block";
	band.className = "linkslist2";
	band.style.left = "620px";
}

function displaymisc() {
	
	displaynone();
	misc.style.display = "block";
	misc.className = "linkslist2";
	misc.style.left = "700px";
}
		
function displaysite() {
	
	displaynone();
	site.style.display = "block";
	site.className ="linkslist2";
	site.style.left="810px";
}

function preload () {


    

      // set image url
      img = new Array();
      img[0] = "Images/Big/Underline/News.png";
      img[1] = "Images/Big/Underline/Albums.png";
      img[2] = "Images/Big/Underline/Band.png";
      img[3] = "Images/Big/Underline/Various.png";
      img[4] = "Images/Big/Underline/Site.png";
      img[5] = "Images/Small/Normal/Latest.png";
      img[6] = "Images/Small/Normal/Archive.png";
      img[7] =  "Images/Small/Normal/Emails_from_Kliffoth.png";
      img[8] =  "Images/Medium/Normal/Latest.png";
      img[9] =  "Images/Medium/Normal/Archive.png";
      img[10] = "Images/Medium/Normal/Emails_from_Kliffoth.png";
      img[11] = "Images/Small/Normal/Discography.png";
      img[12] = "Images/Small/Normal/Extended_Discography.png";
      img[13] = "Images/Small/Normal/Tabulatures.png";
      img[14] = "Images/Medium/Normal/Discography.png";
      img[15] = "Images/Medium/Normal/Extended_Discography.png";
      img[16] = "Images/Medium/Normal/Tabulatures.png";
      img[17] = "Images/Small/Normal/FAQ.png";
      img[18] = "Images/Small/Normal/About.png";
      img[19] = "Images/Small/Normal/Contact.png";
      img[20] = "Images/Medium/Normal/FAQ.png";
      img[21] = "Images/Medium/Normal/About.png";
      img[22] = "Images/Medium/Normal/Contact.png";
	  img[23] = "Images/Small/Normal/Biography.png";
      img[24] = "Images/Small/Normal/Band_Members.png";
      img[25] = "Images/Small/Normal/Tours_and_Gigs.png";
      img[26] = "Images/Small/Normal/Other_Musicians.png";
	  img[27] = "Images/Medium/Normal/Biography.png";
      img[28] = "Images/Medium/Normal/Band_Members.png";
      img[29] = "Images/Medium/Normal/Tours_and_Gigs.png";
      img[30] = "Images/Medium/Normal/Other_Musicians.png";
	  img[31] = "Images/Small/Normal/IRC_Chat.png";
      img[32] = "Images/Small/Normal/Photo_Galleries.png";
      img[33] = "Images/Small/Normal/Forum.png";
      img[34] = "Images/Small/Normal/Downloads.png";
	  img[35] = "Images/Medium/Normal/IRC_Chat.png";
      img[36] = "Images/Medium/Normal/Photo_Galleries.png";
      img[37] = "Images/Medium/Normal/Forum.png";
      img[38] = "Images/Medium/Normal/Downloads.png";

      img[39] = "Images/Small/Normal/Samples.png";
      img[40] = "Images/Medium/Normal/Samples.png";


       var i = 0;


       nimg = new Array();
       for(i=0; i<img.length; i++) {
         nimg[i] = new Image();
         nimg[i].src = img[i];
      //   document.getElementById("newalbumimg").src = img[i];
        }

            
    }

  
		
window.onload = init;		
