var slideimages=new Array()
var slidelinks=new Array()
var slidenames=new Array()
var doU=false
var whichlink=-1
var whichimage=-1

function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src='/catalog/images/'+slideshowimages.arguments[i]
}
}

function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}

function slideshownames(){
for (i=0;i<slideshownames.arguments.length;i++)
slidenames[i]=slideshownames.arguments[i]
doU=true
}

function gotoshow(){
if (whichlink!=-1) window.location=slidelinks[whichlink]
}

function slideit(){

if (!document.images)
return;

if (doU&&(whichimage!=-1)){
if (document.getElementById) document.getElementById(slidenames[whichimage]).style.textDecoration = 'none';
else if (document.all) document.all[slidenames[whichimage]].style.textDecorationUnderline = false;
}

if (whichimage<slideimages.length-1)
whichimage++;
else
whichimage=0;
whichlink=whichimage;

document.images.slide.src=slideimages[whichimage].src;
if (doU){
if (document.getElementById) document.getElementById(slidenames[whichimage]).style.textDecoration = 'underline';
else if (document.all) document.all[slidenames[whichimage]].style.textDecorationUnderline = true;
} 

timer=setTimeout("slideit()",2000);
}
function slidestay(i){

whichlink=-1;
timer=setTimeout("slideit()",250);
}

function forceslide(imagefile){
if (!document.images)
return;
if (doU){
if (document.getElementById) document.getElementById(slidenames[whichimage]).style.textDecoration = 'none';
else if (document.all) document.all[slidenames[whichimage]].style.textDecorationUnderline = false;

}

clearTimeout(timer);
document.images.slide.src='/catalog/images/'+ imagefile;

}

function rollslides(){
timer=setTimeout("slideit()",750);
}

function freezeslide(){
clearTimeout(timer);
}

function popupWindow(url) {//from tep product_info
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}
