Kan du ikke bruge denne her, skal bare tilpasses lidt!
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">
<!-- saved from url=(0058)
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp -->
<HTML><HEAD><TITLE>Demenskonsulent - Velkommen</TITLE>
<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>
<SCRIPT language=JavaScript><!--
/*
The ultimate DHTML drop-down code
Nick Nettleton
www.computerarts.co.uk ||
www.fluid7.co.uk--
This must be the single most requested bit of code in the history of Computer Arts, so we\'ve decided to make it user-friendly and adaptable for everyone. Stacks more goodies to come too - head to one of the above sites for regular infoa nd updates.
Works with v4 and v5 browsers - both IE and NS. Update for NS6 coming. Also, be aware there\'s no way to automatically centre layers in the window - a JS for this coming soon. In the meantime, stick with left-aligned.
Keep an eye out for update for NS6.
--
You can adapt, use and distribute this code under GNU public licence, as long as:
(1) You leave all the comment and credit lines in, including these ones
(2) You don\'t sell it for profit
--
If you want to tweak the code yourself, use the f7_droplayer to set the names of the dropdowns, and just call f7_showdrop(n) and f7_hdidedrop from onmouseover, onmouseout and other events. Swap n for the number of the layer as in the array.
--
Enjoy!!!
*/
//names of dropdowns stored here
f7_droplayer=new Array()
f7_droplayer[0]=\"drop1\"
f7_droplayer[1]=\"drop2\"
f7_droplayer[2]=\"drop3\"
f7_droplayer[3]=\"drop4\"
f7_droplayer[4]=\"drop5\"
f7_droplayer[5]=\"drop6\"
f7_droplayer[6]=\"drop7\"
//simple browser check
f7_v4=(parseInt(navigator.appVersion)>=4 && parseInt(navigator.appVersion)<=5)?1:0
f7_ie=(document.all && f7_v4)?1:0
f7_ns=(document.layers && f7_v4)?1:0
//code for drops
function f7_showdrop(thelayer){
f7_keep=thelayer; f7_hideall(); f7_showitnow=1
f7_showit(thelayer)
}
function f7_showit(thelayer){
if(f7_ie){ eval(f7_droplayer[thelayer]+\'.style.visibility=\"visible\"\') }
if(f7_ns){ eval(\'document.\'+f7_droplayer[thelayer]+\'.visibility=\"show\"\');}
}
function f7_hidedrop(){
f7_keep=-1; setTimeout(\'f7_hideall()\',500)
}
f7_keep=-1
function f7_hideall(){
for(i=0;i<f7_droplayer.length;i++){
f7_hideit=0; f7_checkmousepos(i)
if(f7_ie && f7_keep!=i){
if(f7_hideit){ eval(f7_droplayer[i]+\'.style.visibility=\"hidden\"\') }
}
if(f7_ns && f7_keep!=i){
if(f7_hideit){ eval(\'document.\'+f7_droplayer[i]+\'.visibility=\"hide\"\') }
}
}
}
//deal with cursor over layer
document.onmousemove = f7_getmousepos
if (f7_ns) document.captureEvents(Event.MOUSEMOVE)
function f7_getmousepos(e){
if(f7_ns){f7_mousex=e.pageX; f7_mousey=e.pageY}
if(f7_ie){f7_mousex=event.clientX; f7_mousey=event.clientY;}
}
function f7_checkmousepos(i){
if(f7_ns){
f7_x_min=eval(\'document.\'+f7_droplayer[i]+\'.left\')
f7_x_max=f7_x_min+eval(\'document.\'+f7_droplayer[i]+\'.clip.width\')
f7_y_min=eval(\'document.\'+f7_droplayer[i]+\'.top\')
f7_y_max=f7_y_min+eval(\'document.\'+f7_droplayer[i]+\'.clip.height\')
}
if(f7_ie){
f7_x_min=eval(f7_droplayer[i]+\'.style.pixelLeft\')
f7_x_max=f7_x_min+eval(f7_droplayer[i]+\'.scrollWidth\')
f7_y_min=eval(f7_droplayer[i]+\'.style.pixelTop\')
f7_y_max=f7_y_min+eval(f7_droplayer[i]+\'.scrollHeight\')
}
if (f7_mousex>=f7_x_min && f7_mousex<=f7_x_max && f7_mousey>=f7_y_min && f7_mousey<=f7_y_max){
f7_hideit=0; setTimeout(\'f7_hideall()\',500)
}
else { f7_hideit=1 }
return f7_hideit
}
//--></SCRIPT>
<SCRIPT language=JavaScript><!--
//browser stylesheets
if(f7_ie){
document.write(\'<style type=\"text/css\"><!--\')
document.write(\'.dropdown {height:1px; width:1px; padding-left:10px; padding-top:10px; padding-right:10px; padding-bottom:10px;}\')
document.write(\'p { margin-top:0px; margin-bottom:6px }\')
document.write(\'a { text-decoration: none }\')
document.write(\'a:hover { color: white; text-decoration: underline }\')
document.write(\'--></style>\')
}
//--></SCRIPT>
<STYLE type=text/css>P {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 11px; LINE-HEIGHT: 17px
}
TD {
FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 11px
}
.header {
FONT: bold 24px Arial, Verdana, Helvetica, sans-serif
}
.subhead {
FONT-SIZE: 12px; FONT-WEIGHT: bold
}
.list {
FONT-FAMILY: Arial, Verdana, Helvetica, sans-serif; FONT-SIZE: 12px; TEXT-DECORATION: none
}
.forms {
FONT-FAMILY: Arial, Verdana, Helvetica, sans-serif; FONT-SIZE: 12px
}
.dropdown {
BACKGROUND-COLOR: #efefef; BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; COLOR: black; POSITION: absolute; TOP: 110px; VISIBILITY: hidden; WIDTH: 140px; Z-INDEX: 1; layer-background-color: #EFEFEF
}
.drophead {
COLOR: #333333; FONT: bold 12px Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.dropitem {
COLOR: black; FONT: 12px Arial, Verdana, Helvetica, sans-serif; TEXT-DECORATION: none
}
.drophead:hover {
COLOR: black; TEXT-DECORATION: none
}
.dropitem:hover {
COLOR: black; FONT-WEIGHT: bold
}
</STYLE>
<META content=\"MSHTML 5.00.2614.3500\" name=GENERATOR></HEAD>
<BODY aLink=#ffffff bgColor=#000000 leftMargin=0 link=#ffffff text=#ffffff
topMargin=0 vLink=#ffffff marginheight=\"0\" marginwidth=\"0\">
<div id=\"Layer1\" style=\"position:absolute; left:90px; top:60px; width:800px; height:490px; z-index:1; visibility: visible; background-image: url(../../demenskonsulent/baggrund.gif); layer-background-image: url(../../demenskonsulent/baggrund.gif); border: 1px none #000000\">
<div class=dropdown id=drop1 onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(0)
style=\"LEFT: 99px; top: 110px; width: 100px\">
<p>• <a class=dropitem
href=\"
http://www.demenskonsulent.dk/info/erfa.html\">ERFA</a><br> • <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a></p>
</div>
<div class=dropdown id=drop2 onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(1)
style=\"LEFT: 213px; top: 110px; width: 100px\">
<p>• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a></p>
</div>
<div class=dropdown id=drop3 onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(2)
style=\"LEFT: 330px; top: 110px; width: 100px\">
<p>• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a></p>
</div>
<div class=dropdown id=drop4 onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(3)
style=\"LEFT: 448px; top: 110px; width: 100px\">
<p>• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a></p>
</div>
<div class=dropdown id=drop5 onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(4)
style=\"LEFT: 565px; top: 110px; width: 100px\">
<p>• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a></p>
</div>
<div class=dropdown id=drop6 onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(5)
style=\"LEFT: 424px\">
<p>• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a></p>
</div>
<div class=dropdown id=drop7 onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(6)
style=\"LEFT: 480px; top: 105px\">
<p>• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a><br>
• <a class=dropitem
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\">Link 1</a></p>
</div>
<table border=0 cellpadding=0 cellspacing=0 width=\"68%\" height=\"32\" align=\"center\">
<tbody>
<tr>
<td colspan=6 height=80>
<p> </p>
</td>
</tr>
<tr>
<td bgcolor=#efefef width=\"100%\" height=\"32\">
<table border=1 cellpadding=0 cellspacing=0 height=30 width=600 bgcolor=\"#CCCCCC\" bordercolor=\"#CCCCCC\">
<tbody>
<tr align=middle>
<td width=119 height=\"31\">
<div align=\"center\"><a class=drophead
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\" onMouseOut=f7_hidedrop() onMouseOver=f7_showdrop(0)><b><font size=\"1\">Info
om demens</font></b></a></div>
</td>
<td bgcolor=#000000 width=1 height=\"31\"><img height=1 src=\"\" width=1></td>
<td width=119 height=\"31\">
<div align=\"center\"><a class=drophead
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\" onMouseOut=f7_hidedrop()
onMouseOver=f7_showdrop(1)><b><font size=\"1\">Foreninger</font></b></a></div>
</td>
<td bgcolor=#000000 width=1 height=\"31\"><img height=1 src=\"\" width=1></td>
<td width=119 height=\"31\">
<div align=\"center\"><a class=drophead
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\" onMouseOut=f7_hidedrop()
onMouseOver=f7_showdrop(2)><b><font size=\"1\">Konsulentstilling</font></b></a>
</div>
</td>
<td bgcolor=#000000 width=1 height=\"31\"><img height=1 src=\"\" width=1></td>
<td width=119 height=\"31\">
<div align=\"center\"><a class=drophead
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\" onMouseOut=f7_hidedrop()
onMouseOver=f7_showdrop(3)><b><font size=\"1\">Livshistorier</font></b></a>
</div>
</td>
<td bgcolor=#000000 width=1 height=\"31\"><img height=1 src=\"\" width=1></td>
<td width=119 height=\"31\">
<div align=\"center\"><a class=drophead
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\" onMouseOut=f7_hidedrop()
onMouseOver=f7_showdrop(4)><b><font size=\"1\">Links</font></b></a>
</div>
</td>
<td width=1 height=\"31\"> </td>
<td width=0 height=\"31\"> </td>
<td bgcolor=#efefef width=0 height=\"31\" bordercolor=\"#CCCCCC\"> </td>
<td height=\"31\"><a class=drophead
href=\"
http://www.computerarts.co.uk/web/dhtml/dropdowns_html.asp#\" onMouseOut=f7_hidedrop()
onMouseOver=f7_showdrop(6)></a> </td>
<td bgcolor=#efefef width=0 height=\"31\"> </td>
</tr>
</tbody>
</table>
</td>
<td bgcolor=#efefef width=\"0%\" height=\"32\"> </td>
<td bgcolor=#efefef width=\"0%\" height=\"32\"> </td>
<td width=\"0%\" height=\"32\"> </td>
<td bgcolor=#efefef width=\"0%\" height=\"32\"> </td>
<td bgcolor=#efefef width=\"0%\" height=\"32\"> </td>
</tr>
<tr>
<td colspan=6 height=\"2\"><img height=1 src=\"\"
width=1></td>
</tr>
</tbody>
</table>
</div>
</BODY></HTML>
/pelkjaer