function loadXMLDoc(dname) 
{
try //Internet Explorer
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  }
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    xmlDoc=document.implementation.createDocument("","",null);
    }
  catch(e) {alert(e.message)}
  }
try 
  {
  xmlDoc.async=false;
  xmlDoc.load(dname);
  return(xmlDoc);
  }
catch(e) {alert(e.message)}
return(null);
}

function loadXMLString(txt) 
{
try //Internet Explorer
  {
  xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
  xmlDoc.async="false";
  xmlDoc.loadXML(txt);
  return(xmlDoc); 
  }
catch(e)
  {
  try //Firefox, Mozilla, Opera, etc.
    {
    parser=new DOMParser();
    xmlDoc=parser.parseFromString(txt,"text/xml");
    return(xmlDoc);
    }
  catch(e) {alert(e.message)}
  }
return(null);
}
	function loadPreviews(){
	document.write("<ul style='width: 850px; left: 0pt;' id='mycarousel' class='jcarousel-list jcarousel-list-horizontal'>");							xmlDoc=loadXMLDoc("previews.xml");
							x=xmlDoc.getElementsByTagName("title");
							y=xmlDoc.getElementsByTagName("text");
							z=xmlDoc.getElementsByTagName("image");
							t=xmlDoc.getElementsByTagName("offset");
							r=xmlDoc.getElementsByTagName("image_thumb");

							for (i=0;i<x.length;i++)
							  { 
								document.write("<li class='jcarousel-item jcarousel-item-horizontal jcarousel-item-");
								document.write(i+1);
								document.write("jcarousel-item-");
								document.write(i+1);
								document.write("-horizontal'><div>");
								document.write("<div class='preview_image'><a style='border:0;text-decoration:none;' href='");
								document.write(z[i].childNodes[0].nodeValue);
								document.write("' rel='lightbox[1]'><img src='");
								document.write(r[i].childNodes[0].nodeValue);
								document.write("' alt='' style='position:relative;top: 0;left:");
								document.write(t[i].childNodes[0].nodeValue);
								document.write("px;border:0;' /></a></div><div style='float:left;margin-left:0px;margin-top:10px;'><div class='preview_title'><span>");
								document.write(x[i].childNodes[0].nodeValue);
								document.write("</span></div><div class='preview_text'><span>");
								document.write(y[i].childNodes[0].nodeValue);
								document.write("</span></div><div class='details'><a href='");
								document.write(z[i].childNodes[0].nodeValue);
								document.write("' rel='lightbox[11]' style='text-decoration:none;color:#41acff;'>details &raquo;</a></div></div></div></li>");
							  }
							document.write("</ul>");
}