w head
<style>
DIV.clTop{position:absolute; width:170}
DIV.clSub{position:absolute; left:10; width:170}
#divCont{position:relative; left:0; top:0; height:300; width:0;}
A.clMain{font-size:14px; text-decoration:none; font-weight:bold; color:black}
#divMain{position:absolute}
//-->
</style>
<SCRIPT type="text/javascript">
/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at
www.bratta.com
Visit for more great scripts.
This may be used freely as long as this msg is intact!
********************************************************************************/
/************************************************************************************
This script is a "foldout" menu script, all the "foldouts" will
stay outfolded in older browsers. Works in ie4+ and ns4+.
ADDED: Images
To change where the menu appears change the left and top values of the divCont
in the stylesheets, it's currently placed relative so you can
place this menu in tables or similar if you want. Change the
text colors and size in the A.clMain and A.clSubb classes.
************************************************************************************/
/************************************************************************************
Change this to false if you want all the submenus to get unfold when you foldout a new one.
************************************************************************************/
var stayFolded=false
//This is the image that it changes to when it expands.
var exImg=new Image(); exImg.src='1.gif'
//This is the image is changes to with it's "unfolded" or something :}
//Remeber to change the actual images in the page aswell, but remember to
//keep the name of the image.
var unImg=new Image(); unImg.src='2.gif'
/************************************************************************************
Browsercheck
************************************************************************************/
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
var browser=((n || ie) && parseInt(navigator.appVersion)>=4)
/************************************************************************************
Making cross-browser objects
************************************************************************************/
function makeMenu(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')
this.ref=(n) ? eval(nest+'document.'+obj+'.document'):eval('document');
this.height=n?this.ref.height:eval(obj+'.offsetHeight')
this.x=(n)? this.css.left:this.css.pixelLeft;this.y=(n)? this.css.top:this.css.pixelTop;
this.hideIt=b_hideIt; this.showIt=b_showIt; this.vis=b_vis; this.moveIt=b_moveIt
return this
}
function b_showIt(){this.css.visibility="visible"}
function b_hideIt(){this.css.visibility="hidden"}
function b_vis(){if(this.css.visibility=="hidden" || this.css.visibility=="hide") return true;}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
/************************************************************************************
Initiating the page. Just add to the arrays here to get more menuitems and add divs in the page ************************************************************************************/
function init(){
oTop=new Array()
oTop[0]=new makeMenu('divTop1','divCont')
oTop[1]=new makeMenu('divTop2','divCont')
oTop[2]=new makeMenu('divTop3','divCont')
oTop[3]=new makeMenu('divTop4','divCont')
oTop[4]=new makeMenu('divTop5','divCont')
oTop[5]=new makeMenu('divTop6','divCont')
oTop[6]=new makeMenu('divTop7','divCont')
oSub=new Array()
oSub[0]=new makeMenu('divSub1','divCont.document.divTop1')
oSub[1]=new makeMenu('divSub2','divCont.document.divTop2')
oSub[2]=new makeMenu('divSub3','divCont.document.divTop3')
oSub[3]=new makeMenu('divSub4','divCont.document.divTop4')
oSub[4]=new makeMenu('divSub5','divCont.document.divTop5')
oSub[5]=new makeMenu('divSub6','divCont.document.divTop6')
oSub[6]=new makeMenu('divSub7','divCont.document.divTop7')
for(i=0;i<oSub.length;i++){ oSub[i].hideIt() }
for(i=1;i<oTop.length;i++){ oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height) }
}
/************************************************************************************
This is the function that changes the sub menus to folded or unfolded state.
************************************************************************************/
function menu(num){
if(browser){
if(!stayFolded){
for(i=0;i<oSub.length;i++){
if(i!=num){
oSub[i].hideIt()
oTop[i].ref["imgA"+i].src=unImg.src
}
}
for(i=1;i<oTop.length;i++){
oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height)
}
}
if(oSub[num].vis()){
oSub[num].showIt()
oTop[num].ref["imgA"+num].src=exImg.src
}else{
oSub[num].hideIt()
oTop[num].ref["imgA"+num].src=unImg.src
}
for(i=1;i<oTop.length;i++){
if(!oSub[i-1].vis()) oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height+oSub[i-1].height)
else oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height)
}
}
}
//Initiating the menus onload, if it's a 4.x+ browser.
if(browser) onload=init;
</script>
w body
<div id="divCont">
<div id="divTop1" class="clTop"><a href="#" onClick="menu(0); return false" class="clMain"><img name="imgA0" width=0 height=0 alt="Kliknij mnie, a otworzę menu" border="0">
<FONT title="To menu zawiera pozycje próbne" style="font-size: 9pt"><B>Bezpieczeństwo:</B></FONT></a><br>
<div id="divSub1" class="clSub">
<a href="#">:: Antyspam</a><br>
<a href="#">:: Antyspyware</a><br>
<a href="#">:: Antywirusy</a><br>
<a href="#">:: Firewall</a><br>
<a href="#">:: Pakiety zabezpieczeń</a><br>
</div>
</div>
<div id="divTop2" class="clTop"><a href="#" onClick="menu(1); return false" class="clMain"><img name="imgA1" width=0 height=0 alt="" border="0">
<FONT style="font-size: 9pt"><B>Biuro:</B></FONT></a><br>
<div id="divSub2" class="clSub">
<a href="#">:: Edytory tekstów</a><br>
<a href="#">:: Pakiety biurowe </a><br>
<a href="#">:: Przeglądarki dokumentów </a><br>
</div>
</div>
<div id="divTop3" class="clTop"><a href="#" onClick="menu(2); return false" class="clMain"><img name="imgA2" width=0 height=0 alt="" border="0">
<FONT style="font-size: 9pt"><B>Firma:</B></FONT></a><br>
<div id="divSub3" class="clSub">
<a href="#">:: Fakturowanie</a><br>
<a href="#">:: Księgowość </a><br>
<a href="#">:: Prowadzenie firmy </a><br>
<a href="#">:: Rozliczenia podatkowe</a><br>
<a href="#">:: Sprzedaż</a><br>
<a href="#">:: Inne firma</a><br>
</div>
</div>
<div id="divTop4" class="clTop"><a href="" onClick="menu(3); return false" class="clMain"><img name="imgA3" width=0 height=0 alt="" border="0"> <B>
<FONT style="font-size: 9pt">Grafika</FONT><FONT SIZE="+1"></FONT></B></a><br>
<div id="divSub4" class="clSub">
<a href="#">:: Edycja grafiki</a><br>
<a href="#">:: Flash</a><br>
<a href="#">:: Modelowanie 3D</a><br>
<a href="#">:: Przeglądarki grafiki</a><br>
<a href="#">:: Zrzuty ekranowe</a><br>
</div>
</div>
<div id="divTop5" class="clTop"><a href="#" onClick="menu(4); return false" class="clMain"><img name="imgA4" width=0 height=0 alt="" border="0">
<FONT style="font-size: 9pt"><B>Internet:</B></FONT></a><br>
<div id="divSub5" class="clSub">
<a href="#">:: Czytniki RSS</a><br>
<a href="#">:: Klienci FTP</a><br>
<a href="#">:: Klienci IRC</a><br>
<a href="#">:: Komunikatory</a><br>
<a href="#">:: P2M (peer2mail)</a><br>
<a href="#">:: Pobieranie plików</a><br>
<a href="#">:: Poczta elektroniczna</a><br>
<a href="#">:: Przeglądarki Off-Line</a><br>
<a href="#">:: Przeglądarki WWW</a><br>
<a href="#">:: Serwery FTP</a><br>
<a href="#">:: Tworzenie stron www</a><br>
<a href="#">:: Wymiana plików (P2P)</a><br>
<a href="#">:: Wysyłanie SMSów</a><br>
</div>
</div>
<div id="divTop6" class="clTop"><a href="#" onClick="menu(5); return false" class="clMain"><img name="imgA5" width=0 height=0 alt="" border="0">
<FONT style="font-size: 9pt"><B>Multimedia:</B></FONT></a><br>
<div id="divSub6" class="clSub">
<a href="#">:: Edycja tagów</a><br>
<a href="#">:: Katalogowanie zbiorów</a><br>
<a href="#">:: Kodeki</a><br>
<a href="#">:: Konwersja Audio i Video</a><br>
<a href="#">:: Nagrywanie CD/DVD</a><br>
<a href="#">:: Obróbka Video</a><br>
<a href="#">:: Odtwarzacze Audio i Video</a><br>
<a href="#">:: Odtwarzacze DVD</a><br>
<a href="#">:: Odtwarzacze RADIO/TV</a><br>
<a href="#">:: Syntezatory mowy</a><br>
<a href="#">:: Tworzenie demonstracji</a><br>
<a href="#">:: Tworzenie muzyki</a><br>
<a href="#">:: Inne multimedia</a><br>
</div>
</div>
<div id="divTop7" class="clTop"><a href="#" onClick="menu(6); return false" class="clMain"><img name="imgA6" width=0 height=0 alt="" border="0">
<FONT style="font-size: 9pt"><B>Narzędzia:</B></FONT></a><br>
<div id="divSub7" class="clSub">
<a href="#">:: Dyskowe i plikowe</a><br>
<a href="#">:: Emulatory napędów</a><br>
<a href="#">:: Kompresory/Archiwizery</a><br>
<a href="#">:: Odzyskiwanie danych</a><br>
<a href="#">:: Programowanie</a><br>
<a href="#">:: Rozszerzenia pulpitu</a><br>
<a href="#">:: Sieciowe</a><br>
<a href="#">:: Sterowanie komputerem</a><br>
<a href="#">:: Systemowe</a><br>
<a href="#">:: Szyfrowanie danych</a><br>
<a href="#">:: Testowanie i diagnostyka</a><br>
<a href="#">:: Inne narzędzia</a><br>
</div>
</div>
<!-- <a href="#">-Sub 1</a> -->
</div>
</div>
</div>