<script type="text/javascript">
var table = null;
$(document).ready(function() {
    var h_finestra = $(window).height();
    var h_menu = $('#menu_top').height();
    var margin = $('#Quadro_Lazio').css('margin-top').replace('px','');
    var h_thead = $('#Quadro_Lazio thead').height();
    var h_tfoot = $('#Quadro_Lazio tfoot').height();
   
    var h = parseInt(h_finestra)-parseInt(h_menu)-parseInt(margin)-parseInt(h_thead)-parseInt(h_tfoot)-70;
    table = $('#tabella').html();
   
    $('#Quadro_Lazio').tScroll({
                    h_box: h+'px'
    });
       
});
</script>
<script>
// codice per mostrare il dettaglio
function dettaglio()
{
    tooltip = '<div class="tooltiptopicevent" style="width:auto;height:auto;background:#feb811;position:absolute;z-index:10001;padding:10px 10px 10px 10px ;  line-height: 200%;">'
            + 'Cliente' + ' ' + 'Ragione sociale' + '</div>';
            $("body").append(tooltip);
            $(this).mouseover(function (e)
            {
                $(this).css('z-index', 10000);
                $('.tooltiptopicevent').fadeIn('500');
                $('.tooltiptopicevent').fadeTo('10', 1.9);
            }).mousemove(function (e)
            {
                $('.tooltiptopicevent').css('top', e.pageY + 10);
                $('.tooltiptopicevent').css('left', e.pageX + 20);
            });
}
// codice per chiudere il dettaglio
function chiudiDettaglio()
{
    $(this).css('z-index', 8);
    $('.tooltiptopicevent').remove();
}
</script>
<fieldset class="corpo">
<legend>Vendite 2016</legend>
<table border="0" width="100%" id='quadroLazio'>
<tr>
<td valign="top">
<div  align="center" id='tabella'>
<table border='0' id="Quadro_Lazio" class='sortable' cellpadding='1' cellspacing='0'>
    <thead>
           <tr><th colspan="2"><div align='center'>Vendita Clienti</div></th>
               <th colspan="5"><div align='center'>Vendita ROMA e provincia</div></th></tr>
           
           <tr><th><div align='center'>Cliente</div></th>
               <th><div align='center'>Totale Generale</div></th>
               <th><div align='center'>Materie prime</div></th>
               <th><div align='center'>Plastica</div></th>
               <th><div align='center'>Termoindurenti</div></th>
               <th><div align='center'>Semilavorato</div></th>
               <th><div align='center'>Altro</div></th></tr>
    </thead>
   <tbody>
   
<?php   
// Ciclo for per la lettura array 
for($a = 0; $a < count(array_vendite); $a++)   
{
?>   
<tr><td><DIV align='center' onmouseover='dettaglio(<?php echo $cdclie;?>)' onmouseout='chiudiDettaglio()'>0</DIV></td>
    <td><DIV align='right'>0</DIV></td>
    <td><DIV align='right'>0</DIV></td>
    <td><DIV align='right'>0</DIV></td>
    <td><DIV align='right'>0</DIV></td>
    <td><DIV align='right'>0</DIV></td>
    <td><DIV align='right'>0</DIV></td></tr>
<?php                       
}                 
?>
</tbody>
</table>
</div>
</td>
</tr>
</fieldset>