
function open_photo(url_photo, titre, p_width, p_height) {
    var photo;
    var s_url;
    var s_titre;
    var parametres;
    var posx, posy;

    posx = (screen.availWidth - p_width) / 2;
    posy = (screen.availHeight - p_height) / 2;
    parametres = 'width=' + p_width + ',height=' + p_height + ',resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,directories=no,left=' + posx + ',top=' + posy;
    param_image = p_width - 50;
    s_url = '<p class="photo" align="center"><img class="image" width="' + param_image + '" src="' + url_photo + '" title="Cliquez pour fermer" alt="Cliquez pour fermer" onClick="self.close()"></p>\n';
    s_titre = '<title>' + titre + '</title>\n';
		photo = window.open('','name',parametres);
    photo.document.write('<html><head>\n');
    photo.document.write(s_titre);
    photo.document.write('<style type="text/css"><!--\n');
    photo.document.write('.image {border: 3px solid #FFFFFF;}\n');
    photo.document.write('--></style>\n');
    photo.document.write('</head><body oncontextmenu="return false;" bgcolor="#000000"></script>\n');
    photo.document.write(s_url);
    photo.document.write('</body></html>\n');
    photo.document.close();
    if (window.focus) {photo.focus()}
}


function open_slideshow(swf_name, titre, unique_id, i_width, i_height) {
    var photo;
    var s_url;
    var s_titre;
    var parametres;
    var posx, posy;

    posx = (screen.availWidth - i_width) / 2;
    posy = (screen.availHeight - i_height) / 2;
    tmpw = i_width + 20;
    tmph = i_height + 30;
    parametres = 'width=' + tmpw + ',height=' + tmph + ',resizable=no,scrollbars=no,toolbar=no,menubar=no,location=no,status=no,directories=no,left=' + posx + ',top=' + posy;
    s_titre = '<title>' + titre + '</title>\n';
		photo = window.open('','name',parametres);
    photo.document.write('<html><head>\n');
    photo.document.write(s_titre);
    photo.document.write('</head><body bgcolor="#000000">\n');
    s_url = swf_name + '_' + unique_id + '.xml&unique_id=' + unique_id;
    photo.document.write('<object id="');
    photo.document.write(swf_name);
    photo.document.write('" codeBase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" ');
    param = 'width="'+i_width+'" height="'+i_height+'" ';
    photo.document.write(param);
    photo.document.write('classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">\n<param name="movie" value="include/');
    photo.document.write(swf_name);
    photo.document.write('.swf?xml_path=');
    photo.document.write(s_url);
    photo.document.write('">\n<param name="quality" value="high">');
    photo.document.write('\n<embed ');
    photo.document.write('src="include/');
    photo.document.write(swf_name);
    photo.document.write('.swf?xml_path=');
    photo.document.write(s_url);
    param = '" quality="high" bgcolor="#000000" width="'+i_width+'" height="'+i_height+'" name="';
    photo.document.write(param);
    photo.document.write(swf_name);
    photo.document.write('" type="application/x-shockwave-flash" ');
    photo.document.write('pluginspage="http://www.macromedia.com/go/getflashplayer" />\n</embed></object>\n');
    photo.document.write('</body></html>\n');
    photo.document.close();
    if (window.focus) {photo.focus()}
}


