var x=0;  var action; var first=new Boolean(1);

function rotate(num) {
fs=document.ff.slide;
x=num%fs.length;
if(x<0) x=fs.length-1;
document.images.show.src=fs.options[x].value;
fs.selectedIndex=x;
y=x+1;
showLayer('layer'+y);
CngClass('id'+y);
}

function set_action(play) {
action = play;
}

function auto() {
if(action == "start"){
if (!first) rotate(++x);
setTimeout("auto()", 4000);
first=0;}
}
