/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

//Contents for menu 1
var menu1=new Array()
menu1[0]='<a href="br_oque_ap.html">O que é?</a>'
menu1[1]='<a href="br_francois.html">AP por François Podevyn</a>'
menu1[2]='<a href="br_definicao.html">AP por Hubert Van Gijseghem</a>'
menu1[3]='<a href="br_ursula.html">AP por Ursula Kodjoe</a>'
menu1[4]='<a href="br_magistrado.html">AP por Nadia De Vroede</a>'
menu1[5]='<a href="br_processo.html">AP por W. von Boch-Galhau</a>'
menu1[6]='<a href="br_coloquio.html">Debate na Bélgica</a>'
menu1[7]='<a href="br_tv_franca.html">Programa de TV França</a>'


//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="br_sap.html">Como detectar</a>'
menu2[1]='<a href="br_solucao.html">Terapia Familiar</a>'
menu2[2]='<a href="br_advertencia.html">Aos Juízes</a>'
menu2[3]='<a href="br_delicado.html">Aos Advogados</a>'
menu2[4]='<a href="br_advogados.html">Aos Advogados - comentários</a>'
menu2[5]='<a href="br_ferramenta.html">Mediação: Como funciona</a>'
menu2[6]='<a href="br_propostas.html">Mediação: Modelo</a>'
menu2[7]='<a href="br_conferencia.html">Ursula Kodjoe</a>'
menu2[8]='<a href="br_combate.html">Combatendo a AP</a>'
menu2[9]='<a href="br_sim_nao.html">Sim e Não</a>'
menu2[10]='<a href="br_sintese.html">Síntese</a>'

//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="br_oqueecochem.html">O que é?</a>'
menu3[1]='<a href="br_cochem.html">Cooperação ordenada</a>'
menu3[2]='<a href="br_modelo.html">Grupo de trabalho</a>'
menu3[3]='<a href="br_juizes.html">Papel dos Juízes</a>'
menu3[4]='<a href="br_expertos.html">Papel dos Expertos</a>'
menu3[5]='<a href="br_allgemeine.html">Frankfurter Allgemeine</a>'
menu3[6]='<a href="br_conduta_adv.html">Código de Conduta - advogados</a>'
menu3[7]='<a href="br_comentarios.html">Código de Conduta - comentários</a>'
menu3[8]='<a href="br_pedidos.html">Pedidos das crianças</a>'

//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="br_recusa.html">Recusar as visitas: crime</a>'
menu4[1]='<a href="br_autoridade.html">Autoridade parental</a>'
menu4[2]='<a href="br_convencao.html">Direitos da criança - convenção</a>'
menu4[3]='<a href="br_crianca.html">Direitos da criança - declaração</a>'
menu4[4]='<a href="br_eca_sos.html">Estatuto da criança e do adolescente</a>'

//Contents for menu 4, and so on
var menu6=new Array()
menu6[0]='<a href="es_index.html">Español</a>'
menu6[1]='<a href="fr_index.html">Français</a>'
menu6[2]='<a href="en_index.html">English</a>'
menu6[3]='<a href="ne_index.html">Nederlands</a>'
menu6[4]='<a href="de_index.html">Deutsch</a>'

var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=50  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

if (ie4||ns6)
document.write('<div id="dropmenudiv2" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top=-500
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
if (menuwidth=='55px')
{
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv2") : dropmenudiv
populatemenu(menucontents)
}
else
{
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)
}

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu


//Presentational Slideshow Script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for legal use

var slideshow_width='773px' //SET SLIDESHOW WIDTH (set to largest image's width if multiple dimensions exist)
var slideshow_height='97px' //SET SLIDESHOW HEIGHT (set to largest image's height if multiple dimensions exist)
var pause=2000 //SET PAUSE BETWEEN SLIDE (2000=2 seconds)

var dropimages=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
dropimages[0]="anima1_1.jpg"
dropimages[1]="anima2_1.jpg"
dropimages[2]="anima3_1.jpg"
dropimages[3]="anima4_1.jpg"
dropimages[4]="anima5_1.jpg"

////NO need to edit beyond here/////////////

var preloadedimages=new Array()
for (p=0;p<dropimages.length;p++){
preloadedimages[p]=new Image()
preloadedimages[p].src=dropimages[p]
}

var ie4=document.all
var dom=document.getElementById

var curpos=parseInt(slideshow_width)*(-1)
var degree=10
var curcanvas="canvas0"
var curimageindex=4

function movepic(){
if (curpos<0){
alert("start - nunca passou por aqui")
curpos=Math.min(curpos+degree,0)
tempobj.style.left=curpos+"px"
}
else{
clearInterval(dropslide)
resetit(curcanvas)
nextcanvas=(curcanvas=="canvas0")? "canvas0" : "canvas0"
tempobj=ie4? eval("document.all."+nextcanvas) : document.getElementById(nextcanvas)
var slideimage='<img src="'+dropimages[curimageindex]+'" border=0>'
tempobj.innerHTML = slideimage
// nextimageindex=(nextimageindex<dropimages.length-1)? nextimageindex+1 : 0
setTimeout("rotateimage()",pause)
}
}

function rotateimage(){
if (ie4||dom){
resetit(curcanvas)
var crossobj=tempobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
// crossobj.style.zIndex++
var temp='setInterval("movepic()",50)'
dropslide=eval(temp)
// curcanvas=(curcanvas=="canvas0")? "canvas1" : "canvas0"
}
else
document.images.defaultslide.src=dropimages[curimageindex]
curimageindex=(curimageindex<dropimages.length-1)? curimageindex+1 : 0
}

function resetit(what){
curpos=parseInt(156)*(curimageindex)
var crossobj=ie4? eval("document.all."+what) : document.getElementById(what)
crossobj.style.left=curpos+"px"
// alert(crossobj.style.left)
}

function startit(){
var crossobj=ie4? eval("document.all."+curcanvas) : document.getElementById(curcanvas)
crossobj.innerHTML='<img src="'+dropimages[curimageindex]+'" border=0>'
rotateimage()
}

