function mkFlash(arq,wid,hei){
document.write('<object type="application/x-shockwave-flash" data="'+arq+'" width="'+wid+'" height="'+hei+'">');
document.write('<param name="movie" value="'+arq+'">');
document.write('<param name="menu" value="false">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('</object>');
}

function mkJO(arq,wid,hei,shw,vai){
document.write('<object id="fjo" type="application/x-shockwave-flash" data="'+arq+'" width="'+wid+'" height="'+hei+'">');
document.write('<param name="movie" value="'+arq+'">');
document.write('<param name="menu" value="false">');
document.write('<param name="quality" value="high">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="flashvars" value="xmlFile=jornal_online/'+shw+'/paginas.xml'+vai+'">');
document.write('</object>');
}

function boletim(act){
if(act=="abre"){
document.getElementById('boletim').style.display = "block";
} else {
document.getElementById('boletim').style.display = "none";
}
}

function exp(obj){ 
if(document.getElementById(''+obj+'').style.display=="block"){ 
document.getElementById(''+obj+'').style.display = "none"; 
} else { 
document.getElementById(''+obj+'').style.display = "block"; 
}
}


function galeria_fotos(){
if(document.getElementById('galeria_fotos_shw').style.display=="none"){
document.getElementById('galeria_fotos_shw').style.display = "block";
} else {
document.getElementById('galeria_fotos_shw').style.display = "none";
}
}

function jornalonline(){
if(document.getElementById('jornalonline_shw').style.display=="none"){
document.getElementById('jornalonline_shw').style.display = "block";
} else {
document.getElementById('jornalonline_shw').style.display = "none";
}
}

function contato_mapa(act){
if(act=="abre"){
document.getElementById('contato_mapa').style.display = "block";
} else {
document.getElementById('contato_mapa').style.display = "none";
}
}

function estruturafisica_shw(img){
document.getElementById("estruturafisica_foto").innerHTML = "<img src=\""+img+"\" class=\"estruturafisica_img\" >";
}
function estruturafisica_hid(){
document.getElementById("estruturafisica_foto").innerHTML = "&nbsp;";
}


function imprimir(act,id){
ok = "nao";
if(act=="htm"){
url = ""+id+".asp";
nom = ""+id+"";
alt = 555;
lar = 700;
ok = "ok";
}

if(act=="boletim"){
url = "imprime_boletim.asp";
nom = "imprime_boletim";
alt = 555;
lar = 770;
ok = "ok";
}
if(act=="circulares"){
url = "imprime_circulares.asp?id="+id+"";
nom = "imprime_circulares_"+id+"";
alt = 555;
lar = 770;
ok = "ok";
}
if(act=="estudo"){
url = "imprime_estudo.asp?id="+id+"";
nom = "imprime_estudo_"+id+"";
alt = 555;
lar = 770;
ok = "ok";
}
if(act=="bilheteamigo"){
url = "imprime_bilheteamigo.asp?id="+id+"";
nom = "imprime_bilheteamigo"+id+"";
alt = 555;
lar = 770;
ok = "ok";
}
if(act=="comunicacaointerna"){
url = "imprime_comunicacaointerna.asp?id="+id+"";
nom = "imprime_comunicacaointerna_"+id+"";
alt = 555;
lar = 770;
ok = "ok";
}
if(ok=="ok"){
bai = screen.height;
dir = screen.width;
cim = (bai-alt)/2;
esq = (dir-lar)/2;
window.open(url,nom,'toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,maximize=no,top='+cim+',left='+esq+',width='+lar+',height='+alt+''); 
}
}





var mousex = 0;
var mousey = 0;

function mousePos(e){
var posx = 0;
var posy = 0;
if(!e){ var e = window.event; }
if (e.pageX || e.pageY){
posx = e.pageX;
posy = e.pageY;
} else if(e.clientX || e.clientY){
posx = e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft;
posy = e.clientY + document.body.scrollTop + document.documentElement.scrollTop;
}
mousex = posx;
mousey = posy;
}

document.onmousemove = mousePos;

function toolTip(txt,act){
tooltip = document.getElementById('tooltip_div');
tooltip.innerHTML = ""+txt+"";
tooltip.style.width = ((txt.length*7)+4)+"px";
tooltip.style.height = "15px";
if(act==1){
tooltip.style.top = (mousey-20)+"px";
tooltip.style.left = (mousex-((txt.length*7)/2))+"px";
tooltip.style.display = "block";
} else {
tooltip.style.display = "none";
tooltip.style.top = (mousey-20)+"px";
tooltip.style.left = (mousex-((txt.length*7)/2))+"px";
}
}

// --------------------------


var divName = 'MinhaDiv'; // div that is to follow the mouse
                       // (must be position:absolute)
var offX = 5;          // X offset from mouse position
var offY = 5;          // Y offset from mouse position

function mouseX(evt) {if (!evt) evt = window.event; if (evt.pageX) return evt.pageX; else if (evt.clientX)return evt.clientX + (document.documentElement.scrollLeft ?  document.documentElement.scrollLeft : document.body.scrollLeft); else return 0;}
function mouseY(evt) {if (!evt) evt = window.event; if (evt.pageY) return evt.pageY; else if (evt.clientY)return evt.clientY + (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop); else return 0;}

function follow(evt,divName,shw) {if (document.getElementById) {var obj = document.getElementById(divName).style; obj.visibility = 'visible';
obj.left = (parseInt(mouseX(evt))+offX) + 'px';
obj.top = (parseInt(mouseY(evt))+offY) + 'px';}}
//document.onmousemove = follow;


// --------------------------
