// Handle rollover links in the new (10/2007) version of the site

// Keep track of which one is active
// var active="home";
var actright="q1";

function show(what)	// make this show up 
{
var thing=document.getElementById(what);
thing.style.display="";
}

function hide(what)	// make this go away
{
var thing=document.getElementById(what);
thing.style.display="none";
}

function hideshow(one,two)
{
hide(one);
show(two);
}

function navbut(what)
{
hide(active);
show(what);
active=what;
}

function qbut(what)
{
hide(actright);
show(what);
actright=what;
}

function itson(what)	// replace pictures with this
{
hide("pictures");
show(what);
}

function itsoff(what)	// get rid of this and put pictures back
{
hide(what);
show("pictures");
}

function settick()
{
x=document.getElementById("p1");
w=document.getElementById("p2");
cycle();
tid=setTimeout("tick()",ticks*1000);
}

function cycle()
{
var pp;
if(oe) {
	if(y<10) pp="0"+y.toString();
	else pp=y.toString();
	x.src="http://www.aa-automovers.com/pics/an"+pp+".jpg";
	oe=0;
	y++;
	if(y>maxy) y=1;
	}
else {
	if(z<10) pp="0"+z.toString();
	else pp=z.toString();
	w.src="http://www.aa-automovers.com/pics/bn"+pp+".jpg";
	oe=1;
	z++;
	if(z>maxz) z=1;
	}
}

function tick()
{
cycle();
tid=setTimeout("tick()",ticks*1000);
}

function over(nav) {
var a=document.getElementById(nav);
a.style.color="FFD130";
a.style.fontFamily="verdana";
}

function off(nav) {
var a=document.getElementById(nav);
a.style.color="FFFFFF";
}

var popw;
function popon(o,what)
{
var left=o.clientX+150+window.screenX;
var top=o.clientY-300;
popw=window.open(what+".html","w2","width=300,height=450,left="+left+",top="+top);
if(!popw) alert("Please turn off popup blocker to see help messages");
}
function popoff()
{
popw.close();
}

