function resizeRightBox() {
    var hMain = document.getElementById("divMain").offsetHeight
        var hRightSpacer = document.getElementById("divRightSpacer").offsetHeight
        var hRightHeader = document.getElementById("divRightHeader").offsetHeight

        var hRight = hMain - hRightSpacer - 20
        document.getElementById("divRight").style.height = hRight + "px"

        var hRightEvents = hRight - hRightHeader
        document.getElementById("divRightContent").style.height = hRightEvents + "px"

        var contentIFrame = document.getElementById("iframeContent")
        var rightContent = document.getElementById("divRightContent")
        if (contentIFrame == null) {
            //create it
            var iframehtml = "" +
                "<iframe id=\"iframeContent\" name=\"iframeContent\" src=\"" + rightBoxURL + "\" style=\"border-width:0;\" frameborder=\"0\" scrolling=\"no\"></iframe>"
                rightContent.innerHTML += iframehtml
            contentIFrame = document.getElementById("iframeContent")

        }
    if (contentIFrame != null) {
        contentIFrame.style.height = (rightContent.offsetHeight - 3) + "px"
            contentIFrame.style.width = "100%"
            if (window["iframeContent"].setHeight)
                window["iframeContent"].setHeight()
    }
}

function getContentHeight() {
    return document.getElementById("iframeContent").offsetHeight
}



    function toggleFullPopup(itemIndex) {
        var itemDiv = window["iframeContent"].document.getElementById("item" + itemIndex)
        var popupDivObj = document.getElementById("popupDiv")
        var popupDivInsertObj = document.getElementById("popupDivInsert")

        var insertHTML = itemDiv.innerHTML 
//        insertHTML = insertHTML.replace("display: none","")
        insertHTML = "<a id=\"ppDivTop\"></a><br />" + insertHTML
        popupDivInsertObj.innerHTML = insertHTML
        var itemFullDiv = document.getElementById("itemfull" + itemIndex);
        if (itemFullDiv)
            itemFullDiv.style.display = "block"

        popupDivObj.style.visibility = "hidden"
        popupDivObj.style.display = "block"

        var docWidth = document.documentElement.clientWidth
        var pDivWidth = popupDivObj.clientWidth
        var newLeft = ((docWidth/2) - (pDivWidth/2)) + "px"

        popupDivObj.style.left = newLeft
        popupDivObj.style.top = "200px"
        popupDivObj.style.visibility = "visible"
        document.getElementById("ppDivTop").scrollIntoView();

    }

    function closeFullPopup() {
        var popupDivObj = document.getElementById("popupDiv")
        var popupDivInsertObj = document.getElementById("popupDivInsert")
        popupDivObj.style.display = "none"
        popupDivInsertObj.innerHTML = ""
    }

function initPopupHTML() {
/*
<div id="popupDiv" style="overflow:visible; display:none; position:absolute; width:400px; height: 250px; background: #444444; padding: 10px; border: 1px solid black">
<div id="popupDivInsert" class="item" style="overflow:auto; height: 200px"></div>
<a href="javascript:closeFullPopup()" style="color:white;text-align:center;display:block;">[Close]</a>
</div>
*/

var pHTML = "<div id=\"popupDiv\" style=\"overflow:visible; text-align:left; display:none; position:absolute; width:400px; height: 230px; background: #444444; padding: 10px; border: 1px solid black\">" + 
            "<div id=\"popupDivInsert\" class=\"item\" style=\"overflow:auto; height: 200px\"></div>" + 
            "<a href=\"javascript:closeFullPopup()\" style=\"color:white;text-align:center;display:block;\">[Close]</a>" + 
            "</div>"

document.writeln(pHTML)
}

initPopupHTML()

