/* *************************************************************
** ROTATE.JS - JS Data Library
** ===================================
** This library contains code for 'top.functions' for
** the Optus CCF Network Site.
**      Enjoy ... and please maintain this header.
**
** To load this library in an HTML doc, put the following
** line in the doc's HEAD (before any other SCRIPT tags):
**
** <SCRIPT SRC="rotate.js" LANGUAGE="JavaScript"></SCRIPT>
**
** Author                  Ver   Date         Comments
** ======                ===  ====         ========
** BluePrint Webs  1.2    21/08/07   Version for Kiswel Homes
**
** Copyright 2001, BluePrint Web Designs. All rights reserved. 
** Contact Australia (0404) 850840 or at the site;
**         http://blueprintweb.com.au/
************************************************************* */

number_of_sponsors=7;

var sctr=0;
var halt=0;
var isn=new Array();
for (i=0;i<number_of_sponsors;i++){
 isn[i]=new Image();
}

/* The sponsor .gif names are loaded into the isn[x]
   sponsor images array.  You may load any number of
   sponsor images (.gif or .jpg or both) into this
   array. They must all be the same size, however.
   Substitute your own .gif filenames for the ones
   shown here. Note that the first .gif must appear
   in the isn[0] array element. */
isn[0].src="gallery/pages/_home/house1.jpg";
isn[1].src="gallery/homes/u_Eddies.jpg";
isn[2].src="gallery/pages/_home/house3.jpg";
isn[3].src="gallery/pages/_home/house2.jpg";
isn[4].src="gallery/pages/_home/main.jpg";
isn[5].src="gallery/homes/Tea Gardens - Lot 44 Windward Cct.jpg";
isn[6].src="gallery/pages/_home/house4.jpg";

/* Finally, replace the URL's below with those of
   your sponsors IN THE SAME ORDER. */
var durl=new Array();
durl[0]="#";
durl[1]="#";
durl[2]="#";
durl[3]="#";
durl[4]="#";
durl[5]="#";
durl[6]="#";

/* This script is set to rotate every 10 seconds.
   (5000=5 seconds, so 30000 would equal 30, etc)
   You should change the number in the setTimeout()
   call below for the number of seconds you wish. */
function rotateIt(){
 if (halt!=1){
  sctr++;
// alert("Halt: :"&halt);
  if (sctr>number_of_sponsors-1){
   sctr=0;
   }
  document.main_image.src=isn[sctr].src;
  setTimeout("rotateIt()",6000);
  }
 }

/* This code will work just fine with or without
   frames.  However, if you are in frames and wish
   to replicate the TARGET="_top" call to remove
   frames, change the location.href call to:
    parent.location.href=durl[sctr];
   below. */
function doIt(){
 halt=1;
 parent.location.href=durl[sctr];
// top.contentFrame.location.href=durl[sctr];
 }

function dispIt(){
 parent.window.status=durl[sctr];
 }

