

var childWin;

function showMapIgc(mapFile) {
    popup("http://www.victorb.fr/visugps/visugps.html?track=http://www.victorb.fr/track/" + mapFile);

}

function visuIgc() {
    popup("http://www.victorb.fr/visuigc.html");
}

function popup(url, sbEn) {
    destroyMap();
    sbEn = ((sbEn == undefined)?"no":(sbEn?"yes":"no"));
    var width = 800;
    var height = 600;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var attributes = "width=" + width + ",height=" + height +
    ",left=" + left + ",top=" + top +
    ",screenX=" + left + ",screenY=" + top +
    ",location=no, toolbars=no, scrollbars=" + sbEn +
    ",resizable=yes, directories=no, status=no";

    childWin = window.open(url, "Carte", attributes );
}


function destroyMap() {
    if (childWin && childWin.closed == false) {
        childWin.close();
        }
}     

function showEmail() {
    var ext = "fr";
    var domain = "victorb";
    var user = "contact";
    var email = user + "@" + domain + "." + ext;
       
    document.write("<a href='mailto:" + email + "'>" + email + "</a>");
}

