var duration = 1000; /* fade duration in millisecond */
function photoGallery2(f)
{

m=0;

if (f==0){
if (document.getElementById('div2')) document.getElementById('div2').style.display = 'none';
if (document.getElementById('div3')) document.getElementById('div3').style.display = 'none';
for (i = 0; i <= 1; i += 0.01) {
    setTimeout("SetOpa(" + i +")", i * duration);
  }
if (document.getElementById('div1')) document.getElementById('div1').style.display = 'block';

c = 0;
m=5000
}
if (f==1){
if (document.getElementById('div1')) document.getElementById('div1').style.display = 'none';
if (document.getElementById('div3')) document.getElementById('div3').style.display = 'none';
for (i = 0; i <= 1; i += 0.01) {
    setTimeout("SetOpa(" + i +")", i * duration);
  }
if (document.getElementById('div2')) document.getElementById('div2').style.display = 'block';

c = 1;
m=5000
}
if (f==2){
if (document.getElementById('div1')) document.getElementById('div1').style.display = 'none';
if (document.getElementById('div2')) document.getElementById('div2').style.display = 'none';
for (i = 0; i <= 1; i += 0.01) {
    setTimeout("SetOpa(" + i +")", i * duration);
  }
if (document.getElementById('div3')) document.getElementById('div3').style.display = 'block';

c = 2;
m=5000

}
}

var s
var c=0
var m=0
var flag=false
function photoGallery()
{



if (c%3==0){
if (document.getElementById('div1')) document.getElementById('div1').style.display = 'block';
if (document.getElementById('div2')) document.getElementById('div2').style.display = 'none';
if (document.getElementById('div3')) document.getElementById('div3').style.display = 'none';
}
if (c%3==1){
if (document.getElementById('div1')) document.getElementById('div1').style.display = 'none';
if (document.getElementById('div2')) document.getElementById('div2').style.display = 'block';
if (document.getElementById('div3')) document.getElementById('div3').style.display = 'none';
}
if (c%3==2){
if (document.getElementById('div1')) document.getElementById('div1').style.display = 'none';
if (document.getElementById('div2')) document.getElementById('div2').style.display = 'none';
if (document.getElementById('div3')) document.getElementById('div3').style.display = 'block';
}

if (flag) {m=0; flag=false;}

if (m==5000) flag=true

c=c+1;
//alert(m);
s=setTimeout("photoGallery()",10000+m);


}


var element = document.getElementById("Slideshow");
var duration = 1000; /* fade duration in millisecond */
var hidtime = 0; /* time to stay hidden */
var showtime = 10000; /* time to stay visible */

function SetOpa(Opa) {
  element.style.opacity = Opa;
  element.style.MozOpacity = Opa;
  element.style.KhtmlOpacity = Opa;
  element.style.filter = 'alpha(opacity=' + (Opa * 100) + ');';
}
