Ecco la Pagina
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>Chat</title>

 
<script type="text/javascript">
// JavaScript Document
function Ajax()
			{
				var
					http,
					self = arguments.callee;

				if (window.XMLHttpRequest) {
					http = new XMLHttpRequest();
				} else if (window.ActiveXObject) {
					try {
						http = new ActiveXObject('Msxml2.XMLHTTP');
					} catch(e) {
						http = new ActiveXObject('Microsoft.XMLHTTP');
					}
				}

				if (http) {
					http.onreadystatechange = function()
					{
						if(http.readyState == 4 && http.status == 200) {
							document.getElementById('ReloadThis').innerHTML = http.responseText;
							setTimeout(function(){self();}, 10000);
						}
					};
					http.open('GET', 'chat.php?id=<?php echo $_GET['id']; ?>' + '?' + new Date().getTime(), true);
					http.send(null);
				}

			}
</script>

  </head>

  <body> 
  <script type="text/javascript">
			setTimeout(function() {Ajax();}, 10000);
		</script>
        
<div id="ReloadThis">
   
  <div align="center">
       
    <div class="chat" style="width:95%; height:95%;" align="left">
  
	 <?php
	 include('chat_messaggi.php');
	 ?>
     
    </div>
   </div>

    <script>
     var h = 0;
	 try {
		h = parent.chatview.document.body.offsetHeight + 1000;
	 }
	 catch(e) {
		h = 0;
	 }
	 parent.chatview.scroll (0, h);
	 window.setTimeout("document.location='chat.php?id=<?php echo $_GET['id']; ?>'",60000);
    </script>
    </div>
   </div>
   </div>
 </body>
</html>