
var xmlHttp = new Array();

function defineXMLHttp()
{
	try
  {
	
	// Firefox, Opera 8.0+, Safari
  xmlHttp[xmlHttp.length]=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
		xmlHttp[xmlHttp.length]=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp[xmlHttp.length]=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }
}



function doXML(scrip)
{
	defineXMLHttp();
	
	xmlHttp[xmlHttp.length-1].open("GET", scrip, true);
	
	xmlHttp[xmlHttp.length-1].onreadystatechange=function()
    {
	
		if(this.readyState==4)
		{
			
			writeIt();		
		}
    }
	xmlHttp[xmlHttp.length-1].send(null);
	
}


                               

function writeIt()
{
	
	
	var x = xmlHttp[xmlHttp.length-1].responseXML.getElementsByTagName("IMG");
	

	 for (var i=0;i<x.length;i++)
     {
        
		$(".cycler").html($(".cycler").html() + "<div><img src='images/slideshow/" + $(x[i]).text() + "' alt='777 Third Avenue' /></div>");
    }
	
	$('.cycler').cycle({
    	speed:  1000,
		timeout:  7000,
		random:  1 
	});
	
}






