//****** MAIN NAVIGATION *******//
function RLinks(txt,url,hasChildren,parentId){
	this.txt = txt;
	this.url = url;
	this.hasChildren = hasChildren;
	this.parentId = parentId;
	this.children = new Array();
}
var _rlinks = new Array();
_rlinks[0]=new RLinks('Über Agni Yoga', 'javascript:parent.location.href="ay_ger_info.html";',false,null);
_rlinks[1]=new RLinks('Kontakt',     'javascript:parent.location.href="ay_ger_contact.html"',false,null);
_rlinks[2]=new RLinks('Gruppen',       'javascript:parent.location.href="ay_ger_groups.html"',false,null);
//_rlinks[3]=new RLinks('Compilaciones',null,true,null);
_rlinks[3]=new RLinks('Bestell Info','javascript:parent.location.href="ay_ger_booklist.html"',false,null);
_rlinks[4]=new RLinks('Downloads','javascript:parent.location.href="ay_ger_downloads.html"',false,null);
_rlinks[5]=new RLinks('Suchen','javascript:parent.location.href="search_ger.html"',false,null);


function writeRLinks(ndx,childNdx){
	var htmls = "<TABLE WIDTH='120px' BORDER=0 bordercolor=red ALIGN='LEFT' CELLPADDING='0' CELLSPACING='5'>";
	htmls += "\n\t<TR><TD ROWSPAN='3'>&nbsp;</TD><TD CLASS='common_text' VALIGN='TOP'>";
	htmls += "\n<DIV ALIGN='LEFT'><A HREF='javascript:parent.location.href=\"index.html\"'>";
	htmls += "\n<IMG SRC='../gifs/maitreya_small.gif' WIDTH='80' HEIGHT='86' ALIGN='MIDDLE' BORDER='0'></A></DIV>";
	htmls += "\n</TD></TR><TR><TD><BR></TD></TR><TR><TD CLASS='common_text' ALIGN=LEFT VALIGN='TOP' NOWRAP>";
	for(var i=0; i<_rlinks.length; i++){
		if(i==ndx){ /* selected */
			var prnt = _rlinks[i];
			if(prnt.children && prnt.children.length>0){
				if(childNdx!=null)
					htmls += "\n<A CLASS='ay' onMouseOver='return true;' HREF='"+prnt.url+"'>"+_rlinks[i].txt+"</A><BR>";
				else
					htmls += "\n<SPAN CLASS='ay_sel'>"+_rlinks[i].txt+"</SPAN><BR>";
				for(var j=0; j<prnt.children.length; j++){
					var child = prnt.children[j];
					if(childNdx!=null && childNdx==j){
						htmls += "\n<SPAN CLASS='ay_sel_submenu'>&nbsp;&nbsp;&nbsp;&nbsp;"+child.txt+"</SPAN><BR>";
					}else{
						htmls+="\n<A CLASS='ay_submenu' HREF='"+child.url+"' onMouseOver='return true;'>&nbsp;&nbsp;&nbsp;&nbsp;"+child.txt+"</A><BR>";
					}
				}
			}else{
				htmls += "\n<SPAN CLASS='ay_sel'>"+_rlinks[i].txt+"</SPAN><BR>";
			}
		}else{ /* not selected */
			if(_rlinks[i].url != null){
				htmls+="\n<A HREF='"+_rlinks[i].url+"' CLASS='ay' onMouseOver='return true;'>"+_rlinks[i].txt+"</A><BR>";
			}else{
				htmls+="<NOBR><SPAN CLASS='ay_sel'>"+_rlinks[i].txt+"</SPAN></NOBR><BR>";
			}
		}
	}
	htmls += "\n</TD></TR></TABLE>";
	document.write(htmls);
}
//****** END MAIN NAVIGATION *******//

//************ FOOTER ***********//
function writeFooter(){
	var footer="";
	footer += '<HR WIDTH="100%" ALIGN="CENTER" NOSHADE SIZE="1" CLASS="ay_hr">';
	footer += '<TABLE WIDTH="100%" BORDER="0" CELLPADDING="3" CELLSPACING="0" BGCOLOR="#666666">';
	footer += '<TR>';
	footer += '<TD CLASS="bottom_addrInTable" ALIGN="CENTER"> 319 West 107th Street, New York, NY 10025-2799<BR>';
	footer += 'phone (212)864-7752 &#149; fax (212)864-7704 &#149; e-mail: <A HREF="mailto:info@agniyoga.org" CLASS="bottom_addrInTable">info@agniyoga.org</A>';
	footer += '</TD>';
	footer += '</TR>';
	footer += '</TABLE>';
	document.write(footer);
}
//************ END FOOTER ***********//

//************ ay_nav.js ***********//
function BookLink(url, txt, img){
	this.url = url;
	this.txt = txt;
	this.img = img;
}
var _links = new Array();
_links[0]  = new BookLink("ay_ger_lomg1.html"    ,   "Blätter Aus Dem Garten Morya I (Der Ruf)", "leaves_of_moryas_1924_i.gif");
_links[1]  = new BookLink("ay_ger_lomg2.html"    ,   "Blätter Aus Dem Garten Morya II",          "leaves_of_moryas_1925_i.gif");
_links[2]  = new BookLink("ay_ger_community.html",   "Gemeinschaft",                             "new_era_community_1926_i.gif");
_links[3]  = new BookLink("ay_ger_ay.html"       ,   "Agni Yoga",                                "agni_yoga_1929_i.gif");
_links[4]  = new BookLink("ay_ger_infinity1.html",   "Unbegrenztheit I",                         "infinity_1930_i.gif");
_links[5]  = new BookLink("ay_ger_infinity2.html",   "Unbegrenztheit II",                        "infinity_1930_ii.gif");
_links[6]  = new BookLink("ay_ger_hierarchy.html",   "Hierarchia",                               "hierarchy_1931_i.gif");
_links[7]  = new BookLink("ay_ger_heart.html",       "Das Herz",                                 "heart_1932_i.gif");
_links[8]  = new BookLink("ay_ger_fw1.html",         "Feurige Welt I",                           "fiery_world_1933_i.gif");
_links[9]  = new BookLink("ay_ger_fw2.html",         "Feurige Welt II",                          "fiery_world_1934_i.gif");
_links[10] = new BookLink("ay_ger_fw3.html",         "Feurige Welt III",                         "fiery_world_1935_i.gif");
_links[11] = new BookLink("ay_ger_aum.html",         "Aum",                                      "aum_1936_i.gif");
_links[12] = new BookLink("ay_ger_brotherhood.html", "Brotherhood",                              "brotherhood_1937_i.gif");
_links[13] = new BookLink("ay_ger_supm.html",        "Supermundane",                             "supermundane_1938_i.gif");
//_links[14] = new BookLink("",                        "Supermundane II",                          "supermundane_II_i.gif");
//_links[15] = new BookLink("",                        "Supermundane III",                         "supermundane_III_i.gif");
//_links[16] = new BookLink("",                        "Supermundane IV",                          "supermundane_IV_i.gif");

//_links[17] = new BookLink("",                        "Letters of Helena Roerich, Vol. I",  "lohr1_i.gif");
//_links[18] = new BookLink("",                        "Letters of Helena Roerich, Vol. II", "lohr2_i.gif");
//_links[19] = new BookLink("",                        "On Eastern Crossroads",              "crossroads_i.gif");
//_links[20] = new BookLink("",                        "Foundations of Buddhism",            "FoB_i.gif");

function writeImg(ndx){
	var s="<IMG SRC='ay_ger_book_imgs/"+_links[ndx].img+"' BORDER=1>";
	document.write(s);
}
function writeLinks(ndx){
	var s="";
	for(var i=0; i<_links.length; i++){
		if(i==17) s+="<IMG SRC=\"../gifs/type_emb4.gif\"></IMG><BR>";
		if(i!=ndx)
			s+="\n<NOBR><A HREF='javascript:parent.document.location.href=\""+_links[i].url+"\"' CLASS='sideBookList' onMouseOver='status=\"\"; return true;' onMouseOut=''>"+_links[i].txt+"</A></NOBR><BR>";
		else
			s+="\n<NOBR><SPAN CLASS='sideBookListSel'>"+_links[i].txt+"</SPAN></NOBR><BR>";
	}
	document.write(s);
}
//************ end ay_nav.js ***********//


