function loadXMLDoc(dname) 
{
var xmlDoc;
if (window.XMLHttpRequest)
  {
  xmlDoc=new window.XMLHttpRequest();
  xmlDoc.open("GET",dname,false);
  xmlDoc.send("");
  return xmlDoc.responseXML;
  }
// IE 5 and IE 6
else if (ActiveXObject("Microsoft.XMLDOM"))
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async=false;
  xmlDoc.load(dname);
  return xmlDoc;
  }
alert("Error loading document");
return null;
}
/*
<td><a id="content0"
 rel="shadowbox[VideoGallery];width=768;height=576 onClick="setContact();" href="musicVideos/WhiteStripes_7nationArmy.mov"NaN;><img src="musicVideos/WhiteStripes_7nationArmy_th.jpg"  onmouseout="lowLite(0);" onmouseover="hiLite(0); showDescription('The White Stripes - Seven Nation Army - 03:55 - 2008 Grammy Award Winner');" alt="The White Stripes" border="0"></a></a></td>
*/
xmlDoc=loadXMLDoc("musicVideos/videos.xml");
tthumbnailpath = "musicVideos/";
timagepath = "musicVideos/";
var x=xmlDoc.getElementsByTagName("video");
tstart = '<td>';
tend = ' border="0"></a></td>';
cntr = 0;
for (i=0;i<x.length;i++)
{
	ttitle= ' title="' + x[i].getElementsByTagName("project")[0].childNodes[0].nodeValue + " - " + x[i].getElementsByTagName("songTitle")[0].childNodes[0].nodeValue + " - " + x[i].getElementsByTagName("TRT")[0].childNodes[0].nodeValue;
	ttitle2 = " - " + x[i].getElementsByTagName("award")[0].childNodes[0].nodeValue + ' '
	if (ttitle2 == ' - . ')
	{
		ttitle2 = ""
	}
	ttitle = ttitle + ttitle2 + '" ';
	tcontent = '<a id="content' +  i + '" rel="shadowbox[VideoGallery]';
	twidth = tcontent + ';width=' + x[i].getElementsByTagName("videoWidth")[0].childNodes[0].nodeValue;
	theight = ';height=' + x[i].getElementsByTagName("videoHeight")[0].childNodes[0].nodeValue + '" onClick="setContact();"';
	tpath = ' href="' + timagepath + x[i].getElementsByTagName("videoPath")[0].childNodes[0].nodeValue + '"' + ttitle + '>';
	ttitle = ttitle.substr(7,ttitle.length-1);
	tproject = ' onmouseover=' + "'" + 'overOpacity(this);showDescription(' + ttitle + ");'";
	tproject2 = ' onmouseout=outOpacity(this);clearDescription();';
	tproject = tproject + tproject2;
	twebname = x[i].getElementsByTagName("videoPath")[0].childNodes[0].nodeValue;
	tthumbpath = '<img src="' + tthumbnailpath + x[i].getElementsByTagName("thumbpath")[0].childNodes[0].nodeValue + '"  style="opacity:0.4;filter:alpha(opacity=40)" ';
	document.write(tstart + twidth + theight + tpath + tthumbpath + tproject+ tproject2 + tend);
//if (!confirm(tstart + twidth + theight + tpath + tthumbpath + tproject+ tproject2 + tend))
//break;
	cntr++;
	if (cntr == Math.ceil((x.length/2)))
	{
		document.write("</tr><tr>");
	}
}
