//Agrega la funcion trim a los strings
String.prototype.trim = function(){ return this.replace(/^\s+|\s+$/g, '' ); };

function isvacio(texto){
	return( texto+"".trim()=="" );
}

function isimagen(texto){
	texto=texto+"".trim();
	return( /(\.gif|\.jpg|\.png){1}$/.test(texto) );
}

function isbanner(texto){
	texto=texto+"".trim();
	return( /(\.gif|\.jpg|\.png|\.swf){1}$/.test(texto) );
}

//modificación de la función Lafecha utilizada en ARC, creada por Darío Carnelutti
function fechalarga(){
	var mes = new Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
	a=new Date();
	m=a.getMonth();
	e=a.getFullYear();
	var fecha=a.getDate()+" de "+mes[m]+" del "+e;
	return fecha;
}

function hora(){
	var fecha=new Date();
	hora = fecha.getHours();
	minutos = fecha.getMinutes();
	if(hora>12){
		ampm=(hora==24)?"AM":"PM";
		hora=hora-12;
	}else
		ampm=(hora==12)?"PM":"AM";
	return ( ((hora<10)?"0"+hora:hora)  +":"+((minutos<10)?"0"+minutos:minutos)+" "+ampm);
}
