    function wunderzeitraum(curr_dat)
    { 
			tmpchecked = 0;
			for (i=0; i<document.forms['wundersuche'].datum_wort.length; i++)
				{ 
					if (document.wundersuche.datum_wort[i].checked==true)
						{ 
							tmpchecked = i;
						}
				}
			if (tmpchecked>=0)
				{ 
					tmpstr = document.wundersuche.datum_wort[tmpchecked].value;
					tmparr = tmpstr.split("-");
					document.forms['wundersuche'].elements['dat2_tag'].selectedIndex=tmparr[0];
					document.forms['wundersuche'].elements['dat2_mon'].selectedIndex=tmparr[1];
					document.forms['wundersuche'].elements['dat2_jahr'].selectedIndex=tmparr[2]-parseInt(document.forms['wundersuche'].elements['dat2_jahr'].options[1].value)+1;
					tmparr = curr_dat.split("-");
					document.forms['wundersuche'].elements['dat1_tag'].selectedIndex=tmparr[0]-1;
					document.forms['wundersuche'].elements['dat1_mon'].selectedIndex=tmparr[1]-1;
					document.forms['wundersuche'].elements['dat1_jahr'].selectedIndex=tmparr[2]-parseInt(document.forms['wundersuche'].elements['dat2_jahr'].options[1].value);
				}
    }
	

    function kalender_popup(position,titel,hinweis)
    { monat = document.forms['wundersuche'].elements['dat'+position+'_mon'].selectedIndex;
      jahr = document.forms['wundersuche'].elements['dat'+position+'_jahr'].selectedIndex;
      if (position==1)
        { offset=0;
          monat++;
        }
      else
        { offset=1;
        }
      url = "?monat="+monat+"&jahr="+jahr+"&offset="+offset+"&form=wundersuche&tagf=dat"+position+"_tag&monatf=dat"+position+"_mon&jahrf=dat"+position+"_jahr&titel="+escape(titel)+"&hinweis="+escape(hinweis);
      kal_win = window.open('kalender/index.php3'+url, titel+'win', 'width=180,height=280,resizable');
      if (kal_win)
        { kal_win.moveTo(200,200);
          kal_win.focus();
        }
    }

  function route(id)
  { if ((id) && (id!=0))
      { routewin = window.open('http://www.yellowmap.de/partner/wunder/rsform.asp?id='+id,'routewin1','width=600,height=550,resizable,scrollbars');
        if (routewin) { routewin.focus(); 
                      }
      }
  }

  function wetter(plz,ort)
  { if (((plz) && (plz!="")) && ((ort) && (ort!="")))
      { wetterwin = window.open('http://www.wetter.de/cgi-bin/wetter.de/extern/plz-link2.pl?plz='+escape(plz)+'&ort='+escape(ort),'wetterwin','width=438,height=500,resizable,scrollbars');
      }
    else
      { wetterwin = window.open('../seiten/wetter.htm','wetterwin','width=485,height=500,resizable,scrollbars');
      }
    if (wetterwin)
      { wetterwin.focus();
      }
  }

  function mitfahr(ort,land)
  { mitfahrwin = window.open('http://kunden.wundermedia.de/summer/partner/mitfahr/?ort='+escape(ort)+'&land='+escape(land),'mitfahrwin','width=500,height=500,resizable,scrollbars');
    if (mitfahrwin)
      { mitfahrwin.focus(); 
      }
  }

  function stadt(id)
  { if ((id) && (id!=0))
      { stadtplanwin = window.open('http://www.yellowmap.de/partner/wunder/Kartenservice.asp?id='+id,'stadtplanwin1','width=600,height=550,resizable,scrollbars');
        if (stadtplanwin) { stadtplanwin.focus();
                          }
      }
  }

  function ticket(url)
  { if ((url) && (url!=""))
      { ticketwin = window.open(url,'ticketwin','width=700,height=550,resizable,scrollbars');
        if (ticketwin)
          { ticketwin.focus();
          }
      }
  }

		
		function first_ticket()
		{
			for (i=0; (i<document.links.length) && (document.links[i].href.search(/^javascript:ticket/i) == -1); i++)
				{
				}
			if (document.links[i].href.search(/^javascript:ticket/i) != -1)
				{
					func = document.links[i].href;
					func.replace (/javascript:/,"");
					eval (func);
				}
		}

    slidepos=0;
    preload_count=0;
    preloaded_imgs = new Array;

    function preload()
    { for (i=0; i<bilder.length; i++)
        { preloaded_imgs[i] = new Image();
          preloaded_imgs[i].src = bilder[i];
          preload_count = i;
        }
    }

	function newwin(url)
	{
		window.open(url,"","height=500,width=550,scrollbars=yes,locationbar=no,menubar=no,resizeable=no,status=no");
	}

    function slide()
    { if (slidepos>preload_count) 
        { document.images.slideshow0.src=bilder[slidepos];
        }
      else
        { document.images.slideshow0.src=preloaded_imgs[slidepos].src;
        }
      slidepos = (slidepos>=(bilder.length-1)) ? 0 : slidepos+1;
      setTimeout("slide();",2000);
    }

