// JavaScript Document
// Centratura orizzontale e verticale del div contenitore nel caso di resize della finestra del browser

function centraturadiv(){
var topdiv; 
var leftdiv;

widthscreen = document.body.clientWidth;
widthdiv = 700;
leftdiv = Math.round((widthscreen - widthdiv ) / 2 );
if (leftdiv < 10) { leftdiv = 10};
heightscreen = document.body.clientHeight;
heightdiv = 500;
topdiv = Math.round((heightscreen - heightdiv ) / 2 );
if (topdiv < 10) { topdiv = 10};
document.getElementById('divflash').style.top=topdiv;
document.getElementById('divflash').style.left=leftdiv;
}

function centraturadivpost(){
var topdiv; 
var leftdiv;

widthscreen = document.body.clientWidth;
widthdiv = 710;
leftdiv = Math.round((widthscreen - widthdiv ) / 2 );
if (leftdiv < 10) { leftdiv = 10};
heightscreen = document.body.clientHeight;
heightdiv = 550;
topdiv = Math.round((heightscreen - heightdiv ) / 2 );
if (topdiv < 10) { topdiv = 10};
document.getElementById('div0').style.top=topdiv;
document.getElementById('div0').style.left=leftdiv;
}










