Avatar billede johnny4maj Nybegynder
22. august 2003 - 12:23 Der er 3 kommentarer

Acorbat tager over

Jeg har en dynamisk dropdown menu, som kommer ned over en iframe. Mit problem er at når jeg linker til en pdf fil, bliver den åbnet i Acrobat Reader og så kommer min dropdown menu til at ligge bagved acrobar.
Avatar billede tchami Nybegynder
25. august 2003 - 09:36 #1
Må vi se noget kode?
Avatar billede johnny4maj Nybegynder
26. august 2003 - 21:57 #2
<html>
<head>
<link rel="stylesheet" type="text/css" href="_Include/style.css">
<script type='text/javascript'><!--
function t_popUp(){return}
function t_popDown(){return}
function t_startIt(){return}
thisURL=location.href
t_contentW=window.screen.width
t_padding=3
t_borWid=1
t_childOverlap=3
t_childOffset=-3
t_mSecsVis=300
t_IEfntSiz="10px"
t_NSfntSiz="10px"
t_fntFam="verdana,geneva"
NS4=(document.layers)
IE4=(document.all)
isMac=(navigator.appVersion.indexOf("Mac")!=-1)
isWin=(navigator.appVersion.indexOf("Win")!=-1)
t_NSfontOver=true
if(!isWin&&!isMac)t_NSfontOver=false
if(!NS4&&!IE4)event=null

t_M1=new Array(0,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","Ansvar","default.asp?id=200",0,"Beredskab","default.asp?id=328",0,"Fokus 2003","default.asp?id=232",0,"Kvalitet","default.asp?id=185",0,"Nøgletal","default.asp?id=230",0,"Organisation","default.asp?id=278",0,"Planlægning","default.asp?id=198",0,"Produkter","default.asp?id=199",0)

t_M2=new Array(101,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","Informatik","default.asp?id=183",0,"Kommunikation","default.asp?id=191",0,"Logistik","default.asp?id=176",0,"Medarbejder","default.asp?id=184",0,"Miljø","default.asp?id=180",0,"Produktion","default.asp?id=178",0,"Samarbejde","default.asp?id=190",0,"Sikkerhed","default.asp?id=181",0,"Transport","default.asp?id=182",0,"Udvikling","default.asp?id=291",0,"Vedligehold","default.asp?id=175",0,"Økonomi","default.asp?id=177",0)

t_M3=new Array(202,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","Doculive","default.asp?id=324",0)

t_M4=new Array(303,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","Dokumentation","default.asp?id=329",0,"Konfiguration","default.asp?id=330",0)

t_M5=new Array(404,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","Logistik","default.asp?id=267",0,"Medarbejder","default.asp?id=268",0,"Produktion","default.asp?id=270",0,"Transport","default.asp?id=266",0,"Økonomi","default.asp?id=275",0)

t_M6=new Array(505,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","FRK Log","default.asp?id=343",0,"Mar. Ops","default.asp?id=363",0,"Fly Ops","default.asp?id=360",0,"Sikring","default.asp?id=365",0,"Kik FRK Log","default.asp?id=361",0,"Kik Mar. ops","default.asp?id=364",0,"Kik Fly Ops","default.asp?id=362",0,"Kik Sikring","default.asp?id=366",0)

t_M7=new Array(606,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","Ansvar","default.asp?id=241",0)

t_M8=new Array(707,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","Immage","default.asp?id=368",0,"PDF","default.asp?id=369",0,"1","default.asp?id=141",0)

t_M9=new Array(808,23,120,"#FFFFFF","#63738C","#63738C","#D4D0C8","#63738C","ffff","default.asp?id=372",0)

if(NS4||(IE4&&!isMac)){
    t_menuson=true
    document.write("<script type='text/javascript' src='_Include/menusovs.js'></script>")
    document.close()
    }
    else
    window.onload=t_checkeftermenu
    //function t_checkeftermenu(){if(window.t_eftermenu)t_eftermenu()}
-->
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
  <tr height="50">
    <td colspan="2" bgcolor="#D4D0C8" height="50" width="100%" valign="bottom" align="left"><span id="t_menudiv"><table class="topMenu" border="0" width="100%" height="0" cellspacing="0" cellpadding="0"><tr><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=192'" onMouseOver="t_popUp(1,event)" onMouseOut="t_popDown(1)"><font size="2" Color="#FFFFFF"><b> FRK</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=107'" onMouseOver="t_popUp(2,event)" onMouseOut="t_popDown(2)"><font size="2" Color="#FFFFFF"><b> Proces</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=108'" onMouseOver="t_popUp(3,event)" onMouseOut="t_popDown(3)"><font size="2" Color="#FFFFFF"><b> Redskab</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=109'" onMouseOver="t_popUp(4,event)" onMouseOut="t_popDown(4)"><font size="2" Color="#FFFFFF"><b> Viden</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=110'" onMouseOver="t_popUp(5,event)" onMouseOut="t_popDown(5)"><font size="2" Color="#FFFFFF"><b> Status</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=342'" onMouseOver="t_popUp(6,event)" onMouseOut="t_popDown(6)"><font size="2" Color="#FFFFFF"><b> Log</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=233'" onMouseOver="t_popUp(7,event)" onMouseOut="t_popDown(7)"><font size="2" Color="#FFFFFF"><b> FRK-LE201</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=111'" onMouseOver="t_popUp(8,event)" onMouseOut="t_popDown(8)"><font size="2" Color="#FFFFFF"><b> Søgning</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td width="100" class="menu" align="center"  bgColor="#63738C" style="BORDER-TOP:#63738C 1px solid;BORDER-BOTTOM:#63738C 1px solid;"  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=371'" onMouseOver="t_popUp(9,event)" onMouseOut="t_popDown(9)"><font size="2" Color="#FFFFFF"><b> test</b></font></td ><td width="1" bgColor="#FFFFFF"><IMG width="1" src="images/TransParentDot.gif" ></td ><td align=right class="menu" bgColor="#63738C">&nbsp;</td ></tr ></table ></span><table class="topMenu" border="0" width="100%" height="0" cellspacing="0" cellpadding="0"><tr><td height="1" colspan=8><IMG width=2 SRC="images/TransParentDot.gif"></td></tr><tr><td class=top colspan=8 bgColor="#63738C">&nbsp;<span  Style="CURSOR:hand" onClick="document.location.href='default.asp?id=0'" ><font color="#FFFFFF">Home&nbsp;>&nbsp;</font></span><span Style="CURSOR:hand" onClick="document.location.href='default.asp?id=111'"><font color="#FFFFFF">Søgning&nbsp;&gt;&nbsp;</font></span><span Style="CURSOR:hand" onClick="document.location.href='default.asp?id=369'"><font color="#FFFFFF">PDF&nbsp;&gt;&nbsp;</font></span></td></tr><tr><td height="1" colspan=8><IMG width=10 border=0 SRC="images/TransParentDot.gif"></td></tr></table></td>
  </tr>
  <tr height="100%">
    <td bgcolor="#D4D0C8" height="100%" width="0%" valign="top" align="left"></td>
    <td bgcolor="#D4D0C8" height="100%" width="100%" valign="top" align="left">
        <IFRAME id="InnerF" width="100%" height="100%" scrolling=auto src="innihald.asp" ALLOWTRANSPARENCY="true" Frameborder=0 Border=0 Name="innihald"></IFRAME>
    </td>
  </tr>
</table>
</body>
</html>
Avatar billede johnny4maj Nybegynder
26. august 2003 - 21:59 #3
dette er script koden

window.onload=t_startIt
window.onresize=t_reDo
t_isLoaded=t_areCreated=t_NSresized=false
t_offsetW=0
t_imgStr="<img src=images/Arrow.gif width=5 height=5 border=0 align=right style=margin-top:3>"
t_fullImgSize=9
function t_offset(){
    t_winW=(NS4)?window.innerWidth-16:document.body.offsetWidth-20
    return(t_winW<t_contentW)?0:Math.floor(eval((t_winW-t_contentW)/2))
}
function t_initVars(){
    if(t_areCreated){
        for(i=1;i<t_Count;i++){
            t_cur=eval("elMenu"+i)
            clearTimeout(t_cur.hideTimer)
            t_cur.hideTimer=null
        }
        clearTimeout(t_allTimer)
    }
    t_Count=1
    t_areCreated=t_beingCreated=t_isOverM=false
    t_curM=t_allTimer=null
}
t_initVars()
function t_startIt(){
    t_isLoaded=true
    //window.status="START"
    t_makeTop()
    t_offsetW=t_offset()
    if(IE4&&window.bannerpulje)
        document.all.banners.innerHTML=write_banner()
    else if(NS4&&window.bannerpulje)
        replace_banner()
    if(window.t_eftermenu)t_eftermenu()
}
function t_makeTop(){
    t_beingCreated=true
    while(eval("window.t_M"+t_Count)){
        (NS4)?t_makeMenuNS(false,t_Count):t_makeMenuIE(false,t_Count)
        t_Count++
    }
    //window.status="SLUT"
    t_areCreated=true
    t_beingCreated=false
}
function t_makeMenuIE(t_isChild,t_MCount,t_parM){
    t_M=t_makeEl("elMenu"+t_MCount)
    t_M.t_arr=eval("t_M"+t_MCount)
    var feature=null
    if(t_MCount=="6_1")feature="noselect"
    if(t_MCount=="2_2"||t_MCount=="2_3")feature="wide"
    t_M.t_setMTree=t_setMTree
    t_M.t_setMTree(t_isChild,t_parM,feature)
    t_M.t_itemStr=""
    while(t_M.t_itemCount<t_M.t_maxItems){
        t_M.t_itemCount++
        t_itemName="item"+t_MCount+"_"+t_M.t_itemCount
        t_arrPtr=(t_isChild)?(t_M.t_itemCount-1)*3:((t_M.t_itemCount-1)*3)+8
        t_dispTxt=t_M.t_arr[t_arrPtr]
        t_hasMore=t_M.t_arr[t_arrPtr+2]
        t_htmStr=(t_hasMore)?t_imgStr+t_dispTxt:t_dispTxt
        t_M.t_itemStr+="<span id="+t_itemName+" style=\"width:"+(t_M.t_MWid-(t_borWid*2))+"\">"+t_htmStr+"</span><br>"
        if(t_hasMore){
            t_makeMenuIE(true,t_MCount+"_"+t_M.t_itemCount,t_M)
            t_M=t_M.t_parM
        }   
    }
    t_M.innerHTML=t_M.t_itemStr
    t_itemColl=t_M.children.tags("span")
    for(i=0;i<t_itemColl.length;i++){
        t_itemPad=(feature=="noselect")?0:t_padding
        it=t_itemColl(i)
        it.setup=t_itemSetup
        it.setup(i+1,t_M.t_arr,t_isChild)
    }
    t_M.lastItem=t_itemColl(t_itemColl.length-1)
    t_M.setup(t_isChild,t_parM)
}
function t_makeMenuNS(t_isChild,t_MCount,t_parM,parItem){
    tempArray=eval("t_M"+t_MCount)
    if(!t_isChild)
        t_M=t_makeEl("elMenu"+t_MCount,null,null,tempArray[2])
    else
        t_M=t_makeEl("elMenu"+t_MCount,t_parM,null,null)
    t_M.t_arr=tempArray
    t_M.t_setMTree=t_setMTree
    t_M.t_setMTree(t_isChild,t_parM)
    while(t_M.t_itemCount<t_M.t_maxItems){
        t_M.t_itemCount++
        t_itemPad=t_padding
        t_prevItem=(t_M.t_itemCount>1)?t_M.item:null
        t_itemName="item"+t_MCount+"_"+t_M.t_itemCount
        t_M.item=t_makeEl(t_itemName,null,t_M)
        t_M.item.t_prevItem=t_prevItem
        t_M.item.setup=t_itemSetup
        t_M.item.setup(t_M.t_itemCount,t_M.t_arr,t_isChild)
        if(t_M.item.t_hasMore){
            t_makeMenuNS(true,t_MCount+"_"+t_M.t_itemCount,t_M,t_M.item)
            t_M=t_M.t_parM
        }
    }
    t_M.lastItem=t_M.item
    t_M.setup(t_isChild,t_parM,parItem)
}
function t_findTree(men){
    foundTree=false
    for(i=2;i<men.t_arr.length;i+=3)
        if(men.t_arr[i]){
            foundTree=true
            break
        }
    return foundTree
}
function t_setMTree(t_isChild,t_parM,feature){
    if(!t_isChild){
        this.menuLeft=this.t_arr[0]
        this.menuTop=this.t_arr[1]
        this.t_MWid=this.t_arr[2]
        this.menuFontColor=this.t_arr[3]
        this.menuFontOver=this.t_arr[4]
        this.menuBGColor=this.t_arr[5]
        this.menuBGOver=this.t_arr[6]
        this.menuBorCol=this.t_arr[7]
        this.treeParent=this
        this.startChild=this
        this.isTree=t_findTree(this)
    }
    else{
        this.menuLeft=t_parM.menuLeft
        this.menuTop=t_parM.menuTop
        this.t_MWid=(feature=="wide")?150:t_parM.t_MWid
        this.menuFontColor=t_parM.menuFontColor
        this.menuFontOver=(feature=="noselect")?t_parM.menuFontColor:t_parM.menuFontOver
        this.menuBGColor=t_parM.menuBGColor
        this.menuBGOver=(feature=="noselect")?t_parM.menuBGColor:t_parM.menuBGOver
        this.menuBorCol=t_parM.menuBorCol
        this.treeParent=t_parM.treeParent
        this.isTree=t_parM.isTree
    }
    this.feature=feature
    this.t_maxItems=(t_isChild)?this.t_arr.length/3:(this.t_arr.length-8)/3
    this.hasParent=t_isChild
    this.setup=t_MSetup
    this.t_itemCount=0
}
function t_makeEl(whichEl,whichParent,whichContainer,whichWidth){
    if(NS4){
        if(whichWidth)
            elWidth=whichWidth
        else{
            elWidth=(whichContainer)?whichContainer.t_MWid:whichParent.t_MWid
            if(whichContainer)elWidth-=(t_itemPad+t_borWid)*2
        }
        if(!whichContainer)whichContainer=window
        eval(whichEl+"=new Layer(elWidth,whichContainer)")
    }
    else{
        elStr="<div id="+whichEl+" style='position:absolute;text-align:left'></div>"
        document.all.t_menudiv.insertAdjacentHTML("BeforeEnd",elStr)
    }
    return eval(whichEl)
}
function t_itemSetup(whichItem,whichArray,t_isChild){
    this.onmouseover=t_itemOver
    this.onmouseout=t_itemOut
    this.container=(NS4)?this.parentLayer:this.offsetParent
    t_arrPtr=(this.container.hasParent)?(whichItem-1)*3:((whichItem-1)*3)+8
    this.t_dispTxt=whichArray[t_arrPtr]
    this.linkText=whichArray[t_arrPtr+1]
    this.t_hasMore=whichArray[t_arrPtr+2]
    if(IE4&&this.t_hasMore){
        this.child=eval("elMenu"+this.id.substr(4))
        this.child.t_parM=this.container
        this.child.parentItem=this
    }
    if(this.linkText)
        if(NS4){
            this.captureEvents(Event.MOUSEUP)
            this.onmouseup=t_linkIt
        }
        else{
            this.onclick=t_linkIt
            this.style.cursor="hand"
        }
    if(NS4){
        this.document.tags.font.fontFamily=t_fntFam
        this.document.tags.font.fontSize=t_NSfntSiz
        t_htmStr="<font>"+this.t_dispTxt+"</font>"
        this.htmStrOver=t_htmStr.fontcolor(this.container.menuFontOver)
        this.t_htmStr=t_htmStr.fontcolor(this.container.menuFontColor)
        if(this.t_hasMore){
            this.document.write(t_imgStr)
            this.document.close()
        }
        this.visibility="inherit"
        this.bgColor=this.container.menuBGColor
        if(whichItem==1)
            this.top=t_borWid+t_itemPad
        else
            this.top=this.t_prevItem.top+this.t_prevItem.clip.height
        this.left=t_borWid+t_itemPad
        this.clip.top=this.clip.left=-t_itemPad
        this.clip.right=this.container.t_MWid-(t_borWid*2)-t_itemPad
        maxTxtWidth=this.container.t_MWid-(t_borWid*2)-(t_itemPad*2)
        if(this.container.isTree)maxTxtWidth-=t_fullImgSize
        this.txtLyr=new Layer(maxTxtWidth,this)
        this.txtLyr.document.write(this.t_htmStr)
        this.txtLyr.document.close()
        this.txtLyr.visibility="inherit"
        this.clip.bottom=this.txtLyr.document.height+t_itemPad
        this.dummyLyr=new Layer(100,this)
        this.dummyLyr.left=this.dummyLyr.top=-t_itemPad
        this.dummyLyr.clip.width=this.clip.width
        this.dummyLyr.clip.height=this.clip.height
        this.dummyLyr.visibility="inherit"
    }
    else
        with(this.style){
            padding=t_itemPad
            if(this.container.isTree&&!this.t_hasMore)paddingRight=t_itemPad
            color=this.container.menuFontColor
            fontSize=t_IEfntSiz
            fontFamily=t_fntFam
            backgroundColor=this.container.menuBGColor
        }
}   
function t_MSetup(hasParent,openCont,openItem){
    this.onmouseover=t_MOver
    this.onmouseout=t_MOut
    this.t_showIt=t_showIt
    this.t_keepInWindow=t_keepInWindow
    this.t_hideTree=t_hideTree
    this.t_hidePar=t_hidePar
    this.t_hideChildren=t_hideChildren
    this.t_hideTop=t_hideTop
    this.hasChildVisible=false
    this.isOn=false
    this.hideTimer=null
    this.t_childOverlap=t_childOverlap
    this.currentItem=null
    this.t_hideSelf=t_hideSelf
    this.t_count=t_Count
    if(hasParent){
        this.hasParent=true
        this.t_parM=openCont
        if(NS4){
            this.parentItem=openItem
            this.parentItem.child=this
        }
    }
    else
        this.hasParent=false
    if(NS4){
        this.bgColor=this.menuBorCol
        this.fullHeight=this.lastItem.top+this.lastItem.clip.bottom+t_borWid
        this.clip.right=this.t_MWid
        this.clip.bottom=this.fullHeight
    }
    else{
        with(this.style){
            width=this.t_MWid
            borderWidth=t_borWid
            borderColor=this.menuBorCol
            borderStyle="solid"
            zIndex=10000
        }
        this.lastItem.style.border=""
        this.fullHeight=this.scrollHeight
        this.t_showIt(false)
        if(!this.feature=="noselect")this.onselectstart=t_cancelSelect
        this.moveTo=moveTo
        this.moveTo(0,0)
    }
}
function t_popUp(menuName,e){
    if(NS4&&t_NSresized)t_startIt();
    if(!t_isLoaded)return
    linkEl=(NS4)?e.target:event.srcElement
    if(!t_beingCreated&&!t_areCreated)t_startIt()
    linkEl.menuName="elMenu"+menuName
    if(IE4)(false)
    t_popM(e)
}
function t_popM(e){
    if(!t_isLoaded||!t_areCreated)return true
    eType=(NS4)?e.type:event.type
    t_hideAll()
    linkEl=(NS4)?e.target:event.srcElement
    t_curM=eval(linkEl.menuName)
    t_curM.hasParent=false
    t_curM.treeParent.startChild=t_curM
    if(IE4)menuLocBod=window.document.body
    t_curM.moveTo(t_curM.menuLeft+t_offsetW,t_curM.menuTop)
    t_curM.t_keepInWindow()
    t_curM.isOn=true
    t_curM.t_showIt(true)
    return false
}
function t_MOver(e){
    this.isOn=true
    t_isOverM=true
    t_curM=this
    if(this.hideTimer)clearTimeout(this.hideTimer)
}
function t_MOut(){
    if(IE4){
        theEvent=window.event
        if(theEvent.srcElement.contains(theEvent.toElement))return
    }
    this.isOn=false
    t_isOverM=false
    window.status=""
    t_allTimer=setTimeout("t_curM.t_hideTree()",10)
}
function t_itemOver(){
    if(this.container.currentItem&&this.container.currentItem!=this)
        if(NS4){
            this.container.currentItem.bgColor=this.container.menuBGColor
            if(t_NSfontOver)
                with(this.container.currentItem.txtLyr.document){
                    write(this.container.currentItem.t_htmStr)
                    close()
                }
        }
        else
            with(this.container.currentItem.style){
                backgroundColor=this.container.menuBGColor
                color=this.container.menuFontColor
            }
    if(IE4){
        this.style.backgroundColor=this.container.menuBGOver
        this.style.color=this.container.menuFontOver
    }
    else{
        this.bgColor=this.container.menuBGOver
        if(t_NSfontOver){
            this.txtLyr.document.write(this.htmStrOver)
            this.txtLyr.document.close()
        }
    }
    window.status=this.linkText
    this.container.currentItem=this
    if(this.container.hasChildVisible)this.container.t_hideChildren(this)
    if(this.t_hasMore){
        horoffset=(this.container.t_MWid-this.container.t_childOverlap)
        if(NS4){
            this.childX=this.container.left+horoffset
            this.childY=(this.pageY+this.clip.top)+t_childOffset
        }
        else{
            this.childX=this.container.style.pixelLeft+horoffset
            this.childY=this.offsetTop+this.container.style.pixelTop+t_childOffset+t_borWid
        }
        this.child.moveTo(this.childX,this.childY)
        this.child.t_keepInWindow()
        this.container.hasChildVisible=true
        this.container.visibleChild=this.child
        this.child.t_showIt(true)
    }
}
function t_itemOut(){
    if(IE4){
        theEvent=window.event
        if(theEvent.srcElement.contains(theEvent.toElement))return
    }
    else
        if(!t_isOverM)
            t_allTimer=setTimeout("t_curM.t_hideTree()",10)
}
function moveTo(xPos,yPos){
    this.style.pixelLeft=xPos
    this.style.pixelTop=yPos
}
function t_showIt(on){
    if(NS4){
        this.visibility=(on)?"show":"hide"
        if(this.currentItem){
            this.currentItem.bgColor=this.menuBGColor
            if(t_NSfontOver)
                with(this.currentItem.txtLyr.document){
                    write(this.currentItem.t_htmStr)
                    close()
                }
        }
    }
    else{
        this.style.visibility=(on)?"visible":"hidden"
        if(this.currentItem)
            with(this.currentItem.style){
                backgroundColor=this.menuBGColor
                color=this.menuFontColor
            }
    }
    this.currentItem=null
}

function t_keepInWindow(){
    scrBars=(NS4)?20:0
    botScrBar=scrBars
    rtScrBar=scrBars
    if(NS4){
        winRight=(window.pageXoffset+window.innerWidth)-rtScrBar
        rightPos=this.left+this.t_MWid
        if(rightPos>winRight)
            if(this.hasParent){
                parentLeft=this.t_parM.left
                newLeft=((parentLeft-this.t_MWid)+this.t_childOverlap)
                this.left=newLeft
            }
            else{
                dif=rightPos-winRight
                this.left-=dif
            }
        winBot=(window.pageYoffset+window.innerHeight)-botScrBar
        botPos=this.top+this.fullHeight
        if(botPos>winBot){
            dif=botPos-winBot
            this.top-=dif
        }
        winLeft=window.pageXoffset
        leftPos=this.left
        if(leftPos<winLeft)
            if(this.hasParent){
                parentLeft=this.t_parM.left
                newLeft=((parentLeft+this.t_MWid)-this.t_childOverlap)
                this.left=newLeft
            }
            else
                this.left=5
    }
    else{
        winRight=(window.document.body.scrollLeft+window.document.body.clientWidth)-rtScrBar
        rightPos=this.style.pixelLeft+this.t_MWid
        if(rightPos>winRight)
            if(this.hasParent){
                parentLeft=this.t_parM.style.pixelLeft
                newLeft=((parentLeft-this.t_MWid)+this.t_childOverlap)
                this.style.pixelLeft=newLeft
            }
            else{
                dif=rightPos-winRight
                this.style.pixelLeft-=dif
            }
        winBot=(window.document.body.scrollTop+window.document.body.clientHeight)-botScrBar
        botPos=this.style.pixelTop+this.fullHeight
        if(botPos>winBot){
            dif=botPos-winBot
            this.style.pixelTop-=dif
        }
        winLeft=window.document.body.scrollLeft
        leftPos=this.style.pixelLeft
        if(leftPos<winLeft)
            if(this.hasParent){
                parentLeft=this.t_parM.style.pixelLeft
                newLeft=((parentLeft+this.t_MWid)-this.t_childOverlap)
                this.style.pixelLeft=newLeft
            }
            else
                this.style.pixelLeft=5
    }
}
function t_linkIt(){
    if(this.linkText.indexOf("java script:")!=-1)eval(this.linkText)
    else window.top.location.href=this.linkText
}
function t_popDown(menuName){
    if(!t_isLoaded||!t_areCreated)return
    whichEl=eval("elMenu"+menuName)
    whichEl.isOn=false
    whichEl.t_hideTop()
}
function t_hideAll(){
    for(i=1;i<t_Count;i++){
        temp=eval("elMenu"+i+".startChild")
        temp.isOn=false
        if(temp.hasChildVisible)temp.t_hideChildren()
        temp.t_showIt(false)
    }
}
function t_hideTree(){
    t_allTimer=null
    if(t_isOverM)return
    if(this.hasChildVisible)this.t_hideChildren()
    this.t_hidePar()
}
function t_hideTop(){
    whichTop=this
    this.hideTimer=setTimeout("if(whichTop.t_hideSelf)whichTop.t_hideSelf()",t_mSecsVis)
}
function t_hideSelf(){
    this.hideTimer=null
    if(!this.isOn&&!t_isOverM){
        this.t_showIt(false)
    }
    if(IE4&&(document.all.bannertable1||document.all.t_hidediv1)){
        menuShows=false
        for(i=1;i<t_Count;i++){
            temp=eval("elMenu"+i+".startChild")
            if(temp.style.visibility=="visible"){
                menuShows=true
                break
            }
        }
        if(!menuShows)(true)
    }
}
function t_hidePar(){
    t_tempM=this
    while(t_tempM.hasParent){
        t_tempM.t_showIt(false)
        t_tempM.t_parM.isOn=false       
        t_tempM=t_tempM.t_parM
    }
    t_tempM.t_hideTop()
}
function t_hideChildren(item){
    t_tempM=this.visibleChild
    while(t_tempM.hasChildVisible){
        t_tempM.visibleChild.t_showIt(false)
        t_tempM.hasChildVisible=false
        t_tempM=t_tempM.visibleChild
    }
    if(!this.isOn||!item.t_hasMore||this.visibleChild!=this.child){
        this.visibleChild.t_showIt(false)
        this.hasChildVisible=false
    }
}
function t_cancelSelect(){return false}
function t_reDo(){
    if(NS4&&(navigator.appVersion.slice(0,3)!="4.0")){
        if(t_offsetW==t_offset())return;
        t_initVars();
        t_NSresized=true;
        window.location.reload();
    }
    else
        t_offsetW=t_offset()
}
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester