var photos=new Array()
var photoslink=new Array()
var which=0
//photos[photos.length]="Images/Ads/Sex-Toys-Easter.jpg";
//photos[photos.length]="Images/Ads/prima-sex-pill-offer.jpg";
photos[photos.length]="Images/Ads/new-sex-toys.jpg";
photos[photos.length]="Images/Ads/sexy-lingerie.jpg";
photos[photos.length]="Images/Ads/ipod-sex-toys.jpg";
photos[photos.length]="Images/Ads/sex-toys-men.jpg";
photos[photos.length]="Images/Ads/couples-sex-toys.jpg";
photos[photos.length]="Images/Ads/safari-sex-toys.jpg";
var autoSlides = true;

//photoslink[0]="index.php?cPath=21_114";
//photoslink[0]="product_info.php?products_id=5452&sextoy=B1G1F_-_Prima_Male_Angel_Oyster_Plus_-_Sex_Enhancer_Pill";
photoslink[0]="index.php?cPath=204";
photoslink[1]="index.php?cPath=120_142";
photoslink[2]="advanced_search_result.php?keywords=ipod&search_in_description=1&categories_id=&inc_subcat=1&manufacturers_id=&pfrom=&pto=&dfrom=&dto=&x=26&y=10";
photoslink[3]="index.php?cPath=23";
photoslink[4]="index.php?cPath=46";
photoslink[5]="advanced_search_result.php?keywords=safari";


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()',8000);	
}
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];
}
