function popUpImg(img, width, height, spacer) { 
   myImg = new Image(); 
   myImg.src = img; 
   xwidth = width; 
   xheight = height; 
   titel='lcd';
   

var x,y,sbreite,shoehe;
sbreite = screen.width;
shoehe = screen.height;

x = (sbreite-xwidth)/2;
y = (shoehe-xheight)/2;


   imgWin = window.open('LEO CAN DIVE', 'Foto', 'width=' + xwidth + ', height=' + xheight + ',left=' + x + ', top=' + y + ', screenX=' + x + ', screenY=' + y +' titlebar=yes'); 
  
   with (imgWin.document) { 
      open(); 
      write('<HTML>'); 
      write(' <HEAD>'); 
      write(' <title>LEO CAN DIVE</title>'); 
      write(' </HEAD>'); 
      write(' <BODY style="margin: 0px;" onLoad="self.focus();"><img src="' + img + '" width="' + xwidth + '" height="' + xheight + '"'); 
      write(' <a href="" onClick="JavaScript:self.close()">') ;
      write('<tr><td> <img src="' + spacer + '"   width="' + xwidth  +'" height="' + xheight + '" border="0"></a></td></tr></table>'); 
      write(' </BODY>'); 
      write('</HTML>'); 
      close(); 
   } 
} 


function opacity(id, opacStart, opacEnd, millisec) { 
    //speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } else if(opacStart < opacEnd) { 
        for(i = opacStart; i <= opacEnd; i++) 
            { 
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
            timer++; 
        } 
    } 
} 

//change the opacity for different browsers 
function changeOpac(opacity, id) { 
    var object = document.getElementById(id).style; 
    object.opacity = (opacity / 100); 
    object.MozOpacity = (opacity / 100); 
    object.KhtmlOpacity = (opacity / 100); 
    object.filter = "alpha(opacity=" + opacity + ")"; 
} 
