function returnimgcode(img) {
	var imghtml = "";
	if ( img[1] != "" )
		imghtml = '<a href="'+img[1]+'" target="'+optlinktarget+'">';
	imghtml += '<img src="'+img[0]+'" border="'+imgborderwidth+'">';
	if ( img[1] != "" )
		imghtml += '</a>';
	return imghtml;
}

function returnlegendecode(leg) {
	var leghtml = "";
	if ( leg != "" )
		leghtml = '<br><br><center>'+leg+'</center><br>';
	return leghtml;
}

function modifyimage(loadarea, imgindex) {
	if ( document.getElementById ) {
		var imgobj = document.getElementById(loadarea);
		if ( imgobj.filters && window.createPopup ) {
			imgobj.style.filter = filterstring;
			imgobj.filters[0].Apply();
		}
		imgobj.innerHTML = returnimgcode(dynimages[imgindex]) + returnlegendecode(dynlegendes[imgindex]);
		if (imgobj.filters && window.createPopup)
			imgobj.filters[0].Play();
		return false;
	}
}

function filtreAlpha(nom,alpha) {
	if (document.images[nom] && document.images[nom].filters)
		document.images[nom].filters.alpha.opacity=alpha;
}

