function get_details(str,path,flag)
{
    var xmlhttp;    
    if (str=="")
    {
        document.getElementById("txtClinic").innerHTML="";
        return;
    }
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
         xmlhttp=new XMLHttpRequest();
    }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("txtClinic").innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("GET",path+"clinic_details.php?c_id="+str+"&flag="+flag,true);
    xmlhttp.send();
}

function check_user(str,count,path)
{
    if (str=="")
    {
      document.getElementById("txtst").innerHTML="";
      return;
    }
    if (window.XMLHttpRequest)
    {
      // code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
    }
    else
    {
        // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function()
    {
        if (xmlhttp.readyState==4 || xmlhttp.status==200)
        {
            document.getElementById("txtst").innerHTML=xmlhttp.responseText;
        }
    }
    
    xmlhttp.open("GET",path+"check_users.php?q="+str+"&flag="+count,true);
    xmlhttp.send();
 }
 
function show_users(str,strs,path)
{
    var xmlhttp;
    if (str=="")
    {
        document.getElementById("txtHint").innerHTML="";
        return;
    }
      
    if (window.XMLHttpRequest)
    {
        // code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp=new XMLHttpRequest();
    }
    else
    {
        // code for IE6, IE5
        xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange=function()
    {
        if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
            document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
        }
    }
    xmlhttp.open("GET",path+"get_users.php?q="+str+"&flag="+strs,true);
    xmlhttp.send();
}

function get_clinictype_details(str,path,flag)
{
    var xmlhttp;    
    if (str=="")
    {
        document.getElementById("txtClinic").innerHTML="";
        return;
    }
    if (window.XMLHttpRequest)
    {// code for IE7+, Firefox, Chrome, Opera, Safari
         xmlhttp=new XMLHttpRequest();
    }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.onreadystatechange=function()
      {
      if (xmlhttp.readyState==4 && xmlhttp.status==200)
        {
        document.getElementById("txtClinic").innerHTML=xmlhttp.responseText;
        }
      }
    xmlhttp.open("GET",path+"clinics_list.php?flag="+flag,true);
    xmlhttp.send();
}

 
