var xmlHttp = false;
  try {
   xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
     try {
      xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (e2) {
        xmlHttp = false;
    }
  }
  if(!xmlHttp && typeof XMLHttpRequest != 'underfined')
  {
    xmlHttp = new XMLHttpRequest();
  }
var path = "/modules/captcha/";
var up = false;
var d = new Object();

function call_Server(id, entry)
{
   d.id = id;
   d.entry = entry;

   var url = path+"key_rand_pic.php?entry="+d.entry;
   xmlHttp.open("GET",url,true);
   xmlHttp.onreadystatechange = update_Page;
   xmlHttp.send(null);
}
/*function call_Server2()
{
   var url = path+"key_rand_pic.php?up_key_pic=no&entry=know_enter";
   xmlHttp.open("GET",url,true);
   xmlHttp.onreadystatechange = update_Page;
   xmlHttp.send(null);
}*/

var imaga = ""; 
function update_Page()
{
  //alert(d.id);
  if(xmlHttp.readyState == 4)
  {
    var response = xmlHttp.responseText;
    if(response) 
    {
      	 imaga = new Image();
        img=document.getElementById(d.id);
        imaga.src = path+"capcha.php?entry="+d.entry+"&rand="+Math.random();
        img.src = imaga.src;
    }
/*
    if(!response) 
    {
        call_Server2();
    }
    else
    {
      	 imaga = new Image();
        img=document.getElementById(d.id);
        imaga.src = path+"capcha.php?entry=know_enter&rand="+Math.random();
        img.src = imaga.src;
    }
*/
  }
}
