// JavaScript Document
//will make the target element the same height as the copy from element + or - the offset   

//use 0 for the offset if you want them to be the exact same height

function makeSameHeight('midcon', 'contentcon', 0)

{

    var TargetHeight = GetElementHeight('midcon')

    var CopyHeight = GetElementHeight('contentcon')

    if (TargetHeight && CopyHeight)

    {

        //only change the target height if it is smaller than the copy height

        if ( (TargetHeight + offset) < CopyHeight)

        {

            SetElementHeight('midcon', CopyHeight + offset);

        }

    }

}

 

//set the height in pixels

function setElementHeight(ElementID, height)

{

    var e = document.getElementById(ElementID)

    if (e)

    {

        e.style.height = height + 'px';

    }

}

 

 

//get the height in pixels

function getElementHeight(ElementID)

{

    var e = document.getElementById(ElementID)

    if (e)

    {

        return e.offsetHeight;

    }

    else

    {

        return false;

    }

}


//will make the target element the same height as the copy from element + or - the offset   

//use 0 for the offset if you want them to be the exact same height

/*function MakeSameHeight(ElementIDTarget, ElementIDCopyFrom, offset)

{

    var TargetHeight = GetElementHeight(ElementIDTarget)

    var CopyHeight = GetElementHeight(ElementIDCopyFrom)

    if (TargetHeight && CopyHeight)

    {

        //only change the target height if it is smaller than the copy height

        if ( (TargetHeight + offset) < CopyHeight)

        {

            SetElementHeight(ElementIDTarget, CopyHeight + offset);

        }

    }

}

 

//set the height in pixels

function SetElementHeight(ElementID, height)

{

    var e = document.getElementById(ElementID)

    if (e)

    {

        e.style.height = height + 'px';

    }

}

 

 

//get the height in pixels

function GetElementHeight(ElementID)

{

    var e = document.getElementById(ElementID)

    if (e)

    {

        return e.offsetHeight;

    }

    else

    {

        return false;

    }

}*/
