﻿// JavaScript Document

//<!--

var delay=4000 //set delay in miliseconds
var curimage = Math.floor(Math.random()*(9))
var curindex = curimage

document.write('<img name="defaultimage" src="../Images/HomeLargePics/' + curimage + '.jpg" runat="server" vspace="0" hspace="0" border="0" alt="Family Care Health Centers.">')

function rotateimage()
{

if(curindex < 9)
                curindex++;
        else
                curindex = 0;

if (document.all){
      document.images.defaultimage.style.filter="blendTrans(duration=4)"
      document.images.defaultimage.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.defaultimage.filters.blendTrans.Apply()      
   }
   document.images.defaultimage.src = ('Images/HomeLargePics/' + curindex + '.jpg')
   if (document.all){
      document.images.defaultimage.filters.blendTrans.Play()
   }
}

setInterval("rotateimage()",delay)

//<!--
