////////////////////////////////////////////////////////////////////////////////////
//Abre una ventana.
function NuevaVentana(img, ancho, alto){
  derecha=(screen.width-ancho)/2;
  arriba=(screen.height-alto)/2;
  string="toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+derecha+",top="+arriba+"";
  fin=window.open(img,"",string);
}
///////////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////////
// Date Display Function
function displayDate(){
  var this_month = new Array(12);
  this_month[0]  = "Enero";
  this_month[1]  = "Febrero";
  this_month[2]  = "Marzo";
  this_month[3]  = "Abril";
  this_month[4]  = "Mayo";
  this_month[5]  = "Junio";
  this_month[6]  = "Julio";
  this_month[7]  = "Agosto";
  this_month[8]  = "Septiembre";
  this_month[9]  = "Octubre";
  this_month[10] = "Noviembre";
  this_month[11] = "Diciembre";
  var today = new Date();
  var day   = today.getDate();
  var month = today.getMonth();
  var year  = today.getYear();
  if (year < 1900){
     year += 1900;
  }
  return(day + " " + this_month[month]+" " + year);
}


function GetHttpObject(Handler) {
	var HttpObject = false; 
	
	// branch for native XMLHttpRequest
    if(window.XMLHttpRequest) {
    	try {
			HttpObject = new XMLHttpRequest();
        } catch(e) {
			HttpObject = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
       	try {
        	HttpObject = new ActiveXObject("Msxml2.XMLHTTP");
      	} catch(e) {
        	try {
          		HttpObject = new ActiveXObject("Microsoft.XMLHTTP");
        	} catch(e) {
          		HttpObject = false;
        	}
		}
    }
    
    if(HttpObject) {
		if(Handler) {
			HttpObject.onreadystatechange = Handler;
		}
	}
    
    return HttpObject; 	
}
