
var closebutton = "close.gif"; //percorso del bottone di chiusura

var raampje, xtra, ytra;
function sleepen(){if (event.button!=1)return;	
raampje = eval("maildiv");temp1=raampje.style.posLeft;
temp2=raampje.style.posTop;xpos=event.clientX;
ypos=event.clientY;xtra = temp1-xpos;
ytra = temp2-ypos;document.onmousemove=plaats;}
function plaats(){if (event.button==1){
raampje.style.pixelLeft=event.clientX+xtra;
raampje.style.pixelTop=event.clientY+ytra;return false;}}

function raam(inside, color,img,w,h){		
titlecolor = "white";	
opacitytitle = 100;
var thisspan = eval("maildiv.style") 
thisspan.pixelLeft = document.body.scrollLeft + 350;		
thisspan.pixelTop =  document.body.scrollTop + 200;
thisspan.visibility="visible";
h=h+3;
output = "<table cellpadding=0 cellspacing=0 width="+w+" heigh="+h+" border=1 bordercolor=000000><tr>";
output += "<td onmousedown='sleepen()' style='cursor:hand' onmouseup='JavaScript:document.onmousemove=\"\" ' bgcolor='"+titlecolor+"' style='filter:alpha(opacity="+opacitytitle+");' valign=top><img src=libri/"+img+" ></td></tr>";
output += "<tr><td width=100%><table ";   
output += " width=100% height=100% bgcolor='c1c1c1'><tr><td width=100%>"+ inside+"</td></tr></table></td></tr>";
maildiv.innerHTML = output;
setTimeout('closeraam()',28000);
}

function closeraam(){maildiv.style.visibility="hidden";}

function popup2(img,w,h)
{
var thisspan = eval("maildiv.style") 
thisspan.pixelLeft = document.body.scrollLeft + 350;		
thisspan.pixelTop =  document.body.scrollTop + 200;
thisspan.visibility="visible";
output = "<img onclick=javascript:closeraam(); width='"+w+"' height='"+h+"'  src='libri/"+img+"' >";
maildiv.innerHTML = output;
setTimeout('closeraam()',8000);
}

function popup(img,w,h)
{
outp = "";
outp += "";
raam(outp, "",img,w,h);
}
