var maildivider="[chiocciola]"
for (i=0; i<=(document.links.length-1); i++){
    if (document.links[i].href.indexOf(maildivider)!=-1){
    document.links[i].href=document.links[i].href.split(maildivider)[0]+"@"+document.links[i].href.split(maildivider)[1];
    }
}
function anteprima(image_url,tipo){
	var finestra =",width=640,height=480";
	if (tipo==1){//video
		var finestra =",width=480,height=420";
	}
	window.open(image_url, 'anteprima', 'scrollbars=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes'+finestra);
}

function opla(cosa, wx, wy ) {
    X=(wx+20);
    Y=(wy+20);
    /*alert(cosa+wx+wy+X+Y);*/
    //window.open(cosa,'anteprima','imagetoolbar=0,scrollbars=0,toolbar=0,location=0,resizable=0,width='+X+',height='+Y);
    newWindow = window.open("antep.htm","newWindow","width="+X+",height="+Y+",left=5,top=5");
    newWindow.document.open();
    newWindow.document.write('<html><title>anteprima</title><body bgcolor="#000000" onDblClick="self.close()">');
    newWindow.document.write('<img src="'+cosa+'" width='+wx+' height='+wy+' alt="Doppio Click la finestra x chiudere" /><br/>'); 
    newWindow.document.write('</body></html>');
    newWindow.document.close();
    newWindow.focus();
}
