var aba_menu_antiga = '';
var bg_menu_antiga = '';
var menu_antigo = '';

//document.title = "::Hopi Hari::";

function $id(nomeid) {
return document.getElementById(nomeid);
}

function fecha_menu() {
try {  
menu_antigo.src = String(menu_antigo.src).replace('_o.gif','.gif');  
bg_menu_antiga.style.display = 'none'
aba_menu_antiga.style.display = 'none'
}catch(e) {}


}

function pegar_cookie() {
var a = String(document.cookie).split(';')
for(i=0;i<a.length;i++) {
if(String(a[i]).indexOf('nome_hopihari') != -1) {
var nome_cookie = String(a[i]).substring(String(a[i]).indexOf('=')+1);
return nome_cookie
}

}
return ''
}

function inicio() {

//alert($id('conteudo').offsetHeight)
var visu_alt = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight;
var header_alt = $id('header').offsetHeight
var rodape_alt = $id('foot').offsetHeight

var corpo_alt = visu_alt - header_alt - rodape_alt;

var iefix = document.fireEvent ? iefix = 15 : iefix = 35;
var iefix2 = document.fireEvent ? iefix2 = 33 : iefix2 = 36;

try {
    if(inicial) {
    if($id('corpo').offsetHeight <= 375 && screen.width <= 800) {
    $id('corpo').style.height = '430px'
    }else if($id('corpo').offsetHeight <= corpo_alt && screen.width > 800) {
    $id('corpo').style.height = corpo_alt - iefix + 'px'
    }
    }
    }catch(e){
    if($id('corpo').offsetHeight <= corpo_alt && screen.width > 800) {
    $id('txt').style.height = corpo_alt - iefix2 - 110 + 'px'
    }
}





screen.width > 800 ? $id('tempo').style.display = 'block' : null;

nome = pegar_cookie()
boas_vindas()

for(i=0;i<document.images.length;i++) {

if(String(document.images[i].id).indexOf('over_') != -1) {
document.images[i].onmouseover = function() {
	this.src = String(this.src).replace('.gif','_o.gif');
}

document.images[i].onmouseout = function() {
	this.src = String(this.src).replace('_o.gif','.gif');
}
	
}
	
	
if(String(document.images[i].id).indexOf('bt_') != -1) {
document.images[i].style.cursor = "pointer"


document.images[i].onmouseover = function() {

if(menu_antigo.id != this.id) {
try {  menu_antigo.src = String(menu_antigo.src).replace('_o.gif','.gif');  }catch(e) {}

this.src = String(this.src).replace('.gif','_o.gif');

}

var nome_sub = String(this.id).replace('bt_','submenu_')

try { aba_menu_antiga.style.display = 'none'; }catch(e) { }
try { bg_menu_antiga.style.display = 'none'; }catch(e) { }
var aba_menu_atual = $id(nome_sub)
var bg_menu_atual = $id(nome_sub + '_bg')
try { aba_menu_atual.style.display = 'block'; }catch(e) { }
try { bg_menu_atual.style.display = 'block'; }catch(e) { }
aba_menu_antiga = aba_menu_atual;
bg_menu_antiga = bg_menu_atual;
}

document.images[i].onmouseout = function() {
menu_antigo = this
}

}

}

}