var an2=0;	
function next2()
{
	var pi=3.141592653589, d, l, t, f;
	an2++;	
	if (an2<=35)
	{
		d=(Math.cos((an2*pi)/35)+1)/2;
		l=d*0+(1-d)*-400;
		t=d*0+(1-d)*0;
		f=document.getElementById('frm2');
		f.style.marginLeft=l+'px';
		f.style.marginTop=t+'px';
		if (an2<35) window.setTimeout('next2()',10);
	}
	else
	if (an2<=70)
	{
		d=(Math.cos(((an2-35)*pi)/35)+1)/2;
		l=d*-400+(1-d)*0;
		t=d*0+(1-d)*-268;
		f=document.getElementById('frm2');
		f.style.marginLeft=l+'px';
		f.style.marginTop=t+'px';
		if (an2<70) window.setTimeout('next2()',10);
	}
	else
	if (an2<=105)
	{
		d=(Math.cos(((an2-70)*pi)/35)+1)/2;
		l=d*0+(1-d)*-400;
		t=d*-268+(1-d)*-268;
		f=document.getElementById('frm2');
		f.style.marginLeft=l+'px';
		f.style.marginTop=t+'px';
		if (an2<105) window.setTimeout('next2()',10);
	}
	else
	if (an2<=140)
	{
		d=(Math.cos(((an2-105)*pi)/35)+1)/2;
		l=d*-400+(1-d)*0;
		t=d*-268+(1-d)*-532;
		f=document.getElementById('frm2');
		f.style.marginLeft=l+'px';
		f.style.marginTop=t+'px';
		if (an2<140) window.setTimeout('next2()',10);
	}
	else
	if (an2<=175)
	{
		d=(Math.cos(((an2-140)*pi)/35)+1)/2;
		l=d*0+(1-d)*-400;
		t=d*-532+(1-d)*-532;
		f=document.getElementById('frm2');
		f.style.marginLeft=l+'px';
		f.style.marginTop=t+'px';
		if (an2<175)
		{
			window.setTimeout('next2()',10);
		}
		else
		{
			document.getElementById('nbt2').innerHTML='Ver de nuevo';
		}
	}
	else
	if (an2<=210)
	{
		d=(Math.cos(((an2-175)*pi)/35)+1)/2;
		l=d*-400+(1-d)*0;
		t=d*-532+(1-d)*0;
		f=document.getElementById('frm2');
		f.style.marginLeft=l+'px';
		f.style.marginTop=t+'px';
		window.setTimeout('next2()',10);
	}
	else
	{
		an2=0;
		document.getElementById('nbt2').innerHTML='Siguiente';
	}
}