var int=self.setInterval("erol()",2000)
var xmlHttp

function erol()
{ 

xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="saat.asp";
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,false);
xmlHttp.send(null);
}

function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("hasan").innerHTML=xmlHttp.responseText;

var y=document.createElement('option');
y.text=xmlHttp.responseText;

var x=document.getElementById("mySelect");
try
  {
  x.add(y,null); // standards compliant
  }
catch(ex)
  {
  //alert("hata");
  x.add(y); // IE only
  }


}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}