// JavaScript Document

function assurance(){
$.get("assur.php", function(data){$('#assur').html(data);})
}
function no_assurance(){
$.get("no_assur.php", function(data){$('#assur').html(data);}) 

}

function occupe(){
$.get("occupe.php", function(data){$('#occupe').html(data);}) 

}
function noccupe(){
$.get("", function(data){$('#locataire').html(data);}) 
}
function locataire(){
$.get("locataire.php", function(data){$('#locataire').html(data);}) 

}
function un_locataire(){
$.get("un_locataire.php", function(data){$('#locataire').html(data);}) 

}
function refresh_div()
{
	var xhr_object = null;
	if(window.XMLHttpRequest)
		{ // Firefox
			xhr_object = new XMLHttpRequest();
		}
	else if(window.ActiveXObject)
		{ // Internet Explorer
			xhr_object = new ActiveXObject('Microsoft.XMLHTTP');
		}
	var method = 'POST';
	var filename = 'test.php';
	xhr_object.open(method, filename, true);
	xhr_object.onreadystatechange = function()
		{
			if(xhr_object.readyState == 4)
			{
				var tmp = xhr_object.responseText;
				document.getElementById('voir').innerHTML = tmp;
			}
		}
	xhr_object.send(null);
	setTimeout('refresh_div()', 5000);
}

function get_refresh(){

                                
 $.get('test.php',function(data){

 jQuery('#voir').html(data);

                                });

                 }

                 $(document).ready(function(){

                                setInterval("get_refresh()",1000);

                 });



function lookup(inputString) {
    if(inputString.length == 0) {
        // Hide the suggestion box.
        $('#suggestions').hide();
    } else {
        $.post("js/rpc.php", {queryString: ""+inputString+""}, function(data){
            if(data.length >0) {
                $('#suggestions').show();
                $('#autoSuggestionsList').html(data);
            }
        });
    }
} // lookup

function fill(thisValue) {
		$('#inputString').val(thisValue);
		setTimeout("$('#suggestions').hide();", 200);
}




