function gallery_load(){ 
	Effect.Appear('one'); 
}
var old_item='';
var new_item='';
var i=0;
function change_item(itemname){
	if (i==0){
		old_item="p1";	
	}else{
		
	}
	//alert("FADE: "+old_item);
	Effect.Fade(old_item);
	old_item=itemname;	
	new_item = itemname;
	setTimeout('waitcomplete()',1000);
	
	i++;
}
function waitcomplete(){
	Effect.Appear(new_item);
	return;
}
////////////////////////////////////test to see if image exists
//wont work cross domain... leave for some other time
var xmlhttp;
function loadImageDoc(id)
{
	var i=0;
	
	for (i=0;i<=12;i++){
		var baseloc = "http://4.fl-2.com/NBS/rets_results/rets_results/media2-" + id + "-" + i + ".jpeg";
		xmlhttp=null;
		if (window.XMLHttpRequest)
		  {// code for all new browsers
		  xmlhttp=new XMLHttpRequest();
		  }
		else if (window.ActiveXObject)
		  {// code for IE5 and IE6
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		if (xmlhttp!=null)
		  {
		  xmlhttp.onreadystatechange=state_Change;
		  xmlhttp.open("GET",baseloc,true);
		  xmlhttp.send(null);
		  }
		else
		  {
		  alert("Your browser does not support XMLHTTP.");
		  }
	}
	//gallery_load();
}

function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = OK
    alert("got it")
    }
  else
    {
    //alert("Problem retrieving XML data");
    }
  }
}


