var loadImage = function() {
	removeChild(target);
	var img = new Image(imageLar, imageAlt);
	img.src = images[position][0];
	img.title = images[position][1];
	img.border = 0;
	if(images[position][2] != "")
	{
		var a = document.createElement("a");
		a.href = images[position][2];
		a.target = "_blank";
		a.appendChild(img);
		target.appendChild(a);
	}
	else
	{
		target.appendChild(img);
	}
	if((images.length - 1) == position)
		position = 0;
	else
		position++;
}

function removeChild(target){
	if (target.hasChildNodes())
		while (target.childNodes.length >= 1)
			target.removeChild(target.firstChild);
}

function showSlide(){	
	intervalo = window.setInterval("loadImage();", timer);
}
