
function init_hphl() {
    var obj = getObjById("hphl");
    var lis = obj.getElementsByTagName("li");
    var a = new Array();
    for(var i=0;i<lis.length;i++)
    {
        if( lis[i].parentNode.parentNode == obj)
        {
            var o = lis[i];
            o.style.position="absolute";
            o.style.top = 0;
            if(a.length>=1)
            {
                o.style.top = "-5000px";
            }
            o.style.left = 0;
            o.style.zIndex = (999 - i);
            a[a.length] =o;
            
        }
    }
    if(a.length<2){return;};
    
    obj.stop=false;
    addEvent(obj ,"mouseover",function(){obj.stop=true;});
    addEvent(obj ,"mouseout",function(){obj.stop=false;})
    
    obj.timer = setTimeout("void(0)",0);
    var rotator = function()
    {
        clearTimeout(obj.timer );
        var y = parseInt(a[0].style.top);
        var ey = 0-a[0].offsetHeight;
        if( y > ey && !obj.stop)
        {
            a[0].style.top = (y-1) + "px";
            a[1].style.top = (y-1) + a[0].offsetHeight + "px";
            obj.timer  = setTimeout(rotator,0);
        }
        else
        {
            if(obj.stop)
            {
                clearTimeout(obj.timer );
                a[0].style.top =  "0px";
                a[1].style.top =  "-5000px";
                obj.timer  = setTimeout(rotator,500);                
            }
            else
            {
                a[0].style.top = "-5000px";
                a[1].style.top = 0;                
                var first = a[0];                
                a = a.slice(1,a.length);
                a[a.length] = first;
                var duration = 3;
                if( obj.getAttribute("duration") && !isNaN(obj.getAttribute("duration"))     )
                {
                    duration = parseInt(obj.getAttribute("duration") );
                }
                duration = Math.max(3,duration);
                obj.timer  = setTimeout(rotator,duration * 1000);    
            }
        }
    }
    obj.timer  = setTimeout(rotator,100);
}
/* delegate appropriate functions */
if($id('mf')){chkmf.init($id('mffrm'));}
if($id('edmu')){chkedm.init($id('edmufrm'));}
if($id('fd')){chkfd.init($id('fdfrm'));}
if($id("bbcs")) {bbc.init($id('bbcs'));}
if($id("bbca")) {bbc.init($id('bbca'));}
if($id("adr")) {promotion_rotator_init();}
//if($id('cb')) {cb.init($id('cb'));}
//if($id('hpnr')) {hpnr.init($id('hpnr'));}
//if($id('hpvd')) {hpvd.init($id('hpvd'));}
if($id('hphl')) {init_hphl();}
//if($id('song_bb_international')) {song_bb.init($id('song_bb_international'));}
//if($id('song_bb_chinese')) {song_bb.init($id('song_bb_chinese'));}
//if($id('song_bb_asia')) {song_bb.init($id('song_bb_asia'));}
//if($id('song_bb_classic_jazz')) {song_bb.init($id('song_bb_classic_jazz'));}
//if($id('song_bb_soundtrack')) {song_bb.init($id('song_bb_soundtrack'));}
//if($id('song_bb_world_newage')) {song_bb.init($id('song_bb_world_newage'));}

