//funçaõ para o rollover do menu
function rollOver(img) {
	img.src = "../img/"+img.id+"_over.png";
}
function rollOut(img) {
	img.src = "../img/"+img.id+".png";
}



//funçoes para o relógio "andando"
var timerID = null;
var timerRunning = false;
function stopClock (){
	if(timerRunning){
		clearTimeout(timerID);
	}
	timerRunning = false;
} 
function showTime() {
	now = new Date();
	hours = now.getHours();
	minutes = now.getMinutes();
	seconds = now.getSeconds();
	
	//monta uma string com hora:minu:segu AM ou PM
	timeValue = "" + ((hours > 12) ? hours - 12 : hours);
	timeValue += ((minutes < 10) ? ":0" : ":") + minutes;
	timeValue += ((seconds < 10) ? ":0" : ":") + seconds;
	timeValue += (hours >= 12) ? " pm" : " am";
	document.getElementById("clock").innerHTML = "Brasil, "+timeValue;
	
	//chama a mesma função (recursivamente) de 1 em 1 segundo
	timerID = setTimeout("showTime()",1000);
	timerRunning = true;
}
function startClock () {
	stopClock();
	showTime();
}
//-------------------------------------
