//script para verificar o navegador
IE = (navigator.userAgent.indexOf("Gecko") >= 0)? false: true;

if (!IE)
	window.captureEvents(Event.MOUSEMOVE);

function vetCombo() {
	elemento = document.form1.nomes.options[document.form1.nomes.selectedIndex].value;
	if(elemento == ""){
		return false;
	}
	else{
		location.href = elemento;
	}
}

function combo() {
	total = document.getElementById('cidades').getElementsByTagName('select');
	
	for (i = 0; i < total.length; i++){
		total[i].style.display = "none";				
	}
	
	selecionado = document.form1.uf.options[document.form1.uf.selectedIndex].value;
	document.getElementById(selecionado).style.display = "block";
}


function vaiCidade(qual){
	switch(qual){	
		case "rj": cid = document.form1.rj.options[document.form1.rj.selectedIndex].value; break;		
		case "sp": cid = document.form1.sp.options[document.form1.sp.selectedIndex].value; break;		
		case "es": cid = document.form1.es.options[document.form1.es.selectedIndex].value; break;
	}	
	if(cid != "#"){
		pagina = location.href.substr(0, location.href.lastIndexOf("/") + 1)
		conteudo1.location.href = pagina  + qual + "/" + cid + ".asp"		
	}
}


function mudaHeight(tamanho){
	if(IE)
		setTimeout("redimensiona('" + tamanho + "')", 1000)
	else{
		window.parent.document.getElementById("conteudo1").style.height = tamanho;			
		window.parent.document.getElementById("prancheta").style.height = tamanho;
	}
}

function redimensiona(tamanho){
	window.parent.document.getElementById("conteudo1").style.height = eval(tamanho) - 90;	
}



tempo1 = ""
tempo = ""
a = 1;
j = 0;
set = 0

function voltaSeta(qual){
	if(set == 0){
		if(qual == "cima"){
			document.images["setaBaixo"].src = "/images/seta_03.gif"
			document.getElementById("setaBaixo").style.cursor = "hand"
		}else{
			document.images["setaCima"].src = "/images/seta_02.gif"
			document.getElementById("setaCima").style.cursor = "hand"
		}		
		set = 1		
	}	
}

function movePessoasCima(){	
	if(j != 0){
		if(IE)
			j++;
		else
			j = j + 4;
		
		document.getElementById("todos").style.top = j;
		tempo = setTimeout('movePessoasCima()', 1)		
	}else{
		document.images["setaCima"].src = "/images/seta_02-2.gif"
		document.getElementById("setaCima").style.cursor = "arrow"		
	}
	set = 0
}


function movePessoasBaixo(){
	tamanho = (document.getElementById("todos").offsetHeight - 180) * -1;
	if(j != tamanho){
		if(IE)
			j--;
		else
			j = j - 4;
		document.getElementById("todos").style.top = j;
		
		tempo = setTimeout('movePessoasBaixo()', 1)
	}else{
		document.images["setaBaixo"].src = "/images/seta_03-2.gif"
		document.getElementById("setaBaixo").style.cursor = "arrow"		
	}
	set = 0
}


function mudaImg(img, caminho){
	document.images[img].src = "/donos_caes/produtos/previcox/depoimentos/images/" + caminho;
}

function mostraVets(idDiv){
	
	document.getElementById(ultimo).style.display = "none"		
	document.getElementById("btn_vid").style.display = "none"
	document.getElementById("btn_dep").style.display = "none"
	ultimo = idDiv;	
	document.getElementById(idDiv).style.display = "block"
}
				
function mudaVideo(qual){
	document.getElementById("vid").src = "/veterinarios/caes_gatos/produtos/previcox/depoimentos/videos/" + qual + ".htm";
	document.getElementById("btn_vid").style.display = "none"
	document.getElementById("btn_dep").style.display = "block"
}

function mostraBtVideo(){
	document.getElementById("btn_vid").style.display = "block"	
}




ultimo = ""
function alt(idDiv){	
	function move(e){
		mouseX = (IE)?event.clientX : e.clientX;
		mouseY = (IE)?event.clientY + document.body.scrollTop : e.clientY + document.body.scrollTop;
		document.getElementById(idDiv).style.left = mouseX + 10;
		document.getElementById(idDiv).style.top = mouseY + 10;
	}
	
	if(IE && ultimo != idDiv)
		document.getElementById(idDiv).filters.Blendtrans.apply()
	
	document.getElementById(idDiv).style.display = "block"
	
	if(IE && ultimo != idDiv)
		document.getElementById(idDiv).filters.Blendtrans.play()
	
	document.onmousemove = move;
	ultimo = idDiv;
}



function escondeAlt(idDiv){
	document.getElementById(idDiv).style.display = "none"
}


function paraVideo(qual){
	sclts = document.getElementById(qual).innerHTML;
	document.getElementById(qual).innerHTML = sclts;
}
