lav 5.0 kompatibelt?
Er der en hardcore vbscripter derude der kan få dette script til at vise menuen i ie 5.0? Jeg kan ikke finde nogle fejl nogen steder i koden?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
a:link {
color: White;
text-decoration: none;
}
a:active {
color: White;
text-decoration: none;
}
a:visited {
color: White;
text-decoration: none;
}
A:hover {color: red; background-color: transparent}
</style>
<script language="VBScript">
Dim CurrTip
CurrTip=-1
Dim Tips(6)
tips(0)="Forretningsmæssig erfaring"
tips(1)="Knowhow"
tips(2)="Internationalt markedsorienteret"
tips(3)="Forretningsmæssig erfaring"
tips(4)="Effektivitet"
tips(5)="Ekspertise"
tips(6)="It"
Dim Items()
redim preserve Items(0)
additem "Main.htm","Forside","None","Main"
additem "","Profil","None","Main"
additem "","Investeringer","None",""
additem "","Projektudvikling","None",""
additem "","Sale & lease back","None",""
additem "Kontakt.Htm","Kontakt","None","Main"
additem "Søg/Ejendomme.htm","Idégrundlag","Profil","Main"
additem "Søg/Klienter.Htm","Kerneværdier","Profil","Main"
additem "Mæglere/Claes.Htm","Strategi","Profil","Main"
additem "Mæglere/Gert.Htm","Projektejendomme","Investeringer","Main"
additem "Mæglere/Lars.Htm","Ejendomsselskaber","Investeringer","Main"
additem "Mæglere/Frank.Htm","Ejendomsporteføljer","Investeringer","Main"
additem "Mæglere/Daniel.Htm","Investeringsejendomme","Investeringer","Main"
additem "Mæglere/Daniel.Htm","Brugerejendom","Investeringer","Main"
additem "Mæglere/Daniel.Htm","Grunde","Investeringer","Main"
additem "Mæglere/Daniel.Htm","Grund","Projektudvikling","Main"
additem "Mæglere/Daniel.Htm","Lejer","Projektudvikling","Main"
additem "Mæglere/Daniel.Htm","Investor","Projektudvikling","Main"
additem "Mæglere/Daniel.Htm","Lejekontrakt","Sale & lease back","Main"
additem "Mæglere/Daniel.Htm","Bygninger/byggeri","Sale & lease back","Main"
additem "Mæglere/arDaniel.Htm","Investor","Sale & lease back","Main"
Sub AddItem(Url,Caption,Parent,Target)
if ubound(Items)=0 then
if Items(0) ="" Then
Items(Ubound(Items))=Url &"|" & Caption & "|" & Parent & "|" & Target
exit sub
end if
end if
redim preserve Items(ubound(Items)+1)
Items(Ubound(Items))=Url &"|" & Caption & "|" & Parent & "|" & Target
end sub
</script>
</head>
<body background="Images/Graphic.gif" >
<div id="MyDiv" style="position:absolute; z-index:1; left: 0px; top: 40px; width: 700px; height: 40px;">
<center><Font style='font-size: 30px;' id="MyCell" face="Verdana, Arial, Helvetica, sans-serif"> </Font></center>
</div>
<center>
<table height="25" border="0" cellpadding="0" cellspacing="0" id="Menutable" style='Position: Absolute; left:5 ;'>
<tr>
<script language="VBscript">
For y=0 to ubound(Items)
myArr= split(Items(y),"|")
If myarr(2)="None" then
select case myarr(0)
case ""
document.write "<td height=100% onMouseMove='Vbscript: MoveMenu " & y &"' onMouseOver='Vbscript: ShowMenu " & y &"'> <font style='font-size: 12px;' color='#FFFFFF' face='Verdana' ><b>" & myarr(1) & "</b></font></td>"
case else
document.write "<td height=100% onMouseMove='Vbscript: MoveMenu " & y &"' onMouseOver='Vbscript: ShowMenu " & y &"'> <a href='" & myarr(0) & "' target='" & Myarr(3) &"'><font style='font-size: 12px;' color='#FFFFFF' face='Verdana' ><b>" & myarr(1) & "</b></font></A></td>"
end select
document.write "<td width='20'> </td>"
end if
next
</script>
</tr>
</table>
</center>
<script language="Vbscript">
ahex=222
MyTimer
dim oheight
dim oinhtml
dim oDiv
Dim HasP
Dim CCell
Dim P
set oDiv = parent.document.createElement("<div onmouseout=""Vbscript:document.getelementbyid('layer1').style.visibility='hidden'"" onmouseover=""Vbscript:document.getelementbyid('layer1').style.visibility='Visible'"" id='Layer1' style='position:absolute; width:10px; height:10px; z-index:0; left:0 ; top: 85; Background-color: #BDBEAD; layer-backgroundcolor: #BDBEAD; visibility=hidden; border-color:black; border-width: 1px; border-style: solid;'></div>")
odiv.innerhtml=""
parent.document.body.appendchild odiv
Sub ShowMenu(Cell)
if odiv.style.visibility="visible" and ccell=Cell then exit sub
ccell=Cell
document.body.style.cursor="Arrow"
odiv.innerhtml=""
odiv.style.visibility="hidden"
odiv.style.width=0
odiv.style.height=0
TempArr=Split(Items(cell),"|")
Myname=Temparr(1)
odiv.style.left=window.event.x -10
if odiv.innerhtml <> "" then exit sub
inhtml=""
For X=0 to ubound(Items)
myArr= split(Items(x),"|")
If myarr(2)=Myname then
odiv.innerhtml=odiv.innerhtml & "<div style='position:relative; left:2 ; top:2'> <a onmousemove=""Vbscript:"" href='" & Myarr(0) & "' target='" & myarr(3) & "'>" & myarr(1) & "</a></div>"
end if
next
odiv.style.width=odiv.clientwidth +7
odiv.style.height=odiv.clientheight +5
if odiv.innerhtml <> "" then odiv.style.visibility="visible"
oheight=NumbersOnly(odiv.style.height)
oinhtml=odiv.innerhtml
if p=1 then exit sub
p=0
foldmenu
end sub
sub movemenu(Cell)
if odiv.style.visibility="visible" then
odiv.style.left=window.event.x -10
end if
end sub
Function NumbersOnly(MixedString)
Set Reg = New RegExp
Reg.Pattern = "[^0-9]"
Reg.Global = True
NumbersOnly = Reg.Replace(MixedString,"")
End Function
sub FoldMenu()
if odiv.style.height=oheight then exit sub
if NumbersOnly(odiv.style.height)=oheight then
p=1
odiv.style.height=0
odiv.innerhtml="<div id=""ditlayer"" style=""height:0""><span style=""line-height:0""></span></div>"
end if
odiv.style.height=NumbersOnly(odiv.style.height) + 10
if clng(NumbersOnly(odiv.style.height))=>clng(oheight) then
odiv.style.height=oheight
odiv.innerhtml=oinhtml
P=0
exit sub
end if
settimeout "FoldMenu",100
end sub
public Sub HideMenu(Cell)
if p=1 then
odiv.style.visibility="hidden"
end if
end sub
Sub MyTimer()
If Currtip=Ubound(Tips) Then CurrTip=-1
currtip=currtip+1
Document.GetElementById("MyCell").InnerHtml=Tips(CurrTip)
fadetext
End Sub
sub FadeText()
if(ahex>0) then
ahex=ahex-11
document.getElementById("MyCell").style.color="rgb(" & ahex & ","& ahex & "," & ahex & ")"
setTimeout "fadetext",100
else
fadetextout
end if
end sub
sub FadeTextout()
if(ahex<222) then
ahex=ahex+11
document.getElementById("MyCell").style.color="rgb(" & ahex & ","& ahex & "," & ahex & ")"
setTimeout "FadeTextout",100
else
Mytimer
end if
end sub
</script>
</body>
</html>
Den kan ses i funktion på friserverplads.dk/cse/
