//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();
}

var image1 = new Image(); 
cursor.src =  "../img/cursor.jpg"; 
 
function LoadImg(img) { 
document.image.src = eval(img + ".src"); 
}
//-------------------------------------
function conta(item) {
    if(item.value > 5){
        alert("O número de ítens não pode ser superior a 5!! \nCaso deseje maior quantidade, solicite através do formulário de contato.");
        item.value=5;
    }
		//var valor = parent.content.document.frm.f_vlrcusto.value;
		//var val = valor.replace(",",".");
		/*if(val > 0 ){

			parent.content.document.frm.f_vlrvenda.value=valorVenda.toFixed(2);
	    }*/
}

