var httpRandomPictChanging=null;
var xmlhttpRandomPict;
function loadXMLRandomPict(url)
{
xmlhttpRandomPict=null;
if (window.XMLHttpRequest)
{// code for Firefox, Opera, IE7, etc.
xmlhttpRandomPict=new XMLHttpRequest();
}
else if (window.ActiveXObject)
{// code for IE6, IE5
xmlhttpRandomPict=new ActiveXObject("Microsoft.XMLHTTP");
}
if (xmlhttpRandomPict!=null)
{
xmlhttpRandomPict.open("GET",url,true);
xmlhttpRandomPict.onreadystatechange=state_Change_RandomPict;
xmlhttpRandomPict.send(null);
}
else
{
alert("Your browser does not support XMLHTTP.");
}
}
function state_Change_RandomPict()
{
if (xmlhttpRandomPict.readyState==4)
{// 4 = "loaded"
if (xmlhttpRandomPict.status==200)
{// 200 = "OK"
httpRandomPictChanging.innerHTML=xmlhttpRandomPict.responseText;
httpRandomPictChanging.focus();
httpRandomPictChanging = null;
StartRandomPhotoTimer();
}
else
{
alert("Problem retrieving data:" + xmlhttp.statusText);
}
}
}
var showdelay=10000;
var photopath="experiences/";
function SetRandomPhotoTimer()
{
if (httpPictChanging != null)
{
changephototimerId = setTimeout("SetPhotoTimer()",showdelay);
}
else
{
httpdocchanging= document.getElementById('MR-Experience-Random-Photo');
changephototimerId = setTimeout("randomPhoto()",showdelay);
}
}
function StartRandomPhotoTimer()
{
changephototimerId = setTimeout("SetRandomPhotoTimer()",10000);
}
function randomPhoto() /* , Path) */
{
var url = "http://www.theintertwine.org/" + photopath + "experiences-random-photo-gen1.php?ExpPath=experiences/";
httpRandomPictChanging = document.getElementById('MR-Experience-Random-Photo');
loadXMLRandomPict(url);
}
function mouseOverRandomPict(pict, objname, divobjname)
{
var obj = document.getElementById(objname); /*"RandomPictDisplay");*/
var divobj = document.getElementById(divobjname); /*"RandomPictDiv");*/
var debugobj = document.getElementById("debugRandom");
debugobj.innerHTML = debugobj.innerHTML + "entry: " + pict + objname + divobjname +"
";
divobj.style.visibility = "visible";
/* obj.style.width = "400px"; */
obj.src = pict;
obj.focus()
}
function mouseOutRandomPict( divobjname )
{
var divobj = document.getElementById(divobjname); /*"RandomPictDiv");*/
var debugobj = document.getElementById("debugRandom");
debugobj.innerHTML = debugobj.innerHTML + "exit
";
divobj.style.visibility = "hidden";
}