var photos=new Array()
var photoslink=new Array()
var which=0

//photos[photos.length]="images/ads/slides/fathers-day-2007.jpg";
//photos[photos.length]="images/ads/slides/beach-towels.jpg";
//photos[photos.length]="images/ads/slides/amys-gifts-gift-shop.jpg";
//photos[photos.length]="images/ads/slides/personalised-christmas-gift.jpg";
//photos[photos.length]="images/ads/slides/domestic-goddess-aprons.jpg";
//photos[photos.length]="images/ads/slides/retro-spoofs.jpg";
//photos[photos.length]="images/ads/slides/tea-for-one-sets.jpg";
//photos[photos.length]="images/ads/slides/pet-lovers-gifts.jpg";
//photos[photos.length]="images/ads/slides/alice-tea-sets.jpg";
photos[photos.length]="images/ads/slides/linen-gifts.gif";
photos[photos.length]="images/ads/slides/designer-gifts.gif";
photos[photos.length]="images/ads/slides/popular-gifts.gif";
photos[photos.length]="images/ads/slides/gifts-for-men.gif";
photos[photos.length]="images/ads/slides/gifts-for-children.gif";

var autoSlides = true;
photoslink[photoslink.length]="index.php?cPath=124_125";
photoslink[photoslink.length]="index.php?cPath=124_128";
photoslink[photoslink.length]="index.php?cPath=124";
photoslink[photoslink.length]="index.php?cPath=45";
photoslink[photoslink.length]="index.php?cPath=47";
//photoslink[0]="index.php?cPath=21_114";
//photoslink[0]="index.php?cPath=45";
//photoslink[0]="advanced_search_result.php?keywords=beach";
//photoslink[1]="amysgifts-gift-shop-aboutus.php";
//photoslink[1]="index.php?cPath=31_32";
//photoslink[2]="advanced_search_result.php?keywords=domestic";
//photoslink[3]="index.php?cPath=124_130";
//photoslink[4]="advanced_search_result.php?keywords=china";
//photoslink[5]="index.php?cPath=23";
//photoslink[6]="index.php?cPath=25_112";




var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}


function applyeffect(){
try
{
if (document.all && slideShow && slideShow.filters ){

slideShow.filters.revealTrans.Transition=Math.floor(Math.random()*23)
slideShow.filters.revealTrans.stop()
slideShow.filters.revealTrans.apply()
}
}
catch (e)
{
}

}



function playeffect(){
if (document.all && slideShow.filters)
slideShow.filters.revealTrans.play()
}

function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}


function prevSlide(){
if (which>0)
which--
else 
which = photos.length-1;
applyeffect()
document.images.slideShow.src=photos[which]
playeffect()
keeptrack()

}

function fnAutoSlides(){
if (autoSlides==false)
	return;
if (which<photos.length-1)
which++
else
which = 0;
try
{
applyeffect()
document.images.slideShow.src=photos[which]
playeffect()
keeptrack()
if (autoSlides == true)
	setTimeout('fnAutoSlides()',10000);	
}
catch (e)
{
}

}

function nextSlide(){
autoSlides = false;
if (which<photos.length-1)
which++
else
which = 0;
applyeffect()
document.images.slideShow.src=photos[which]
playeffect()
keeptrack()
}



function getImage(){
window.location=photoslink[which];
}
