// JavaScript Document



function cargarURLAjax(url, divrespuesta){
			
		var loadstatustext = "<img src='loading.gif'> Obteniendo informacion...";

		document.getElementById(divrespuesta).innerHTML = loadstatustext;
		
		var cadenaFormulario = "";
		
		var xmlhttp=false;
		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();
		}
		
		if (!xmlhttp) { // Mozilla, Safari, ...
			xmlhttp = new XMLHttpRequest();
			if (xmlhttp.overrideMimeType) {
				xmlhttp.overrideMimeType('text/xml');
				// See note below about this line
			}
		} 
		
		xmlhttp.open("POST", url, true);
		xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=ISO-8859-1');
		xmlhttp.send(cadenaFormulario);
		xmlhttp.onreadystatechange = function() {
			  if (xmlhttp.readyState == 4 && (xmlhttp.status == 200 || window.location.href.indexOf ("http") == - 1)){
					document.getElementById(divrespuesta).innerHTML = xmlhttp.responseText;
			  }
		}
	}
	
	function ajaxobj() {
		try {
			_ajaxobj = new ActiveXObject("Msxml2.xmlhttp");
		} catch (e) {
			try {
				_ajaxobj = new ActiveXObject("Microsoft.xmlhttp");
			} catch (E) {
				_ajaxobj = false;
			}
		}
	   
		if (!_ajaxobj && typeof xmlhttpRequest!='undefined') {
			_ajaxobj = new xmlhttpRequest();
		}
		
		return _ajaxobj;
	};
	