var timenowrandimage39725 = 0;
var counttimerrandimage39725 = -1;
var timesetrandimage39725 = 5;
var nimagerandimage39725 = new Image;
var imagesrandimage39725 = new Array('http://www.cgiconnection.com/randimage3/images/home4.jpg','http://www.cgiconnection.com/randimage3/images/home1.jpg','http://www.cgiconnection.com/randimage3/images/home5.jpg','http://www.cgiconnection.com/randimage3/images/home2.jpg','http://www.cgiconnection.com/randimage3/images/home3.jpg');
var urlsrandimage39725 = new Array('http://www.cgiconnection.com/randimage3/images/home4.jpg','http://www.cgiconnection.com/randimage3/images/home1.jpg','http://www.cgiconnection.com/randimage3/images/home5.jpg','http://www.cgiconnection.com/randimage3/images/home2.jpg','http://www.cgiconnection.com/randimage3/images/home3.jpg');
var timesrandimage39725 = new Array('','','','','');
var newwinsrandimage39725 = new Array('Y','Y','Y','Y','Y');
var footersrandimage39725 = new Array('Demo House #4
Random Image Rotator III
Powered by CGI Connection','Demo House #1
Random Image Rotator III
Powered by CGI Connection','Demo House #5
Random Image Rotator III
Powered by CGI Connection','Demo House #2
Random Image Rotator III
Powered by CGI Connection','Demo House #3
Random Image Rotator III
Powered by CGI Connection');
var timerrandimage39725;
var timerfrandimage39725;
var i = 0;
var preloadimgrandimage39725 = 1;
var footerrandimage39725 = '
Click the above picture to open in a new window';
var statusrandimage39725 = '';
var fadeSpeedrandimage39725 = 25;
var outTime = 2100 - (fadeSpeedrandimage39725 * 35);
var objrandimage39725;
var opacityrandimage39725;
var nsrandimage39725 = document.layers;
var ierandimage39725 = document.all;
var fadeinvalrandimage39725 = "Y";
var fadeoutvalrandimage39725 = "Y";
if (preloadimgrandimage39725 == 1)
{
for(i=0; i < imagesrandimage39725.length; i++)
{
nimagerandimage39725.src = imagesrandimage39725[i];
}
}
function setOpacrandimage39725(objrandimage39725, opacityrandimage39725) {
opacityrandimage39725 = (opacityrandimage39725 == 100)?99.999:opacityrandimage39725;
if (nsrandimage39725)
{
// Older Mozilla and Firefox
objrandimage39725.style.MozOpacity = opacityrandimage39725/100;
}
else if (ierandimage39725)
{
// IE/Win
objrandimage39725.style.filter = "alpha(opacity:"+opacityrandimage39725+")";
}
else
{
// Safari 1.2, newer Firefox and Mozilla, CSS3
objrandimage39725.style.opacity = opacityrandimage39725/100;
}
}
function fadeInrandimage39725(objIdrandimage39725,opacityrandimage39725) {
if (document.getElementById) {
objrandimage39725 = document.getElementById(objIdrandimage39725);
if (opacityrandimage39725 <= 100) {
setOpacrandimage39725(objrandimage39725, opacityrandimage39725);
opacityrandimage39725 += fadeSpeedrandimage39725;
window.setTimeout("fadeInrandimage39725('" + objIdrandimage39725 +"',"+opacityrandimage39725+")", 100);
}
else
{
setOpacrandimage39725(objrandimage39725, 100);
}
}
}
function fadeOutrandimage39725(objIdrandimage39725,opacityrandimage39725) {
if (document.getElementById) {
objrandimage39725 = document.getElementById(objIdrandimage39725);
if (opacityrandimage39725 >= 0) {
setOpacrandimage39725(objrandimage39725, opacityrandimage39725);
opacityrandimage39725 = opacityrandimage39725 - fadeSpeedrandimage39725;
window.setTimeout("fadeOutrandimage39725('" + objIdrandimage39725 +"',"+opacityrandimage39725+")", 100);
}
else
{
setOpacrandimage39725(objrandimage39725, 0);
}
}
}
function changeTextrandimage39725(div_id,val){
elm=document.getElementById(div_id);
elm.innerHTML = '' + val + footerrandimage39725 + '
';
}
document.write('');
document.write('');
var imageIdrandimage39725 = 'randimage39725';
var imageElemrandimage39725 = document.getElementById(imageIdrandimage39725);
function go_urlrandimage39725() {
window.status = statusrandimage39725;
if (urlsrandimage39725[counttimerrandimage39725] != "" && urlsrandimage39725[counttimerrandimage39725] != "http://")
{
if (newwinsrandimage39725[counttimerrandimage39725] == "Y")
{
window.open(urlsrandimage39725[counttimerrandimage39725],'RandomImage','resizable=yes,scrollbars=yes,toolbar=yes,menubar=yes,location=yes,width=790,height=550,top=10,left=10');
}
else
{
location.href = urlsrandimage39725[counttimerrandimage39725];
}
}
}
function go_backrandimage39725() {
clearTimeout(timerfrandimage39725);
window.status = statusrandimage39725;
counttimerrandimage39725 = counttimerrandimage39725 - 1;
begin_imagerandimage39725(1);
}
function go_nextrandimage39725() {
clearTimeout(timerfrandimage39725);
window.status = statusrandimage39725;
counttimerrandimage39725++;
begin_imagerandimage39725(1);
}
function begin_imagerandimage39725(doit) {
if (counttimerrandimage39725 >= (imagesrandimage39725.length - 1))
{
if (doit < 1)
{
counttimerrandimage39725 = 0;
}
}
else
{
if (doit < 1)
{
counttimerrandimage39725++;
}
}
if (counttimerrandimage39725 < 0 && doit == 1)
{
counttimerrandimage39725 = imagesrandimage39725.length - 1;
}
if (counttimerrandimage39725 > (imagesrandimage39725.length - 1) && doit == 1)
{
counttimerrandimage39725 = 0;
}
var tempTime = timesrandimage39725[counttimerrandimage39725];
if (tempTime < 1)
{
tempTime = timesetrandimage39725;
}
tempTime = tempTime * 1000;
if (fadeinvalrandimage39725 == 'Y')
{
setOpacrandimage39725(imageElemrandimage39725, 0);
}
if (fadeinvalrandimage39725 == '' && fadeoutvalrandimage39725 == 'Y')
{
setOpacrandimage39725(imageElemrandimage39725, 100);
}
nimagerandimage39725.src = imagesrandimage39725[counttimerrandimage39725];
document.randimage39725.src = nimagerandimage39725.src;
changeTextrandimage39725("divtextrandimage39725",footersrandimage39725[counttimerrandimage39725]);
if (fadeinvalrandimage39725 == 'Y')
{
fadeInrandimage39725(imageIdrandimage39725,0);
}
if (fadeoutvalrandimage39725 == 'Y')
{
timerfrandimage39725 = setTimeout('fadeOutrandimage39725(imageIdrandimage39725,100);', (tempTime - outTime));
}
clearTimeout(timerrandimage39725);
timerrandimage39725 = setTimeout('begin_imagerandimage39725(0);', tempTime);
}
begin_imagerandimage39725(0);