﻿function showArticle(obj)
{
    var divId="ctl00_uc_leftMenu1_"+obj.id.replace("li","div");
    var divObject=document.getElementById(divId);
    divObject.style.display="";
    
    var position=GetObjPos(obj);
    divObject.style.top=(position.y)+"px";
    var ua = window.navigator.userAgent; 
    if(ua.indexOf("Firefox")>-1||ua.indexOf("Safari")>-1||ua.indexOf("MSIE 6.0")>-1||navigator.userAgent.indexOf("MSIE 8.0")>-1)
    {
        divObject.style.left=179+"px";
    }
//    divObject.style.left=(position.x+95)+"px";
}

function hideArticle(obj)
{
    if(obj.id.indexOf("ctl00_uc_leftMenu1_")>-1)
    {
        obj.style.display="none";
    }
    else
    {
        var divId="ctl00_uc_leftMenu1_"+obj.id.replace("li","div");
        var divObject=document.getElementById(divId);
        divObject.style.display="none";
    }
}

function keepArticleShow(obj)
{
    obj.style.display="";
}

function CPos(x, y)
{
    this.x = x;
    this.y = y;
}

function GetObjPos(ATarget)
{
    var target = ATarget;
    var pos = new CPos(target.offsetLeft, target.offsetTop);
    
    var target = target.offsetParent;
    while (target)
    {
        pos.x += target.offsetLeft;
        pos.y += target.offsetTop;
        
        target = target.offsetParent
    }
    
    return pos;
} 
