var a = 1;
var max;

function iniautofocus(c)
{
a=c;
max=1;
autofocus();
}

function autofocus()
{
focuspage(a);
if (a>max)
{
a=a-1;
var t=setTimeout("autofocus()",25);
}
}


function focuspage(pid)
{
var page= "p"+pid;
var spine="p"+pid+"s";
document.getElementById(page).style.width="549px";
document.getElementById(page).style.backgroundColor="#222222";
document.getElementById(spine).style.width="0px";
document.getElementById(spine).style.visibility="hidden";

for (i=1;i<=7;i++)
{
if (i!=pid)
{
blurpage(i);
}
}
}

function blurpage(pid)
{
var pageout= "p"+pid;
var spine="p"+pid+"s";
document.getElementById(pageout).style.width="24px";
document.getElementById(pageout).style.backgroundColor="#777777";
document.getElementById(spine).style.width="24px";
document.getElementById(spine).style.visibility="visible";
}

function openlink(link) 
{
window.open(link);
}