
function getXMLObject()  //XML OBJECT
{
   var xmlHttp = false;
   try {
     xmlHttp = new ActiveXObject("Msxml2.XMLHTTP")  // For Old Microsoft Browsers
   }
   catch (e) {
     try {
       xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")  // For Microsoft IE 6.0+
     }
     catch (e2) {
       xmlHttp = false   // No Browser accepts the XMLHTTP Object then false
     }
   }
   if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
     xmlHttp = new XMLHttpRequest();        //For Mozilla, Opera Browsers
   }
   return xmlHttp;  // Mandatory Statement returning the ajax object created
}
var xmlhttp = new getXMLObject();	//xmlhttp holds the ajax object

/*SECCION HOME*/

function home(){

		if(xmlhttp){										
    	xmlhttp.open("POST","home.php",true); //gettime will be the servlet name
        //alert("la variable a contiene" + a );
    	xmlhttp.onreadystatechange  =function(){ 
		if (xmlhttp.readyState == 4) {
     if(xmlhttp.status == 200) {          	
     	document.getElementById("varios").innerHTML=xmlhttp.responseText;  
     	//Effect.Pulsate('varios');              	
     }	
     else {
        alert("Error during AJAX call. Please try again");
     }
   	}else $("varios").innerHTML="<center><img src='system/site/design/images/cargando.gif'></img></center>"
		}
    xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
    	//xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    	xmlhttp.send(null);
  					}
	}
	
/*SECCION EMPRESA*/
function empresa(){

		if(xmlhttp){										
    	xmlhttp.open("POST","empresa.php",true); //gettime will be the servlet name
        //alert("la variable a contiene" + a );
    	xmlhttp.onreadystatechange  =function(){ 
		if (xmlhttp.readyState == 4) {
     if(xmlhttp.status == 200) {          	
     	document.getElementById("varios").innerHTML=xmlhttp.responseText;  
     	//Effect.Pulsate('varios');              	
     }	
     else {
        alert("Error during AJAX call. Please try again");
     }
   	}else $("varios").innerHTML="<center><img src='system/site/design/images/cargando.gif'></img></center>"
		}
    xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
    	//xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    	xmlhttp.send(null);
  					}
	}
	
/*SECCION FAQS*/
	function faqs(){

		if(xmlhttp){										
    	xmlhttp.open("POST","faqs.php",true); //gettime will be the servlet name
        //alert("la variable a contiene" + a );
    	xmlhttp.onreadystatechange  =function(){ 
		if (xmlhttp.readyState == 4) {
     if(xmlhttp.status == 200) {          	
     	document.getElementById("varios").innerHTML=xmlhttp.responseText;  
     	//Effect.Pulsate('varios');              	
     }	
     else {
        alert("Error during AJAX call. Please try again");
     }
   	}else $("varios").innerHTML="<center><img src='system/site/design/images/cargando.gif'></img></center>"
		}
    xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
    	//xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    	xmlhttp.send(null);
  					}
	}
	
	/*SECCION FRANQUICIAS*/
	function franquicias(){

		if(xmlhttp){										
    	xmlhttp.open("POST","franquicias.php",true); //gettime will be the servlet name
        //alert("la variable a contiene" + a );
    	xmlhttp.onreadystatechange  =function(){ 
		if (xmlhttp.readyState == 4) {
     if(xmlhttp.status == 200) {          	
     	document.getElementById("varios").innerHTML=xmlhttp.responseText;  
     	//Effect.Pulsate('varios');              	
     }	
     else {
        alert("Error during AJAX call. Please try again");
     }
   	}else $("varios").innerHTML="<center><img src='system/site/design/images/cargando.gif'></img></center>"
		}
    xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
    	//xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    	xmlhttp.send(null);
  					}
	}
	/*SECCION INVERSIONISTAS*/
	function inversionistas(){

		if(xmlhttp){										
    	xmlhttp.open("POST","inversionistas.php",true); //gettime will be the servlet name
        //alert("la variable a contiene" + a );
    	xmlhttp.onreadystatechange  =function(){ 
		if (xmlhttp.readyState == 4) {
     if(xmlhttp.status == 200) {          	
     	document.getElementById("varios").innerHTML=xmlhttp.responseText;  
     	//Effect.Pulsate('varios');              	
     }	
     else {
        alert("Error during AJAX call. Please try again");
     }
   	}else $("varios").innerHTML="<center><img src='system/site/design/images/cargando.gif'></img></center>"
		}
    xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
    	//xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    	xmlhttp.send(null);
  					}
	}
	
	/*SECCION CONTACTANOS*/
	function contactanos(){

		if(xmlhttp){										
    	xmlhttp.open("POST","contactanos.php",true); //gettime will be the servlet name
        //alert("la variable a contiene" + a );
    	xmlhttp.onreadystatechange  =function(){ 
		if (xmlhttp.readyState == 4) {
     if(xmlhttp.status == 200) {          	
     	document.getElementById("varios").innerHTML=xmlhttp.responseText;  
     	//Effect.Pulsate('varios');              	
     }	
     else {
        alert("Error during AJAX call. Please try again");
     }
   	}else $("varios").innerHTML="<center><img src='system/site/design/images/cargando.gif'></img></center>"
		}
    xmlhttp.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-1");
    	//xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    	xmlhttp.send(null);
  					}
	}
