/***********************************************
* 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="http://clients.mindbodyonline.com/ws.asp?studioid=261&stype=-7&sLoc=4" onclick="go_there_dupont()">dupont</a>'
menu1[1]='<a href="http://clients.mindbodyonline.com/ws.asp?studioid=1217&stype=-7" onclick="go_there_bethesda()">bethesda'
menu1[2]='<a href="/arlington.html">arlington</a>'
menu1[3]='<a href="/prices.html">prices</a>'
menu1[4]='<a href="/privatesessions.html">private session</a>'
menu1[5]='<a href="/faqs.html">faqs</a>'

//Contents for menu 2
var menu2=new Array()
menu2[0]='<a href="/faqs.html">faqs</a>'
menu2[1]='<a href="/studenttips.html">student tips</a>'
menu2[2]='<a href="/newbieprograms.html">newbie programs</a>'
menu2[3]='<a href="/testimonials.html">testimonials</a>'
menu2[3]='<a href="/50special.html">$50 1-month special</a>'



//Contents for menu 3, and so on
var menu3=new Array()
menu3[0]='<a href="/teachertraining.html">teacher training</a>'
menu3[1]='<a href="http://clients.mindbodyonline.com/ws.asp?studioid=261&stype=-8&sLoc=0">workshops & retreats'
menu3[2]='<a href="/privatesessions.html">private sessions</a>'
menu3[3]='<a href="/yogaathome.html">yoga at home/work</a>'
menu3[4]='<a href="/yogaparties.html">yoga parties</a>'
menu3[5]='<a href="/yogaconcierge.html">yoga concierge</a>'
menu3[6]='<a href="/studiorental.html">studio rental</a>'
menu3[7]='<a href="/karmayoga.html">karma yoga</a>'
menu3[8]='<a href="/yogalifepodcast.html">yoga + life podcast</a>'
menu3[9]='<a href="/preandpostnatal.html">prenatal yoga</a>'
menu3[10]='<a href="/preandpostnatal.html#postnatal">baby and me</a>'
menu3[11]='<a href="/membership/">membership</a>'
menu3[12]='<a href="/teabar.html">tea bar</a>'

//Contents for menu 4, and so on
var menu4=new Array()
menu4[0]='<a href="/treatments.html">treatments</a>'
menu4[1]='<a href="/therapists.html">therapists</a>'
menu4[2]='<a href="/appointments/splash.php">online request</a>'
menu4[3]='<a href="/lotus_lounge.html">lotus lounge</a>'



//Contents for menu 5, and so on
var menu5=new Array()
menu5[0]='<a href="/tranquilityboutique.html">tranquility boutique</a>'
menu5[1]='<a href="http://www.tranquilit.com" target="_blank">TranquiliT line</a>'
menu5[2]='<a href="/giftcards.html">gift cards</a>'
menu5[3]='<a href="/traveling_boutique.html">traveling boutique</a>'
menu5[4]='<a href="/trunkshows.html">trunk shows</a>'

//Contents for menu 6, and so on
var menu6=new Array()
menu6[0]='<a href="/philosophy.html">philosophy</a>'
menu6[1]='<a href="/press.html">press</a>'
menu6[2]='<a href="/werecommend.html">we recommend</a>'
menu6[3]='<a href="/photogallery.html">photo gallery</a>'
menu6[4]='<a href="/hourslocations.html">hours/locations</a>'
menu6[5]='<a href="/tranquiliteam.html">team and teachers</a>'
menu6[6]='<a href="/kimberly.html">kimberly wilson</a>'
menu6[7]='<a href="/sharethoughts.html">share your thoughts</a>'
menu6[8]='<a href="http://www.tranquilspacefoundation.org" target="_blank">our foundation</a>'
menu6[9]='<a href="/green/" target="_blank">green efforts</a>'


//Contents for menu 7, and so on
var menu7=new Array()
menu7[0]='<a href="/e-cards.html">e cards</a>'
menu7[1]='<a href="/newsletter.html">newsletters</a>'
menu7[2]='<a href="/archives.html">archives</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='#EA88D1'  //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

function go_there_bethesda()
{
 var where_to= confirm("You are now leaving the TS Dupont site.  Click OK to continue.");
 if (where_to== true)
 {
   window.open="http://clients.mindbodyonline.com/ws.asp?studioid=1217&stype=-7";
 }
}

function go_there_dupont()
{
 var where_to= confirm("You are being directed to our online reservation system where you can view the class schedule, and make a reservation if you wish. Drop-ins are welcome. First-timers please do not register online. Arrive at studio 15 minutes before class starts.");
 if (where_to== true)
 {
   window.open="http://clients.mindbodyonline.com/ws.asp?studioid=261&stype=-7&sLoc=4";
 }
}

function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}