

/***********************************************
* 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, ABOUT YOU
var menu1=new Array()
menu1[0]='<a href="about_you.html">Unwrapping the Powerful Self</a>'
menu1[1]='<a href="about_you_buttons.html">Getting Free Of Your Buttons</a>'
menu1[2]='<a href="about_you_ratherberight.html">Rather to be right, or have what you want?</a>'
menu1[3]='<a href="about_you_3stepstofreedom.html">Three Steps to Freedom</a>'
menu1[4]='<a href="about_you_should.html">Escaping the Should Trap</a>'


//Contents for menu 2,  PARENTING ATTACHMENT
var menu2=new Array()
menu2[0]='<a href="parenting_ap_wearingbaby.html">The Benefits of Wearing Your Baby</a>'
menu2[1]='<a href="parenting_ap_breastfeeding.html">Breastfeeding</a>'
menu2[2]='<a href="parenting_ap_childspacing.html">Child Spacing</a>'
menu2[3]='<a href="parenting_ap_foundation.html">The Foundation of Attachment: Responding to Your Baby</a>'
menu2[4]='<a href="parenting_ap_siblings.html">Siblings at the Birth</a>'
menu2[5]='<a href="parenting_ap_parentingalone.html">Parenting Alone: Wider Community Makes for Healthy Kids</a>'
menu2[6]='<a href="parenting_ap_gettingsleep.html">Co-Sleeping: Getting the Sleep You Need</a>'
menu2[7]='<a href="parenting_ap_cosleepdangers.html">Co-sleeping: Is It Dangerous?</a>'
menu2[8]='<a href="parenting_ap_cosleeptroubleshoot.html">Co-sleeping: Trouble Shooting</a>'
menu2[9]='<a href="parenting_ap_cosleeptransition.html">Co-Sleeping: Helping Your Kids Transition Out</a>'
menu2[10]='<a href="parenting_ap_weaning.html">On Weaning</a>'
menu2[11]='<a href="parenting_ap_discipline.html">Discipline and Your Child: Overview</a>'
menu2[12]='<a href="parenting_ap_discipline27tips.html">Discipline and Your Child: 27 Discipline Tips</a>'

//Contents for menu 3,  PARENTING  CHILDREN
var menu3=new Array()
menu3[0]='<a href="parenting_children_idealspacing.html">Ideal Child Spacing, and Other Things You Don’t <br> Need to Worry About</a>'
menu3[1]='<a href="parenting_children_discipline.html">Discipline and Your Child: Overview</a>'
menu3[2]='<a href="parenting_children_discipline27tips.html">Discipline and Your Child: 27 Discipline Tips</a>'
menu3[3]='<a href="parenting_children_parentingalone.html">Parenting Alone: Wider Community Makes for Healthy Kids</a>'
menu3[4]='<a href="parenting_children_aboutdeath.html">Talking to Kids About Death</a>'
menu3[5]='<a href="parenting_children_familystructure.html">The Healthiest Family Structure: A Systemic Perspective</a>'
menu3[6]='<a href="parenting_children_kidtips.html">Kid Tips: What You Are Is What You Get!</a>'
menu3[7]='<a href="parenting_children_repairs.html">Making Repairs When You Mess Up: Your Buttons and<br> Your Child</a>'
menu3[8]='<a href="parenting_children_lettingkids.html">On Letting Kids Be Kids</a>'

//Contents for menu 4,  PARENTING  TEENS
var menu4=new Array()
menu4[0]='<a href="parenting_teens_10traits.html">Ten Traits of the Healthiest, Happiest Teenagers</a>'
menu4[1]='<a href="parenting_teens_familystructure.html">The Healthiest Family Structure: A Systemic Perspective</a>'
menu4[2]='<a href="parenting_teens_tunnelvision.html">On Teens: Combating the Teen Tunnel-Vision Effect</a>'
menu4[3]='<a href="parenting_teens_top10defiant.html">Top Ten for Defiant Teens</a>'

//Contents for menu 5,  YOUR RELATIONSHIPS
var menu5=new Array()
menu5[0]='<a href="your_relationships.html">"Clearing" Tool : For Removing Misunderstandings</a>'
menu5[1]='<a href="your_relationships_truth.html">On Your Relationship: Telling the Truth</a>'
menu5[2]='<a href="your_relationships_familystructure.html">The Healthiest Family Structure: A Systemic Perspective</a>'
menu5[3]='<a href="your_relationships_trustmyth.html">The Trust Mythology</a>'
menu5[4]='<a href="your_relationships_selfishness.html">“Selfishness” Nourishes Your Relationship</a>'
		
var menuwidth='195px' //default menu width
var menubgcolor='EBEFF2'  //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

