// Object constructor
function article(title, linktitle, page, info, lang, llinktitle, lpage, linfo, llang) {
   this.title = title
   this.linktitle = linktitle
   this.page = page
   this.info = info
   this.lang = lang
   this.llinktitle = llinktitle
   this.lpage = lpage
   this.linfo = linfo
   this.llang = llang
}

// Create new articles array.
var articles = new Array()
// Stuff entries with objects.
articles[0] = new article("Torah-Cosmos", "Torah Cosmos", "http://otaku.onlinehome.de/torah.html", "the astrological mathematical system behind the verses","en")

articles[1] = new article("Hall of Records", "Gematria a la Hitomi", "http://otaku.onlinehome.de/gematria.html", 'gematroscopic function "Hitomi" finds star-maps in the Torah',"en")

articles[2] = new article("Verse Kabbalah","Verse Numbers","http://otaku.onlinehome.de/kabbalah.html","the Kabbalah of the verse numbers","en",
"Bedeutung in der Z&auml;hlung der Verse","http://otaku.onlinehome.de/kabbalah_de.html","die Kabbalah der Torahversz&auml;hlung","de")

articles[3] = new article("Hitomi-Funktion","Siegel","http://otaku.onlinehome.de/siegel.html","Hitomi chiffrierte Bilder in der Torah","de")

articles[4] = new article("The Eye of God",
"Neues aus dem Sohar über das Auge als Allegorie zur Welt / Bilder aus der Genesis","http://otaku.onlinehome.de/auge.html","Augenschema im Sohar entziffert","de",
"News from the Sohar about the eye as an allegory to the world / decoding pictures from the Genesis","http://otaku.onlinehome.de/eye.html","Eyes pattern in Sohar decoded","en")

articles[5] = new article("10 Faces of God","Die Antlitze Gottes, beschrieben im Sohar, dechiffriert aus der Genesis und fertig ausgedeuet auf dieser Website.","http://otaku.onlinehome.de/antlitze.html","Die Antlitze Gottes im Detail (betaversion)","de" /* ,
"The Faces od God, described in the Sohar, decoded from the Genesis and explained in this article.","http://otaku.onlinehome.de/faces.html","The 10 Faces of God explained" */)

articles[6] = new article("TimeMasterSys.", "Der totale Kalender mit der Verflechtung von geschichtlichen Ereignissen mit der Torah.", "http://otaku.onlinehome.de/?", "der tolle Zeitplan der Sch&ouml;pfung (kommt bald)","de")

articles[7] = new article("Patriarch Tarot", "Parallelen Tarot und 21 Patriarchen", "http://otaku.onlinehome.de/tarot.html", "und der Rota- Zyklus (betaver.)","de")

articles[8] = new article("my Weblog", "news out of the Tora Cosmos", "http://blog.quicktunnels.net/", "neues aus dem Torakosmos")

//get base and index name of this page
var page = document.URL;

//get blank string
var blank = "";


if ("http://otaku.onlinehome.de/" == page.substring(0,page.indexOf("de")+3)) {
	if ( page.indexOf("#") > -1 ) {
		page = page.substring(0,page.indexOf("#"));
	}
	if ( page.indexOf("?") > -1 ) {
		page = page.substring(0,page.indexOf("?"));
	}
}

if ("http://blog.quicktunnels.net/" == page.substring(0,page.indexOf("net")+4)) {
page = "http://blog.quicktunnels.net/";
}



//create html for top of articles menu
document.write('<div id="articles"><a href="http://otaku.onlinehome.de/impressum.html"><img id="minisihanimg" src="http://otaku.onlinehome.de/minisihan.gif" ')
document.write('alt="" style="float: right; margin-top: 3px; margin-right: -2px;" border="0"></a>articles')

//create html for items
for (i=0;i<articles.length;i++) {
if (articles[i].page != page) {

//create inactive item

// document.write('<a class="aitem" href="'+articles[i].page)
document.write('<a class="aitem" href="'+articles[i].page);

document.write('" TITLE="'+articles[i].linktitle+'">')
document.write(articles[i].title+'<br>')
if (articles[i].lang != null) {
   document.write('<img class="flag" alt="" src="http://otaku.onlinehome.de/'+articles[i].lang+'.png"/>')
}
document.write('<span>'+articles[i].info+'</span></a>')
} else {
//create the one active item
document.write('<span class="aitem" id="acurrentitem">'+articles[i].title+'<br>')
if (articles[i].lang != null) {
   document.write('<img class="flag" alt="" src="http://otaku.onlinehome.de/'+articles[i].lang+'.png"/>')
}
document.write('<span>'+articles[i].info+'</span></span>')
}
if (articles[i].llang != null) {

document.write('<div class="alangdiv"></div>');

//create other lang item

if (articles[i].lpage != page) {

//create other lang inactive item
document.write('<a class="laitem" href="'+articles[i].lpage);
document.write('" TITLE="'+articles[i].llinktitle+'">')
document.write('<img class="flag" alt="" src="http://otaku.onlinehome.de/'+articles[i].llang+'.png"/>')
document.write('<span>'+articles[i].linfo+'</span></a>')
} else {
//create other lang the one active item
document.write('<span class="laitem" id="acurrentitem">')
document.write('<img class="flag" alt="" src="http://otaku.onlinehome.de/'+articles[i].llang+'.png"/>')
document.write('<span>'+articles[i].linfo+'</span></span>')
}

}
}

//create html for bottom of articles menu
document.write('</div>')
