// JavaScript Document
function dataExt(){
var meses = new Array("","Janeiro","Fevereiro","Março",
  						"Abril","Maio","Junho","Julho",
						"Agosto","Setembro","Outubro",
						"Novembro","Dezembro");
var time = new Date();
var mes = meses[time.getMonth() + 1];
var data = time.getDate();
var ano = time.getFullYear();
data = document.write("Recife, " + data + " de " + mes + " de " + ano);
return data;
}
function logar(){
	if (navigator.appName.indexOf("Netscape")!=-1){  // determine IE version
		if(evtObj.which==13)
			acesso()
	}else{
		if(event.keyCode==13)
			acesso()
	}		
}

function acesso(){
	with(document.forms[0]){
		if(login.value==''){
			alert("Informe seu login.")
			login.focus()
			return false
		}
		if(senha.value==''){
			alert("Informe sua senha.")
			senha.focus()
			return false
		}
		submit()
	}
}

function acesso_oficina(){
	with(document.forms[0]){
		if(document.form2.cgc.value==''){
			alert("Informe o cgc da oficina.")
			document.form2.cgc.focus()
			return false
		}
		if(document.form2.senha.value==''){
			alert("Informe a senha oficina.")
			document.form2.senha.focus()
			return false
		}
		document.form2.submit();
	}
}

function generate_table1(ind){
	switch(ind){
		case 0:
				document.writeln('<table width="780" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" id="topo1">')
				document.writeln('<tr><td><img src="img/home11.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home12.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home13.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home14_a.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home15_a.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home16_a.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home17_a.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home18_a.jpg" width="80" height="70" border="0" alt=""></td>')
				document.writeln('</tr></table>')
				break
		case 1:
				document.writeln('<table width="780" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" id="topo1">')
				document.writeln('<tr><td><img name="home11" src="img/home11.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home12.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home13.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home14_b.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home15_b.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home16_b.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home17_b.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home18_b.jpg" width="80" height="70" border="0" alt=""></td>')
				document.writeln('</tr></table>')
				break
		case 2:
				document.writeln('<table width="780" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" id="topo1">')
				document.writeln('<tr><td><img name="home11" src="img/home11.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home12.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home13.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home14_c.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home15_c.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home16_c.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home17_c.jpg" width="100" height="70" border="0" alt=""></td>')
				document.writeln('<td><img src="img/home18_c.jpg" width="80" height="70" border="0" alt=""></td>')
				document.writeln('</tr></table>')
				break
		}
}

function generate_table2(num){
	switch(num){
		case 0:
				document.write('<table width="780" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" id="topo2">')
				document.write('<tr><td><img src="img/home21.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home22.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home23.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home24.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home25_a.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home26_a.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home27_a.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home28_a.jpg" width="80" height="70" border="0" alt=""></td>')
				document.writeln('</tr></table>')
				break
		case 1:
				document.write('<table width="780" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" id="topo2">')
				document.write('<tr><td><img src="img/home21.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home22.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home23.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home24.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home25_b.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home26_b.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home27_b.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home28_b.jpg" width="80" height="70" border="0" alt=""></td>')
				document.writeln('</tr></table>')
				break
		case 2:
				document.write('<table width="780" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff" id="topo2">')
				document.write('<tr><td><img src="img/home21.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home22.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home23.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home24.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home25_c.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home26_c.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home27_c.jpg" width="100" height="70" border="0" alt=""></td>')
				document.write('<td><img src="img/home28_c.jpg" width="80" height="70" border="0" alt=""></td>')
				document.writeln('</tr></table>')
				break
	}
}

function upperMe(obj) {
  var upperCaseVersion = obj.value.toUpperCase();
  obj.value = upperCaseVersion;
}
