dave: Button -active / -is active / -was active

Beitrag lesen

Hi...nimm mal dieses script...das is besser.......

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

if (navigator.appVersion.indexOf("2.") != -1){
 check = false;
 }
if ((navigator.appVersion.indexOf("3.") != -1) && (navigator.appName.indexOf("Explorer") != -1)){
 check = false;
 }
else
 {
 check = true;
 }
if (check == true){
 image0 = new Image();
 image0.src = "images/navohneZeil5xSpal1.gif";
 image0on = new Image();
 image0on.src = "images/navmitZeil5xSpal1.gif";
 image0stay = new Image();
 image0stay.src = "images/navmitZeil5xSpal1.gif";

image1 = new Image();
 image1.src = "images/navohneZeil7xSpal1.gif";
 image1on = new Image();
 image1on.src = "images/navmitZeil7xSpal1.gif";
 image1stay = new Image();
 image1stay.src = "images/navmitZeil7xSpal1.gif";

image2 = new Image();
 image2.src = "images/navohneZeil9xSpal1.gif";
 image2on = new Image();
 image2on.src = "images/navmitZeil9xSpal1.gif";
 image2stay = new Image();
 image2stay.src = "images/navmitZeil9xSpal1.gif";

image3 = new Image();
 image3.src = "images/navohneZeil11xSpal1.gif";
 image3on = new Image();
 image3on.src = "images/navmitZeil11xSpal1.gif";
 image3stay = new Image();
 image3stay.src = "images/navmitZeil11xSpal1.gif";

image4 = new Image();
 image4.src = "images/navohneZeil13xSpal1.gif";
 image4on = new Image();
 image4on.src = "images/navmitZeil13xSpal1.gif";
 image4stay = new Image();
 image4stay.src = "images/navmitZeil13xSpal1.gif";

image5 = new Image();
 image5.src = "images/navohneZeil15xSpal1.gif";
 image5on = new Image();
 image5on.src = "images/navmitZeil15xSpal1.gif";
 image5stay = new Image();
 image5stay.src = "images/navmitZeil15xSpal1.gif";

}
imageStay = ""
function imageon(name){
 if (imageStay != name){
         document[name].src = eval(name + "on.src");
 }
}
function imageoff(name){
 if (imageStay != name){
         document[name].src = eval(name + ".src");
 }
}
function on(name){
        if (check == true){
 imageon(name);
 }
}
function off(name){
        if (check == true){
 imageoff(name);
 }
}
function stay(name){
 if (check == true){
 document[name].src = eval(name + "stay.src");
 if (imageStay != name){
  if (imageStay != ""){
   document[imageStay].src = eval(imageStay + ".src");
  }
 }
 imageStay = name
 }
}
// -->
</script>

und dies sind die Links auf den Buttons:

<a href="mitte.htm" target="mitte" onmouseover="on('image0');return true" onmouseout="off('image0'); return true" onclick="stay('image0'); return true" onFocus="this.blur()"><img src= dienbild></A>

Ich hoffe es hilft

Mfg