Ora va meglio, però funziona solo al primo clic... poi ricevo l'errore "mostra is not function":
Codice PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
<style type="text/css">
#coprente {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: transparent url(overlay.png) repeat;
z-index: 30; /* o cmq il numero più alto tra quelli degli altri z-index presenti */
}
#box_popup_che_deve_comparire {
position: absolute;
top: 50%;
left: 50%;
width: 100px;
height: 100px;
margin-left: 50px; margin-top: 50px; /* a cui sottrarre la metà di AA e BB */
}
</style>
<script language="javascript">
// Parametro vero -> true = visibile; false = invisibile
function mostra(vero) {
if(mostra = true){
document.getElementById('box_popup_che_deve_comparire').style.display="none";
//document.getElementById('box_popup_che_deve_comparire').style.background='#FFFFFF';
}
if(mostra = false){
document.getElementById('box_popup_che_deve_comparire').style.display="block";
//document.getElementById('box_popup_che_deve_comparire').style.background='#FFFFFF';
}
}
</script>
</head>
<body>
<div id="box_popup_che_deve_comparire">
... contenuto del box ...
</div>
<div id="coprente">
[url="#"]SCURISCI[/url]
<a id="mostr" href="#" onclick="mostra(false);" style="color:#FFFF00">TOGLI TRASPARENZA</a
</div>
</body>
</html>