//Rutina para poner texto en la barra de estado

var current = 0;
var x = 0;
var speed = 100;
var speed2 = 1000;
function initArray(n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' ';
 }
}
typ = new initArray(12);
typ[0]=" • W W W . G R U P O A L E G R I A . C L .....";
typ[1]=" • El Grupo Nro1 de la Movida Tropical Chilena.....";
typ[2]=" • Mas de 14 Anos de Trayectoria se resumen en esta Web.....";
typ[3]=" • Mp3, Imagenes, Videos, Articulos, Noticias.....";
typ[4]=" • Y muchas cosas mas.....";
typ[5]=" • Solo aqui... En www.GrupoAlegria.cl.....";
typ[6]=" • Y recuerda que seguimos siendo....";
typ[7]=" • Los Amos Del Ritmo.....";

function typewrite() {
var m = typ[current];
window.status = m.substring(0, x++) + "•";
if (x == m.length + 1) {
x = 0;
current++;
if (current > typ.length - 1) {
current = 0;
}
setTimeout("typewrite()", speed2);
}
else {
setTimeout("typewrite()", speed);
}
}
typewrite();


/* Funciones para bloquear el boton secundario*/

function clickIE() {
	if (document.all) 
	{
		return false;
	}
}

function clickNS(e)
{
	if (document.layers||(document.getElementById&&!document.all)) 
	{
		if (e.which==2||e.which==3)
		{
			return false;
		}
	}
}

if (document.layers) 
{
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown=clickNS;
}
else
{
	document.onmouseup=clickNS;
	document.oncontextmenu=clickIE;
}

document.oncontextmenu=new Function("return false")

/* funciones para trimear cadenas */

function Trim(TRIM_VALUE){
	if(TRIM_VALUE.length < 1){
		return"";
	}
	TRIM_VALUE = RTrim(TRIM_VALUE);
	TRIM_VALUE = LTrim(TRIM_VALUE);
	if(TRIM_VALUE==""){
		return "";
	}
	else{
		return TRIM_VALUE;
	}
} //End Function

function RTrim(VALUE){
	var w_space = String.fromCharCode(32);
	var v_length = VALUE.length;
	var strTemp = "";
	if(v_length < 0){
		return"";
	}
	var iTemp = v_length -1;

	while(iTemp > -1){
		if(VALUE.charAt(iTemp) == w_space){
		}
		else{
			strTemp = VALUE.substring(0,iTemp +1);
			break;
		}
		iTemp = iTemp-1;

	} //End While
	return strTemp;

} //End Function

function LTrim(VALUE){
	var w_space = String.fromCharCode(32);
	if(v_length < 1){
		return"";
	}
	var v_length = VALUE.length;
	var strTemp = "";

	var iTemp = 0;

	while(iTemp < v_length){
		if(VALUE.charAt(iTemp) == w_space){
		}
		else{
			strTemp = VALUE.substring(iTemp,v_length);
			break;
		}
		iTemp = iTemp + 1;
	} //End While
	return strTemp;
} //End Function