function myEmptyCallback() {
}
  
function get_xmlhttp() {
        try {
                xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
                try {
                        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
                } catch (E) {
                        xmlhttp = false;
                }
        }
        if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
                xmlhttp = new XMLHttpRequest();
        }
        return xmlhttp;
}

function isdefined( variable) {
    return (typeof(window[variable]) == "undefined")?  false: true;
}	
function ajax_init( ajax_server, div_container, values, callback )
{
			var objetus;
		    objetus = get_xmlhttp();    
		    objetus.open ("GET", ajax_server + "?" + values, true);
		    
		    objetus.onreadystatechange=function() {
		        if ( objetus.readyState == 1 )
		        {
		            document.getElementById(div_container).style.display = "";
		            document.getElementById(div_container).innerHTML = "Loading...";
		
		        }
		        else if ( objetus.readyState==4)
		        {
		            if( objetus.status==200)
		            {
		                document.getElementById(div_container).innerHTML = objetus.responseText;
		                if ( callback != '' )
		                  callback();
		            }
		            else
		            {
		                window.alert('error-['+ objetus.status +']-' + objetus.responseText );
		            }
		        }
		    }
		    objetus.send(null);
} 		
