// JavaScript Document


var tickspeed3=13300 
var displaymode3="auto"

var selectedDiv3=0
var totalDivs3=0

function getElementbyClass3(classname){
partscollectc=new Array()
var inc=0
var alltags=document.all? document.all.tags("DIV") : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
partscollectc[inc++]=alltags[i]
}
}

function contractall3(){
var inc=0
while (partscollectc[inc]){
partscollectc[inc].style.display="none"
inc++
}
}

function expandone3(){
var selectedDiv3Obj=partscollectc[selectedDiv3]
contractall3()
selectedDiv3Obj.style.display="block"
if (document.gallerycontrol)
temp.options[selectedDiv3].selected=true
selectedDiv3=(selectedDiv3<totalDivs3-1)? selectedDiv3+1 : 0
if (displaymode3=="auto")
autocontrolvar3=setTimeout("expandone3()",tickspeed3)
}


function preparemode3(themode3){
displaymode3=themode3
if (typeof autocontrolvar3!="undefined")
clearTimeout(autocontrolvar3)
if (themode3=="auto"){
document.gallerycontrol.menu.disabled=true
autocontrolvar3=setTimeout("expandone3()",tickspeed3)
}
else
document.gallerycontrol.menu.disabled=false
}


function startgallery3(){
if (document.getElementById("controldiv")) //if it exists
document.getElementById("controldiv").style.display="block"
getElementbyClass3("gallerycontent3")
totalDivs3=partscollectc.length
if (document.gallerycontrol){
populatemenu()
if (document.gallerycontrol.mode){
for (i=0; i<document.gallerycontrol.mode.length; i++){
if (document.gallerycontrol.mode[i].checked)
displaymode3=document.gallerycontrol.mode[i].value
}
}
}
if (displaymode3=="auto" && document.gallerycontrol)
document.gallerycontrol.menu.disabled=true
expandone3()
}

