// JavaScript Document

<!-- Hide from old browsers


var indexI = 1;
var banner1= new Image();
banner1.src = "images/page4_11.jpg";
var banner2 = new Image();
banner2.src = "images/p1.jpg";
var banner3 = new Image();
banner3.src = "images/p2.jpg";
var banner4 = new Image();
banner4.src = "images/p3.jpg";
var banner5 = new Image();
banner5.src = "images/p4.jpg";
var banner6 = new Image();
banner6.src = "images/p5.jpg";
var banner7 = new Image();
banner7.src = "images/p6.jpg";

var description = new Array();
description[1] = "";
description[2] = "";
description[3] = "";
description[4] = "";
description[5] = "";
description[6] = "";
description[7] = "";

var links = new Array();
links[1] = "http://www.loseweightwithlida.com/weightloss/product_info.php?cPath=22&products_id=47";
links[2] = "http://www.loseweightwithlida.com/weightloss/product_info.php?cPath=22&products_id=47";
links[3] = "http://www.loseweightwithlida.com/weightloss/product_info.php?cPath=22&products_id=47";
links[4] = "http://www.loseweightwithlida.com/weightloss/product_info.php?cPath=22&products_id=47";


function startTime()
{
        var curDate= new Date();
        hours= curDate.getHours();
        mins= curDate.getMinutes();
        secs= curDate.getSeconds();
        closeTime=hours*3600+mins*60+secs;
        closeTime+=3;	// How many seconds til the next rotation
        Timer();
}

function Timer(){
        var curDate= new Date();
        hours= curDate.getHours();
        mins= curDate.getMinutes();
        secs= curDate.getSeconds();
        curTime=hours*3600+mins*60+secs
        if (curTime>=closeTime)
        {
    		if (indexI < 7)// The number 2 is the amount of banners that you have
            {
    			indexI++;
				
    			document.getElementById("banner").src = eval("banner" + indexI + ".src");
    		}
    		else
            {
    			indexI = 1;
    			document.getElementById("banner").src = eval("banner" + indexI + ".src");
    		}
    		startTime();
    	}
        else
        {
                window.setTimeout("Timer()",1000)
        }

}

function clickLink(){
	top.location = links[indexI];
}

function descript(){
	window.status = description[indexI];
}

// -->