SoFunction
Updated on 2025-04-14

Imitation DVBBS drop-down menu effect jb51 corrects without error


//Pop-it menu- By Dynamic Drive - Modified by Wbird
//For full source code and more DHTML scripts, visit 
//This credit MUST stay intact for use
var menuOffX=0//The distance from the leftmost end of the menu to the connected text
var menuOffY=18//The distance between the menu and the top of the connection text
var vBobjects = new Array();
var fo_shadows=new Array();
////No need to edit beyond here
var ie4=&&("Opera")==-1
var ns6=&&!
var ns4=

function MM_findObj(n, d) {
var p,i,x; if(!d) d=document; if((p=("?"))>0&&) {
d=[(p+1)].document; n=(0,p);}

if(!(x=d[n])&&) x=[n]; for (i=0;!x&&i<;i++) x=[n];

for(i=0;!x&&&&i<;i++) x=MM_findObj(n,);

if(!x && ) x=(n); return x;



function fetch_object(idname, forcefetch)
{
if (typeof(vBobjects[idname]) == "undefined")
{
vBobjects[idname] = MM_findObj(idname);
}
return vBobjects[idname];
}
//showmenu vmenu: content, allowed to be empty, vmenuobj DIV data ID, MOD 0=Close browser adaptation, used for layout navigation menu
function showmenu(e,vmenu,vmenuobj,mod){
    if (!&&!&&!)
        return
    var which=vmenu;
    if (vmenuobj)
    {
        var MenuObj = fetch_object(vmenuobj);
        if (MenuObj)
        {
            which = ;
        }
    }
    if (!which)
    {
        return
    }
    clearhidemenu();
    ie_clearshadow();
    menuobj=ie4?  : ns6? ("popmenu") : ns4?  : ""
    =(ie4||ns6)?  : menuobj
    if (ie4||ns6)
        =which
    else{
        ('<layer name=gui bgcolor="#E6E6E6" width="165" onmouseover="clearhidemenu()" onmouseout="hidemenu()">'+which+'</layer>')
        ()
    }
    =(ie4||ns6)?  : 
    =(ie4||ns6)?  : 
    eventX=ie4?  : ns6?  : 
    eventY=ie4?  : ns6?  : 
    var rightedge=ie4? -eventX : -eventX
    var bottomedge=ie4? -eventY : -eventY
    var getlength
        if (rightedge<){
            getlength=ie4? ++menuOffX : ns6? + : 
        }else{
            getlength=ie4? ie_x()+menuOffX : ns6? +eventX : eventX
        }
        =getlength+'px'
        if (bottomedge<&&mod!=0){
            getlength=ie4? ++menuOffY-23 : ns6? +-10 : 
        }    else{
            getlength=ie4? ie_y()+menuOffY : ns6? +eventY+10 : eventY
        }
    =getlength+'px'
    ="visible"
    ie_dropshadow(menuobj,"#999999",3)
    return false
}

function ie_y(e){  
    var t=;  
    while(e=){  
        t+=;  
    }  
    return t;  
}  
function ie_x(e){  
    var l=;  
    while(e=){  
        l+=;  
    }  
    return l;  
}  
function ie_dropshadow(el, color, size)
{
    var i;
    for (i=size; i>0; i--)
    {
        var rect = ('div');
        var rs = 
         = 'absolute';
         = ( + i) + 'px';
         = ( + i) + 'px';
         =  + 'px';
         =  + 'px';
         =  - i;
         = color;
        var opacity = 1 - i / (i + 1);
         = 'alpha(opacity=' + (100 * opacity) + ')';
        //('afterEnd', rect);
        fo_shadows[fo_shadows.length] = rect;
    }
}
function ie_clearshadow()
{
    for(var i=0;i<fo_shadows.length;i++)
    {
        if (fo_shadows[i])
            fo_shadows[i].="none"
    }
    fo_shadows=new Array();
}
function contains_ns6(a, b) {
    while ()
        if ((b = ) == a)
            return true;
    return false;
}

function hidemenu(){
    if ()
        =(ie4||ns6)? "hidden" : "hide"
    ie_clearshadow()
}

function dynamichide(e){
    if (ie4&&!())
        hidemenu()
    else if (ns6&&!= && !contains_ns6(, ))
        hidemenu()
}

function delayhidemenu(){
    if (ie4||ns6||ns4)
        delayhide=setTimeout("hidemenu()",500)
}

function clearhidemenu(){
    if ()
        clearTimeout(delayhide)
}
function highlightmenu(e,state){
    if ()
        source_el=
    else if ()
        source_el=
    if (source_el.className=="menuitems"){
        source_el.id=(state=="on")? "mouseoverstyle" : ""
    }
    else{
        while(source_el.id!="popmenu"){
            source_el=? source_el.parentNode : source_el.parentElement
            if (source_el.className=="menuitems"){
                source_el.id=(state=="on")? "mouseoverstyle" : ""
            }
        }
    }
}

if (ie4||ns6)
=hidemenu