var mascotList = Array();
mascotList[0] = Array("http://mascot.crystalxp.net/png/th_19455.jpg", "http://mascot.crystalxp.net/nl.html", "Naam : <span style='color:#3B678E; font-weight:normal;'>Wall E</span><br />Auteur : <span style='color:#3B678E; font-weight:normal;'></span><br />Categorie : <span style='color:#3B678E; font-weight:normal;'>Drawings</span><br />");
mascotList[1] = Array("http://mascot.crystalxp.net/png/th_19383.jpg", "http://mascot.crystalxp.net/nl.html", "Naam : <span style='color:#3B678E; font-weight:normal;'>escarabajo</span><br />Auteur : <span style='color:#3B678E; font-weight:normal;'></span><br />Categorie : <span style='color:#3B678E; font-weight:normal;'>Crystal</span><br />");
mascotList[2] = Array("http://mascot.crystalxp.net/png/th_19172.jpg", "http://mascot.crystalxp.net/nl.html", "Naam : <span style='color:#3B678E; font-weight:normal;'>War Machine</span><br />Auteur : <span style='color:#3B678E; font-weight:normal;'></span><br />Categorie : <span style='color:#3B678E; font-weight:normal;'>Crystal</span><br />");

var mascotImg = Array();
mascotImg[0] = new Image(128,128);
mascotImg[0].src = mascotList[0][0];
mascotImg[1] = new Image(128,128);
mascotImg[1].src = mascotList[1][0];
mascotImg[2] = new Image(128,128);
mascotImg[2].src = mascotList[2][0];

function changeMascot()
{
//	document.getElementById("last-mascot-image-crystalxp-net").innerHTML = "<a href='"+mascotList[currMascot][1]+"' target='_blank'><img src='"+mascotList[currMascot][0]+"' alt='' style='border:none;' /></a>";
	
	var imgLink = document.createElement("A");
	imgLink.target = "_blank";
	imgLink.href = mascotList[currMascot][1];
			
	var img = document.createElement("img");
	img.src = mascotImg[currMascot].src;
	img.style.border = "none";
						
	imgLink.appendChild(img);
							
	while ( document.getElementById("last-mascot-image-crystalxp-net").lastChild )
		document.getElementById("last-mascot-image-crystalxp-net").removeChild( document.getElementById("last-mascot-image-crystalxp-net").lastChild );
										
	document.getElementById("last-mascot-image-crystalxp-net").appendChild(imgLink);
	
	document.getElementById("last-mascot-descr-crystalxp-net").innerHTML = mascotList[currMascot][2];
	currMascot++;
	currMascot = currMascot % mascotList.length;
}

var currMascot = 0;


// Cadre
document.writeln("<div style='height:236px; width:202px; background:url(http://www.crystalxp.net/_design/img/v2/fond-plugin-mascot.gif) no-repeat; padding-top:24px; padding-left:13px; padding-right:12px; margin:0px;'>");
// Image
document.writeln("<div id='last-mascot-image-crystalxp-net' style='padding-top:2px; height:131px; width:176px; text-align:center; margin:0px;'><img src='http://www.crystalxp.net/_design/img/v2/wait-image.gif' alt='loading' style='height:131px; width:131px; margin-top:1.5px'/></div>");
//Infos
document.writeln("<div id='last-mascot-descr-crystalxp-net' style='height:66px; width:176px; padding-top:18px; text-align:center; font-size:8pt; color:#041738; font-weight:bold; font-family:Arial, sans-serif; margin:0px;'></div>");
// Fin du cadre
document.writeln("</div>");

changeMascot();
setInterval ("changeMascot();", 3000);