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 += 'Eli'; break;
    case 1: thetext += 'Samuel'; break;
    case 2: thetext += 'Saul'; break;
    case 3: thetext += 'David'; break;
    case 4: thetext += 'Solomon'; break;
    case 5: thetext += 'Rehoboam'; break;
    case 6: thetext += 'Abijam'; break;
    case 7: thetext += 'Asa'; break;
    case 8: thetext += 'Jeroboam'; break;
    case 9: thetext += 'Nadab'; break;
    case 10: thetext += 'Baasha'; break;
    case 11: thetext += 'Burnaburiash 2'; break;
    case 12: thetext += 'Nebuchadnezzar 1'; break;
    case 13: thetext += 'Tiglath-pileser 1'; break;
    case 14: thetext += 'Suppiluliumus 1'; break;
    case 15: thetext += 'Shuttarna 2'; break;
    case 16: thetext += 'Amenhotep 3'; break;
    case 17: thetext += 'Akhenaten'; break;
    case 18: thetext += 'Tutankhamun'; break;
    case 19: thetext += 'Rameses 1'; break;
    case 20: thetext += 'Seti 1'; break;
    case 21: thetext += 'Rameses 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>Israel</h3>";break;
    case 1: theText="<h3>Babylon</h3>";break;
    case 2: theText="<h3>Assyria</h3>";break;
    case 3: theText="<h3>Mitanni</h3>At the height of Mitanni power, Assyria was a vassal state, but in the period in question here, decline set in and the territory was absorbed into Assyria.";break;
    case 4: theText="<h3>New Kingdom</h3>This was another period of strength, lasting around 400 years, in which a number of powerful military conquerers extended their sway well beyond the borders of Egypt. Some of the best-known Pharaohs date from this era.";break;
    case 5: theText="<h3>The Hittite empire</h3>The Hittite empire emerged from the earlier Hittite kingdom near the end of the Judges era. Its end, shortly after this chart, was quite sudden, and several different causes have been suggested.";break;
    case 6: theText="<h3>Kassite dynasty</h3>The Kassites gradually rebuilt power after the collapse of the Old period. However. later days saw increasing nomadic invasions and final disintegration. As the Kassites lost power again, other leaders arose from different Mesopotamian cities.";break;
    case 7: theText="<h3>2nd Isin dynasty</h3>This dynasty, seeking to reassert the fortunes of Isin, rose to a high point under Nebuchadnezzar 1 but declined quite quickly again in the later stages of his reign.";break;
    case 8: theText="<h3>Dynasty 'E'</h3>One of several contending dynasties arising as the Kassites declined, this was based around Babylon.";break;
    case 9: theText="<h3>Middle period</h3>Recovery of independence for Assyria in the early stages lasted for some years until Assyria came under the control of Aramaeans. Nineveh became the prominent city.";break;
    case 10: theText="<h3>Neo-Assyrians</h3>The Neo-Assyrians were typically expansionist and aggressive. There are many synchronisms with Biblical events during the divided monarchy period.";break;
    case 11: theText="<h3>Exodus/Judges</h3>After establishing a presence in the land of Canaan, the Israelite tribes were loosely organised and easily subdued by others. The duration of this period is difficult to estimate reliably. The issues involved are discussed on the <a href=exjudgescontext.htm>Exodus and Judges page</a>.";break;
    case 12: theText="<h3>New Kingdom</h3>18th dynasty<br><br>With this dynasty, Egypt was once again reunited under one central rule and able to take a more vigorous part in external affairs. However, after strong early figures, rulers became more inward-looking, allowing surrounding nations to become strong. The middle years of the dynasty are associated with a lengthy correspondence with rulers of other regions, called the Amarna letters. ";break;
    case 13: theText="<h3>New Kingdom</h3>19th dynasty<br><br>With this dynasty, Egypt was once again reunited under one central rule and able to take a more vigorous part in external affairs. However, after strong early figures, rulers became more inward-looking, allowing surrounding nations to become strong. The middle years of the dynasty are associated with a lengthy correspondence with rulers of other regions, called the Amarna letters. ";break;
    case 14: theText="<h3>Judah</h3>Southern kingdom<br><br>";break;
    case 15: theText="<h3>Israel</h3>Northern kingdom<br><br>";break;
  }
  if (ieadv)
  {
    expl.innerHTML=theText;
  }
  if (nsadv)
  { 
    document.expl.document.write(theText);
    document.expl.document.close();
  } 
}

function DoPosition() {
  if (ieadv)
  {
    exp=expl.style;
    leg=legend.style;
    bp=babylontmpic.style;
    be=babylontmexpl.style;
    ap=assyriatmpic.style;
    ae=assyriatmexpl.style;
    hp=hattitmpic.style;
    he=hattitmexpl.style;
    ep=egypttmpic.style;
    ee=egypttmexpl.style;
    ejp=exjtransmonpic.style;
    eje=exjtransmonexpl.style;
    iep=isrearlytmpic.style;
    imp=isrmidtmpic.style;
    ilp=isrlatetmpic.style;
    ite=isrtmexpl.style;
    nts=notes.style;
  }
  if (nsadv)
  { 
    exp=document.expl;
    leg=document.legend;
    bp=document.babylontmpic;
    be=document.babylontmexpl;
    ap=document.assyriatmpic;
    ae=document.assyriatmexpl;
    hp=document.hattitmpic;
    he=document.hattitmexpl;
    ep=document.egypttmpic;
    ee=document.egypttmexpl;
    ejp=document.exjtransmonpic;
    eje = document.exjtransmonexpl;
    iep=document.isrearlytmpic;
    imp=document.isrmidtmpic;
    ilp=document.isrlatetmpic;
    ite=document.isrtmexpl;
    nts = document.notesd;
  }
  if (ieadv||nsadv)
  {
    exp.left=10;
    exp.top=225;
    exp.width=240; 
    exp.height=515;
    exp.visibility="visible";
    leg.left=249;
    leg.top=650;
    leg.width=640; 
    leg.height=90;
    leg.visibility="visible";
    bp.top = 225;
    bp.left = 350;
    bp.visibility = "visible";
    be.top = 200;
    be.left = 350;
    be.visibility = "visible";
    ap.top = 225;
    ap.left = 420;
    ap.visibility = "visible";
    ae.top = 200;
    ae.left = 490;
    ae.visibility = "visible";
    hp.top = 225;
    hp.left = 630;
    hp.visibility = "visible";
    he.top = 200;
    he.left = 625;
    he.visibility = "visible";
    ep.top = 225;
    ep.left = 675;
    ep.visibility = "visible";
    ee.top = 200;
    ee.left = 675;
    ee.visibility = "visible";
    ejp.top = 225;
    ejp.left = 545;
    ejp.visibility = "visible";
    eje.top = 225;
    eje.left = 575;
    eje.visibility = "visible";
    imp.top = 396;
    imp.left = 250;
    imp.visibility = "visible";
    iep.top = 225;
    iep.left = 250;
    iep.visibility = "visible";
    ilp.top = 550;
    ilp.left = 250;
    ilp.visibility = "visible";
    ite.top = 270;
    ite.left = 275;
    ite.visibility = "visible";
    nts.top = 750;
    nts.left = 10;
    nts.visibility = "visible";
  }
}


