ALex: Schlefen

Beitrag lesen

MOin zusammen!

Der Code bei mir ist viel zu lang! kann man hier (in den ersten teil) etwas verkürzen? (www.bunzl.de) ps: ich weiss...ist sehr vile code. Ich bedanke mich in vorraus!!!

Alex

-------TEIL1-------

<script language="JavaScript" type="text/javascript"> <!-- function show() {   for(i=1;i<=17;i++)

{ document.getElementById([i]).style.visibility = "hidden"; } } function show1() {

for(i=1;i<=17;i++)

{ document.getElementById([i]).style.visibility = "hidden"; }     document.getElementById("1").style.visibility = "visible";  document.getElementById("2").style.visibility = "visible";  document.getElementById("3").style.visibility = "visible";

} function show2() {  for(i=1;i<=17;i++)    {document.getElementById([i]).style.visibility = "hidden";}

document.getElementById("4").style.visibility = "visible";  document.getElementById("5").style.visibility = "visible";  document.getElementById("6").style.visibility = "visible";  document.getElementById("7").style.visibility = "visible";  document.getElementById("8").style.visibility = "visible";  document.getElementById("9").style.visibility = "visible";  document.getElementById("10").style.visibility = "visible"; } function show3() {  for(i=1;i<=17;i++)    {document.getElementById([i]).style.visibility = "hidden";}

document.getElementById("11").style.visibility = "visible";     document.getElementById("12").style.visibility = "visible";     document.getElementById("13").style.visibility = "visible"; } function show4() {  for(i=1;i<=17;i++)   {document.getElementById([i]).style.visibility = "hidden";}

document.getElementById("14").style.visibility = "visible";  document.getElementById("15").style.visibility = "visible";  document.getElementById("16").style.visibility = "visible";  document.getElementById("17").style.visibility = "visible"; }

function bewegen() {

document.getElementById(41).style.top = '200px';     document.getElementById(42).style.top = '223px';     document.getElementById(43).style.top = '246px';     document.getElementById(44).style.top = '271px';     document.getElementById(45).style.top = '294px'; }

function bewegen1() {

document.getElementById(41).style.top = '158px';     document.getElementById(42).style.top = '181px';     document.getElementById(43).style.top = '204px';     document.getElementById(44).style.top = '227px';     document.getElementById(45).style.top = '250px'; }

function bewegen2() {

document.getElementById(42).style.top = '271px';     document.getElementById(43).style.top = '294px';     document.getElementById(44).style.top = '317px';     document.getElementById(45).style.top = '340px'; }

function bewegen3() {

document.getElementById(43).style.top = '244px';     document.getElementById(44).style.top = '267px';     document.getElementById(45).style.top = '290px'; }

function bewegen4() {

document.getElementById(44).style.top = '282px';     document.getElementById(45).style.top = '305px'; } //-->  </script>

----------TEIL2-------

<!-- ID's : 1-17 Untermenues; 39-45 Hauptmenues -->

<style> body { margin: 0; }  #39{Z-INDEX:2;left:5px;POSITION:absolute; TOP:112px;}  #40{Z-INDEX:1;left:5px;POSITION:absolute; TOP:135px; }  #41{Z-INDEX:3;left:5px; POSITION:absolute; TOP:158px;}  #42{Z-INDEX:4;left:5px; POSITION:absolute; TOP:181px}  #43{Z-INDEX:5;left:5px;POSITION:absolute;TOP:204px}  #44{Z-INDEX:6;left:5px; POSITION:absolute; TOP:227px;}  #45{Z-INDEX:7;left:5px;POSITION:absolute;TOP:250px;}  </style></head>  <body BGColor="#000066" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0"   background="bg-navbar.gif" onLoad="MM_preloadImages('../NAVIGATION/gfx/button_left_over.gif','maw_link_over.gif')">   <LINK href="../CSS_ORDNER/bunzl_css.css" type="text/css" rel="stylesheet">    <DIV>     <div id="39">       <A id="18" class="NAVI_LINKS" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image31','','../NAVIGATION/gfx/button_left_over.gif',1)"onclick="javascript:show();javascript:bewegen1()" href="../ALLE_HTMLS/START/start.html"target="mainFrame"> <IMG id="Img2" height="8" src="../NAVIGATION/gfx/button_left.gif" width="8" border="0"name="Image31"> HOME</A>     </div>     <div id="40"><p style="LINE-HEIGHT:10.5pt">        <A id="19" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image4','','../NAVIGATION/gfx/button_left_over.gif',1)"class="NAVI_LINKS" href="javascript:show1();javascript:bewegen()"> <IMG id="IMG1" height="8" src="../NAVIGATION/gfx/button_left.gif" width="8" border="0"name="Image4"> UNTERNEHMEN</A>       <br>            <A href="../ALLE_HTMLS/UNTERNEHMEN/struktur/struktur.html" onclick="BildWechseln(1)"target="mainFrame" id="1" style="VISIBILITY: hidden" class="UnterMenue">Struktur</A><br>            <A href="../ALLE_HTMLS/UNTERNEHMEN/philosophie/philosophie.html" onclick="BildWechseln(1)"target="mainFrame" id="2" style="VISIBILITY: hidden" class="UnterMenue">Philosophie</A><br>            <A href="../ALLE_HTMLS/UNTERNEHMEN/kompetenz/kompetenz.html" onclick="BildWechseln(1)"id="3" target="mainFrame" style="VISIBILITY: hidden" class="UnterMenue">Kompetenz</A>     </p></div>     <div id="41"><p style="LINE-HEIGHT:9.5pt">        <A id="20" class="NAVI_LINKS" onmouseover="MM_swapImage('Image4113','','../NAVIGATION/gfx/button_left_over.gif',1)"onmouseout="MM_swapImgRestore()" href="javascript:show2();javascript:bewegen1();javascript:bewegen2()"> <IMG height="8" src="../NAVIGATION/gfx/button_left.gif" width="8" border="0" name="Image4113"> BRANCHEN </A>       <br>           <A class="UnterMenue" id="4" style="VISIBILITY: hidden" onclick="BildWechseln(1)" href="../ALLE_HTMLS/BRANCHEN/restaurants/restaurants.html"target="mainFrame">Restaurants</A><br>           <A class="UnterMenue" id="5" style="VISIBILITY: hidden" onclick="BildWechseln(1)" href="../ALLE_HTMLS/BRANCHEN/baecker_metzger/baecker.html"target="mainFrame">Bäcker</A><br>           <A class="UnterMenue" id="6" style="VISIBILITY: hidden" onclick="BildWechseln(1)" href="../ALLE_HTMLS/BRANCHEN/baecker_metzger/metzger.html"target="mainFrame">Metzger</A><br>           <A class="UnterMenue" id="7" style="VISIBILITY: hidden" onclick="BildWechseln(1)" href="../ALLE_HTMLS/BRANCHEN/hotels/hotels.html"target="mainFrame">Hotels</A><br>           <A class="UnterMenue" id="8" style="VISIBILITY: hidden" onclick="BildWechseln(1)" href="../ALLE_HTMLS/BRANCHEN/catering_kantinen/catering_cantinen.html"target="mainFrame">Catering|Kantinen</A><br>           <A class="UnterMenue" id="9" style="VISIBILITY: hidden" onclick="BildWechseln(1)" href="../ALLE_HTMLS/BRANCHEN/krankenhauser/krankenhauser.html"target="mainFrame">Krankenhäuser</A><br>           <A class="UnterMenue" id="10" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/BRANCHEN/supermaerkte/supermaerkte.html" target="mainFrame">Supermärkte</A>     </p></div>     <div id="42"><p style="LINE-HEIGHT:10.5pt">        <A id="21" class="NAVI_LINKS" onmouseover="MM_swapImage('Image4313','','../NAVIGATION/gfx/button_left_over.gif',1)"onmouseout="MM_swapImgRestore()" href="javascript:show3();javascript:bewegen1(); javascript:bewegen3()"> <IMG height="8" src="../NAVIGATION/gfx/button_left.gif" width="8" border="0" name="Image4313"> SERVICE</A>                <br>            <A class="UnterMenue" id="11" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/SERVICE/beratung/beratung.html" target="mainFrame">Beratung</A><br>            <A class="UnterMenue" id="12" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/SERVICE/planung/planung.html" target="mainFrame">Planung</A><br>            <A class="UnterMenue" id="13" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/SERVICE/versand/versand.html" target="mainFrame">Versand</A> </p></div> <DIV id="43"><p style="LINE-HEIGHT:10.5pt">  <A id="22" class="NAVI_LINKS" onmouseover="MM_swapImage('Image4513','','../NAVIGATION/gfx/button_left_over.gif',1)"onmouseout="MM_swapImgRestore()" href="javascript:show4();javascript:bewegen1();javascript:bewegen4()"> <IMG height="8" src="../NAVIGATION/gfx/button_left.gif" width="8" border="0" name="Image4513"> PRODUKTE</A><br>

<A class="UnterMenue" id="14" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/PRODUKTE/tischdekoration/produkte_tischdekoration.html" target="mainFrame">Tischdekoration</A>

<A class="UnterMenue" id="15" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/PRODUKTE/frischhalteprodukt/produkte_frischhalteproduk.html" target="mainFrame">Frischhalteprodukte</A>

<A class="UnterMenue" id="16" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/PRODUKTE/einwegverpackung/produkte_einwegverpack.html" target="mainFrame">Einwegverpackungen</A><br>

<A class="UnterMenue" id="17" style="VISIBILITY: hidden" onclick="BildWechseln(1)"href="../ALLE_HTMLS/PRODUKTE/hygiene/produkte_hygiene.html" target="mainFrame">Hygiene</A> </p> </DIV> <div id="44">  <A id="23" class="NAVI_LINKS" onmouseover="MM_swapImage('Image4713','','../NAVIGATION/gfx/button_left_over.gif',1)"onclick="javascript:show();;javascript:bewegen1()" onmouseout="MM_swapImgRestore()" href="../ALLE_HTMLS/KONTAKT/kontakt.html"target="mainFrame"> <IMG height="8" src="../NAVIGATION/gfx/button_left.gif" width="8" border="0" name="Image4713"> KONTAKT</A>     </div>     <div id="45">        <A id="24" class="NAVI_LINKS" onmouseover="MM_swapImage('Image4814','','../NAVIGATION/gfx/button_left_over.gif',1)"onclick="javascript:show();;javascript:bewegen1()" onmouseout="MM_swapImgRestore()" href="../ALLE_HTMLS/IMPRESSUM/impressum.html"target="mainFrame"> <IMG height="8" src="../NAVIGATION/gfx/button_left.gif" width="8" border="0" name="Image4814"> IMPRESSUM</A>     </div>    </DIV>