
function open_popup(imageName,imageWidth,imageHeight,alt) {
        if (screen.width > imageWidth)
            {posLeft = (screen.width - imageWidth) / 2;}
            else
            {posLeft = 0}

        if (screen.height > imageWidth)
            {posTop = (screen.height - imageWidth) / 2;}
            else
            {posTop = 0}

        newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop);
        newWindow.document.open();
        newWindow.document.write('<html><title>Image</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">');
        newWindow.document.write('<img src='+imageName+' width='+imageWidth+' height='+imageHeight+' alt="'+alt+'">');
        newWindow.document.write('</body></html>');
        newWindow.document.close();
        newWindow.focus();
}


function addbookmark() {
   if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
      window.external.AddFavorite('http://www.getlinux.fr', 'Getlinux : Votre distribution sur CD / DVD');
   }
}

function emptyField(field) {
   field.value='';
}

function urlConfirm(msg, url) {
   if (confirm(msg)) {
      document.location = url;
   }
}

function openPass() {
   window.open('http://www.getlinux.fr/user/oubli_password.php', 'passsword', 'width=300,height=150');
}

// JavaScript pour roll over TR (tableau)
var oldCol;
function TR(tr, mode) {
   if (mode == 0) {
      oldCol = tr.className;
      tr.className = 'trOver';
      tr.style.cursor = "hand";
   } else {
      tr.className = oldCol;
   }
}

//Boite de dialogue pour une confirmation
function conf(texte, url) {
    if (confirm(texte)) {
       document.location=url;
    }
}
