      if (document.layers)
      { // Netscape
          document.captureEvents(Event.MOUSEMOVE);
          document.onmousemove = captureMousePosition;
      }
      else if (document.all) 
      { // Internet Explorer
          document.onmousemove = captureMousePosition;
      }
      else if (document.getElementById) 
      { // Netcsape 6
          document.onmousemove = captureMousePosition;
      }
      
	// Definition of the global positioning variables
	var xMousePos = 0; var yMousePos = 0; var xMousePosMax = 0; var yMousePosMax = 0; 

      function captureMousePosition(e) {
          if (document.layers) {
              xMousePos = e.pageX;
              yMousePos = e.pageY;
              xMousePosMax = window.innerWidth+window.pageXOffset;
              yMousePosMax = window.innerHeight+window.pageYOffset;
          } else if (document.all) {
              xMousePos = window.event.x+document.body.scrollLeft;
              yMousePos = window.event.y+document.body.scrollTop;
              xMousePosMax = document.body.clientWidth+document.body.scrollLeft;
              yMousePosMax = document.body.clientHeight+document.body.scrollTop;
          } else if (document.getElementById) {
              xMousePos = e.pageX;
              yMousePos = e.pageY;
              xMousePosMax = window.innerWidth+window.pageXOffset;
              yMousePosMax = window.innerHeight+window.pageYOffset;
          }
     // window.status = "xMousePos=" + xMousePos + ", yMousePos=" + yMousePos + ", xMousePosMax=" + xMousePosMax + ", yMousePosMax=" + yMousePosMax;
      }
      
      function divsettings(a, b, c, d)
	{
		var pop = document.getElementById("popup");
		pop.style.position = "absolute";
		pop.style.display = "block";
		pop.style.textAlign = "left";
		pop.style.backgroundColor = "white";
		pop.style.width = a;
		pop.style.height = b;
		pop.style.left = c;
		pop.style.top = d;
		pop.style.padding = "3px";
		pop.style.border = "3px double black";
	}
	importXML();
	function figureOpen(a, b, c, d, e)
	{
		var capt = slt(e);
		var win = window.open('', 'Graphic', 'left=0,top=0,width=750,height=400,scrollbars=yes,resizable=yes,status=no') ;
		win.document.open() ;
		win.document.writeln("<html>") ;
		win.document.writeln("<head><title>Science for Southern Colorado</title></head>") ;
		win.document.writeln("<body>") ;
		win.document.writeln("<h1 align=\"center\">" + b + "</h1>") ;
		win.document.writeln("<div align=\"center\"><p><img alt=\"" + capt + "\" src=\"" + a + "\" width=\"" + c + "\" height=\"" + d + "\"></p>");
		win.document.writeln("<p align=\"left\" style=\"font-size: 12pt; font-family: arial; width: 500px;\">" + capt + "</p>");
		win.document.writeln("<a href=\"javascript:window.close();\">Close Window</a></div>") ;
		win.document.writeln("</body>") ;
		win.document.writeln("</html>") ;
		win.document.close() ;
	}
	
	function slt(fig) {
		var cont = "";
		for (var i = 0; i < arrCapID.length; i++) {
			if (arrCapID[i].valueOf().toString() == fig)
			{
				return arrContent[i].valueOf().toString();
			}
		}
		return "";
	}
	
	var xmlDoc;
	function importXML()
      {
      	if (document.implementation && document.implementation.createDocument)
      	{
      		xmlDoc = document.implementation.createDocument("", "", null);
      		xmlDoc.onload = createTable;
      	}
      	else if (window.ActiveXObject)
      	{
      		xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
      		xmlDoc.onreadystatechange = function () {
      			if (xmlDoc.readyState == 4) {
      				createTable();
      			}
      		};
       	}
      	else
      	{
      		alert('Your browser can\'t handle this script');
      		return;
      	}
      	xmlDoc.load("http://www.scienceforsoutherncolorado.com/include/captions.xml");
      }
      
	var contents = new String()
	contents = "";
	var newContents = new Array();
	var arrCapID = new Array();
	var strCapID = new String();
	var strContent = new String();
	var arrContent = new Array();
	
      function createTable()
      {
      	var x = xmlDoc.getElementsByTagName("caption");
      	for (i = 0; i < x.length; i++)
      	{
      		for (j = 0; j < x[i].childNodes.length; j++)
      		{
      			if (x[i].childNodes[j].nodeType != 1) continue;
      			contents += x[i].childNodes[j].firstChild.nodeValue + "|";
      		}
      	}
		newContents = contents.split("|");
		//var nd = "";
		for (var k = 0; k < newContents.length-1; k++) {
			if ((k%2) == 0) {
				strCapID += newContents[k] + "|";
			} else {
				strContent += newContents[k] + "|";
			}
		}
		arrCapID = strCapID.split("|");
		arrContent = strContent.split("|");
      }
	
	
