Janette: zwei objekte mit einer funktion

Beitrag lesen

Hallo,

ich hab da ein kleines problem und bin wohl gerade etwas blöd ;) auf jedenfall fällt mir keine lösung für folgendes problem ein und ich dachte vielleicht könnt ihr mir helfen

Ich habe auf meiner HTML-seite zwei slideshows: (warum ich das in zwei tabellen gepackt hab ist egal)

  
<body onload='showHot=true;self.focus();showHot2=true;self.focus();'>  
  
<table style="table-layout:fixed" border="0" width="100%" height="280px">  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('H');" title="first">&#8657;&#8657;</a></td>  
    <td width="350px" height="280px" colspan="2" rowspan="4">  
    <img src="slideshow/Nebula00.gif" name="PictureBox" width="350px" height="280px"></td>  
    <td width="" height="280px" id="CaptionBox" class="Caption" align="center" rowspan="4">  
    Standard-Beschreibung / Einleitung</td>  
  </tr>  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('B');" title="last">&#8657;</a></td>  
  </tr>  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('F');" title="next">&#8659;</a></td>  
  </tr>  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('L');" title="very last">&#8659;&#8659;</a></td>  
  </tr>  
  
</table>  
  
<br>  
  
  
<table style="table-layout:fixed" border="0" width="100%" height="280px">  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('H');" title="first">&#8657;&#8657;</a></td>  
    <td width="350px" height="280px" colspan="2" rowspan="4">  
    <img src="slideshow/Nebula00.gif" name="PictureBox" width="350px" height="280px"></td>  
    <td width="" height="280px" id="CaptionBox" class="Caption" align="center" rowspan="4">  
    Standard-Beschreibung / Einleitung</td>  
  </tr>  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('B');" title="last">&#8657;</a></td>  
  </tr>  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('F');" title="next">&#8659;</a></td>  
  </tr>  
  <tr>  
    <td width="40px" height="70px" align="center" valign="middle">  
    <a class="Controls" href="#" onClick="javascript:control('L');" title="very last">&#8659;&#8659;</a></td>  
  </tr>  
  
</table>  

und eine funktion un einer "funktionen.js"-datei:

  
var SlideShowSpeed = 3000;  
  
  
var CrossFadeDuration = 2;  
  
var Picture = new Array();  
var Caption = new Array();  
var showHot = false;  
  
  
  
Picture[1]  = 'slideshow/Nebula01.jpg';  
Picture[2]  = 'slideshow/Nebula02.jpg';  
Picture[3]  = 'slideshow/Nebula03.jpg';  
Picture[4]  = 'slideshow/Nebula04.jpg';  
Picture[5]  = 'slideshow/Nebula05.jpg';  
Picture[6]  = 'slideshow/Nebula06.jpg';  
Picture[7]  = 'slideshow/Nebula07.jpg';  
Picture[8]  = 'slideshow/Nebula08.jpg';  
Picture[9]  = 'slideshow/Nebula09.jpg';  
Picture[10] = 'slideshow/Nebula10.jpg';  
  
  
  
Caption[1]  = "Das ist die erste Beschreibung.";  
Caption[2]  = "Das ist die zweite Beschreibung.";  
Caption[3]  = "Das ist die dritte Beschreibung.";  
Caption[4]  = "Das ist die vierte Beschreibung.";  
Caption[5]  = "Das ist die f&uuml;nfte Beschreibung.";  
Caption[6]  = "Das ist die sechste Beschreibung.";  
Caption[7]  = "Das ist die siebte Beschreibung.";  
Caption[8]  = "Das ist die achte Beschreibung.";  
Caption[9]  = "Das ist die neunte Beschreibung.";  
Caption[10] = "Das ist die zehnte Beschreibung.";  
  
  
var tss;  
var iss;  
var jss = 0;  
var pss = Picture.length-1;  
  
var preLoad = new Array();  
for (iss = 1; iss < pss+1; iss++){  
preLoad[iss] = new Image();  
preLoad[iss].src = Picture[iss];}  
  
function control(how){  
if (showHot){  
if (how=="H") jss = 1;  
if (how=="F") jss = jss + 1;  
if (how=="B") jss = jss - 1;  
if (how=="L") jss = 10;  
if (jss > (pss)) jss=1;  
if (jss < 1) jss = pss;  
if (document.all){  
document.images.PictureBox.style.filter="blendTrans(duration=2)";  
document.images.PictureBox.style.filter="blendTrans(duration=CrossFadeDuration)";  
document.images.PictureBox.filters.blendTrans.Apply();}  
document.images.PictureBox.src = preLoad[jss].src;  
if (document.getElementById) document.getElementById("CaptionBox").innerHTML= Caption[jss];  
if (document.all) document.images.PictureBox.filters.blendTrans.Play();  
}

und das problem ist das ich nicht darauf komme wie ich zwei unabhängige slideshows kriege da die steuerungen im moment nur die erste slideshow steuern

geschweige denn zei unterschiedliche Picture-und Caption-listen hinkriege

kann mir einer helfen??