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 DoExplain(trigger) 
{
  theText='';
  switch (trigger)
  {
    case 0: theText="<h3>Proto-history</h3>Shem<br>c. 3100-3050 BCE";break;
    case 1: theText="<h3>Proto-history</h3>Peleg<br>c. 2850-2800 BCE";break;
    case 2: theText="<h3>Proto-history</h3>Arphaxad<br>c. 3050-3000 BCE";break;
    case 3: theText="<h3>Proto-history</h3>Reu<br>c. 2650-2600 BCE";break;
    case 4: theText="<h3>Proto-history</h3>Shelah<br>c. 3000-2950 BCE";break;
    case 5: theText="<h3>Proto-history</h3>Eber<br>c. 2950-2900 BCE";break;
    case 6: theText="<h3>Proto-history</h3>Serug<br>c. 2450-2400 BCE";break;
    case 7: theText="<h3>Proto-history</h3>Nahor<br>c. 2250-2200 BCE";break;
    case 8: theText="<h3>Proto-history</h3>Terah<br>c. 2020-1920 BCE";break;
    case 9: theText="<h3>Proto-history</h3>Abraham<br>c. 1950-1775 BCE";break;
  }
  if (ieadv)
  {
    expl.innerHTML=theText;
  }
  if (nsadv)
  { 
    document.expl.document.write(theText);
    document.expl.document.close();
  } 
}

function ClearExplain()
{
  HideLoc();
}

function DoPosition() {
  if (ieadv)
  {
    exp=expl.style;
    leg=legend.style;
    nts=notes.style;
    si1=proisr1.style;
    si2=proisr2.style;
    si3=proisr3.style;
    si4=proisr4.style;
    si5=proisr5.style;
    si6=proisr6.style;
    si7=proisr7.style;
  }
  if (nsadv)
  { 
    exp=document.expl;
    leg = document.legend;
    nts = document.notes;
    si1 = document.proisr1;
    si2 = document.proisr2;
    si3 = document.proisr3;
    si4 = document.proisr4;
    si5 = document.proisr5;
    si6 = document.proisr6;
    si7 = document.proisr7;
  }
  if (ieadv||nsadv)
  {
    exp.left=10;
    exp.top=300;
    exp.width=240; 
    exp.height=475;
    exp.visibility="visible";
    leg.left=500;
    leg.top=300;
    leg.width=300; 
    leg.height=475;
    leg.visibility="visible";
    nts.left=10;
    nts.top=800;
    nts.visibility="visible";
    si1.left=260;
    si1.top=225;
    si1.width=50; 
    si1.height=200;
    si1.visibility="visible";
    si2.left=310;
    si2.top=225;
    si2.width=50; 
    si2.height=275;
    si2.visibility="visible";
    si3.left=360;
    si3.top=225;
    si3.width=50; 
    si3.height=151;
    si3.visibility="visible";
    si4.left=410;
    si4.top=225;
    si4.width=50; 
    si4.height=375;
    si4.visibility="visible";
    si5.left=260;
    si5.top=575;
    si5.width=50; 
    si5.height=200;
    si5.visibility="visible";
    si6.left=310;
    si6.top=675;
    si6.width=50; 
    si6.height=150;
    si6.visibility="visible";
    si7.left=360;
    si7.top=775;
    si7.width=50; 
    si7.height=75;
    si7.visibility="visible";
  }
}

function ShowLoc(index, e) {
  var thetext='<font color=blue>';
  switch (index) {
    case 0: thetext += 'Genesis 11.10'; break;
    case 1: thetext += 'Genesis 11.16-19'; break;
    case 2: thetext += 'Genesis 11.10-13'; break;
    case 3: thetext += 'Genesis 11.18-21'; break;
    case 4: thetext += 'Genesis 11.12-15'; break;
    case 5: thetext += 'Genesis 11.14-17'; break;
    case 6: thetext += 'Genesis 11.20-23'; break;
    case 7: thetext += 'Genesis 11.22-25'; break;
    case 8: thetext += 'Genesis 11.24-32'; break;
    case 9: thetext += 'Genesis 11.26 - 25.11'; 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();
  }
}

