// JavaScript Document

//msg na barra de status

var hellotext="::..Sejam bem Vindos ao Sitio Chaminé!..::"
var thetext=""
var started=false
var step=0
var times=1

function welcometext()
{
times--
if (times==0)
{
if (started==false)
{
started = true;
window.status = hellotext;
setTimeout("anim()",1);
}
thetext = hellotext;
}
}

function showstatustext(txt)
{
thetext = txt;
setTimeout("welcometext()",4000)
times++
}

function anim()
{
step++
if (step==12) {step=1}
if (step==1) {window.status='>>=========='+thetext+'==========<<'}
if (step==2) {window.status='=>>========='+thetext+'=========<<='}
if (step==3) {window.status='==>>========'+thetext+'========<<=='}
if (step==4) {window.status='===>>======='+thetext+'=======<<==='}
if (step==5) {window.status='====>>======'+thetext+'======<<===='}
if (step==6) {window.status='=====>>====='+thetext+'=====<<====='}
if (step==7) {window.status='======>>===='+thetext+'====<<======'}
if (step==8) {window.status='=======>>==='+thetext+'===<<======='}
if (step==9) {window.status='========>>=='+thetext+'==<<========'}
if (step==10) {window.status='=========>>='+thetext+'=<<========='}
if (step==11) {window.status='==========>>'+thetext+'<<=========='}
setTimeout("anim()",100);
}
welcometext();

//bloqueio do botão direito do mouse

function click() {
if (event.button==2||event.button==3) {
 oncontextmenu='return false';
  }
}
document.onmousedown=click
document.oncontextmenu = new Function("return false;");

//mensagem no titulo

var message = new Array();

message[0] = "::.Sitio Chaminé.:: ";
message[1] = "::.Um paraíso Pertinho de você!!!.:: ";
message[2] = "::.Venha Conferir a sua melhor opção em Lazer!!.:: ";
message[3] = "::.Piscinas,Splash,Tobo Água, Play Grand, Mirante, Caminhada Ecológica, e muito mais!.::";
message[4] = "::.Venha Conferir!.:: ";
message[5] = "::.Hopedagem, Excursão, e a melhor opção de lazer!.:: ";
message[6] = "::.Preserve a naturesa!.:: ";

var reps = 2;
var speed = 200; // Set the overall speed (larger number = slower action).

var p = message.length;
var T = "";
var C = 0;
var mC = 0;
var s = 0;
var sT = null;
if (reps < 1) reps = 1;
function doTheThing() {
T = message[mC];
A();
}
function A() {
s++;
if (s > 8) { s = 1;}
// you can fiddle with the patterns here...
if (s == 1) { document.title = '||||||====||| '+T+' -----'; }
if (s == 2) { document.title = '|||=|||===||| '+T+' -----'; }
if (s == 3) { document.title = '|||==|||==||| '+T+' -----'; }
if (s == 4) { document.title = '|||===|||=||| '+T+' -----'; }
if (s == 5) { document.title = '|||====|||||| '+T+' -----'; }
if (s == 6) { document.title = '|||===|||=||| '+T+' -----'; }
if (s == 7) { document.title = '|||==|||==||| '+T+' -----'; }
if (s == 8) { document.title = '|||=|||===||| '+T+' -----'; }
if (C < (8 * reps)) {
sT = setTimeout("A()", speed);
C++;
}
else {
C = 0;
s = 0;
mC++;
if(mC > p - 1) mC = 0;
sT = null;
doTheThing();
}
}
doTheThing();

// menu rolouver

var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {};

Spry.BrowserSniff = function()
{
	var b = navigator.appName.toString();
	var up = navigator.platform.toString();
	var ua = navigator.userAgent.toString();

	this.mozilla = this.ie = this.opera = this.safari = false;
	var re_opera = /Opera.([0-9\.]*)/i;
	var re_msie = /MSIE.([0-9\.]*)/i;
	var re_gecko = /gecko/i;
	var re_safari = /(applewebkit|safari)\/([\d\.]*)/i;
	var r = false;

	if ( (r = ua.match(re_opera))) {
		this.opera = true;
		this.version = parseFloat(r[1]);
	} else if ( (r = ua.match(re_msie))) {
		this.ie = true;
		this.version = parseFloat(r[1]);
	} else if ( (r = ua.match(re_safari))) {
		this.safari = true;
		this.version = parseFloat(r[2]);
	} else if (ua.match(re_gecko)) {
		var re_gecko_version = /rv:\s*([0-9\.]+)/i;
		r = ua.match(re_gecko_version);
		this.mozilla = true;
		this.version = parseFloat(r[1]);
	}
	this.windows = this.mac = this.linux = false;

	this.Platform = ua.match(/windows/i) ? "windows" :
					(ua.match(/linux/i) ? "linux" :
					(ua.match(/mac/i) ? "mac" :
					ua.match(/unix/i)? "unix" : "unknown"));
	this[this.Platform] = true;
	this.v = this.version;

	if (this.safari && this.mac && this.mozilla) {
		this.mozilla = false;
	}
};
// pop up aqui
function fecha_banner()
{
	var banner_obj = document.getElementById('banner_popup');
	banner_obj.style.display = 'none';
}

function fecha_banner_timeout()
{
	setTimeout('fecha_banner()', 10000);
}

function abre_banner()
{
	var banner_obj = document.getElementById('banner_popup');

	banner_obj.style.left = '38%';
	banner_obj.style.top = '34%';

	banner_obj.style.display = '';

	fecha_banner_timeout();
}

// Fim do pop up

