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 += 'Hammurabi'; break;
    case 1: thetext += 'Ammisaduga'; break;
    case 2: thetext += 'Shamshi-Adad 1'; break;
    case 3: thetext += 'Hattusilis 1'; break;
    case 4: thetext += 'Senuseret 3'; break;
    case 5: thetext += 'Amenemhat 3'; break;
    case 6: thetext += 'Neferhotep 1'; break;
    case 7: thetext += 'Ay'; break;
    case 8: thetext += 'Dudimose'; break;
    case 9: thetext += 'Joseph'; break;
    case 10: thetext += 'Ephraim'; break;
    case 11: thetext += 'Beriah'; break;
    case 12: thetext += 'Rephah'; break;
    case 13: thetext += 'Resheph'; break;
    case 14: thetext += 'Telah'; break;
    case 15: thetext += 'Tahan'; break;
    case 16: thetext += 'Laadan'; break;
    case 17: thetext += 'Ammihud'; break;
    case 18: thetext += 'Elishama'; break;
    case 19: thetext += 'Nun'; break;
    case 20: thetext += 'Amram'; break;
    case 21: thetext += 'Joshua'; break;
    case 22: thetext += 'Moses'; break;
    case 23: thetext += 'Aaron'; break;
    case 24: thetext += 'Jethro'; break;
    case 25: thetext += 'Caleb'; break;
    case 26: thetext += 'Annitas'; 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 - sojourn</h3>Few names are known to help bridge the gap between Joseph - last representative of the patriarchs - and Moses as instigator and leader of the Exodus. The majority of the individuals chosen are of the family line of Ephraim, listed in 1 Chronicles 6. The sequence helps to establish an estimate of overall duration.";break;
    case 1: theText="<h3>Middle kingdom</h3>12th dynasty<br><br>An important and powerful dynasty, during which the power of local officials (nomarchs) was broken and authority centralised.";break;
    case 2: theText="<h3>Hatti (the Hittites)</h3>";break;
    case 3: 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 4: theText="<h3>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;
    case 5: 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 6: theText="<h3>Larsa</h3>A city in the southern part of Mesopotamia which arose to dominance after the fall of Ur III. Its period of flourishing was marked by continual rivalry and conflict with Isin.";break;
    case 7: theText="<h3>Isin</h3>A city in the central part of Mesopotamia which arose to dominance after the fall of Ur III. Its period of flourishing was marked by continual rivalry and conflict with Larsa. ";break;    
    case 8: theText="<h3>Old Assyrian period</h3>This period is largely based on the city of Asshur, and extends from during patriarchal times.";break;
    case 9: theText="<h3>Old Babylonian period</h3>Early expansion led to conflict and eventual capture of Isin and Larsa. At its height, the territory controlled was approximately the same as that of Ur III.";break;
    case 10: theText="<h3>Middle kingdom</h3>From part-way through the 11th dynasty, central authority and unity were recovered, and Egypt once more took a prominent part in international affairs.";break;
    case 11: 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 12: theText="<h3>2nd Intermediate Period</h3>15th dynasty<br><br>A dynasty based around Thebes, existing in parallel with other contenders.";break;
  }
  if (ieadv)
  {
    expl.innerHTML=theText;
  }
  if (nsadv)
  { 
    document.expl.document.write(theText);
    document.expl.document.close();
  } 
}

function ClearExplain()
{
}

function DoPosition() {
  if (ieadv)
  {
    exp=expl.style;
    leg=legend.style;
    nts=notes.style;
    iep=isrearlypic.style;
    iee=isrearlyexpl.style;
    ilp=isrlatepic.style;
    itp=isrlate2pic.style;
    mp=mesopic.style;
    me=mesoexpl.style;
    hp=hattipic.style;
    he=hattiexpl.style;
    ep=egyptpic.style;
    ee=egyptexpl.style;
    pp=patriarchspic.style;
    pe=patriarchsexpl.style;
    xp=exjudgespic.style;
    xe=exjudgesexpl.style;
  }
  if (nsadv)
  { 
    exp=document.expl;
    leg = document.legend;
    nts = document.notes;
    iep = document.isrearlypic;
    iee = document.isrearlyexpl;
    ilp=document.isrlatepic;
    itp=document.isrlate2pic;
    mp=document.mesopic;
    me=document.mesoexpl;
    hp=document.hattipic;
    he=document.hattiexpl;
    ep=document.egyptpic;
    ee=document.egyptexpl;
    pp=document.patriarchspic;
    pe=document.patriarchsexpl;
    xp=document.exjudgespic;
    xe=document.exjudgesexpl;
  }
  if (ieadv||nsadv)
  {
    exp.left=10;
    exp.top=225;
    exp.width=240; 
    exp.height=470;
    exp.visibility="visible";
    leg.left=249;
    leg.top=575;
    leg.width=640; 
    leg.height=120;
    leg.visibility="visible";
    iep.left=260;
    iep.top=225;
    iep.visibility="visible";
    ilp.left=260;
    ilp.top=375;
    ilp.visibility="visible";
    itp.left=353;
    itp.top=375;
    itp.visibility="visible";
    iee.left=350;
    iee.top=225;
    iee.visibility="visible";
    mp.left=590;
    mp.top=225;
    mp.visibility="visible";
    me.left=590;
    me.top=200;
    me.visibility="visible";
    hp.left=690;
    hp.top=325;
    hp.visibility="visible";
    he.left=685;
    he.top=300;
    he.visibility="visible";
    ep.left=530;
    ep.top=225;
    ep.visibility="visible";
    ee.left=530;
    ee.top=200;
    ee.visibility="visible";
    pp.left=410;
    pp.top=225;
    pp.visibility="visible";
    pe.left=410;
    pe.top=200;
    pe.visibility="visible";
    xp.left=460;
    xp.top=475;
    xp.visibility="visible";
    xe.left=450;
    xe.top=435;
    xe.visibility="visible";
    nts.top = 700;
    nts.left = 10;
    nts.visibility = "visible";
  }
}


