var ro = new Array(8);
var rob = new Array(8);
var x = 0;

for(x=0;x<8;x++) rob[x] = false;
for(x=0;x<8;x++) ro[x] = null;
for(x=0;x<8;x++){
	var bpic = document.getElementById('bpic'+x);
	if(bpic != null) bpic.style.visibility = "hidden";
}

function Loaded(id){
	
	document.getElementById('bpic'+id).style.visibility = "visible";
	
}

function RollOver(id){
	
	if(rob[id] == false){
		
		rob[id] = true;
		
		if(ro[id] != null) clearTimeout(ro[id]);
		
		document.getElementById('p'+id).className = 'black_bg';
		document.getElementById('t'+id).className = 'black_bg';
		document.getElementById('c'+id).className = 'black_bg';
		
		document.getElementById('pic'+id).style.visibility = "hidden";
		
	}else clearTimeout(ro[id]);
	
}

function RollOut(id){
	
	if(ro[id] != null) clearTimeout(ro[id]);
	ro[id] = setTimeout("tRollOut("+id+");",100);
	
}

function tRollOut(id){
	
	document.getElementById('p'+id).className = 'white_bg';
	document.getElementById('t'+id).className = 'white_bg';
	document.getElementById('c'+id).className = 'white_bg';
	
	document.getElementById('pic'+id).style.visibility = "visible";
	
	rob[id] = false;
	
}

function Click(id){
	
	tRollOut(id);
	
}
