var timerRunning=false;
function stopclock (){
	if(timerRunning)
			clearTimeout(timerID);
	timerRunning=false;
}
function startclock (){
	stopclock ();
	showtime ();
}
function showtime() {
	var now=new Date();
	var hours= now.getHours();
	var minutes= now.getMinutes();
	var seconds= now.getSeconds();
	var timeValue=""+ hours;
	timeValue += ((minutes<10) ? ":0" : ":") + minutes
	timeValue += ((seconds<10) ? ":0" : ":") + seconds

	document.form1.relogio.value= timeValue
	timerID = setTimeout("showtime()",1000);
	timerRunning = true;
}
function Imprimir(){
	window.print();
}

function LimpaCampo(campo){
	campo.value = "";
}


function sizeFont (elem, acao){
    // tamanho inicial da fonte (em px)
    var tamInic = 12;
    // Tamanho mínimo da [b]fonte (em px)
    var tamMin = 10;
    // Tamanho máximo da fonte (em px)
    var tamMax = 22;
    // Pega o tamanho da fonte. Se não foi setada ainda (primeira vez que a função é executada) terá como tamanho padrão 'tamInic'.
    if (document.getElementById(elem).style.fontSize == "") {
            var tamFonte = tamInic;
    }else{
		var tamFonte = parseInt(document.getElementById(elem).style.fontSize);
		}
		switch (acao){
			// Aumenta o tamanho, enquanto foi menor que 'tamMax'
			case '+':
					if (tamFonte < tamMax)
							document.getElementById(elem).style.fontSize = (tamFonte + 2) + "px";
			break;
			// Diminui o tamanbo, enquanto for maior que 'tamMin'
			case '-':
					if (tamFonte > tamMin)
							document.getElementById(elem).style.fontSize = (tamFonte - 2) + "px";
			break;
	}
}
