constMaxItem=9
function fnDispThis(active)
{
for (i=1; i < constMaxItem+1; i++)
	{
	if (i!=active)
		{
		document.all("sub"+i).style.display="NONE"
		}
	else
		{
		document.all("sub"+active).style.display="BLOCK"
		}
	}
}

constMaxItemB=4
function fnDispThisB(active)
{
for (n=1; n < constMaxItemB+1; n++)
	{
	if (n!=active)
		{
		document.all("subb"+n).style.display="NONE"
		}
	else
		{
		document.all("subb"+active).style.display="BLOCK"
		}
	}
}


function scrollit_r2l(seed)
{
	var msg="ASOCIACION PROHUERFANOS DE LA GUARDIA CIVIL"
	var out = " ";
	var c   = 1;
	if (seed > 100) {
		seed--;
		var cmd="scrollit_r2l(" + seed + ")";
		timerTwo=window.setTimeout(cmd,100);
	}
	else if (seed <= 100 && seed > 0) {
		for (c=0 ; c < seed ; c++) {
			out+=" ";
		}
		out+=msg;
		seed--;
		var cmd="scrollit_r2l(" + seed + ")";
		    window.status=out;
		timerTwo=window.setTimeout(cmd,100);

	}
	else if (seed <= 0) {
		if (-seed < msg.length) {
			out+=msg.substring(-seed,msg.length);
			seed--;
			var cmd="scrollit_r2l(" + seed + ")";
			window.status=out;
			timerTwo=window.setTimeout(cmd,100);
		}
		else {
			window.status=" ";
			timerTwo=window.setTimeout("scrollit_r2l(100)",75);
		}
	}
}

function cargamarcos(pag1,pag2)
{
        parent.cuatro.location.href=pag2;
        parent.seis.location.href=pag1;
}

function cargapag(pag1,pag2)
{
        parent.cuatro.location.href=pag2;
        parent.navega.location.href=pag1;
}

function abre(pagina)
{
var ventana = window.open(pagina,"","toolbar=0, resizeable=0, menubar=0, statusbar=0, scrollbar=0, height=800, width=1100");
}

function abre2(pagina)
{
var ventana = window.open(pagina,"","toolbar=0, resizeable=0, menubar=0, statusbar=0, scrollbar=0, height=594, width=792");
}

function sobre(objeto)
{
        objeto.bgColor="#000000";
}
function fuera(objeto)
{
        objeto.bgColor="0099CC";
}



function informacion(enlace)
{
        window.open(enlace,'info','status=yes,width=560,height=300,scrollbars=yes');
}

function advertencia(legal)
{
        window.open(legal,'adv','scrollbars=1,width=560,height=300');
}

function informaciong(enlaceg)
{
        window.open(enlaceg,'infog','scrollbars=0,width=560,height=325');
}

function mostrar(num)
{
        num=escape(num);
        window.open('libros.php?tipo=4&num='+num,'indice','scrollbars=1,width=560,height=325');
} 

function getCookieVal (offset)
{
        var endstr = document.cookie.indexOf (";", offset);
        if (endstr == -1)
                endstr = document.cookie.length;
        return unescape(document.cookie.substring(offset, endstr));
}


function GetCookie (name)
{
        var arg = name + "=";
        var alen = arg.length;
        var clen = document.cookie.length;
        var i = 0;while (i < clen)
        {
                var j = i + alen;
                if (document.cookie.substring(i, j) == arg)
                        return getCookieVal (j);
                i = document.cookie.indexOf(" ", i) + 1;
                if (i == 0) break;
        }
        return null;
}
function SetCookie (name, value)
{
        var argv = SetCookie.arguments;
        var argc = SetCookie.arguments.length;
        var expires = (argc > 2) ? argv[2] : null;
        var path = (argc > 3) ? argv[3] : null;
        var domain = (argc > 4) ? argv[4] : null;
        var secure = (argc > 5) ? argv[5] : false;
        document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) +((domain == null) ? "" : ("; domain=" + domain)) +((secure == true) ? "; secure" : "");
}
function DeleteCookie (name)
{
         var exp = new Date();
        exp.setTime (exp.getTime() - 1);
        var cval = GetCookie (name);
        document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}




