fab: Bilderwechsel funktioniert bei NS4.x nicht

Beitrag lesen

hallo,

folgende seite funktioniert in ns6 und ie5 einwandfrei doch in ns4 geht es einfach nicht die bilder zu verändern! ich dachte ich werde das ganze script einfach mal hier einfuegen!

vielleicht kannst du mir ja helfen. vielen dank im voraus!

fabian

script -->

<html>
<head>

<script language="javascript">
<!--

script by fabbraun@gmx.net

var now = "";

if(document.layers)
{
  ns_yes = 1; ie_yes = 0; ns6_yes = 0;
  location.href = "menu_ns.html";
}
if(document.all)
{
  ie_yes = 1; ns_yes = 0; ns6_yes = 0;
}
if(!document.all && document.getElementById)
{
  ns6_yes = 1; ns_yes = 0; ie_yes = 0;
}

function show_l(layer_id,win_stat) {

if (now != layer_id)
  {
    imgname = "i_" + layer_id.slice(2);
    document[imgname].src = "img/" + layer_id.slice(2) + "_h.gif";
  }

window.status = win_stat;

if (now != layer_id)
  {
    if (ns6_yes)
    {
      document.getElementById(layer_id).style.visibility = "visible";
    }
    else
    {
      document.all[layer_id].style.visibility = "visible";
    }
  }

}

function hide_l(layer_id) {

if (now != layer_id)
  {
    imgname = "i_" + layer_id.slice(2);
    document[imgname].src = "img/" + layer_id.slice(2) + "_n.gif"
  }
  window.status = "";

if (now != layer_id)
  {

if (ns6_yes)
    {
      document.getElementById(layer_id).style.visibility = "hidden";
    }
    else
    {
      document.all[layer_id].style.visibility = "hidden";
    }
  }

}

function act_l(layer_id) {

if (now != layer_id)
  {
    if (now == "")
    {
      var imgname = "i_" + layer_id.slice(2);
      document[imgname].src = "img/" + layer_id.slice(2) + "_s.gif"

if (ns6_yes)
      {
        document.getElementById(layer_id).style.zIndex = "0";
      }
      else
      {
        document.all[layer_id].style.zIndex = "0";
      }
    }
    else
    {
      var imgnamenow = "i_" + now.slice(2);
      document[imgnamenow].src = "img/" + now.slice(2) + "_n.gif";
      var imgname = "i_" + layer_id.slice(2);
      document[imgname].src = "img/" + layer_id.slice(2) + "_s.gif";

if (ns6_yes)
      {
        document.getElementById(layer_id).style.zIndex = "0";
        document.getElementById(now).style.visibility = "hidden";
        document.getElementById(now).style.zIndex = "1";
      }
      else
      {
        document.all[now].style.visibility = "hidden";
        document.all[now].style.zIndex = "1";
        document.all[layer_id].style.zIndex = "0";
      }
    }

now = layer_id;

}

}

//-->
</script>

</head>

<body bgcolor=#001635 topmargin=0 leftmargin=0 background=img/bg.jpg

<div style="position:absolute;left:0px;top:48px;z-index:1;" id=menu>

<img src=img/d_blue.gif width=86 height=22><img src=img/orange.gif height=22 width=1 border=0><a onclick="act_l('s_home');" onmouseover="show_l('s_home','home');" onmouseout="hide_l('s_home');"><img src=img/home_n.gif name=i_home border=0></a><img src=img/orange.gif height=22 width=1 border=0><a onclick="act_l('s_dj');" onmouseover="show_l('s_dj','dj');" onmouseout="hide_l('s_dj');"><img src=img/dj_n.gif name=i_dj border=0></a><img src=img/orange.gif height=22 width=1 border=0><a onclick="act_l('s_about');" onmouseover="show_l('s_about','about me');" onmouseout="hide_l('s_about');"><img src=img/about_n.gif name=i_about border=0></a><img src=img/orange.gif height=22 width=1 border=0><a onclick="act_l('s_pics');" onmouseover="show_l('s_pics','pictures');" onmouseout="hide_l('s_pics');"><img src=img/pics_n.gif name=i_pics border=0></a><img src=img/orange.gif height=22 width=1 border=0><a onclick="act_l('s_gb');" onmouseover="show_l('s_gb','guestbook');" onmouseout="hide_l('s_gb');"><img src=img/gb_n.gif name=i_gb border=0></a><img src=img/orange.gif height=22 width=1 border=0><a onclick="act_l('s_sms');" onmouseover="show_l('s_sms','sms');" onmouseout="hide_l('s_sms');"><img src=img/sms_n.gif name=i_sms border=0></a><img src=img/orange.gif height=22 width=1 border=0><a onclick="act_l('s_links');" onmouseover="show_l('s_links','links');" onmouseout="hide_l('s_links');"><img src=img/links_n.gif name=i_links border=0></a><img src=img/orange.gif width=1 height=22>

</div>

<div style="position:absolute; visibility:hidden; left:0px; top:152px;  z-index:1; background-color: #001635" id=s_home>

<table border=0 cellpadding=0 cellspacing=0><tr><td width=567 height=22 align=right><img src=img/orange.gif height=22 width=1 border=0><img src=img/home_news.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/home_contact.gif border=0><img src=img/orange.gif height=22 width=1 border=0></td></tr></table>
</div>

<div style="position:absolute; visibility:hidden; left:0px; top:152px;  z-index:1; background-color: #001635" id=s_dj>

<table border=0 cellpadding=0 cellspacing=0><tr><td width=567 height=22 align=right><img src=img/orange.gif height=22 width=1 border=0><img src=img/dj_tape.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/dj_booking.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/dj_charts.gif border=0><img src=img/orange.gif height=22 width=1 border=0></td></tr></table>
</div>

<div style="position:absolute; visibility:hidden; left:0px; top:152px;  z-index:1; background-color: #001635" id=s_about>

<table border=0 cellpadding=0 cellspacing=0><tr><td width=567 height=22 align=right><img src=img/orange.gif height=22 width=1 border=0><img src=img/about_biography.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/about_friends.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/about_family.gif border=0><img src=img/orange.gif height=22 width=1 border=0></td></tr></table>
</div>

<div style="position:absolute; visibility:hidden; left:0px; top:152px;  z-index:1; background-color: #001635" id=s_pics>

<table border=0 cellpadding=0 cellspacing=0><tr><td width=567 height=22 align=right><img src=img/orange.gif height=22 width=1 border=0><img src=img/pics_me.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/pics_friends.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/pics_parties.gif border=0><img src=img/orange.gif height=22 width=1 border=0></td></tr></table>
</div>

<div style="position:absolute; visibility:hidden; left:0px; top:152px;  z-index:1; background-color: #001635" id=s_gb>

<table border=0 cellpadding=0 cellspacing=0><tr><td width=567 height=22 align=right><img src=img/orange.gif height=22 width=1 border=0><img src=img/gb_sign.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/gb_view.gif border=0><img src=img/orange.gif height=22 width=1 border=0></td></tr></table>
</div>

<div style="position:absolute; visibility:hidden; left:0px; top:152px;  z-index:1; background-color: #001635" id=s_sms>

<table border=0 cellpadding=0 cellspacing=0><tr><td width=567 height=22 align=right><img src=img/orange.gif height=22 width=1 border=0><img src=img/sms_send.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/sms_download.gif border=0><img src=img/orange.gif height=22 width=1 border=0></td></tr></table>
</div>

<div style="position:absolute; visibility:hidden; left:0px; top:152px;  z-index:1; background-color: #001635" id=s_links>

<table border=0 cellpadding=0 cellspacing=0><tr><td width=567 height=22 align=right><img src=img/orange.gif height=22 width=1 border=0><img src=img/links_people.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/links_music.gif border=0><img src=img/orange.gif height=22 width=1 border=0><img src=img/links_other.gif border=0><img src=img/orange.gif height=22 width=1 border=0></td></tr></table>
</div>

</body>
</html>