<!-- begin head.php -->

<?php
include("include/config.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Monitoring</title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
<?php
if (($page=="prehled") || ($page=="detail"))
{  
$dotaz=mysql_query("SELECT val FROM settings WHERE id='refresh';");
$refr=mysql_fetch_row($dotaz);
echo '<meta http-equiv="refresh" content="'.$refr[0].'">';
}
?>
    <link href="style.css" rel="stylesheet" type="text/css" media="screen" />
    <script type="text/javascript" src="scripts/jquery-1.6.4.js"></script>

<script type="text/javascript">
/* $(document).ready(function() {
 	 $("#refresh").load("refresh.php");
   var refreshId = setInterval(function() {
      $("#refresh").load('refresh.php?randval='+ Math.random());
   }, 9000);       
      $.ajaxSetup({ cache: false });
});
*/
</script>


  </head>
  <body>
  
<script type="text/javascript">

 $(document).ready(function(){
   $("tr.barvi:even").css("background-color","#E5E5E5");
   $("td.imag").css("background-color","#FFFFFF");   
 });
</script>


<?php 

 if (($page=="prehled") || ($page=="detail"))
{  
 echo '<script type="text/javascript">var zobraz=1;</script>';
}
else 
{
 echo '<script type="text/javascript">var zobraz=0;</script>';
}
?>
<script type="text/javascript">
 
 $(document).ready(function(){

 if (zobraz==1)
    {    
    
    var okno="<div id=\"shade\" style=\"position:absolute; left:0px; top:0px; width:100%; height:100%; background-image:url('images/shade.png'); background-repeat:repeat;\"></div>          \
                     <div id=\"window\" style=\"position:absolute; left:100px; top:300px; background-color:#FFFFFF;\">                                                                    \
                     <div id=\"bar\" style=\"position:relative; left:5px; top:5px; width:465px; height:16px; background-color:#DDDDDD;>\">Nový snímač!</div>                                                   \
                     <div id=\"exit\" style=\"position:relative; left:474px; top:-11px; width:16px; height:16px; background-color:#FF0000; color:#FFFFFF; font-weight:bold; text-align:center; \"><a href=\"#\" onclick=\"hide()\" style=\"color:white;\">X</a></div>        ";
    
    $.ajax({
      url: "include/popup_asociace.php",
      cache: false,
      async: false
     }).done(function(data) {
          okno=okno+data;
     });
                   
    okno=okno+"</div>";
    
     $(".post").before(okno);
      
    
    };

          
    $("#thumb").load(function(){  
       var sirka=$(document).width();
       var sirka_okna=$("#window").width();
       $("#window").css({"left": (sirka/2)-(sirka_okna/2)});
    
       var vyska=$(document).height();
       var vyska_okna=$("#window").height();
       $("#window").css({"top": (vyska/2)-(vyska_okna/2)}); 
    };

 });
 
</script>



    <div id="wrapper">	
      <div id="logo">		<h1>Webový monitoring</h1>		
        <p>
          <em>spotřeby elektrické energie domácích spotřebičů.</em>
        </p>	
      </div>	
      <hr />	
      <!-- end #logo -->	



<!-- end head.php -->         