function nuevoAjax()
{ 
	/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
	lo que se puede copiar tal como esta aqui */
	var xmlhttp=false;
	try
	{
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			// Creacion del objet AJAX para IE
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(E)
		{
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
		}
	}
	return xmlhttp; 
}

function abrirpopup(nombre,ancho,alto) {
	dat =  'width=' + ancho + ',height=' + alto + ',left=200,top=150,scrollbars=yes,resize=no,menubar=yes';
	window.open(nombre,'',dat)
}

function round(number,X) {
	X = (!X ? 2 : X);
	return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
}

function fechaLarga() {
	var date = new Date();
	// Luego le sacamos los datos aņo, dia, mes 
	// y numero de dia de la variable date
	var anio = date.getYear();
	var dia = date.getDay();
	var mes = date.getMonth();
	var ndia = date.getDate();
	//Como los dias de la semana vienen con numeros
	//reemplazamos estos por el dia correspondiente
	if (dia==0) {var dia="Domingo"};
	if (dia==1) {var dia="Lunes"};
	if (dia==2) {var dia="Martes"};
	if (dia==3) {var dia="Miercoles"};
	if (dia==4) {var dia="Jueves"};
	if (dia==5) {var dia="Viernes"};
	if (dia==6) {var dia="Sabado"};
	//Y hacemos lo mismo con los meses
	if (mes==0) {var mes="Enero"};
	if (mes==1) {var mes="Febrero"};
	if (mes==2) {var mes="Marzo"};
	if (mes==3) {var mes="Abril"};
	if (mes==4) {var mes="Mayo"};
	if (mes==5) {var mes="Junio"};
	if (mes==6) {var mes="Julio"};
	if (mes==7) {var mes="Agosto"};
	if (mes==8) {var mes="Septiembre"};
	if (mes==9) {var mes="Octubre"};
	if (mes==10) {var mes="Noviembre"};
	if (mes==11) {var mes="Diciembre"};
	//juntamos todos los datos en una variable
	fecha = dia + " " + ndia + " de " + mes + " del " + anio;
	//y procedemos a escribir dicha fecha
	document.write (fecha);
	/* Objetivoweb.com - recursos para webmastes
	http://www.objetovoweb.com/ */ 
}
