
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){		
titlecolor = "white";	
opacitytitle = 45;
var thisspan = eval("maildiv.style") 
thisspan.pixelLeft = document.body.scrollLeft + 100;		
thisspan.pixelTop =  document.body.scrollTop + 100;
thisspan.visibility="visible";
output = "<table cellpadding=0 cellspacing=0 width=355 height=230 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><font face=Verdana size=2 color=0000FF><b><font size=3 color=000000>Esempio nr. 1</font><br>Pop-up dallo sfondo semitrasparente. Questo javascript, che potete scaricare nella sezione 'Webmasters', è personalizzabile nei colori, nelle dimensioni, nel carattere ecc. Ad esempio, si possono inserire <a href=http://www.spacemarc.it>link</a>, <font face=Times New Roman size=3>cambiare font</font>, formattare <i>varie parti del testo</i>, <font color=FF0000>modificare i colori</font>, aumentare o diminuire il grado di trasparenza. E' compatibile soltanto con Microsoft Internet Explorer.</b></font></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;
}function closeraam(){maildiv.style.visibility="hidden";}

function popup()
{
outp = "";
outp += "<div align=center><input type='image' alt=\"Chiudi questa finestra\" onclick='closeraam()' src='"+closebutton+"'></div>";
raam(outp, "");
}
