var hl='#99CC33';
var ll='#D6E34A';
var mb='#F7F7F7';

var myWidth=450;
var lastclicked = 0;
var l=myWidth;

function scrollit(text,i){
if (l == myWidth) {
	if (lastclicked==i) return;
	}
lastclicked = i;
l = l - 20;
if (l > 20) {
document.getElementById('inside').innerHTML=text;
document.getElementById('inside').style.left=l+"px";
}
else document.getElementById('inside').style.left="0px";

if (l > 20)  setTimeout("scrollit('"+text+"',"+i+")",10);
else {
	l=myWidth;	
	if (i != 1) document.getElementById('menu1').style.backgroundColor=ll;
	else {
		document.getElementById('lftbx').innerHTML='<div style="margin-left:10px;">'+about+'</div>';
		document.getElementById('toppicbox').innerHTML='<img src="/images/rtboxphotos/top/catpaw.jpg">';
		document.getElementById('botpicbox').innerHTML='<img src="/images/rtboxphotos/bot/catpaw.jpg">';
		}
	if (i != 2) document.getElementById('menu2').style.backgroundColor=ll;
	else {
		document.getElementById('lftbx').innerHTML='<div style="margin-left:10px;">'+resources+'</div>';
		document.getElementById('toppicbox').innerHTML='<img src="/images/rtboxphotos/top/doggiebag.jpg">';
		document.getElementById('botpicbox').innerHTML='<img src="/images/rtboxphotos/bot/doggiebag.jpg">';
		}
	if (i != 3) document.getElementById('menu3').style.backgroundColor=ll;
	else {
		document.getElementById('lftbx').innerHTML='<div style="margin-left:10px;">'+gallery+'</div>';
		document.getElementById('toppicbox').innerHTML='<img src="/images/rtboxphotos/top/daisy.jpg">';
		document.getElementById('botpicbox').innerHTML='<img src="/images/rtboxphotos/bot/daisy.jpg">';
		}
	if (i != 4) document.getElementById('menu4').style.backgroundColor=ll;
	else {
		document.getElementById('lftbx').innerHTML='<div style="margin-left:10px;">'+sos+'</div>';
		document.getElementById('toppicbox').innerHTML='<img src="/images/rtboxphotos/top/rescue.jpg">';
		document.getElementById('botpicbox').innerHTML='<img src="/images/rtboxphotos/bot/rescue.jpg">';
		}
	if (i != 5) document.getElementById('menu5').style.backgroundColor=ll;	
	else {
		document.getElementById('toppicbox').innerHTML='<img src="/images/rtboxphotos/top/catcomp.jpg">';
		document.getElementById('botpicbox').innerHTML='<img src="/images/rtboxphotos/bot/catcomp.jpg">';
		}
	}
}

function chgcell(a,c){
document.getElementById(a+c).style.backgroundColor=hl;
document.getElementById('animal'+a).style.backgroundColor=hl;
document.getElementById('animal'+a).style.color="#000000";
document.getElementById('condition'+c).style.backgroundColor=hl;
document.getElementById('condition'+c).style.color="#000000";
return;
}

function revertcell(a,c,s){
document.getElementById(a+c).style.backgroundColor="#"+s;
document.getElementById('animal'+a).style.backgroundColor=mb
document.getElementById('animal'+a).style.color="";
document.getElementById('condition'+c).style.backgroundColor="#"+s; 
document.getElementById('condition'+c).style.color="";
return;
}