function writeLetreiro(){
		
		document.write('<table cellpadding="0" cellspacing="0" width="100%" height="20" bgcolor="#F2F0C6">')
			document.write('<tr>')
				document.write('<td height="20">')
					document.write('<img src="img/seta_red.gif" width="9" height="7" alt="" border="0" style="margin-left:10px; margin-right:10px">')
				document.write('</td>')
				document.write('<td>')
					document.write('<div class="div_letreiro">')
						document.write('<marquee><span>Seja bem-vindo ao site da Colonial Portas e Janelas &nbsp; &nbsp; &nbsp; &nbsp;</span></marquee>')
					document.write('</div>')
				document.write('</td>')
			document.write('</tr>')
		document.write('</table>')
		
}

function validaContato(){
	
	if (document.formContato.nome.value == ""){
		alert('Campo nome não pode estar vazio')
		document.formContato.nome.focus();
		return false;
	}
	
	if (document.formContato.email.value == ""){
		alert('Campo e-mail não pode estar vazio')
		document.formContato.email.focus();
		return false;
	}
	
	parte1 = document.formContato.email.value.indexOf("@");
	parte2 = document.formContato.email.value.indexOf(".");
	parte3 = document.formContato.email.value.length;
		if (!(parte1 >= 3 && parte2 >= 6 && parte3 >= 9)) {
		alert ("O campo " + document.formContato.email.name + " deve ser conter um e-mail válido!");
		document.formContato.email.focus();
		return false;
	}
	
	if (document.formContato.assunto.value == ""){
		alert('Campo assunto não pode estar vazio')
		document.formContato.assunto.focus();
		return false;
	}
	
	
	
	if (document.formContato.mensagem.value == ""){
		alert('Campo mensagem não pode estar vazio')
		document.formContato.mensagem.focus();
		return false;
	}
	
	document.formContato.submit()
	
}


window.onload = function(){ 
	if (document.getElementsByTagName) { 
	// Get all the tags of type object in the page. 
	var objs = document.getElementsByTagName("object"); 
		for (i=0; i<objs.length; i++) { 
		// Get the HTML content of each object tag 
		// and replace it with itself. 
		objs[i].outerHTML = objs[i].outerHTML; 
		} 
	} 
} 

// When the page unloads: 
window.onunload = function() { 
	if (document.getElementsByTagName) { 
	//Get all the tags of type object in the page. 
	var objs = document.getElementsByTagName("object"); 
		for (i=0; i<objs.length; i++) { 
		// Clear out the HTML content of each object tag 
		// to prevent an IE memory leak issue. 
		objs[i].outerHTML = ""; 
		} 
	} 
}

function abreFoto(cod, desc){
	idFoto = cod;
  	open("abreFoto.php?idFoto=" + idFoto + "&desc=" + desc,"fotos", "toolbar=no,location=no,status=no,menubar=no,resizable=no,scrollbars=no,width=300,height=300,top=130,left=270");
}


