

<div style="padding:10px 10px 10px 10px;">
           


<?php
     include("config.php");
     $id=$_GET['id'];

   $dotaz=mysql_query("SELECT devices.name,devices.floor,devices.loc_x,devices.loc_y,buildings.mapname FROM devices,sensors,icons,buildings WHERE icons.id=devices.icon AND buildings.id = devices.building AND devices.id=".$id." LIMIT 1");
     $zarizeni=mysql_fetch_row($dotaz);
                                                                                                                   
    echo' 
    

  
  
    <h2 style="text-align:center;">'.$zarizeni[0].'</h2>
    
    <img src="maps/'.$zarizeni[4].'_'.$zarizeni[1].'.png" alt="mapa" id="map"/>
    <div id="cross" style="position:absolute; top:-20px; left:-20px; width:14px; height:14px; background-image:url(\'maps/crosshair.png\')"></div>
 
 
  <script type="text/javascript">
     $(document).ready(function() {
    var offset = $("#map").offset();
    var offset2 = $("#window").offset();
    
    $("#cross").css({"top": '.$zarizeni[3].' + offset.top - offset2.top - 7, "left": '.$zarizeni[2].' + offset.left - offset2.left - 7});
  });
  </script>
    ';
    
?>    
     </div>
     
     