
function popupImage(image,titulo) {
var tete="B&E Promotions";
var texte=titulo;
var imgtitle="Cliquer pour fermer";
var alt="Image agrandie, cliquer pour fermer";
var style="";
var h = 250;
var l = 250;
var mh = 60;
var mv = 20;
var ln = 10;
var hn = 30;
var lfm,hfm,hautfm,gauchefm;
if (typeof self.innerHeight != 'undefined')
{
ln2 = self.outerWidth-document.body.offsetWidth;
hn2 = self.outerHeight-self.innerHeight;
hautfm = self.screenY;
gauchefm = self.screenX;
lfm = self.outerWidth-ln2;
hfm = self.innerHeight+hn2;
}
else if (typeof document.documentElement != 'undefined' && document.documentElement.clientHeight != 'undefined')
{
hautfm = window.screenTop;
gauchefm = window.screenLeft;
lfm = document.documentElement.clientWidth-ln;
hfm = document.documentElement.clientHeight-hn;
}
else if (typeof document.body != 'undefined')
{
hautfm = window.screenTop;
gauchefm = window.screenLeft;
lfm = document.body.clientWidth-ln;
hfm = document.body.clientHeight-hn;
}
var PosX = 0;
var PosY = 5;
var option = "resizable,toolbar=no,scrollbars=yes,top="+PosX+",left="+PosY+",width="+l+",height="+h+"";
w=open('',"titre",option);
w.document.write("<html>");
w.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />");
w.document.write("<html><head><title>"+tete+"</title></head>");
w.document.write("<link href='"+style+"' rel='stylesheet' type='text/css' />");
w.document.write("<script type=text/javascript>function checkSize() { if (document.images[0].width > 1 && document.images[0].height > 1) { window.resizeTo(document.images[0].width+"+ln+"+"+mv+",document.images[0].height+"+hn+"+"+mh+"+10)} else { setTimeout('checksize()',250) } }</"+"script>");
w.document.write("<body style='margin:0px;' onload='checkSize()' onblur='window.close()' onclick='window.close()' bgcolor='#5f5f5f'>");
w.document.write("<div align='center'><img src='"+image+"' alt='"+alt+"' title='"+imgtitle+"'></div><div align='center'><font color='#472D16'><b>"+texte+"</b></font></div>");
w.document.write("</body></html>");
w.document.close();
}

function popupContact(idPrg) {
var tete="Publika";
var texte="Envoi à un ami - idPrg: "+idPrg;
var imgtitle="Cliquer pour fermer";
var alt="alt texte";
var style="";
var h = 300;
var l = 500;
var mh = 60;
var mv = 20;
var ln = 10;
var hn = 30;
var lfm,hfm,hautfm,gauchefm;
if (typeof self.innerHeight != 'undefined')
{
ln2 = self.outerWidth-document.body.offsetWidth;
hn2 = self.outerHeight-self.innerHeight;
hautfm = self.screenY;
gauchefm = self.screenX;
lfm = self.outerWidth-ln2;
hfm = self.innerHeight+hn2;
}
else if (typeof document.documentElement != 'undefined' && document.documentElement.clientHeight != 'undefined')
{
hautfm = window.screenTop;
gauchefm = window.screenLeft;
lfm = document.documentElement.clientWidth-ln;
hfm = document.documentElement.clientHeight-hn;
}
else if (typeof document.body != 'undefined')
{
hautfm = window.screenTop;
gauchefm = window.screenLeft;
lfm = document.body.clientWidth-ln;
hfm = document.body.clientHeight-hn;
}
var PosX = 0;
var PosY = 5;
var option = "resizable,toolbar=no,scrollbars=yes,top="+PosX+",left="+PosY+",width="+l+",height="+h+"";
w=open('',"titre",option);
w.document.write("<html>");
w.document.write("<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1' />");
w.document.write("<html><head><title>"+tete+"</title>");
w.document.write("<script language='javascript'>");
w.document.write("function maverif(){");
w.document.write(" var ok=1;");
w.document.write("	if(document.getElementById('mailperso').value=='') ok=0;");
w.document.write("	if(document.getElementById('maildest').value=='') ok=0;");
w.document.write("	if(document.getElementById('nom').value=='') ok=0;");
w.document.write("	if(document.getElementById('nomdest').value=='') ok=0;");
w.document.write("	if(ok!=1){ return false; ");
w.document.write("  alert('Remplir tous les champs!');} ");
w.document.write("	else return true;");
w.document.write("}");
w.document.write("</script>");
w.document.write("<style>label{float:left;width:150px;}</style>");
w.document.write("</head>");
w.document.write("<link href='"+style+"' rel='stylesheet' type='text/css' />");
w.document.write("<body style='margin:0px;' bgcolor='#5f5f5f'>");
w.document.write("<div style='margin-left:10px;'>");
w.document.write("<form method='post' action='envoi_ami.php' onsubmit='javascript:return maverif();'>");
w.document.write("<h2>Envoyer a un ami ...</h2>");
w.document.write("<label>Votre nom :</label><input id='nom' type='texte' name='nom' /><br />");
w.document.write("<label>Votre mail :</label><input id='mailperso' type='texte' name='mailperso' /><br />");
w.document.write("<label>Nom du destinataire:</label><input  id='nomdest' type='texte' name='nomdest' /><br />");
w.document.write("<label>Mail destinataire :</label><input type='texte' id='maildest' name='maildest' /><br />");
w.document.write("Commentaires eventuels :<br />");
w.document.write("<textarea name='commentaires' cols='40'></textarea><br />");
w.document.write("<input type='submit' valeur='Envoyer' /><br />");
w.document.write("<input type='hidden' name='idp' valeur='"+idPrg+"' />");
w.document.write("</form>");
w.document.write("</div>");
w.document.write("</body></html>");
w.document.close();
}