function img_alterna(xthis,nome,bo){
	if (bo==0){
		//xthis.src='img/botao'+nome+'.jpg';
		document.getElementById('descricao_produto').innerHTML='&nbsp;';
	}
	else{
		//xthis.src='img/botao'+nome+'over.jpg';
		document.getElementById('descricao_produto').innerHTML=xthis.alt;
	
	}
		
}
function cssresolucao(){
	if(window.screen.width<=800) {
	document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/css800.css\" media=\"screen\"/>");
	}
}

//Rede credenciada - Funções//
function ValidaCampos() {
prod=document.getElementById('menuProduto');
est=document.getElementById('menuEstado');
cid=document.getElementById('menuCidade');

	if (prod.options[prod.selectedIndex].value=='') {
		alert('Escolha um produto para consultar.');
		prod.focus();
		return false;
	}
	if (est.options[est.selectedIndex].value=='') {
		alert('Escolha um estado para consultar.');
		est.focus();
		return false;
	}
	if (cid.options[cid.selectedIndex].value=='') {
		alert('Escolha uma cidade para consultar.');
		cid.focus();
		return false;
	}
	return true;
}

function EnviarForm() {
	if (ValidaCampos()) {
		document.getElementById('formu').submit();
	} 
	return true;
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function goProduto(valor){
var x=document.getElementById('menuTipo');
valor= document.getElementById(valor);
//location.href='rede_credenciada.php?codparauf='+valor+'&cv='+x.options[x.selectedIndex].value;
document.location.href='rede_credenciada.php?codparauf='+valor.options[valor.selectedIndex].value+'&cv='+x.options[x.selectedIndex].value;
}
function goUf(valor,est){
var y=document.getElementById('menuTipo');
valor= document.getElementById(valor);
est= document.getElementById(est);
//location.href='rede_credenciada.php?codparauf='+valor+'&cv='+x.options[x.selectedIndex].value;
document.location.href='rede_credenciada.php?codparauf='+valor.options[valor.selectedIndex].value+'&cv='+y.options[y.selectedIndex].value+'&estado='+est.options[est.selectedIndex].value;
}
function goCidade(valor,est,cid){
var z=document.getElementById('menuTipo');
valor= document.getElementById(valor);
est= document.getElementById(est);
cid= document.getElementById(cid);
//location.href='rede_credenciada.php?codparauf='+valor+'&cv='+x.options[x.selectedIndex].value;
document.location.href='rede_credenciada.php?codparauf='+valor.options[valor.selectedIndex].value+'&cv='+z.options[z.selectedIndex].value+'&estado='+est.options[est.selectedIndex].value+'&cidade='+cid.options[cid.selectedIndex].value;
}