// menu-System written by Azaroth in 2000

var menuPath = "images/menu_";
var menuPicType = ".jpg";
var selected = "";

function preload()
{
        for (var i = 0; i < document.images.length; i++)
	{
		if (document.images[i].name.length > 0)
		{
			this.image = new Image();
			this.image.src = menuPath + document.images[i].name + "_o" + menuPicType;
			this.image = new Image();
			this.image.src = menuPath + document.images[i].name + menuPicType;
		}
	}
}

function select(name)
{

  if (selected != "")
  { document[selected].src = menuPath + selected + menuPicType; }
  document[name].src = menuPath + name + "_o" + menuPicType;
  selected = name;
}

preload();