var leftPos = "10px";
//opens a shareobject window with left position manipulated to its parent
function openShare(aObj){    
    if(aObj != null && aObj != undefined ){        
        document.getElementById("shareDiv").style.left = (getX(aObj)-230)+"px";
        leftPos = (getX(aObj)-230)+"px";
    } else {        
        document.getElementById("shareDiv").style.left = leftPos;        
    }
    document.getElementById("shareDiv").style.display = "block";    
}
//closes a shareobject window
function closeShare(){
    document.getElementById("shareDiv").style.display = "none";
}

//generic method to obtain the x position of an element
function getX( oElement )
{
    var iReturnValue = 0;
    while( oElement != null ) {
        iReturnValue += oElement.offsetLeft;
        oElement = oElement.offsetParent;
    }
    return iReturnValue;
}