
function dosubmit(jan) {
resultado=window.open('',jan,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=350,height=325");
}

function AbreAmigo(abreamigo) {
resultado=window.open('',abreamigo,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=500,height=400");
}

function IndicaSite(indicasite) {
resultado=window.open('',indicasite,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=no,copyhistory=no,width=350,height=350");
}


function add_bookmark() {
var browsName = navigator.appName; 
if (browsName == "Microsoft Internet Explorer") { 
window.external.AddFavorite('http://www.feriasbrasil.com.br','feriasbrasil.com.br');
} else 
if (browsName == "Netscape") {
alert ("\nPara adicionar essa página ao seu BookMark aperte CTRL+D");
}
}

// XWindow

function xWindow(name, w, h, x, y, loc, men, res, scr, sta, too)
{
  var e='',c=',',xf='left=',yf='top='; this.n = name;
  if (document.layers) {xf='screenX='; yf='screenY=';}
  this.f = (w?'width='+w+c:e)+(h?'height='+h+c:e)+(x>=0?xf+x+c:e)+
    (y>=0?yf+y+c:e)+'location='+loc+',menubar='+men+',resizable='+res+
    ',scrollbars='+scr+',status='+sta+',toolbar='+too;
  this.opened = function() {return this.w && !this.w.closed;};
  this.close = function() {if(this.opened()) this.w.close();};
  this.focus = function() {if(this.opened()) this.w.focus();};
  this.load = function(sUrl) {
    if (this.opened()) this.w.location.href = sUrl;
    else this.w = window.open(sUrl,this.n,this.f);
    this.focus();
    return false;
  };
}

// Para fechar, usar um link com: onclick='winToys.close()' 
// Paara dar o focus,  usar um link com: onclick='winToys.focus()'

//  Definicoes das Janelas XWindow:  (name, w, h, x, y, loc, men, res, scr, sta, too) 

var FBADSAmpliaFotosPopup = new xWindow('FBADSAmpliaFotosPopup',460,450,200,150,0,0,0,1,0,0);

var FBADSPreviewAnuncio = new xWindow('FBADSPreviewAnuncio',760,400,10,100,0,0,0,1,0,0);
var FBADSEnviaAmigoPopup = new xWindow('FBADSEnviaAmigoPopup',500,400,10,100,0,0,0,1,0,0);
var FBADSDispPopup = new xWindow('FBADSDispPopup',330,350,10,100,0,0,0,0,0,0);
var FBADSDepoimentos = new xWindow('FBADSDepoimentos',760,400,10,100,0,0,0,1,0,0);
var FBADSStatsAdmin = new xWindow('FBADSStatsAdmin',1024,500,10,10,0,0,0,1,0,0);
var FBADSAdmGeneralPopup = new xWindow('FBADSAdmGeneralPopup',640,450,10,10,0,0,0,1,0,0);
var FBADSLinkExterno = new xWindow('FBADSLinkExterno',0,0,0,0,1,1,1,1,1,1);

var FBADSTurismoInternet = new xWindow('FBADSTurismoInternet',500,322,200,150,0,0,0,0,0,0);

var FBAdmin_Detail = new xWindow('FBAdmin_Detail',screen.width,screen.height,0,0,1,1,1,1,1,1);

var fbwinmain = new xWindow('fbwinmain',screen.width,screen.height,0,0,1,1,1,1,1,1);

var FBGaleria = new xWindow('FBGaleria',640,525,80,5,0,0,0,0,0,0);

var FBGMapa = new xWindow('FBGMapa',480,460,80,5,0,0,0,0,0,0);
var FBGMapaEdit = new xWindow('FBGMapaEdit',600,560,80,5,0,0,0,0,0,0);
var FBAdmin_FotosADM = new xWindow('FBAdmin_FotosADM',960,600,50,100,0,0,0,1,0,0);
var FBGMapaDetalhe = new xWindow('FBGMapaDetalhe',570,430,80,5,0,0,0,0,0,0);

var FBNovaJanelaMapa = new xWindow('FBNovaJanelaMapa',screen.width,screen.height,0,0,1,1,1,1,1,1);

var FBGMapaDefinir = new xWindow('FBGMapaDefinir',749,520,100,100,0,0,0,0,0,0);

// incio funcao para show / hide um div

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

// fim funcao para para show / hide um div


/* Inicio funcao para fix do flicker no IE6 */
    (function (){
	var  mflick = document.uniqueID /*IE*/
	&& document.compatMode  /*>=IE6*/
	&& !window.XMLHttpRequest /*<=IE6*/
	&& document.execCommand ;
	
	try{
		if(!!mflick){
			mflick("BackgroundImageCache", false, true) /* = IE6 only */ 
		}
		
	}catch(oh){};
})();
/* Fim funcao para fix do flicker no IE6 */


 
//-->
<!-- SCRIPT QUE POSICIONA O POPUP DE FOTOS COM TOP=0 QUANDO A RESOLUÇÃO FOR 800 x 600 -->
b_versao = parseInt(navigator.appVersion);
var win = null;
function NewWindow(mypage,myname,w,h,scroll,size)
{
	if ((screen.width == 800) && (screen.height == 600))
	{
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 110;
		TopPosition = (screen.height) ? (screen.height-h)/0 : 0;
	}
	else
	{
		LeftPosition = 200;
		TopPosition = 100;
	}
	var settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+size+'';
	var win = window.open(mypage,myname,settings);
	if(win.window.focus){win.window.focus();}
}



function BannerRandomicoExpand(url, width, height)
{
	document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="' + width + '" HEIGHT="' + height + '" id="BannerRandomico" wmode="transparent">');
	document.write('<PARAM NAME=movie VALUE="' + url + '">');
	document.write('<PARAM NAME=quality VALUE=high>');
	document.write('<PARAM NAME=bgcolor VALUE=#FFFFFF>');
	document.write('<PARAM NAME=wmode VALUE=transparent>');
	document.write('<EMBED src="' + url + '" quality="high" wmode="transparent" bgcolor="#FFFFFF" WIDTH="' + width + '" HEIGHT="' + height + '" NAME="BannerRandomico" TYPE="application/x-shockwave-flash" PLUGINSPAGE="https://www.macromedia.com/go/getflashplayer">');
	document.write('</EMBED>');
	document.write('</OBJECT>');
}

if ( document.body ) {
	var res = window.screen.width;
	
	if ( res < 1024 ) {
		document.body.className = 's800';
	} else {
		document.body.className = 's1024';	
	}
}
/* Ajusta a largura do campo de busca */
$(function() {
	var w = window.screen.width;
	var bText = '» Quero ir para';
	$("#quero_ir").val(bText)
					.focus(function() {
						if ( $(this).val() == bText ) $(this).val('');
					}).blur(function() {
						if ( $(this).val().length == 0 ) $(this).val(bText);
					});
	var $menuAzul = $("#menu_azul");
	$("#menu li",$menuAzul).hover(function() {
								var $this = $(this);
								if ( $this.hasClass('sempicote') ) {
									$this.removeClass('sempicote');
									$this.addClass('menu_azul_hover_sempicote');
									$menuAzul.css('backgroundColor','#50a9e7');
								} else {
									$this.addClass('menu_azul_hover');
								}
							},function() {
								var $this = $(this);
								if ( $this.hasClass('menu_azul_hover_sempicote') ) {
									$this.removeClass('menu_azul_hover_sempicote');
									$this.addClass('sempicote');
									$menuAzul.css('backgroundColor','#3C86C3');
								} else {
									$this.removeClass('menu_azul_hover');
								}
							}).click(function() {
								window.location.href = $(this).children('a').attr('href');
							});
	if ( w < 1024 ) { $("#logo_topo").attr('src',$("#logo_topo").attr('src').replace('logo_v','logo_h')); }
});