1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
var fois=0
function AfficheImage(petiteImage,grandeImage,texteImage)
{
document.write('<A HREF="javascript:Affichegrande(\''+grandeImage+'\',\''+texteImage+'\')">Cliquez ici pour agrandir l\'image </A>');
}
function Affichegrande(cheminImage,texte)
{
newImage = new Image;
newImage.src = cheminImage;
html = '<HTML><HEAD><TITLE>Image</TITLE><meta http-equiv="Pragma" content="no-cache"></HEAD><BODY onBlur="self.close();" leftmargin=0 marginwidth=0 topmargin=0 marginheigth=0 oncontextmenu="return false"><CENTER>'+
'<a href="#" onClick="window.close()" ><IMG SRC="'+cheminImage+'" BORDER=0 NAME=monImage alt="'+texte+'"border="0" onLoad="window.resizeTo(document.monImage.width+20,document.monImage.height+80);"> </a></CENTER></BODY></HTML>';
if (fois == 1 ) ouvrirImage.close();
ouvrirImage = window.open('','_blank',' top=10, left=10, location=0, toolbar=0,location=0,menuBar=0,scrollbars=0,resizable=0');
ouvrirImage.document.write(html);
fois=1;
}
document.onfocus = function(){
if (ouvrirImage != null){
window.ouvrirImage.close();
}
} |
Partager