/***********************************************
* 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 the Jooga menu
var menuJooga=new Array()
menuJooga[0]='<a href="/yoga/cursoyoga.htm">Informa&ccedil;&atilde;o sobre as aulas</a>'
menuJooga[1]='<a href="/yoga/oqueeoyoga.htm">O que &eacute; o Yoga?</a>'
menuJooga[2]='<a href="/yoga/beneficiosdoyoga.htm">Benef&iacute;cios do Yoga</a>'
menuJooga[3]='<a href="/yoga/saudebemestar.htm">Sa&uacute;de e bem-estar</a>'
menuJooga[4]='<a href="/articles/articles.htm">Artigos</a>'
//Joogan vaikutukset, Mitä klassinen jooga on?, Artikkeleita
//Contents for the Tantra menu
var menuTantra=new Array()
menuTantra[0]='<a href="/tantra/curso.htm" >Informa&ccedil;&atilde;o sobre o curso</a>'
menuTantra[1]='<a href="/tantra/tantra.htm" >O que &eacute; o tantra Er&oacute;tico?</a>'
menuTantra[2]='<a href="/tantra/continencia_PT.html" >Curso de contin&ecirc;ncia</a>'
menuTantra[3]='<a href="/tantra/tantra_completo.html" >Curso extensivo de Tantra</a>'
menuTantra[4]='<a href="/articles/articles.htm" >Artigos</a>'


//Contents for the Natha menu
var menuNatha=new Array()
menuNatha[0]='<a href="/siddha/escola.htm" >Sobre a escola</a>'
menuNatha[1]='<a href="/siddha/sobreoensino.htm" >Sobre o ensino</a>'
menuNatha[2]='<a href="/siddha/fundador.htm" >O Fundador</a>'
menuNatha[3]='<a href="/siddha/comunidadeinternacional.htm" >Comunidade Internacional</a>'
menuNatha[4]='<a href="/indexPorto.htm" >Filial de Porto</a>'
menuNatha[5]='<a href="/indexBeja.htm" >Filial de Beja</a>'
menuNatha[6]='<a href="/siddha/contactinformation.htm" >Contactos</a>'

//Contents for the Opetus menu
var menuOpetus=new Array()
menuOpetus[0]='<a href="/program/cursoyoga.htm">Aulas de Yoga</a>'
menuOpetus[1]='<a href="/program/cursotantra.htm">Curso de Tantra</a>'
menuOpetus[2]='<a href="/tantra/tantra_completo.html" >Curso extensivo de Tantra</a>'
menuOpetus[3]='<a href="/Ayurveda/Curso_Ayurveda.html">Curso de Ayurveda</a>'
menuOpetus[4]='<a href="/Ayurveda/Ayurveda_Medicos.html">Curso de Ayurveda para Médicos</a>'
menuOpetus[5]='<a href="/program/gruposhakti.htm">Grupo Shakti</a>'
menuOpetus[6]='<a href="/program/eneagrama.html">Eneagrama</a>'
menuOpetus[7]='<a href="/program/revelationoftheself.htm">Revelação do Self</a>'
menuOpetus[8]='<a href="/program/cursomassagem.htm">Curso de Massagem</a>'
menuOpetus[9]='<a href="/program/tratamentos.htm">Tratamentos e aconselhamento</a>'
menuOpetus[10]='<a href="/siddha/precos.html">Preços e outras Informações</a>'


var menuAjankohtaiset=new Array()
menuAjankohtaiset[0]='<a href="/newsandevents/astrologicalmoments.htm">Momentos Astrol&oacute;gicos</a>'
menuAjankohtaiset[1]='<a href="/newsandevents/program2009.html">Agenda</a>'
menuAjankohtaiset[2]='<a href="/newsandevents/galeriaeventosantigos.html">Galeria de Eventos Antigos</a>'
menuAjankohtaiset[3]='<a href="/newsandevents/workshops.htm">Workshops</a>'
		
var menuwidth='300px' //default menu width
var menubgcolor='#F4F1FA'  //menu bgcolor
var disappeardelay=250  //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>')

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="-500px"
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()
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