function menufunc(menuId)
{
    if(document.getElementById(menuId).style.display == "none")
    {
        startmenu();
        document.getElementById(menuId).style.display = "block";
    }
    else
    {
        startmenu();
    }
}

var slideShowSpeed = 3000

var crossFadeDuration = 3

var Pic = new Array()

Pic[0] = 'images/random1.jpg'
Pic[1] = 'images/random2.jpg'
Pic[2] = 'images/random3.jpg'
Pic[3] = 'images/random4.jpg'
Pic[4] = 'images/random5.jpg'
Pic[5] = 'images/random6.jpg'
Pic[6] = 'images/random7.jpg'
Pic[7] = 'images/random8.jpg'


var t
var j = 0
var p = Pic.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}

function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}

function avvio(){

    runSlideShow();
    startmenu();
}

var clickmessage="Per poter avere una copia delle immagini contattare l'e-mail : info@akhalteke.it"

function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}

function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}

if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()


// -->
