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>Key figures</h3>Joseph<br>c. 1700-1590 BCE";break;
    case 1: theText="<h3>Key figures</h3>Amram<br>c. 1570-1555 BCE";break;
    case 2: theText="<h3>Key figures</h3>Elishama<br>c. 1535-1430 BCE";break;
    case 3: theText="<h3>Key figures</h3>Ephraim<br>c. 1670-1570 BCE";break;
    case 4: theText="<h3>Key figures</h3>Nun<br>c. 1520-1440 BCE";break;
    case 5: theText="<h3>Key figures</h3>Beriah<br>c. 1650-1635 BCE";break;
    case 6: theText="<h3>Key figures</h3>Resheph<br>c. 1620-1600 BCE";break;
    case 7: theText="<h3>Key figures</h3>Tahan<br>c. 1585-1570 BCE";break;
    case 8: theText="<h3>Key figures</h3>Ammihud<br>c. 1550-1535 BCE";break;
    case 9: theText="<h3>Key figures</h3>Jethro<br>c. 1520-1440 BCE";break;
    case 10: theText="<h3>Key figures</h3>Rephah<br>c. 1635-1620 BCE";break;
    case 11: theText="<h3>Key figures</h3>Telah<br>c. 1600-1585 BCE";break;
    case 12: theText="<h3>Key figures</h3>Laadan<br>c. 1570-1550 BCE";break;
    case 13: theText="<h3>Key figures</h3>Caleb<br>c. 1470-1370 BCE";break;
    case 14: theText="<h3>Key figures</h3>Moses<br>c. 1520-1440 BCE";break;
    case 15: theText="<h3>Key figures</h3>Aaron<br>c. 1650-1635 BCE";break;
    case 16: theText="<h3>Key figures</h3>Joshua<br>c. 1620-1600 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=sojisr1.style;
    si2=sojisr2.style;
    si3=sojisr3.style;
    si4=sojisr4.style;
    si5=sojisr5.style;
    si6=sojisr6.style;
    si7=sojisr7.style;
  }
  if (nsadv)
  { 
    exp=document.expl;
    leg = document.legend;
    nts = document.notes;
    si1 = document.sojisr1;
    si2 = document.sojisr2;
    si3 = document.sojisr3;
    si4 = document.sojisr4;
    si5 = document.sojisr5;
    si6 = document.sojisr6;
    si7 = document.sojisr7;
  }
  if (ieadv||nsadv)
  {
    exp.left=10;
    exp.top=225;
    exp.width=240; 
    exp.height=475;
    exp.visibility="visible";
    leg.left=249;
    leg.top=525;
    leg.width=400; 
    leg.height=175;
    leg.visibility="visible";
    nts.left=10;
    nts.top=725;
    nts.visibility="visible";
    si1.left=260;
    si1.top=250;
    si1.width=50; 
    si1.height=280;
    si1.visibility="visible";
    si2.left=310;
    si2.top=250;
    si2.width=50; 
    si2.height=270;
    si2.visibility="visible";
    si3.left=360;
    si3.top=250;
    si3.width=50; 
    si3.height=270;
    si3.visibility="visible";
    si4.left=410;
    si4.top=250;
    si4.width=50; 
    si4.height=280;
    si4.visibility="visible";
    si5.left=460;
    si5.top=400;
    si5.width=50; 
    si5.height=130;
    si5.visibility="visible";
    si6.left=510;
    si6.top=400;
    si6.width=50; 
    si6.height=130;
    si6.visibility="visible";
    si7.left=560;
    si7.top=400;
    si7.width=50; 
    si7.height=130;
    si7.visibility="visible";
  }
}

function ShowLoc(index, e) {
  var thetext='<font color=blue>';
  switch (index) {
    case 0: thetext += 'Genesis'; break;
    case 1: thetext += 'Exodus'; break;
    case 2: thetext += 'Exodus'; break;
    case 3: thetext += 'Genesis'; break;
    case 4: thetext += 'Exodus'; break;
    case 5: thetext += '1 Chronicles'; break;
    case 6: thetext += '1 Chronicles'; break;
    case 7: thetext += '1 Chronicles'; break;
    case 8: thetext += 'Exodus'; break;
    case 9: thetext += 'Numbers'; break;
    case 10:thetext += '1 Chronicles'; break;
    case 11:thetext += '1 Chronicles'; break;
    case 12:thetext += '1 Chronicles'; break;
    case 13:thetext += 'Numbers'; break;
    case 14:thetext += 'Exodus'; break;
    case 15:thetext += 'Exodus'; break;
    case 16:thetext += 'Joshua'; 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();
  }
}


