
var slideShowSpeed = 3000

var crossFadeDuration = 3

var Pic = new Array()

Pic[0] = 'images/1.gif'
Pic[1] = 'images/2.gif'
Pic[2] = 'images/3.gif'
Pic[3] = 'images/4.gif'
Pic[4] = 'images/5.gif'
Pic[5] = 'images/6.gif'

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";
  whichDog=isIE ? document.all.theLayer : document.getElementById("theLayer");  
  hotDog=isIE ? event.srcElement : e.target;  
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }  
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx; 
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;  
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(){
  if (isIE||isNN) whichDog.style.visibility="hidden";
  else if (isN4) document.theLayer.visibility="hide";
}

function showMe(){
  if (isIE||isNN) whichDog.style.visibility="visible";
  else if (isN4) document.theLayer.visibility="show";
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");

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();      
   }
   if (!isN4) document.images.SlideShow.src = preLoad[j].src;
   if (isN4) document.layers['theLayer'].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 scrivi(){
var tit="Kostenlose Weinprobe";
var tex="<br><b>Freitag 11.03.05</b><br>von 14.30 bis 18.30 Uhr<br><br><b>Samstag 12.03.05</b><br>von 10.00 bis 14.00 Uhr<br><br>Vorgestellt werden die neuen Jahrgänge des Weinguts <b>Pelassa</b> aus Alba im Piemont. Herr Pelassa ist persönlich anwesend und beantwortet gerne Ihre Fragen. Für den kulinarischen Rahmen sorgt Ihr VULCANO-Team.<br><br>Herzlich willkommen!<br>";
document.writeln("<table width=\"170\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\" > ");
document.writeln("<tr>");
document.writeln("<td align=\"center\" valign=\"top\" class=\"BorderUp\" colspan=\"3\" bgcolor=\"#008D31\"><span class=\"white\">"+tit+"</span></td></tr>");
//document.writeln("<tr><td align=\"left\" valign=\"top\" class=\"BorderLDown\"  colspan=\"3\" ><img src=\"images/1pix_trans.gif\" width=\"1\" height=\"5\" border=\"0\"></td></tr>");
document.writeln("<tr><td  align=\"left\" width=\"5\" class=\"BorderLeft\">&nbsp;</td><td class=\"BorderRight\" colspan=\"2\">"+tex+"</td></tr>");
document.writeln("<tr>");
document.writeln("<td align=\"left\" valign=\"top\" class=\"BorderLDown\"  colspan=\"2\" ><img src=\"images/1pix_trans.gif\" width=\"1\" height=\"1\" border=\"0\"></td>");
document.writeln("<td><img src=\"images/1pix_trans.gif\" width=\"139\" height=\"1\"  class=\"BorderDown\"><img src=\"images/rahm.gif\" width=\"26\" height=\"13\" border=\"0\"></td>");
document.writeln("</tr></table>");
}