oli: Dynamisches JS mit link!

Beitrag lesen

Hallo Forum

Ich hab ein kleines Problem:
Ich habe ne JavaScript Funktion, welches ein Bild pro Tag wechselt. Das Funktioniert auch, jedoch ist auf dem Bild ein Link und der leuft nicht!!
Der Code:

<a href="../test/home.html">
              <script language="JavaScript"><!--

now = new Date();  
day = now.getDay();  
{  
if (day == 0)  

document.write ("<img src='images/p_testt4.jpg' name='titel' height='46' width='268' border='0'>");
else if (day == 1)
  document.write ("<img src='images/p_testt1.jpg' name='titel' height='46' width='268' border='0'>");
else if (day == 2)
  document.write ("<img src='images/p_testt2.jpg' name='titel' height='46' width='268' border='0'>");
else if (day == 3)
  document.write ("<img src='images/p_testt3.jpg' name='titel' height='46' width='268' border='0'>");
else if (day == 4)
  document.write ("<img src='images/p_testt4.jpg' name='titel' height='46' width='268' border='0'>");
else if (day == 5)
  document.write ("<img src='images/p_testt5.jpg' name='titel' height='46' width='268' border='0'>");
else if (day == 6)
  document.write ("<img src='images/p_testt2.jpg' name='titel' height='46' width='268' border='0'>");
}
    
//-->
</script>
              <br>
              <br>
              </a>

Muss ich den Link in die dynamischen Ausgaben integrieren??
Ich wäre froh um Eure Hilfe
Danke
oli