function randomImageLink() { 
var button = new imageLink('udm-button');

//add possibilities ('href', 'title text', 'src', 'width', 'height', 'alt text')
button.addLink('./dsn_sb.php', 'Fairies', 'img/ran/06_37.jpg', '76', '79', 'Sleeping Beauty');
button.addLink('./dsn_las.php', 'Lilo', 'img/ran/06_2.jpg', '76', '79', 'Lilo and Stitch');
button.addLink('./an_ccs_fan.php', 'CCS', 'img/ran/06_3.jpg', '76', '79', 'Card Captor Sakura');
button.addLink('./toon_nbxmas_media.php', 'Zero', 'img/ran/06_4.jpg', '76', '79', 'Nightmare Before Christmas');
button.addLink('./an_dbz.php', 'Goku', 'img/ran/06_5.jpg', '76', '79', 'Dragon Ball');
button.addLink('./an_dnang_fan.php', 'Souske', 'img/ran/06_6.jpg', '76', '79', 'DNAngel');
button.addLink('./dsn_101.php', '101', 'img/ran/06_7.jpg', '76', '79', '101 Dalmatians');
button.addLink('./an_inu.php', 'Inuyasha', 'img/ran/06_8.jpg', '76', '79', 'Inu-Yasha');
button.addLink('./dsn_tlk.php', 'Simba', 'img/ran/06_9.jpg', '76', '79', 'The Lion King');
button.addLink('./dsn_poca.php', 'Flit', 'img/ran/06_10.jpg', '76', '79', 'Pocahontas');
button.addLink('./dsn_poca.php', 'Meeko', 'img/ran/06_11.jpg', '76', '79', 'Pocahontas');
button.addLink('./an_fb.php', 'Tohru', 'img/ran/06_12.jpg', '76', '79', 'Fruits Basket');
button.addLink('./dsn_al.php', 'Yago', 'img/ran/06_13.jpg', '76', '79', 'Aladdin');
button.addLink('./dsn_bc.php', 'Fairy', 'img/ran/06_14.jpg', '76', '79', 'The Black Cauldron');
button.addLink('./dsn_cind.php', 'Cinderella', 'img/ran/06_15.jpg', '76', '79', 'Cinderella');
button.addLink('./an_kno.php', 'Sana', 'img/ran/06_16.jpg', '76', '79', 'Child\'s Toy');
button.addLink('./ghb_mono.php', 'Kodamas', 'img/ran/06_17.jpg', '76', '79', 'Princess Mononoke');
button.addLink('./an_guru.php', 'Kukuri', 'img/ran/06_18.jpg', '76', '79', 'Magic Circle Guru Guru');
button.addLink('./dsn_dumbo.php', 'Tim', 'img/ran/06_19.jpg', '76', '79', 'Dumbo');
button.addLink('./ghb_porco.php', 'Plane', 'img/ran/06_20.jpg', '76', '79', 'Porco Rosso');
button.addLink('./dsn_cind.php', 'Jaq', 'img/ran/06_21.jpg', '76', '79', 'Cinderella');
button.addLink('./dsn_al.php', 'Al', 'img/ran/06_22.jpg', '76', '79', 'Aladdin');
button.addLink('./an_ccs_fan.php', 'Tamoe', 'img/ran/06_23.jpg', '76', '79', 'Card Captor Sakura');
button.addLink('./an_ranma.php', 'Mousse', 'img/ran/06_24.jpg', '76', '79', 'Ranma ˝');
button.addLink('./dsn_las.php', 'Stitch', 'img/ran/06_25.jpg', '76', '79', 'Lilo and Stitch');
button.addLink('./an_dbz.php', 'Goku', 'img/ran/06_26.jpg', '76', '79', 'Dragon Ball');
button.addLink('./an_pok.php', 'Pikachu', 'img/ran/06_27.jpg', '76', '79', 'Pokémon');
button.addLink('./an_inu.php', 'Inuyasha', 'img/ran/06_28.jpg', '76', '79', 'Inu-Yasha');
button.addLink('./dsn_pooh.php', 'Pooh', 'img/ran/06_29.jpg', '76', '79', 'Winnie the Pooh');
button.addLink('./an_ccs_fan.php', 'CCS', 'img/ran/06_30.jpg', '76', '79', 'Card Captor Sakura');
button.addLink('./ghb_kiki.php', 'Kiki', 'img/ran/06_31.jpg', '76', '79', 'Kiki\'s Delivery Service');
button.addLink('./an_guru.php', 'Kukuri', 'img/ran/06_32.jpg', '76', '79', 'Magic Circle Guru Guru');
button.addLink('./dsn_nemo_media.php', 'Dori', 'img/ran/06_33.jpg', '76', '79', 'Finding Nemo');
button.addLink('./an_abeno_media.php', 'Ayumi', 'img/ran/06_34.jpg', '76', '79', 'Abenobashi Magic Shopping District');
button.addLink('./dsn_tlm.php', 'Ariel', 'img/ran/06_35.jpg', '76', '79', 'The Little Mermaid');
button.addLink('./an_cho.php', 'Plum', 'img/ran/06_36.jpg', '76', '79', 'Chobits');
button.addLink('./dsn_tar.php', 'Tarzan', 'img/ran/06_38.jpg', '76', '79', 'Tarzan');
button.addLink('./an_al.php', 'Hikaru', 'img/ran/06_39.jpg', '76', '79', 'Angelic Layer');
button.addLink('./an_pok.php', 'Ash', 'img/ran/06_40.jpg', '76', '79', 'Pokémon');
button.addLink('./dsn_aristo.php', 'Aristocat', 'img/ran/06_41.jpg', '76', '79', 'Aristocats');
button.addLink('./an_op.php', 'Zoro', 'img/ran/06_42.jpg', '76', '79', 'One Piece');
button.addLink('./dsn_rh.php', 'Robin Hood', 'img/ran/06_43.jpg', '76', '79', 'Robin Hood');
button.addLink('./dsn_rh.php', 'Robin', 'img/ran/06_44.jpg', '76', '79', 'Robin Hood');
button.addLink('./ghb_mnt.php', 'My Neighbor Totoro', 'img/ran/06_45.jpg', '76', '79', 'My Neighbor Totoro');
button.addLink('./dsn_alice.php', 'Alice in Wonderland', 'img/ran/06_46.jpg', '76', '79', 'Alice in Wonderland');
button.addLink('./an_inu.php', 'Kagome', 'img/ran/06_47.jpg', '76', '79', 'Inu-Yasha');
button.addLink('./an_fma.php', 'Edward', 'img/ran/06_48.jpg', '76', '79', 'Fullmetal Alchemist');
button.addLink('./an_bleach.php', 'Kon', 'img/ran/06_49.jpg', '76', '79', 'Bleach');
button.addLink('./an_bleach.php', 'Cptn', 'img/ran/06_50.jpg', '76', '79', 'Bleach');
button.addLink('./an_bleach.php', 'Kon2', 'img/ran/06_51.jpg', '76', '79', 'Bleach');
button.addLink('./an_bleach.php', 'Orihime', 'img/ran/06_52.jpg', '76', '79', 'Bleach');
button.addLink('./dsn_rr.php', 'Zipper', 'img/ran/06_53.jpg', '76', '79', 'Chip n Dale Rescue Rangers');
button.addLink('./dsn_rr.php', 'Zipper2', 'img/ran/06_54.jpg', '76', '79', 'Chip n Dale Rescue Rangers');
button.addLink('./dsn_rr.php', 'Dale', 'img/ran/06_55.jpg', '76', '79', 'Chip n Dale Rescue Rangers');
button.selectLink();
};

function imageLink(linkid)
{
	this.link = document.getElementById(linkid);
	this.possibles = [];
};

imageLink.prototype.addLink = function()
{
	this.possibles[this.possibles.length] = arguments;
};

imageLink.prototype.selectLink = function()
{
	if(this.link != null)
	{
		this.rnd = this.possibles[Math.floor(Math.random() * this.possibles.length)];
		this.link.href = this.rnd[0];
		this.link.title = this.rnd[1];
		this.img = this.link.getElementsByTagName('img')[0];
		if(this.img != null)
		{
			this.img.src = this.rnd[2]; 
			this.img.width = this.rnd[3]; 
			this.img.height = this.rnd[4]; 
			this.img.alt = this.rnd[5]; 
		}
	}
};

if(typeof document.getElementById != 'undefined') { randomImageLink(); }