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 += 'Moses'; break;
    case 1: thetext += 'Joshua'; break;
    case 2: thetext += 'Caleb'; break;
    case 3: thetext += 'Othniel'; break;
    case 4: thetext += 'Ehud'; break;
    case 5: thetext += 'Deborah/Barak'; break;
    case 6: thetext += 'Gideon'; break;
    case 7: thetext += 'Jephtah'; break;
    case 8: thetext += 'Samson'; break;
    case 9: thetext += 'Eli'; break;
    case 10: thetext += 'Samuel'; break;
    case 11: thetext += 'Saul'; break;
    case 12: thetext += 'Ammisaduga'; break;
    case 13: thetext += 'Shalmaneser 1'; break;
    case 14: thetext += 'Mursilis 1'; break;
    case 15: thetext += 'Tudhaliyas 1'; break;
    case 16: thetext += 'Dudimose'; break;
    case 17: thetext += 'Thutmose 3'; break;
    case 18: thetext += 'Amenhotep 3'; break;
    case 19: thetext += 'Akhenaten'; 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>Assyria/Mitanni</h3>These two realms held sway over the region north-west of Babylon and east of the Hittites. There were no real boundaries between them, and their interaction was a series of struggels for supremacy. For much of the Exodus and Judges periods, Mitanni was the stronger power, but in the end Assyria emerged the victor.";break;
    case 2: theText="<h3>Hatti (the Hittites)</h3>The Hittite kingdom, lasting through most of this period was based in modern Turkey and held sway over a region of the Middle East centred on this. Hittite fortunes fluctuated considerably over the years, since their extensive land borders led to vulnerability to invasion from various directions. The last years of this period saw the rise of the Hittite empire.";break;
    case 3: theText="<h3>2nd Intermediate Period</h3>A period of turmoil and confusion which lasted nearly 4 centuries until the establishment of the 18th dynasty.";break;
    case 4: theText="<h3>Sojourn in Egypt</h3>The Sojourn period begins with Joseph's rise to power in Egypt and ends with the Exodus. The fortunes of the Israelites in Egypt varied widely during this period. The era is discussed on the <a href=sojourncontext.htm>Sojourn in Egypt page</a>.";break;
    case 5: theText="<h3>Transition to monarchy</h3>";break;
    case 6: theText="<h3>Babylon</h3>";break;
    case 7: 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 8: theText="<h3>2nd Intermediate Period</h3>13th dynasty<br><br>Early weak, short-lived rulers were followed by stronger men who enforced Egyptian authority, but the dynasty ended in collapse.";break;
    case 9: theText="<h3>2nd Intermediate Period</h3>15th dynasty<br><br>A dynasty based around Thebes, existing in parallel with other contenders.";break;
    case 10: theText="<h3>2nd Intermediate Period</h3>17th dynasty<br><br>Last of the Second Intermediate Period dynasties, this comprises the most powerful of the Hyksos rulers. It is contemporary with the 16th dynasty but slightly overlaps at start and finish.";break;
    case 11: 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 12: theText="<h3>The Hittite kingdom</h3>This lasted through most of the Exodus and Judges period, was based in modern Turkey and held sway over a region of the Middle East centred on this. Hittite fortunes fluctuated considerably over the years, since their extensive land borders led to vulnerability to invasion from various directions.";break;
    case 13: theText="<h3>The Hittite Empire</h3>The last years of the Exodus and Judges period saw the rise of the Hittite empire, though its full strength was not to emerge until a little later.";break;
    case 14: theText="<h3>Old Babylonian period</h3>At the height of this Babylonian period, the territory controlled was extensive, but during the time of Exodus and Judges the city was in decline.";break;
    case 15: 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 16: theText="<h3>Old Assyrian period</h3>This period is largely based on the city of Asshur, and was in decline through much of this era. There were few rulers of major impact.";break;
    case 17: theText="<h3>Middle Assyrian 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 18: theText="<h3>Mitanni</h3>Also known as Horites or Hurrians, the Mitanni held sway over a region to the west of Assyria. Initially they seized land from Babylon after the Hittite sack. At the height of Mitanni power, Assyria was a vassal state.";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;
    nts=notes.style;
    eep=earlyexsojourn.style;
    lep=lateexsojourn.style;
    eee=isrexpl.style;
    sp=sojournejpic.style;
    se=sojournejexpl.style;
    tp=sojourntmpic.style;
    te=sojourntmexpl.style;
    ap=assyriapic.style;
    ae=assyriaexpl.style;
    bp=babylonpic.style;
    be=babylonexpl.style;
    hp=hattipic.style;
    he=hattiexpl.style;
    ep=egyptpic.style;
    ee=egyptexpl.style;
  }
  if (nsadv)
  { 
    exp=document.expl;
    leg = document.legend;
    nts = document.notesd;
    eep = document.earlyexsojourn;
    lep = document.lateexsojourn;
    eee = document.isrexpl;
    sp = document.sojournejpic;
    se = document.sojournejexpl;
    tp = document.sojourntmpic;
    te = document.sojourntmexpl;
    ap = document.assyriapic;
    ae = document.assyriaexpl;
    bp = document.babylonpic;
    be = document.babylonexpl;
    hp = document.hattipic;
    he = document.hattiexpl;
    ep = document.egyptpic;
    ee = document.egyptexpl;
  }
  if (ieadv||nsadv)
  {
    exp.left=10;
    exp.top=225;
    exp.width=240; 
    exp.height=615;
    exp.visibility="visible";
    leg.left=249;
    leg.top=750;
    leg.width=640; 
    leg.height=90;
    leg.visibility="visible";
    eep.top = 225;
    eep.left = 260;
    eep.visibility = "visible";
    lep.top = 425;
    lep.left = 260;
    lep.visibility = "visible";
    eee.top = 225;
    eee.left = 310;
    eee.visibility = "visible";
    sp.top = 225;
    sp.left = 360;
    sp.visibility = "visible";
    se.top = 200;
    se.left = 330;
    se.visibility = "visible";
    tp.top = 625;
    tp.left = 360;
    tp.visibility = "visible";
    te.top = 575;
    te.left = 340;
    te.visibility = "visible";
    ap.top = 225;
    ap.left = 400;
    ap.visibility = "visible";
    ae.top = 225;
    ae.left = 420;
    ae.visibility = "visible";
    bp.top = 225;
    bp.left = 470;
    bp.visibility = "visible";
    be.top = 250;
    be.left = 490;
    be.visibility = "visible";
    hp.top = 225;
    hp.left = 540;
    hp.visibility = "visible";
    he.top = 200;
    he.left = 540;
    he.visibility = "visible";
    ep.top = 225;
    ep.left = 600;
    ep.visibility = "visible";
    ee.top = 200;
    ee.left = 600;
    ee.visibility = "visible";
    nts.top = 850;
    nts.left = 10;
    nts.visibility = "visible";
  }
}


