function MenueAuf(Men, Ereignis)
{
  if(document.getElementById)
  {
	if (!Ereignis)
		Ereignis = window.event;
	document.getElementById(Men).style.left = Ereignis.clientX + "px";
	document.getElementById(Men).style.top = Ereignis.clientY + "px";
	document.getElementById(Men).style.visibility="visible";
  }

  else if(document.all && !document.getElementById)
  {
    if (!Ereignis)
		Ereignis = window.event;
	document.all[Men].style.left = Ereignis.pageX + "px";
	document.all[Men].style.top = Ereignis.pageY + "px";
	document.all[Men].style.visibility="visible";
  }
}

function MenueHalten(Men)
{
  if(document.getElementById)
  {
	document.getElementById(Men).style.visibility="visible";
  }

  else if(document.all && !document.getElementById)
  {
	document.all[Men].style.visibility="visible";
  }
}

function MenueZu(Men)
{
  if(document.getElementById)
  {
    document.getElementById(Men).style.visibility="hidden";
  }

  else if(document.all && !document.getElementById)
  {
    document.all[Men].style.visibility="hidden";
  }
}


var polaroidimg = new Array("polaroid1.gif","polaroid2.gif","polaroid3.gif","polaroid4.gif","polaroid5.gif","polaroid6.gif","polaroid7.gif","polaroid8.gif","polaroid9.gif","polaroid10.gif");
var polaroidcur=-1;
var path="";
var ptimeout = 8000;

function randInt(min,max)
{
   var div = (max - min) + 1
   var randNum = Math.random()
   for (var i = 0; i <= div - 1; i++)
      {
      if (randNum >= i / div && randNum < (i+1) / div)
      {return i + min}
      }
}

function chPolaroid() {
  if (polaroidcur==-1) {
    polaroidcur=randInt(0,polaroidimg.length-1); 
    if (initLightbox) initLightbox();
  }
  else polaroidcur+=1;
  if (polaroidcur >= polaroidimg.length) polaroidcur=0;
  if (document.getElementById('polimg')) {
    if (path=="") path=document.getElementById('polimg').src.substr(0,(document.getElementById('polimg').src.lastIndexOf("/")+1));
    document.getElementById('polimg').src = path+polaroidimg[polaroidcur];
    document.getElementById('polimg').style.display="block";
  }
  setTimeout("chPolaroid()", ptimeout);
}



