var xmlDoc;
var req;

function loadXML()
{
// code for IE
if (window.ActiveXObject)
{
      req = new ActiveXObject("Microsoft.XMLHTTP");
      if (req) {
          req.onreadystatechange = getmessage;
          req.open("GET", " arts&tech.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", "arts&tech.xml", true);
    req.send(null);
  }
else
  {
  alert('Your browser cannot handle this script');
  }
}

function changeClass(Elem, myClass) {
	var elem;
	if(document.getElementById) {
		var elem = document.getElementById(Elem);
	} else if (document.all){
		var elem = document.all[Elem];
	}
	elem.className = myClass;
}

function DefaultDesc()
{
	changeClass("Desc", "desc_arts_g");

	document.getElementById("Desc").innerHTML= "<a name='general' /><b>ARTS & TECHNOLOGY</b><br />Every aspect of contemporary life is colored by the convergence of art and technology, and these programs are geared toward the artist of tomorrow. In order for the young artist to be prepared for the professional world, they need to be fluent in the technological language of their chosen discipline. These programs, while based in creation and composition, gives students hands-on experience with the hardware and software used by industry professionals, including Pro-Tools, Final Cut Pro, and Adobe CS. <br /><br />";
}

function LoadDesc(i)
{
	changeClass("Desc", "desc_arts");
	document.getElementById("Desc").innerHTML= "<a name='"+ xmlDoc.getElementsByTagName("Link")[i].childNodes[0].nodeValue + "' class='medium_bold'>" + xmlDoc.getElementsByTagName("Name")[i].childNodes[0].nodeValue + "</a><br /><br />" + xmlDoc.getElementsByTagName("Desc")[i].childNodes[0].nodeValue + "<div style='text-align:right'><br />";
}


function LoadOriginal(num)
{
  var original_desc='<br/> <br /> <br/>';
  changeClass("Desc", "desc");
  
  if(num==0)
  {
  
  original_desc+="<a name='#video' class='medium_bold'> Video Production</a><br /><br/> Students are introduced to the extraordinary and multidimensional world of film and video.  In this program, students script, shoot, and edit original short films, public service announcements, music videos and other segments. <br/><br/> <span class='subsection'> <b>Public Service Announcement</b> <br /><br/>     Within the format of a public service announcement, students choose a social issue or conflict that they identify in the world around them.  That conflict is analyzed, a storyboard is written as a guide for shooting the scenes, and spontaneous re-direction is acknowledged.  The digital video is assembled on a computer in the 'Video Production Lab' using video editing software.</span>";
  
  }
  else if(num==1)
  {
    original_desc+=" <a name='#video' class='medium_bold'> Video Production</a><br /><br/> Students are introduced to the extraordinary and multidimensional world of film and video.  In this program, students script, shoot, and edit original short films, public service announcements, music videos and other segments. <br/><br/> <span class='subsection'> <b>Music Video</b> <br /><br/> Students create an original music video.  A concept is developed based on analysis of the different elements of a chosen song, including lyrics, mood and tempo. Students create an original storyboard, and explore staging and choreography.  Finally, students shoot and edit their video composition. This is the perfect compliment to a CREATE! dance, music, or theatre residency. </span>";
  }
  
  else
  {
    original_desc+="<a name='#video' class='medium_bold'> Video Production</a><br /><br/> Students are introduced to the extraordinary and multidimensional world of film and video.  In this program, students script, shoot, and edit original short films, public service announcements, music videos and other segments. <br/><br/> <span class='subsection'> <a href='#original_works'  onclick='LoadOriginal(0);'>Public Service Announcement</a> <br /><br/> <a href='#original_works' onclick='LoadOriginal(1);' >Music Video</b> <br /></span>";
   }
    
  document.getElementById("Desc").innerHTML = original_desc;

}


function getmessage()
{
xmlDoc = req.responseXML;

var x=xmlDoc.getElementsByTagName("Name");
var courses= "";
for (var i=0;i<x.length;i++)
  { 
	//courses= courses + "<a href='#" + xmlDoc.getElementsByTagName("Link")[i].childNodes[0].nodeValue + "' onclick='LoadDesc(" + i + ")'>" + x[i].childNodes[0].nodeValue + "</a> <br />";
	courses= courses + "<a href='#detail' onclick='LoadDesc(" + i + ")'>" + x[i].childNodes[0].nodeValue + "</a> <br />";
  }
  
document.getElementById("Names").innerHTML = courses;
}