﻿// JScript File

var currentIndex = 0;
function previous(){
 currentIndex = currentIndex -1;
 if(currentIndex>0)
 {
 var controlName = "t" + currentIndex.toString(); 
document.getElementById(controlName).click();
 } 
 else
 {
 currentIndex= 6;
 var controlName = "t" + currentIndex.toString(); 
document.getElementById(controlName).click();

 }
	}
function next(){
		 currentIndex = currentIndex + 1;
 if(currentIndex<7)
 {
 var controlName = "t" + currentIndex.toString();
 
document.getElementById(controlName).click();
 }
 else
 {
 currentIndex= 1;
 var controlName = "t" + currentIndex.toString(); 
document.getElementById(controlName).click();
 }
	}
function SetIndex(index)
{
currentIndex = index;
}
	$(document).ready(function() {
 		$('#slideshow').cycle({
			fx: 'fade',
			speed: '300',
 			timeout: 3000,
			pager: '#groups',
			pause: true,
			cleartype: 1,
			cleartype: !$.support.opacity,
			pagerAnchorBuilder: function(idx, slide) {
			 // return sel string for existing anchor
 			return '#groups li:eq(' + (idx) + ') a';
 			}
 		});
 		$(".lavaLamp").lavaLamp({
            fx: "backout",
            speed: 400
        })
 });


