function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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];}}
}


/*********************************************
 VALIDA CONTATO
*********************************************/

function ValidaContato(){
	erro = "";
	if (document.contato.nome.value == "") {
		erro = erro + "• Preencha o campo Nome\n";
	}
	if (document.contato.email.value == "") {
		erro = erro + "• Preencha o campo E-mail\n";
	}
	if (document.contato.email.value != "") {
	
     var re = new RegExp;
     re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
     var mailArr = re.exec(document.contato.email.value);
	
     if (mailArr == null) {
         erro = erro + "• O email digitado não é válido\n";
     }
	 }
	 
	if (document.contato.mensagem.value == "") {
		erro = erro + "• Preencha o campo Mensagem\n";
	}
	if (erro == "") {
		document.contato.submit();
	} else {	
		alert("Aconteceram os seguintes erros:           \n\n" + erro);	
	}

}
//-->


/*********************************************
 VALIDA ORÇAMENTO
*********************************************/

function ValidaOrcamento(){
	erro = "";
	if (document.orcamento.nome.value == "") {
		erro = erro + "• Preencha o campo Nome\n";
	}
	if (document.orcamento.email.value == "") {
		erro = erro + "• Preencha o campo E-mail\n";
	}
	if (document.orcamento.telefone.value == "") {
		erro = erro + "• Preencha o campo Telefone\n";
	}
	if (document.orcamento.data.value == "") {
		erro = erro + "• Preencha o campo Data\n";
	}
	if (document.orcamento.horario.value == "") {
		erro = erro + "• Preencha o campo Horário\n";
	}
	if (document.orcamento.local.value == "") {
		erro = erro + "• Preencha o campo Local\n";
	}
	if (document.orcamento.cidade.value == "") {
		erro = erro + "• Preencha o campo Cidade-UF\n";
	}
	if (document.orcamento.convidados.value == "") {
		erro = erro + "• Preencha o campo N&deg; de convidados\n";
	}
	if (document.orcamento.email.value != "") {
	
     var re = new RegExp;
     re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
     var mailArr = re.exec(document.orcamento.email.value);
	
     if (mailArr == null) {
         erro = erro + "• O email digitado não é válido\n";
     }
	 }
	 
	
	if (erro == "") {
		document.orcamento.submit();
	} else {	
		alert("Aconteceram os seguintes erros:           \n\n" + erro);	
	}

}
//-->


/***********************************************************
 FUNÇÕES FLASH
 **********************************************************/
 if(Browser == undefined){
	var Browser = {
		isIE: function(){ return (window.ActiveXObject && document.all && navigator.userAgent.toLowerCase().indexOf("msie") > -1  && navigator.userAgent.toLowerCase().indexOf("opera") == -1) ? true : false; }
	}
}

var Flash = function(movie, id, width, height, initParams){

	this.html = "";
	this.attributes = this.params = this.variables = null;
	
	this.variables = new Array();
	this.attributes = {
		"classid": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
		"codebase": "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0",
		"type": "application/x-shockwave-flash"
	}
	this.params = { "pluginurl": "http://www.macromedia.com/go/getflashplayer_br" };
	
	if(movie) {
		this.addAttribute("data", movie);
		this.addParameter("movie", movie);
	}
	
	if(id && id != null) this.addAttribute("id", id);
	if(width) this.addAttribute("width", width);
	if(height) this.addAttribute("height", height);
	
	if(initParams != undefined){
		for(var i in initParams){
			this.addParameter(i.toString(), initParams[i]);
		}
	}
	
}
Flash.version = "1.2b";
Flash.getObjectByExceptions = function(obj, excep){
	var tempObj = {};
	for(var i in obj){
		var inclui = true;
		for(var j=0; j<excep.length; j++)
			if(excep[j] == i.toString()) { inclui = false; break; };
		if(inclui) tempObj[i] = obj[i];
	}
	return tempObj;
}
Flash.prototype.addAttribute = function(prop, val){ this.attributes[prop] = val; }
Flash.prototype.addParameter = function(prop, val){ this.params[prop] = val; }
Flash.prototype.addVariable = function(prop, val){ this.variables.push([prop, val]); }
Flash.prototype.getFlashVars = function(){
	var tempString = new Array();
	
	for(var i=0; i<this.variables.length; i++)
		tempString.push(this.variables[i].join("="));
		
	return tempString.join("&");
}
Flash.prototype.toString = function(){
	
	this.params.flashVars = this.getFlashVars();
	if(Browser.isIE()){
		//IE
		this.html = "<ob" + "ject";
		var attr = Flash.getObjectByExceptions(this.attributes, ["type", "data"]);
		for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr[i] + "\"";
		this.html += "> ";
		var params = Flash.getObjectByExceptions(this.params, ["pluginurl", "extend"]);
		for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params[i] + "\" /> ";
		this.html += " </obj" + "ect>";
	} else {
		//non-IE
		this.html = "<!--[if !IE]> <--> <obj" + "ect";
		var attr = Flash.getObjectByExceptions(this.attributes, ["classid", "codebase"]);
		for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr[i] + "\"";
		this.html += "> ";
		var params = Flash.getObjectByExceptions(this.params, ["extend"]);
		for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params[i] + "\" /> ";
		this.html += " </obj" + "ect> <!--> <![endif]-->";
	}

	return this.html;
	
}
Flash.prototype.write = Flash.prototype.outIn = Flash.prototype.writeIn = function(w){
	if(typeof w == "string" && document.getElementById) var w = document.getElementById(w);
	if( w != undefined && w ) w.innerHTML = this.toString();
	else document.write( this.toString() );
}




/**** AUMENTA/DIMINUI FONTE ****/
//Specify spectrum of different font sizes:
var szs = new Array( '10px','11px','12px','13px','15px' );
var startSz = 2;

function ts( trgt,inc ) {
    if (!document.getElementById) return
    var d = document,cEl = null,sz = startSz,i,j,cTags;
    
    sz += inc;
    if ( sz < 0 ) sz = 0;
    if ( sz > 4 ) sz = 4;
    startSz = sz;
        
    if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

    cEl.style.fontSize = szs[ sz ];

    for ( i = 0; i < tgs.length; i++ ) {
        cTags = cEl.getElementsByTagName( tgs[ i ] );
        for ( j = 0; j < cTags.length; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
    } }

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'texto','div');


/************************************************************************************/



        
//SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
 //By Dynamic Drive: http://www.dynamicdrive.com/style/
        
        var menuids=["suckertree1"] //Enter id(s) of SuckerTree UL menus, separated by commas
        
        function buildsubmenus(){
        for (var i=0; i<menuids.length; i++){
          var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
            for (var t=0; t<ultags.length; t++){
            ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
                if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
                    ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
                else //else if this is a sub level submenu (ul)
                  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
            ultags[t].parentNode.onmouseover=function(){
            this.getElementsByTagName("ul")[0].style.display="block"
            }
            ultags[t].parentNode.onmouseout=function(){
            this.getElementsByTagName("ul")[0].style.display="none"
            }
            }
                for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
                ultags[t].style.visibility="visible"
                ultags[t].style.display="none"
                }
          }
        }
        
        if (window.addEventListener)
        window.addEventListener("load", buildsubmenus, false)
        else if (window.attachEvent)
        window.attachEvent("onload", buildsubmenus)
        
