var xmlDoc;
var req;
var position=0;
var interval = 3000;
var random_display = 0;

function newArray()
{
imageArray = new Array("images/about1.jpg", "images/about2.jpg", "images/barbara.jpg", "images/peter.jpg", "images/dance_kids.jpg");

nextImage(0);

}

function nextImage(position)
{
	

	if(position==imageArray.length-1)
	position=0;
	else
	position++;
		
	document.getElementById("about_pic").src = imageArray[position];
	
	setTimeout("nextImage(" + position + ")", interval);
}

function loadXML()
{
// code for IE
if (window.ActiveXObject)
{
      req = new ActiveXObject("Microsoft.XMLHTTP");
      if (req) {
          req.onreadystatechange = getmessage;
          req.open("GET", " about.xml", true);
          req.send();
      }
  }
// code for Mozilla, Firefox, Opera, etc.
else if (document.implementation &&
document.implementation.createDocument)
  {
    req = new XMLHttpRequest();
    req.onreadystatechange = getmessage;
    req.open("GET", "about.xml", true);
    req.send(null);
  }
else
  {
  alert('Your browser cannot handle this script');
  }
}

function getmessage()
{
xmlDoc = req.responseXML;
var x=xmlDoc.getElementsByTagName("Name");
var courses= "";
var articles = " ";

for (var i=0;i<x.length;i++)
 { 
	courses= courses + "<a href='#" + xmlDoc.getElementsByTagName("Link")[i].childNodes[0].nodeValue + "'>" + x[i].childNodes[0].nodeValue + "</a> <br />";
	articles += "<div class='desc_about' > <b> <a name='" + xmlDoc.getElementsByTagName("Link")[i].childNodes[0].nodeValue + "'>" + xmlDoc.getElementsByTagName("Name")[i].childNodes[0].nodeValue + "</a></b> <br />"; 
	
	articles += "<p>" + xmlDoc.getElementsByTagName("p")[i].childNodes[0].nodeValue + "</p>";

	articles+="</div>";
 }
 
document.getElementById("Names").innerHTML = courses;
articles+="<div class='desc_about'><b> <a name='fees'>Program Fees & Availability</a></b><br /><br/> CREATE!'s programs are subsidized by public and private funds, which enable us to offer programming to our school partners at affordable prices.<br /><br/> For Program Fees & Availability, please call: 718-643-7775 <br /><br/> CREATE! has been a licensed vendor with the New York City Department of Education since 1984. Please contact us for current Vendor and License information.</div>";
articles +="<div class='desc_about'><b> <a name='thanks'> CREATE! Thanks... </a></b><br/><br /> The artistic and educational endeavors of CREATE! have been made possible, in part, with public support from: <br /> <br />NYC Department of Education <br /> NYC Department of Cultural Affairs  <br /> New York State Council on the Arts <br /> Queens Council on the Arts <br /> <br /> CREATE! acknowledges with gratitude the generous support from the following organizations and individuals:  <br /> <br />Eunice Burton <br />Donald Elliott <br />Center for Arts Education <br /> Independence Community Foundation <br /> JKW Foundation  <br /> New York State Music Fund  <br /> Tiger Baron Foundation  <br /> Winfield Foundation  <br /></div>";

document.getElementById("Desc").innerHTML= articles;

newArray();
}
