function act()
{
	if (actual!="")
	{
		color = "040493";
		bg = "ff6600";
		document.all[actual].style.color=color;
		document.all[actual].style.background=bg;
	}
}

function muestra(o,x)
{
	color = "040493";
	bg = "url(\"images/block.gif\")";
	document.all[x].style.display = "";
	document.all[o].style.color=color;
	document.all[o].style.background=bg;
}

function oculta(o,x)
{
	color = "040493";
	bg = "none";
	document.all[x].style.display = "none";
	document.all[o].style.color=color;
	document.all[o].style.background=bg;
}

function resalta(o)
{
	color = "040493";
	bg = "url(\"images/block.gif\")";
	o.style.background=bg;
	o.style.color=color;
}

function noresalta(o)
{
	bg = "none";
	o.style.background=bg;
}

function cambiaimg(refer,opc)
{
	var nueva = opc==2 ? "bullet3.gif" : "bullet6.gif";
	document.all[refer].src="images/" + nueva;
}


function cambianvg(refer,nueva)
{
	document.all[refer].src="images/" + nueva + ".gif";
}


function abre()
{
	window.open("sac.asp","x","width=590,height=440,location=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}


floatX=1; floatY=1; layerwidth=133; layerheight=256; align="left"; valign="center"; delayspeed=1;

function adjust()
{

		floatX = (document.body.scrollWidth - 780)/2
		if (lastX==-1 || delayspeed==0)
		{
			lastX=document.body.scrollLeft + floatX;
			lastY=document.body.scrollTop + floatY;
		}
		else
		{
			dx=Math.abs(document.body.scrollLeft+floatX-lastX);
			dy=Math.abs(document.body.scrollTop+floatY-lastY);
			d=Math.sqrt(dx*dx+dy*dy);
			c=Math.round(d/10);
			if (document.body.scrollLeft+floatX>lastX) {lastX=lastX+delayspeed+c;}
			if (document.body.scrollLeft+floatX<lastX) {lastX=lastX-delayspeed-c;}
			if (document.body.scrollTop+floatY>lastY) {lastY=lastY+delayspeed+c;}
			if (document.body.scrollTop+floatY<lastY) {lastY=lastY-delayspeed-c;}
		}
		document.all['floatlayer'].style.posLeft = lastX;
		document.all['floatlayer'].style.posTop = lastY;

	setTimeout('adjust()',40);
}

function define()
{
		if (align=="left") {floatX=ifloatX};
		if (align=="right") {floatX=document.body.offsetWidth-ifloatX-layerwidth-20}
		if (align=="center") {floatX=Math.round((document.body.offsetWidth-20)/2)-Math.round(layerwidth/2)}

}



function aparece(div)
{
	document.all['floatmenu'].style.display = "none";
	document.all['paso'].style.display = "none";
	document.all[div].style.posTop = 250
	document.all[div].style.display ="";
}

function posiciona()
{
	var divtop = document.all[div].style.posTop;
	if (divtop > 20 )
	{	document.all[div].style.posTop--; }
	setTimeout('posiciona()',20);
}

function homesel(ref)
{
	var pic = "images/" + ref + "sel.jpg";
	document.all[ref].src = pic;
}

function homeunsel(ref)
{
	var pic = "images/" + ref + ".jpg";
	document.all[ref].src = pic;
}

