<head>
<script language="javascript1.5">
var xObj;
var uri = "rotateTestimonial.php"; //relative path
var tObj, testimonial
var timeout = 10; //number of seconds
window.onload = function () {
//need to call this after the window has loaded
testimonial = document.getElementById("testimonial");
//get content for the initial display
refreshTestimonial();
tObj = window.setInterval(refreshTestimonial, (timeout * 1000));
}
function init_transport() {
var A;
var o = new Array(
'Msxml2.XMLHTTP.5.0',
'Msxml2.XMLHTTP.4.0',
'Msxml2.XMLHTTP.3.0',
'Msxml2.XMLHTTP',
'Microsoft.XMLHTTP');
for (var i = 0; i < o.length; i++) {
try {
A = new ActiveXObject(o[i]);
} catch (e) {
A = null;
}
}
if(!A && typeof XMLHttpRequest != "undefined") {
A = new XMLHttpRequest();
}
xObj = A;
}
function refreshTestimonial(){
if (!xObj) {
init_transport();
}
try {
xObj.open("GET", uri, true);
} catch (e) {
return;
}
xObj.onreadystatechange = function() {
if (xObj.readyState != 4) {
return;
} else {
testimonial.innerHTML = xObj.responseText;
}
}
xObj.send(null);
}
</script>
<style type="text/css">
#testimonial { width: 120px; height: 200px; border: red thin solid; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px; color: #006699; background-color:#FFCCFF;}
</style>
</head>
<body>
<div id="testimonial">
</div>