/**
 * @fichier popup.js
 * @version 1.0.0.0
 * @auteur  Stphane RIO
 * @email   stephane.rio@univ-rennes1.fr
 * @date    05.06.2006
*/

/**
 * fonction qui ouvre une nouvelle fenetre pour achicher les coordonnee
 * d une personne
*/
function popup(nom, prenom, fonction, composante, adresse, telephone, fax, emailGauche, emailDroit)
{

    emailGauche = emailGauche.replace("&_", "&#39");
    emailDroit = emailDroit.replace("&_", "&#39");
    fonction = fonction.replace("&_", "&#39");
    composante= composante.replace("&_", "&#39");
    nom = nom.replace("&_", "&#39");
    prenom = prenom.replace("&_", "&#39");
    adresse = adresse.replace("&_", "&#39");

    var width = 330;
    var height = 280;
    var top = ( screen.height - height ) / 2;
    var left = ( screen.width - width ) / 2;
    var params = ", toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, menubar=0, dependent=yes";
    var newwin = window.open( "","","top = " + top + ", left = " + left + ", width= "+ width + ",height= " + height + params );
    newwin.document.write( "<html>\n" );
    newwin.document.write( "<head>\n" );
    newwin.document.write( "<title>CONTACT</title>\n" );
    newwin.document.write( "<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />\n" );
    newwin.document.write( "<meta http-equiv='Content-Style-Type' content='text/css' />\n" );
    newwin.document.write( "<meta http-equiv='Content-Script-Type' content='text/javascript' />\n" );
    newwin.document.write( "<style type='text/css'>\n" );
    newwin.document.write( "body{margin:0px;padding:10px;font-family:'Trebuchet MS',Arial,Helvetica,sans-serif;color:#000;font-size:0.75em;text-align:left;background-color:#ededed;}" );
    newwin.document.write( "</style>\n" );
    newwin.document.write( "</head>\n" );
    newwin.document.write( "<body>\n" );
    if ( ( !( nom == "" ) ) || ( !( prenom == "" ) ) ) newwin.document.write( "<b>Contact :</b> "+ nom + " " + prenom );
    if ( !( fonction == "" ) ) newwin.document.write( "<br /><b>Fonction : </b>" + fonction );
    if ( !( composante == "" ) ) newwin.document.write( "<br /><b>Composante : </b> "+ composante );
    if ( !( adresse == "" ) ) newwin.document.write( "<br /><b>Adresse Postale : </b> "+ adresse );
    if ( !( telephone == "" ) ) newwin.document.write( "<br /><b>T&eacute;l. : </b> "+ telephone );
    if ( !( fax == "" ) ) newwin.document.write( "<br /><b>Fax : </b> "+ fax );
    if ( ( !( emailGauche == "" ) ) || ( !( emailDroit == "" ) ) )newwin.document.write( "<br /><b>Courriel : </b> <a href=\"mailto:" + emailGauche + "@" + emailDroit + "\" \/>" +  emailGauche + "@" + emailDroit + "</a>");
    newwin.document.write( "</body>\n" );
    newwin.document.write( "</html>\n" );
    newwin.document.close();
}
