// POPUP
	function pop(ventana,nombre,ancho,alto,resi,barras){
		izqda = (screen.width - ancho)/2;
		ariba = (screen.height - alto)/2;
		window.open(ventana,nombre,'width='+ancho+',height='+alto+',left='+izqda+',top='+ariba+',resizable='+resi+',scrollbars='+barras+',status=no');
	}

	function ampliar(wdimg){
		izqda = (screen.width - 900)/2;
		ariba = (screen.height - 320)/2;
		window.open(wdimg,'big','width=900,height=320,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=yes,status=no');
	}

	function ampliar2(wdimg){
		izqda = (screen.width - 480)/2;
		ariba = (screen.height - 320)/2;
		window.open(wdimg,'big','width=480,height=320,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=no,status=no');
	}

	function ampliar3(wdimg){
		izqda = (screen.width - 600)/2;
		ariba = (screen.height - 600)/2;
		window.open(wdimg,'big','width=600,height=600,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=no,status=no');
	}
	
	function ampliar4(wdimg){
		izqda = (screen.width - 525)/2;
		ariba = (screen.height - 350)/2;
		window.open(wdimg,'big','width=525,height=350,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=no,status=no');
	}

	function ampliar4v(wdimg){
		izqda = (screen.width - 350)/2;
		ariba = (screen.height - 525)/2;
		window.open(wdimg,'big','width=350,height=525,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=no,status=no');
	}

	function ampliar5(wdimg){
		izqda = (screen.width - 400)/2;
		ariba = (screen.height - 400)/2;
		window.open(wdimg,'big','width=400,height=400,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=no,status=no');
	}

	function ampliar6(wdimg){
		izqda = (screen.width - 534)/2;
		ariba = (screen.height - 300)/2;
		window.open(wdimg,'big','width=534,height=300,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=no,status=no');
	}

	function ampliar7(wdimg){
		izqda = (screen.width - 509)/2;
		ariba = (screen.height - 300)/2;
		window.open(wdimg,'big','width=509,height=300,left='+izqda+',top='+ariba+',resizable=yes,scrollbars=no,status=no');
	}

// CHECK HTTP
	function httpChk(obj){
		str = obj.value.substr(0,7);
		if(str != "http://"){obj.value = "http://"+obj.value}
	}

// RESET
	function limpia(obj){
		obj.reset();
	}

//	TRIM AND NORMALICE WHITE SPACES
	function trim(value) {
		var cadena = value;
		var obj = /^(\s*)([\W\w]*)(\b\s*$)/;
		if (obj.test(cadena)) {cadena = cadena.replace(obj, '$2');}
		var obj = /  /g;
		while (cadena.match(obj)) {cadena = cadena.replace(obj, " ");}
		return cadena;
	}
