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>Moses<br>c. 1533-1414 BCE";break;
    case 1: theText="<h3>Key figures</h3>Othniel<br>c. 1375-1360 BCE";break;
    case 2: theText="<h3>Key figures</h3>Deborah/Barak<br>c. 1230-1190 BCE";break;
    case 3: theText="<h3>Key figures</h3>Joshua<br>c. 1494-1384 BCE";break;
    case 4: theText="<h3>Key figures</h3>Ehud<br>c. 1325-1305 BCE";break;
    case 5: theText="<h3>Key figures</h3>Caleb<br>c. 1470-1370 BCE";break;
    case 6: theText="<h3>Key figures</h3>Gideon<br>c. 1185-1145 BCE";break;
    case 7: theText="<h3>Key figures</h3>Eli<br>c. 1090-1060 BCE";break;
    case 8: theText="<h3>Key figures</h3>Jephtah<br>c. 1120-1100 BCE";break;
    case 9: theText="<h3>Key figures</h3>Samuel<br>c. 1060-1020 BCE";break;
    case 10: theText="<h3>Key figures</h3>Samson<br>c. 1090-1080 BCE";break;
    case 11: theText="<h3>Key figures</h3>Saul<br>c. 1052-1012 BCE";break;
    case 12: theText="<h3>Oppressors</h3>Cushan-Rishathaim<br>c. 1370-1365 BCE";break;
    case 13: theText="<h3>Oppressors</h3>Eglon of Moab<br>c. 1330-1315 BCE";break;
    case 14: theText="<h3>Oppressors</h3>Jabin of Hazor<br>c. 1245-1205 BCE";break;
    case 15: theText="<h3>Oppressors</h3>Midianites/Amalekites<br>c. 1195-1175 BCE";break;
    case 16: theText="<h3>Oppressors</h3>Ammonites/Philistines<br>c. 1130-1110 BCE";break;
    case 17: theText="<h3>Oppressors</h3>Philistines<br>c. 1100 BCE into Monarchy period";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;
    ej1=exjisr1.style;
    ej2=exjisr2.style;
    ej3=exjisr3.style;
    ej4=exjisr4.style;
    ej5=exjisr5.style;
    ej6=exjisr6.style;
    ep1=exjopp1.style;
    ep2=exjopp2.style;
    ep3=exjopp3.style;
    ep4=exjopp4.style;
    ep5=exjopp5.style;
    ep6=exjopp6.style;
  }
  if (nsadv)
  { 
    exp=document.expl;
    leg = document.legend;
    nts = document.notes;
    ej1 = document.exjisr1;
    ej2 = document.exjisr2;
    ej3 = document.exjisr3;
    ej4 = document.exjisr4;
    ej5 = document.exjisr5;
    ej6 = document.exjisr6;
    ep1 = document.exjopp1;
    ep2 = document.exjopp2;
    ep3 = document.exjopp3;
    ep4 = document.exjopp4;
    ep5 = document.exjopp5;
    ep6 = document.exjopp6;
}
  if (ieadv||nsadv)
  {
    exp.left=10;
    exp.top=225;
    exp.width=240; 
    exp.height=475;
    exp.visibility="visible";
    leg.left=650;
    leg.top=225;
    leg.width=200; 
    leg.height=475;
    leg.visibility="visible";
    nts.left=10;
    nts.top=725;
    nts.visibility="visible";
    ej1.left=260;
    ej1.top=250;
    ej1.width=50; 
    ej1.height=301;
    ej1.visibility="visible";
    ej2.left=310;
    ej2.top=250;
    ej2.width=50; 
    ej2.height=151;
    ej2.visibility="visible";
    ej3.left=360;
    ej3.top=250;
    ej3.width=50; 
    ej3.height=101;
    ej3.visibility="visible";
    ej4.left=310;
    ej4.top=500;
    ej4.width=50; 
    ej4.height=151;
    ej4.visibility="visible";
    ej5.left=360;
    ej5.top=550;
    ej5.width=50; 
    ej5.height=151;
    ej5.visibility="visible";
    ej6.left=260;
    ej6.top=600;
    ej6.width=50; 
    ej6.height=101;
    ej6.visibility="visible";
    ep1.left=410;
    ep1.top=300;
    ep1.width=50; 
    ep1.height=50;
    ep1.visibility="visible";
    ep2.left=410;
    ep2.top=350;
    ep2.width=50; 
    ep2.height=50;
    ep2.visibility="visible";
    ep3.left=410;
    ep3.top=450;
    ep3.width=50; 
    ep3.height=50;
    ep3.visibility="visible";
    ep4.left=410;
    ep4.top=500;
    ep4.width=50; 
    ep4.height=50;
    ep4.visibility="visible";
    ep5.left=410;
    ep5.top=550;
    ep5.width=50; 
    ep5.height=50;
    ep5.visibility="visible";
    ep6.left=410;
    ep6.top=600;
    ep6.width=50; 
    ep6.height=50;
    ep6.visibility="visible";
  }
}

function ShowLoc(index, e) {
  var thetext='<font color=blue>';
  switch (index) {
    case 0: thetext += 'Exodus'; break;
    case 1: thetext += 'Judges'; break;
    case 2: thetext += 'Judges'; break;
    case 3: thetext += 'Exodus'; break;
    case 4: thetext += 'Judges'; break;
    case 5: thetext += 'Exodus'; break;
    case 6: thetext += 'Judges'; break;
    case 7: thetext += '1 Samuel'; break;
    case 8: thetext += 'Judges'; break;
    case 9: thetext += '1 Samuel'; break;
    case 10: thetext += 'Judges'; break;
    case 11: thetext += '1 Samuel'; break;
    case 12: thetext += 'Judges'; break;
    case 13: thetext += 'Judges'; break;
    case 14: thetext += 'Judges'; break;
    case 15: thetext += 'Judges'; break;
    case 16: thetext += 'Judges'; break;
    case 17: thetext += 'Judges-Samuel'; 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();
  }
}

