
function ImageTransition(iTransitType, strTransitParam, frameHost, strIDPreamble, idxStart, idxEnd, fOut, cHalfSecs, FuncAtEnd)
{
    if (top.globalTransit.clock == null)
    {
        top.globalTransit.idxStart=idxStart;
        top.globalTransit.idxEnd=idxEnd;
        top.globalTransit.strIDPreamble=strIDPreamble;
        top.globalTransit.frameHost=frameHost;
        top.globalTransit.iTransitType=iTransitType;
        top.globalTransit.strTransitParam=strTransitParam;
        top.globalTransit.fOut=fOut;
        top.globalTransit.lCount=1;
        top.globalTransit.FuncEnd=FuncAtEnd;
        top.globalTransit.fKill=false;

        var strObjName=top.globalTransit.strIDPreamble;
        if (idxStart >= 0)
            strObjName=strObjName+(""+idxStart);
        top.globalTransit.obj=top.globalTransit.frameHost.document.getElementById(strObjName);
        if (top.globalTransit.obj==null)
            return;

        if (iTransitType==1)
        {
            if (typeof top.globalTransit.obj.style.opacity != 'undefined')
                top.globalTransit.type = 'e_w3c';
            else if (typeof top.globalTransit.obj.style.MozOpacity != 'undefined')
                top.globalTransit.type = 'e_moz';
            else if (typeof top.globalTransit.obj.style.KhtmlOpacity != 'undefined')
                top.globalTransit.type = 'e_khtml';
            else if (typeof top.globalTransit.obj.filters == 'object')
                top.globalTransit.type = (top.globalTransit.obj.filters.length > 0 && typeof top.globalTransit.obj.filters.alpha == 'object' && typeof top.globalTransit.obj.filters.alpha.opacity == 'number') ? 'e_ie' : 'e_none';
            else
                return;
		
            if (fOut == false)
                top.globalTransit.lCount=0.1;
			
            top.globalTransit.clock=setInterval('FadeStep()', (parseInt(cHalfSecs, 10) * 500)/10);
        }
    }
};





function FadeStep()
{
    if (top.globalTransit.fKill)
    {
        clearInterval(top.globalTransit.clock);
        top.globalTransit.clock=null;

        if (top.globalTransit.FuncEnd!=null)
            top.globalTransit.FuncEnd();
    }
    else
    {
        top.globalTransit.lCount = (top.globalTransit.fOut) ? top.globalTransit.lCount * 0.60 : (top.globalTransit.lCount * (1/0.60)); 

        if (top.globalTransit.fOut==true)
        {
            if (top.globalTransit.lCount < 0.01)
            {
                top.globalTransit.lCount=0;
                top.globalTransit.fKill=true;
            }
        }
        else if (top.globalTransit.fOut==false)
        {
            if (top.globalTransit.lCount > 0.95)
            {
                top.globalTransit.lCount = 1;
                top.globalTransit.fKill=true;
            }
        }

        var i;
        var obj;
        var strObjName;
        for (i=top.globalTransit.idxStart; i<=top.globalTransit.idxEnd; i++)
        {
            strObjName=top.globalTransit.strIDPreamble;
            if (top.globalTransit.idxStart >= 0)
                strObjName=strObjName+(""+i);
            obj=top.globalTransit.frameHost.document.getElementById(strObjName);

            if (obj!=null)
            {
                switch(top.globalTransit.type)
                {
                    case 'e_ie':    obj.filters.alpha.opacity = top.globalTransit.lCount * 100; break;
                    case 'e_khtml': obj.style.KhtmlOpacity = top.globalTransit.lCount; break;
                    case 'e_moz':   obj.style.MozOpacity = (top.globalTransit.lCount == 1 ? 0.9999999 : top.globalTransit.lCount); break;
                    default:        obj.style.opacity = (top.globalTransit.lCount == 1 ? 0.9999999 : top.globalTransit.lCount);
                }
            }
        }
    }
};




function BlockDragStart() {return false;}
function BlockSelectStart() {return false;}
function BlockContextMenu() {return false;}
function onIELegacyClickBlock() {if (event.button==2) BlockContextMenu();}
function onNetscapeLegacyClickBlock(evt) {if ((document.layers || document.getElementById) && (document.all==0)) {if ((evt.which==2) || (evt.which==3))BlockContextMenu();}}

function InstallBlock()
{
    if (document.layers==0) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=onNetscapeLegacyClickBlock;}
    else if (document.all && (document.getElementById==0)) document.onmousedown=onIELegacyClickBlock;
    document.oncontextmenu=BlockContextMenu;
    document.ondragstart=BlockDragStart;
    document.onselectstart=BlockSelectStart;
}





