<!--

bInfo=new Array();

bInfo=[
					["Yoga Classes","Yoga Classes","content.php?p=yoga_pricing"],

					["Yoga Jo's","Yoga Jo's","content.php?p=yoga_jos_philosophy"],

					["Get Connected","Get Connected","content.php?p=yogajos_blog"],

					["Yoga Trainings","Yoga Trainings","content.php?p=yogatrainingcenter"]
				 ];

bInfoSub=new Array();

bInfoSub = [

				[

					["Schedule","Class Schedule","javascript:launchWS('http://clients.mindbodyonline.com/ws.asp?studioid=2675&stype=-7');"],

					["Pricing","Pricing","content.php?p=yoga_pricing"]

				],

				[

					["Philosophy","Philosophy","content.php?p=yoga_jos_philosophy"],

					["Location","Location","content.php?p=locations_locations"],
 
					["Staff","Staff","content.php?p=all_about_us_teachers"]

				],

				[

					["Blog","Blog","http://yogajos.blogspot.com"],

					["facebook","facebook","http://www.facebook.com/home.php?ref=home#/pages/North-Ogden-UT/Yoga-Jos-Studio/50044646052"],

					["YouTube","YouTube","http://www.youtube.com/user/YogaJosStudio"]

				],
				
				[

					["Workshops","Workshops","http://clients.mindbodyonline.com/ws.asp?studioid=2675&stype=-8"],

					["Yoga Training","Yoga Training","http://www.yogatrainingcenter.com"]

				]

			];



document.topNavHTML = "";



function MM_reloadPage(init) {  //reloads the window if Nav4 resized

  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {

    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}

  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();

}

MM_reloadPage(true);



function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; if(d.forms)for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; //added 'if(d.forms)' because NS7 couldn't find collection and errored out

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function MM_swapImage() { //v3.0

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}



function CW_getPage(obj, ext) { //v1.2

  i = 0;

  if((obj+"").indexOf("p=") < 0){

    x=(obj+"").split("/");while(i<x.length&&x[i].indexOf(ext)==-1){i++};

  } else if((obj+"").indexOf("p=") > -1){

    x=(obj+"").split("p=");

	i=1;

  }

  return x[i];

}



/*function CW_getContentPage(obj, ext) { //v1.1

  x=(obj+"").split("p=");//i=0;while(i<x.length&&x[i].indexOf(ext)==-1){i++};

  return x[1];

}*/



function CW_navInd() { //v.1

  if(document.all||document.links){

  		document.atNavInd = new Array();

		l=CW_getPage(window.location,".htm")+"";

		

		for (i=0;i<bInfo.length;i++){

			if(bInfo[i][2].indexOf(l) != -1){

				// match

				document.atNavInd[0] = i;

			} // Gives priority to sub heading if the same URL is in both primary and sub menu

			for (j=0;j<bInfoSub[i].length;j++){

				if(bInfoSub[i][j][2].indexOf(l) != -1){

					// match

					document.atNavInd[0] = i;

					document.atNavInd[1] = j;

				}

			}

		}

		i = document.atNavInd[0];

		MM_swapImage('b_'+i,'','images/yj_button_at.gif',1);

		// Gen Subnav if there is one

		if(bInfoSub[i].length > 0){

			offset = bInfoSub[i].length * 20;

			for (j=i+1;j<bInfo.length;j++){

				MM_findObj('b'+j).style.top = (parseInt(MM_findObj('b'+j).style.top)+offset)+'px';

			}

			subTop = parseInt(MM_findObj('b'+i).style.top)+17;

			document.writeln('<div id="submenuTop" style="visibility:hidden;position:absolute; left:15px; top:'+subTop+'px; width:115; height:17px; z-index:2">');

			document.writeln('<img src="images/subTop.gif" width="115" height="17"><br>');

			document.writeln('</div>\n');

			document.writeln('<div id="submenu" class="navTextSub" style="visibility:hidden;background-color:white; position:absolute; left:15px; top:'+(17+subTop)+'px; width:115; height:'+offset+'px; z-index:1">');

			for (j=0;j<bInfoSub[i].length;j++){

				document.writeln('<a onMouseOver="this.style.color=\'#993399\';this.style.letterSpacing=\'1px\'" onMouseOut="this.style.color=\'#000000\';this.style.letterSpacing=\'normal\'" class="navTextSub" href="'+bInfoSub[i][j][2]+'">'+bInfoSub[i][j][0]+'</a><br>');

				document.topNavHTML += mkNbsp(bInfoSub[i][j][0]).link(bInfoSub[i][j][2])+" &nbsp;";

			}

			document.topNavHTML = (document.topNavHTML !="") ? "<div id='topNav'>"+document.topNavHTML+"</div>":document.topNavHTML;

			document.writeln('</div>\n');

			document.writeln('<div id="submenuBot" style="visibility:hidden;position:absolute; left:15px; top:'+(subTop+offset+12)+'px; width:115; height:15px; z-index:0">');

			document.writeln('<img src="images/subBot.gif" width="115" height="15">');

			document.writeln('</div>\n');

		}

  }

}



function mkNbsp(strIn){

	return (strIn.split(" ").join("&nbsp;"));

}



function genNav(){

//				 onPage=((CW_getPage(window.location,".htm")+"").indexOf(bInfo[i][1])==-1)?0:1;

for(i=0;i<bInfo.length;i++){

document.writeln('<div id="b'+i+'" style="visibility: hidden; position:absolute; left:5px; top:'+(180+(i*42))+'px; width:135; height:30px; z-index:1">');

document.writeln('  <img name="b_'+i+'" src="images/yj_button.gif" width="135" height="30">');

document.writeln('  <div id="t'+i+'" style="position:absolute; left:0px; top:8px; width:135px; height:20px; z-index:2" class="navText">'+bInfo[i][0]+'</div>');

document.writeln('  <div id="c'+i+'" style="position:absolute; left:0px; top:0px; width:135; height:30px; z-index:3">');

document.writeln('    <a name="l'+i+'" href="'+bInfo[i][2]+'" onMouseOut="MM_findObj(\'t'+i+'\').className = \'navText\';if(document.atNavInd[0]!='+i+')MM_swapImgRestore()" onMouseOver="MM_findObj(\'t'+i+'\').className = \'navTextOn\';if(document.atNavInd[0]!='+i+')MM_swapImage(\'b_'+i+'\',\'\',\'images/yj_button_on.gif\',1)"> ');

document.writeln('      <img src="images/clear.gif" alt="'+bInfo[i][1]+'" name="c_'+i+'" width="135" height="30" border="0"></a> ');

document.writeln('  </div>\n</div>\n');

}

CW_navInd();

}



function showHidden() {

	for(i=0;i<bInfo.length;i++){

		show(MM_findObj("b"+i),1);

	}

}



function show(obj, vis){

		if(obj.visibility){

			vis = (vis)?"show":"hide";

		}else if (obj.style){

			obj = obj.style;

			vis = (vis)?"visible":"hidden";

		} else {

			document.write("Your browser is not compliant with standards. Please use a standard browser like <a href='http://microsoft.com/ie'>Internet Explorer</a>");

		}

		obj.visibility = vis;

}



function isVis(obj){

    vis = false;

		if(obj.style){

			obj = obj.style;

			vis = (obj.visibility=="visible")?true:false;

		}else if (obj.visibility){

			vis = (obj.visibility=="show")?true:false;

		} else {

			document.write("Your browser is not compliant with standards. Please use a standard browser like <a href='http://microsoft.com/ie'>Internet Explorer</a>");

		}

		return vis;

}



function writeHeader(){

	x=parseInt(MM_findObj("b"+(bInfo.length-1)).style.top);

	x += (document.atNavInd[0] == bInfo.length-1) ? parseInt(MM_findObj("submenu").style.height) : 0;

	MM_findObj("navImg").style.height=(x-250)+'px';

	l=CW_getPage(window.location,".htm")+"";

	document.write( (document.atNavInd.length > 1) ? bInfoSub[document.atNavInd[0]][document.atNavInd[1]][1] : bInfo[document.atNavInd[0]][1] );

}



function launchWS(winName) {



	//window height and width

	myHeight = screen.height*.80;

	myWidth = 784;

	

	//widow height bounds

	if ( myHeight < 556 ) {

		myHeight = 556;

	} else if (myHeight>700) {

		myHeight = 700;

	}

	

	//get screen size, and cacl center screen positioning

	var height = screen.height;

	var width = screen.width;

	var leftpos = width / 2 - myWidth / 2;

	var toppos = (height / 2 - myHeight / 2) - 40; 



   //open window	

   msgWindow=window.open(winName,"ws_window","toolbar=no,location=no,directories=no,resizable=yes,menubar=no,scrollbars=no,status=yes,width=" + myWidth + ",height="+ myHeight + ", left=" + leftpos + ",top=" + toppos);  



   //focus window

   setTimeout('msgWindow.focus()',1);

}

//-->