function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

           function mascara_data(campo){ 
		      var data;
              var mydata = ''; 
			  data = eval("document.info."+campo+".value");
              mydata = mydata + data; 
              if (mydata.length == 2){ 
                  mydata = mydata + '/'; 
                  document.info.dtnasc.value = mydata; 
              } 
              if (mydata.length == 5){ 
                  mydata = mydata + '/'; 
                  document.info.dtnasc.value = mydata; 
              } 
          } 
           
          function verifica_data () { 

            dia = (document.info.dtnasc.value.substring(0,2)); 
            mes = (document.info.dtnasc.value.substring(3,5)); 
            ano = (document.info.dtnasc.value.substring(6,10)); 

            situacao = ""; 
            // verifica o dia valido para cada mes 
            if ((dia < 01)||(dia < 01 || dia > 30) && (  mes == 04 || mes == 06 || mes == 09 || mes == 11 ) || dia > 31) { 
                situacao = "falsa"; 
            } 

            // verifica se o mes e valido 
            if (mes < 01 || mes > 12 ) { 
                situacao = "falsa"; 
            } 

            // verifica se e ano bissexto 
            if (mes == 2 && ( dia < 01 || dia > 29 || ( dia > 28 && (parseInt(ano / 4) != ano / 4)))) { 
                situacao = "falsa"; 
            } 
    
            if (document.info.dtnasc.value == "") { 
                situacao = "falsa"; 
            } 
    
            if (situacao == "falsa") { 
                alert("Data inválida!"); 
                document.info.dtnasc.focus(); 
            } 
          } 
function valida()
{
	if (document.info.nome.value=="")
	{
		alert("Preencha o campo \"NOME\"!")
		document.info.nome.focus();
		return false
	}
	if (document.info.email.value=="")
	{
		alert("Preencha o campo \"E-MAIL\"!")
		document.info.email.focus();
		return false
	}
 return true;
}
function valida1()
{
	if (document.info.nome.value=="")
	{
		alert("Preencha o campo \"NOME\"!")
		document.info.nome.focus();
		return false
	}
	if (document.info.email.value=="")
	{
		alert("Preencha o campo \"E-MAIL\"!")
		document.info.email.focus();
		return false
	}
 return true;
}

if (window.Event) 
document.captureEvents(Event.MOUSEUP); 

function nocontextmenu() 
{ 
event.cancelBubble = true 
event.returnValue = false; 

return false; 
} 

function norightclick(e) 
{ 
if (window.Event) 
{ 
if (e.which == 2 || e.which == 3) 
return false; 
} 
else 
if (event.button == 2 || event.button == 3) 
{ 
event.cancelBubble = true 
event.returnValue = false; 
return false; 
} 

} 
if (document.layers) { 
document.captureEvents(Event.MOUSEDOWN); 
} 
document.oncontextmenu = nocontextmenu; 
document.onmousedown = norightclick; 
document.onmouseup = norightclick;

function Abre(lang,cod_conteudo)
{
 window.open("detalhe_conteudo415a.html?lang=" + lang + "&CodConteudo=" + cod_conteudo,"detalhe","height=300,width=419,scrollbars=1")
}
function Foto(op,cod_foto)
{
 window.open("detalhe_foto3472.html?op=" + op + "&CodFoto=" + cod_foto,"foto","height=450,width=580,scrollbars=1")
}
function Novidade(lang,cod_novidade)
{
 window.open("view_novidade415a.html?lang=" + lang + "&CodNovidade=" + cod_novidade,"novidade","height=300,width=400")
}
function Receita(lang,cod_receita)
{
 window.open("view_receita415a.html?lang=" + lang + "&CodReceita=" + cod_receita,"receita","height=300,width=459,scrollbars=1")
}
function PopUp(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
toolbar_str = toolbar ? 'yes' : 'no';
menubar_str = menubar ? 'yes' : 'no';
statusbar_str = statusbar ? 'yes' : 'no';
scrollbar_str = scrollbar ? 'yes' : 'no';
resizable_str = resizable ? 'yes' : 'no';
window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+', menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}
  function mOvr(src,clrOver) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = clrOver;
	}
  }
  function mOut(src,clrIn) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = clrIn;
	}
  }
  function mClk(src) {
    if(event.srcElement.tagName=='TD'){
	  src.children.tags('A')[0].click();
    }
  }
function Video(v)
{
 window.open("view_video86f8.html?video=" + v,"video","height=300,width=400")
}
function Mapa()
{
 window.open("view_mapa.html","mapa","height=500,width=700,scrollbars=1,resizable=1")
}
function Galeria()
{
 window.open("galeria_pousada/index.html","galeria","height=400,width=620,scrollbars=0,resizable=0")
}
function vwFoto(maior)
{
 window.open("view_foto5b7d.html?maior=" + maior,"foto","height=450,width=580,scrollbars=1")
}
function vwFolder(lang)
{
 window.open("view_folder415a.html?lang=" + lang,"folder","scrollbars=1")
}
function maximiza() {
	window.moveTo(0,0);
	window.moveTo(0,0);
	if (document.all) {
		top.window.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById) {
		if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
			top.window.outerHeight = screen.availHeight;
			top.window.outerWidth = screen.availWidth;
		}
	}
}
function vwFotoULeve()
{
 window.open("imagens/ultra_leve.jpg","foto1","height=165,width=240,scrollbars=0")
}