var browsername = navigator.appName;
var opera = (navigator.userAgent.search("Opera")>=0) ? 1:0;
var nsadv = ((document.layers) && parseInt(navigator.appVersion)>=4) ? 1:0;
var ieadv = ((document.all) && parseInt(navigator.appVersion)>=4) ? 1:0;

function ShowLoc(index, e) {
  var thetext='<font color=blue>';
  switch (index) {
    case 0: thetext += 'Shem'; break;
    case 1: thetext += 'Arphaxad'; break;
    case 2: thetext += 'Shelah'; break;
    case 3: thetext += 'Eber'; break;
    case 4: thetext += 'Peleg'; break;
    case 5: thetext += 'Reu'; break;
    case 6: thetext += 'Serug'; break;
    case 7: thetext += 'Nahor'; break;
    case 8: thetext += 'Terah'; break;
    case 9: thetext += 'Etana'; break;
    case 10: thetext += 'Meskiagkasher'; break;
    case 11: thetext += 'Enmerkar'; break;
    case 12: thetext += 'Gilgamesh'; break;
    case 13: thetext += 'Sargon 1'; break;
    case 14: thetext += 'Djoser/Imhotep'; break;
    case 15: thetext += 'Khufu (Cheops)'; break;
    case 16: thetext += 'Pepi 2'; break;
  }
  thetext += '</font>' 
  if (ieadv) {
    commenttext.innerHTML = thetext;
	commentbubble.style.left = e.x - 25 + document.body.scrollLeft;
	commentbubble.style.top = e.y - 140 + document.body.scrollTop;
	commenttext.style.left = e.x + document.body.scrollLeft;
	commenttext.style.top = e.y - 110 + document.body.scrollTop;
	commentbubble.style.visibility = 'visible';
	commenttext.style.visibility = 'visible';
  }
  if (nsadv) {
    vbub=document.commentbubble;
	vbub.document.write('<img src=images/comment.gif>');
	vbub.document.close();
	vbub.moveTo(e.x+250,e.y-80);
    vtext=document.commenttext;
	vtext.document.write('<font color=#006600>' + thetext + '</font>');
	vtext.document.close();
	vtext.y = e.y - 45;
	vtext.x = e.x+275;
	vbub.visibility = "visible";
	vtext.visibility = "visible";
  }
}

function HideLoc() {
  if (ieadv) {
	commenttext.style.visibility = 'hidden';
	commentbubble.style.visibility = 'hidden';
    commenttext.innerHTML = '';
  }
  if (nsadv) {
	vbub=document.layers['commentbubble'];
    vtext=document.layers['commenttext'];
	vtext.visibility = "hidden";
	vbub.visibility = "hidden";
	vtext.document.write('');
	vtext.document.close();
  }
}

function DoExplain(trigger) 
{
  theText='';
  switch (trigger)
  {
    case 0: theText="<h3>Ebla archive</h3>The tablets found at Ebla describe influential nearby cities and record law codes and judicial decisions made at the city. The structure of laws and customs provides a good parallel for the Genesis accounts. Personal names matching those in Genesis are also found.";break;
    case 1: theText="<h3>Kish 1</h3>A city in the northern part of Mesopotamia. The land under its influence was ruled not as a controlled empire but a loose confederation of individual cities, each with its own ruler but acknowledging Kish as overlord. According to the Sumerian kinglist, Kish was the first city to which kingship was restored after the flood. The reigns given for this period are extremely long and are often presumed to name important representatives rather than all individuals.";break;
    case 2: theText="<h3>Kish 2</h3>After an interval, a second dynasty arose in Kish. Few names are known with confidence from this era.";break;
    case 3: theText="<h3>Kish 3</h3>This very short dynasty followed directly after Kish 2.";break;
    case 4: theText="<h3>Kish 4</h3>During the second half of this dynasty, Sargon initiated the rise of power in Akkad.";break;
    case 5: theText="<h3>Uruk 1</h3>A city in the southern part of Mesopotamia, also known as Erech and traditionally founded or greatly extended by Nimrod (Enmerkar). The land under its influence was ruled not as a controlled empire but a loose confederation of individual cities, each with its own ruler but acknowledging Uruk as overlord. The reign lengths given during the early Uruk I period are extremely long, and are often assumed to give representative names rather than listing all individuals.";break;
    case 6: theText="<h3>Uruk 2</h3>The royal lines of Uruk and Ur joined during this dynasty.";break;
    case 7: theText="<h3>Uruk 3</h3>The dynastic line here ended in conquest by Sargon of Akkad.";break;
    case 8: theText="<h3>Ur 1</h3>A city in the southern part of Mesopotamia. The land under its influence was ruled not as a controlled empire but a loose confederation of individual cities, each with its own ruler but acknowledging Ur as overlord.";break;
    case 9: theText="<h3>Ur 2</h3>This short dynasty consisted of rulers who were also rulers over Uruk as the royal lines had merged.";break;
    case 10: theText="<h3>Lagash</h3>A city in the southern area of Mesopotamia. It's period of dominance was marked by continual border conflicts with Uruk and other cities, and ended in conquest by Lugalzagezi of Uruk III.";break;
    case 11: theText="<h3>Akkad</h3>The most significant time of this dynasty was the reign of Sargon I, when power was exerted over all of Sumeria across to Syria and Anatolia. Akkad (or Agade) was warlike and regularly used military force to subdue cities.";break;
    case 12: theText="<h3>Predynastic period</h3>In this period, centres of power and culture developed in several places along the Nile Valley, especially Naqada. Over time these were gradually absorbed to become a single nation. The transition to the dynastic period comes at the point of unification.";break;
    case 13: theText="<h3>Early dynastic period</h3>During this period, Egyptian culture developed many of its distinctive traits. Recent work suggests that the leaders may have originated from Mesopotamia and traveled to Egypt via the Persian Gulf and Ethiopia. Dates are moved approximately 150-200 years later than in the conventional chronology of Egypt.";break;
    case 14: theText="<h3>Old Kingdom</h3>The first great period of flourishing for Egypt, it lasted about 500 years through the second half of the 3rd millennium BCE. Dates are moved approximately 150-200 years later than in the conventional chronology of Egypt.";break;
    case 15: theText="<h3>First intermediate period</h3>A time of short-lived and ineffectual rulers, often with contending dynasties holding separate parts of Egypt. Dates are moved approximately 100-200 years later than in the conventional chronology of Egypt.";break;
    case 16: theText="<h3>Predynastic period</h3>Naqada 1<br><br>";break;
    case 17: theText="<h3>Predynastic period</h3>Naqada 2<br><br>";break;
    case 18: theText="<h3>Predynastic period</h3>Naqada 3 / Dynasty 0<br><br>";break;
    case 19: theText="<h3>Early dynastic period</h3>Dynasty 1<br><br>This dynasty is thought to have been based at This, hence called Thinite. Few details are certain.";break;
    case 20: theText="<h3>Early dynastic period</h3>Dynasty 2<br><br>This dynasty was also based at This, though the capital was moved to Memphis part way through. During part of the time hostility arose between northern and southern Egypt, but by the end of the dynasty relations were good.";break;
    case 21: theText="<h3>Old Kingdom</h3>Dynasty 3<br><br>First of the Old Kingdom dynasties, little is known of the details of the 3rd dynasty. It is, however, dominated by the building exploits of Djoser including the well-known step pyramid.";break;
    case 22: theText="<h3>Old Kingdom</h3>Dynasty 4<br><br> In the early part of the dynasty several powerful and respected kings ruled, but later on issues of succession were disputed.";break;
    case 23: theText="<h3>Old Kingdom</h3>Dynasty 5<br><br>In this dynasty Egypt became more open to links with the outside world. Trading links with various places in the north Mediterranean were established.";break;
    case 24: theText="<h3>Old Kingdom</h3>Dynasty 6<br><br>Last dynasty of the Old Kingdom, it was dominated by the incredibly long reign of Pepi II. Overall it was a time of decline towards the First Intermediate Period.";break;
    case 25: theText="<h3>First intermediate period</h3>Dynasty 8<br><br>This dynasty ruled from Thebes and produced no rulers of great note.";break;
    case 26: theText="<h3>Proto-historical patriarchs</h3>The date ranges given for these people are very tentative. Reasons for the assignments are given in the accompanying pages. The basic assumption is that the names and sequence are correct, but the dates indicated in this portion of Genesis may not be reliable.";break;
    case 27: theText="<h3>The Patriarchs</h3>The family leaders from Abraham to Joseph form a distinctive part of the Genesis account. It was a period of migration, beginning with a pastoral life in Mesopotamia and ending with a position of power and responsibility in Egypt.";break;
  }
  if (ieadv)
  {
    expl.innerHTML=theText;
  }
  if (nsadv)
  { 
    exp=document.expl;
    theText="<table cellpadding=5 width=240 height=475 border=1><tr><td valign=top><font color='#006600'>"+theText+"</font></td></tr></table>";
    exp.document.write(theText);
    exp.document.close();
    exp.left=10;
    exp.top=75;
  } 
}

function DoPosition() {
  if (ieadv)
  {
    exp=expl.style;
    leg=legend.style;
    ebp=eblapic.style;
    ebe=eblaexpl.style;
    mp=mesopic.style;
    me=mesoexpl.style;
    egp=egyptpic.style;
    ege=egyptexpl.style;
    nts = notes.style;
    ppep=protopatearly.style;
    ppmp=protopatmid.style;
    pplp=protopatlate.style;
    ppe = protopatexpl.style;
    pp=patpic.style;
    pe=patexpl.style;
  }
  if (nsadv)
  { 
    exp=document.expl;
    leg = document.legend;
    ebp=document.eblapic;
    ebe=document.eblaexpl;
    mp=document.mesopic;
    me=document.mesoexpl;
    egp=document.egyptpic;
    ege=document.egyptexpl;
    nts = document.notes;
    ppep=document.protopatearly;
    ppmp=document.protopatmid;
    pplp=document.protopatlate;
    ppe = document.protopatexpl;
    pp=document.patpic;
    pe=document.patexpl;
  }
  if (ieadv||nsadv)
  {
    exp.left=10;
    exp.top=225;
    exp.width=240; 
    exp.height=565;
    exp.visibility="visible";
    leg.left=249;
    leg.top=700;
    leg.width=640; 
    leg.height=90;
    leg.visibility="visible";
    ppep.left=260;
    ppep.top=250;
    ppep.visibility="visible";
    ppmp.left=260;
    ppmp.top=400;
    ppmp.visibility="visible";
    pplp.left=260;
    pplp.top=550;
    pplp.visibility="visible";
    ppe.left=300;
    ppe.top=270;
    ppe.visibility="visible";
    ebp.left=380;
    ebp.top=550;
    ebp.visibility="visible";
    ebe.left=380;
    ebe.top=550;
    ebe.visibility="visible";
    mp.left=500;
    mp.top=250;
    mp.visibility="visible";
    me.left=500;
    me.top=250;
    me.visibility="visible";
    egp.left=650;
    egp.top=250;
    egp.visibility="visible";
    ege.left=660;
    ege.top=225;
    ege.visibility="visible";
    pp.left=430;
    pp.top=625;
    pp.visibility="visible";
    pe.left=415;
    pe.top=600;
    pe.visibility="visible";
    nts.top = 800;
    nts.left = 10;
    nts.visibility = "visible";
  }
}


