yo tengo una funcion q cada 3 min(creo) checa si hay algun registro nuevo en una tabla usando ASP, AJAX y JS, te la paso tal cual a ver si te sirve:
    
Código Javascript
:
Ver original- <%if session("user_admin")<>"admin" and alertas=1 then%> 
- <script type="text/javascript">   
-  var RequestObject = false;    
-  var Archivo = 'checa_pedidos.asp?n=<%=session("negocio")%>'; //directorio donde tenemos el archivo ajax.php    
-  window.setInterval("actualizacion_reloj()", 300000); // el tiempo X que tardará en actualizarse    
-    if (window.XMLHttpRequest) //    
-  RequestObject = new XMLHttpRequest();   
-  if (window.ActiveXObject)      
-    RequestObject = new ActiveXObject("Microsoft.XMLHTTP");   
-  function ReqChange() {   
-  // Si se ha recibido la información correctamente   
-    if (RequestObject.readyState==4) {   
-    // si la información es válida    
-    if (RequestObject.responseText.indexOf('invalid') == -1)    
-    {    
-    // obtener la respuesta    
-    var msgs = RequestObject.responseText.split('|');   
-    // Buscamos la div con id online    
-    //document.getElementById("online").innerHTML = msgs[0];   
-         if(msgs[0]>0){ 
-             //document.getElementById("pedidos_flash").style.visibility='visible'; 
-             document.getElementById("pedidos_flash").innerHTML = "<object style='z-index:-1' type='application/x-shockwave-flash' data='pedidos.swf' width='191' height='36'><param name='movie' value='pedidos.swf'><param name='wmode' VALUE='transparent'></object>"; 
-             alert("Tienes " + msgs[1] + " pedidos pendientes "); 
-         } 
-         else { 
-             //alert("No tienes mensajes"); 
-             //document.getElementById("pedidos_flash").style.visibility="hidden"; 
-         } 
-    }   
-    else {   
-    // Por si hay algun error    
-    //document.getElementById("online").innerHTML = "Error llamando";   
-             alert("Ha ocurrido un error"); 
-   
-    }   
-    }   
-    }   
-  function llamadaAjax() {   
-   // Mensaje a mostrar mientras se obtiene la información remota...   
-    document.getElementById("pedidos").innerHTML = "";   
-    // Preparamos la obtención de datos    
-    RequestObject.open("GET", Archivo , true);   
-    RequestObject.onreadystatechange = ReqChange;   
-    // Enviamos    
-    RequestObject.send(null);    
-    }   
-    function actualizacion_reloj() {   
-    llamadaAjax();   
-    }   
-   
-     var ancho=screen.width;  
-     var alto=screen.availHeight;  
-     var ventana;  
-     var anchoVentanita=200;  
-     var altoVentanita=150;  
-     function cerrar(){if(ventana &&!ventana.closed){ventana.close()}}  
-     function ventanita(url){  
-     ventana=window.open(url,'ventanita','width='+anchoVentanita+',height=0,top='+alto+',left='+(ancho-anchoVentanita-10));  
-     desplegar(true);  
-     }  
-     function desplegar(cambio){  
-         if(cambio){  
-             inicio=0;  
-             fin=altoVentanita;  
-             incremento=1;  
-         }  
-         else{  
-             inicio=altoVentanita;  
-             fin=0;  
-             incremento=-1;  
-         }  
-         for(a=inicio;a!=fin;a+=incremento){  
-             ventana.focus();  
-             ventana.resizeTo(anchoVentanita,a);  
-             ventana.moveTo((ancho-anchoVentanita-10),(alto-a));  
-         }  
-         if(cambio){  
-             setTimeout('desplegar(false)',2000)  
-         }  
-         else{ 
-             ventana.close(); 
-         }  
-     }  
-   
- </script>  
- <%end if%>