
//troca a cor das guias
function ApplyXPOverStyle(obj,color,color2,addborder) { 
	 obj.style.backgroundColor = color;
	 obj.style.borderColor = color2;
    if (addborder=='true') {obj.style.borderStyle='solid';obj.style.borderWidth='1px'}
}

function ApplyXPOutStyle(obj) {
	obj.style.backgroundColor = '';
	if (navigator.appName == 'Netscape') { obj.style.borderColor = 'EEEEEE'; } else { 
	obj.style.borderColor = ''; }
	obj.style.borderStyle = '';
}

//troca a cor dos botões de noticias
function ApplyXPOverStyle2(obj,color,color2,addborder) { 
	obj.style.backgroundColor = color;
	obj.style.borderColor = color2;
    if (addborder=='true') {obj.style.borderStyle='solid';obj.style.borderWidth='2px'}
}

function ApplyXPOutStyle2(obj,color,color2,addborder) { 
	obj.style.backgroundColor = color;
	obj.style.borderColor = color2;
    if (addborder=='true') {obj.style.borderStyle='solid';obj.style.borderWidth='2px'}
}




// ******************************************************************

sfHoverH = function() {
	var uls = document.getElementsByTagName("ul");
	for (var i=0; i<uls.length; i++) {
		menuS = new RegExp("menuS");
		if (uls[i].getAttribute("className").match(menuS)) {

			var sfEls = uls[i].getElementsByTagName("li");
			for (var h=0; h<sfEls.length; h++) {
				sfEls[h].onmouseover=function() {
					this.className+=" sfhover";
				}
				sfEls[h].onmouseout=function() {
					this.className=this.className.replace(new RegExp(" sfhover\\b"));
				}
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHoverH);


function validar()
{
	var frm = document.contato
	var numeros = "1234567890"
	var letras = "acdefghijklmnopqrstuvwxyzçáãàóõòôíì"
	
	if(frm.nome.value.length == 0)
	{
		alert("Por favor preencha o seu NOME")
		frm.nome.focus()
		return false;
	}
	
	if(frm.email.value.length == 0)
	{
		alert("Por favor preencha o seu EMAIL")
		frm.email.focus()
		return false;
	}

	if (frm.email.value.indexOf("@") == -1 || frm.email.value.indexOf(".") == -1 || frm.email.value.indexOf(" ") != -1 || frm.email.value.indexOf("@") == 0 || frm.email.value.substring(frm.email.value.indexOf("@")+1, frm.email.value.length).indexOf("@") != -1 || frm.email.value.substring(frm.email.value.indexOf("@")+1, frm.email.value.length).indexOf(".") == -1 || frm.email.value.substring(frm.email.value.indexOf("@")+1, frm.email.value.indexOf("@")+2) == "." || frm.email.value.indexOf(".")+1 == frm.email.value.length)
	{
		alert("Por favor preencha o seu EMAIL corretamente!");
		frm.email.focus();
		return false;
	}

	if(frm.telefone.value.length == 0)
	{
		alert("Por favor preencha o seu TELEFONE")
		frm.telefone.focus()
		return false;
	}
	
	if(frm.cidade.value.length == 0)
	{
		alert("Por favor preencha a sua CIDADE")
		frm.cidade.focus()
		return false;
	}
	
	if(frm.comentarios.value.length == 0)
	{
		alert("Por favor faça o COMENTÁRIO")
		frm.comentarios.focus()
		return false;
	}

	return true
}

function ampliar(url){
	w = 200
	h = 200
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('ampliar.asp?'+url, 'zoom', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+'');
}

function videos_visualizacao(url) 
{
	w = 425;
 	h = 355;
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('videos_visualizacao.asp?'+ url, 'visualizacao', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+',menubar=no,scrollbars=no');
}

function resultado(x){
	w = 310
	h = 260
	centerX = (screen.height/2)-h/2;
	centerY = (screen.width/2)-w/2;
	window.open('enquete_resultado.asp?x='+ x, 'enquete', 'width='+w+', height='+h+',top='+centerX+', left='+centerY+'');
}

// ******************************************************************