var picwin=0

function close_picture()
{
  if (picwin)                              /* wenn existent */
    if (!picwin.closed)                  /* wenn noch offen */
      picwin.close();                            /* mach zu */
}

function open_picture(picname,bgcolor)
{
  close_picture();                               /* mach zu */
  if (!bgcolor)
    bgcolor="#FFFFFF";               /* Standardwert: weiss */
  picwin=open("","picwin","width=100,height=100,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
                                       /* Dokument oeffnen: */
  picwin.document.open("text/html","replace");
                                     /* Dokument schreiben: */
  picwin.document.write("<html>\n<head>\n");
  picwin.document.write("<title>"+picname+"</title>\n");
  picwin.document.write("</head>\n");
    /* Benachrichtigung des opener-Fensters nach dem Laden: */
  picwin.document.write("<body onLoad=\"opener.picture_size(window,document.images[0])\" bgcolor=\""+bgcolor+"\">\n");
                                       /* Bild reinbasteln: */
  picwin.document.write("<p align=center><img src=\""+picname+"\" hspace=\"0\" vspace=\"0\"></p>");
  picwin.document.write("</body>\n</html>");
                                    /* Dokument schliessen: */
  picwin.document.close();
}


function picture_size(picwin,image)
{
  var output;
                  /* Fenstergroesse und Fensterlage setzen: */
  
  if (image.width+20 > screen.width || image.height+20 > screen.height){
  		picwin.resizeTo(screen.width-40,screen.height-40);}	
  	else{
		picwin.resizeTo(image.width+60,image.height+80);}
  //picwin.moveTo((screen.width-image.width+10)/2,(screen.height-image.height+10)/2);                                   /* Zeichenkette bauen: */
  output="src: "+image.src+"\n\n";
  output+=" width: "+image.width+"\n";
  output+="height: "+image.height+"\n";
                                          /* Output setzen: */
  //document.form1.imagedata.value=output;
                                      /* Fenster nach vorn: */
  picwin.focus();
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function swap(bildname,tauschbild) {
	document.images[bildname].src=tauschbild;
}

//Specify the marquee's width (in pixels)
var marqueewidth=136
//Specify the marquee's height
var marqueeheight=136
//Specify the marquee's scroll speed (larger is faster)
var speed=1
//Specify the marquee contents
var marqueecontents='<center><font face="arial, helvetica" color="#FFFFCC" size="1">Im Sport-Shop:<br><br><img src="images/logo_tacchini_s.gif"><br><br>30% auf diverse Einzelstücke<br><br>..............................<br><br><img src="images/voelkl_logo_s.gif"><br><br>Bei uns können Sie alle Rackets kostenlos testen!</font></center>'
var rotate_delay = 5000; // delay in milliseconds (5000 = 5 secs)
current = 0;
function regenerate(){
//window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}

function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marqueeheight
scrollit()
}
}

//window.onload=regenerate2

function ticker(){
//if (document.all)
document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+marqueecontents+'</marquee>')

document.writeln("<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name='cmarquee01'><layer name='cmarquee02' width=&{marqueewidth}; height=&{marqueeheight};></layer></ilayer>");
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i>a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	//regenerate2
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function TarifFenster(seite)
{
fenster1=window.open(seite,'infofenster','width=600,height=750,scrollbars=yes,resizable=yes');
}


function head(){
document.write("<tr><td>&nbsp;</td><td><img src='images/tennis_02.gif' width='149' height='74'></td></tr>");
document.write("<tr><td><a href='index.htm' target='_self'><img src='images/tennis_03.gif' width='591' height='82' border='0'></a></td>  <td><img src='images/tennis_04.gif' width='149' height='82'></td></tr>");
}

function bottom(){
document.write("<tr><td colspan='2'><img src='images/tennis_08.gif' width='740' height='43'></td></tr>");
document.write("<tr><td colspan='2'>&nbsp;</td></tr>");
}


function menue(){

document.write("<table width='136' align='center' border='0' cellspacing='0' cellpadding='0' background='images/pixgrau.gif'>");
document.write("<tr><td></td><td width='120'><img src='images/ball_off.gif' width='15' height='15'></td></tr>");

document.write("<tr><td width='120' colspan='2'><img src='images/navihalle.gif' width='132' height='19'></td></tr>");
//Tennishalle
document.write("<tr><td><img name='m_01' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='finden.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_01','','images/ball_on.gif',1)>&nbsp;Wie Sie uns finden</a></td></tr>");
document.write("<tr><td><img name='m_02' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='javascript: TarifFenster(\"sommer.pdf\")' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_02','','images/ball_on.gif',1)>&nbsp;Tarife Sommer</a></td></tr>");
document.write("<tr><td><img name='m_03' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='javascript: TarifFenster(\"winter.pdf\")' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_03','','images/ball_on.gif',1)>&nbsp;Tarife Winter</a></td></tr>");
//Tennisschule
document.write("<tr><td width='120' colspan='2'><br><img src='images/navischule.gif' width='132' height='19'></td></tr>");
document.write("<tr><td><img name='m_04' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='schule.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_04','','images/ball_on.gif',1)>STS Tennisschool</a></td></tr>");
document.write("<tr><td><img name='m_06' src='images/ball_off.gif' width='15' height='15'></td></tr>");
//document.write("<td width='120'><a href='junioren.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_06','','images/ball_on.gif',1)>&nbsp;Junioren-Tennis</a></td></tr>");
//document.write("<tr><td><img name='m_07' src='images/ball_off.gif' width='15' height='15'></td>");
//document.write("<td width='120'><a href='anmeldung.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_07','','images/ball_on.gif',1)>&nbsp;Anmeldung</a></td></tr>");
//Shop
document.write("<tr><td width='120' colspan='2'><br><img src='images/navishop.gif' width='132' height='19'></td></tr>");
document.write("<tr><td><img name='m_08' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='noshop.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_08','','images/ball_on.gif',1)>&nbsp;Shop</a></td></tr>");
//document.write("<td width='120'><a href='_private/shop/s_index.htm' target='-blank' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_08','','images/ball_on.gif',1)>&nbsp;Online-Shop</a></td></tr>");
//document.write("<tr><td><img name='m_09' src='images/ball_off.gif' width='15' height='15'></td>");
//document.write("<td width='120'><a href='mailto:info@linthindoor.ch' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_09','','images/ball_on.gif',1)>&nbsp;Schuhe</a></td></tr>");
//document.write("<tr><td><img name='m_10' src='images/ball_off.gif' width='15' height='15'></td>");
//document.write("<td width='120'><a href='index.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_10','','images/ball_on.gif',1)>&nbsp;Tennisrackets</a></td></tr>");
//document.write("<tr><td><img name='m_11' src='images/ball_off.gif' width='15' height='15'></td>");
//document.write("<td width='120'><a href='find.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_11','','images/ball_on.gif',1)>&nbsp;Zubehör</a></td></tr>");
//Quick Links
document.write("</td><td width='120' colspan='2'><br><img src='images/navilinks.gif' width='132' height='19'></td></tr>");
document.write("<tr><td><img name='m_12' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='http://www.swisstennis.ch/?rub=20' target='_blank' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_12','','images/ball_on.gif',1)>&nbsp;Interclub</a></td></tr>");
document.write("<tr><td><img name='m_14' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='http://www.swisstennis.ch/?rub=21' target='_blank' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_14','','images/ball_on.gif',1)>&nbsp;Junioren IC</a></td></tr>");

document.write("<tr><td><img name='m_13' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='http://www.swisstennis.ch/?rub=24' target='-blank' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_13','','images/ball_on.gif',1)>&nbsp;Klassierungen</a></td></tr>");
//document.write("<tr><td><img name='m_14' src='images/ball_off.gif' width='15' height='15'></td>");
//document.write("<td width='120'><a href='index.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_14','','images/ball_on.gif',1)>&nbsp;[Home]</a></td></tr>");
document.write("<tr><td><img name='m_15' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='links.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_15','','images/ball_on.gif',1)>&nbsp;Weitere Links........</a></td></tr>");
//E-Mail
document.write("</td><td width='120' colspan='2'>&nbsp;</td></tr>");
document.write("<tr><td><img name='m_16' src='images/email_off.gif' width='15' height='17'></td>");
document.write("<td width='120'><a href='mailto:info@linthindoor.ch' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_16','','images/email_on.gif',1)>&nbsp;E-Mail</a></td></tr>");
//Home
document.write("<tr><td>&nbsp;</td></tr>");
document.write("<tr><td><img name='m_17' src='images/ball_off.gif' width='15' height='15'></td>");
document.write("<td width='120'><a href='index.htm' onMouseOut=MM_swapImgRestore() onMouseOver=MM_swapImage('m_17','','images/ball_on.gif',1)>&nbsp;[Home]</a></td></tr>");

document.write("</table><br>");
}


function next() {
if (document.slideform.slide[current+1]) {
document.images.show.src = document.slideform.slide[current+1].value;
document.slideform.slide.selectedIndex = ++current;
   }
else first();
}
function previous() {
if (current-1 >= 0) {
document.images.show.src = document.slideform.slide[current-1].value;
document.slideform.slide.selectedIndex = --current;
   }
else last();
}
function first() {
current = 0;
document.images.show.src = document.slideform.slide[0].value;
document.slideform.slide.selectedIndex = 0;
}
function last() {
current = document.slideform.slide.length-1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
}
function ap(text) {
document.slideform.slidebutton.value = (text == "Stop") ? "Start" : "Stop";
rotate();
}
function change() {
current = document.slideform.slide.selectedIndex;
document.images.show.src = document.slideform.slide[current].value;
}
function rotate() {
if (document.slideform.slidebutton.value == "Stop") {
current = (current == document.slideform.slide.length-1) ? 0 : current+1;
document.images.show.src = document.slideform.slide[current].value;
document.slideform.slide.selectedIndex = current;
window.setTimeout("rotate()", rotate_delay);
   }
}


var picwin=0

function close_picture()
{
  if (picwin)                              /* wenn existent */
    if (!picwin.closed)                  /* wenn noch offen */
      picwin.close();                            /* mach zu */
}
function open_picture(picname,bgcolor)
{
  close_picture();                               /* mach zu */
  if (!bgcolor)
    bgcolor="#FFFFFF";               /* Standardwert: weiss */
  picwin=open("","picwin","width=100,height=100,resizable=yes,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes");
                                       /* Dokument oeffnen: */
  picwin.document.open("text/html","replace");
                                     /* Dokument schreiben: */
  picwin.document.write("<html>\n<head>\n");
  picwin.document.write("<title>"+picname+"</title>\n");
  picwin.document.write("</head>\n");
    /* Benachrichtigung des opener-Fensters nach dem Laden: */
  picwin.document.write("<body onLoad=\"opener.picture_size(window,document.images[0])\" bgcolor=\""+bgcolor+"\">\n");
                                       /* Bild reinbasteln: */
  picwin.document.write("<p align=center><img src=\""+picname+"\" hspace=\"0\" vspace=\"0\"></p>");
  picwin.document.write("</body>\n</html>");
                                    /* Dokument schliessen: */
  picwin.document.close();
}


function picture_size(picwin,image)
{
  var output;
  var pwidth;
  var pheight;
  pwidth=screen.width;
  pheight=screen.height;
                  /* Fenstergroesse und Fensterlage setzen: */
	if (image.width+60 > screen.width){
		pwidth=screen.width-60;}
	if (image.height+60 > screen.height){
			pheight=screen.height-60;}

  picwin.resizeTo(pwidth,pheight);
  picwin.moveTo((screen.width-pwidth-50)/2,(screen.height-pheight-50)/2);
                                     /* Zeichenkette bauen: */
  output="src: "+image.src+"\n\n";
  output+=" width: "+image.width+"\n";
  output+="height: "+image.height+"\n";
                                          /* Output setzen: */
  //document.form1.imagedata.value=output;
                                      /* Fenster nach vorn: */
  picwin.focus();
}
