function RadsplitterSetHeight()//
{
    var gsRadSplitterPrefix = "RAD_SPLITTER_";
    var URLpath = document.URL;
    var pagename = URLpath.substring(URLpath.lastIndexOf('/') + 1);
    top.jsLog("&nbsp;&nbsp; Resizing RadSplitter - " + pagename);

    if (document.getElementsByClassName)//  FireFox Code
    {
        var arrRadSplitters = document.getElementsByClassName("RadSplitter");


        for (var i = 0; i < arrRadSplitters.length; i++)//
        {
            var sRadSplitterName = arrRadSplitters[i].id.replace(gsRadSplitterPrefix, "");
            //alert(sRadSplitterName + " -in- " + document.title);
            top.jsLog("&nbsp;&nbsp;&nbsp;&nbsp;FF RadSplitter- " + sRadSplitterName);
            var objSplitter = $find(sRadSplitterName);
            //alert($find(sRadSplitterName) + " -in- " + document.title);
            FindNewHeightAndSet_RadPane(objSplitter);
            //FindNewHeightAndSet_RadPane(arrRadSplitters[i].id.replace(gsRadSplitterPrefix, ""));
        }
    }
    else////  IE Code
    {
        var arrTables = document.getElementsByTagName("table");
        var URLpath = document.URL;
        var pagename = URLpath.substring(URLpath.lastIndexOf('/') + 1);
        for (var i = 0; i < arrTables.length; i++)//
        {
            if (arrTables[i].className.indexOf("RadSplitter") > -1)//
            {
                var sRadSplitterName = arrTables[i].id.replace(gsRadSplitterPrefix, "");
                var objSplitter = $find(sRadSplitterName);
                top.jsLog("&nbsp;&nbsp;&nbsp;&nbsp;IE RadSplitter- " + sRadSplitterName);
                //alert($find(sRadSplitterName) + " named " + sRadSplitterName +  " -in- " + document.title);
                FindNewHeightAndSet_RadPane(objSplitter);
            }
        }
    }
}
function FindNewHeightAndSet_RadPane(elementRadSplitter)//
{
    /*
    var showAlert = false;

    if (document.title == "Accreditation")//
    {
    showAlert = true;
    }
    */
    var splitter_Main = elementRadSplitter;
    //  alert(sRadSplitterId + " >>> " + "splitter_Main = " + splitter_Main);
    var iMaxPaneHeight = 500; //will hold the height of the highest Panes
    var arrPanes = splitter_Main.getPanes(); //get the Panes in the RadSplitter
    for (var i = 0; i < arrPanes.length; i++)//loop thru arrPanes
    {
        arrPanes[i].getContentElement().style.height = ""; //set DivControlElement height to 'auto' instead of it's fixed value

        //now see if there is an iframe in the RadPane's DivContentElement (meaning it has a ContentUrl)
        var arrIframes = arrPanes[i].getContentElement().getElementsByTagName("iframe"); //get possible iframes
        if (arrIframes.length > 0)//there is an iframe (meaning it has a ContentUrl, use the first iframe)
        {
            arrIframes[0].style.height = "0px"; //hide the iframes while we check the newly adjusted div heights

            //check for a new iMaxPaneHeight with the DivContentElement's iframe's content
            //var elementDocument = (arrIframes[0].contentDocument ? arrIframes[0].contentDocument : arrIframes[0].document);
            for (var j = 0; j < window.frames.length; j++)//loop thru window.frames
            {
                if (window.frames[j].frameElement == arrIframes[0])//found RadPane iframe in window.frames
                {//check this frame-body-scrollheight for possible new max


                    //top.jsLog("NUm RadPane IMages- " + window.frames[j].document.images.length);
                    for (iImg = 0; iImg < window.frames[j].document.images.length; iImg++) {
                        //top.jsLog("NUm RadPane IMages- " + window.frames[j].document.images[iImg].src + " - " + window.frames[j].document.images[iImg].height);
                    }
                    var iA = parseInt(iMaxPaneHeight);
                    var iB = parseInt(window.frames[j].document.body.scrollHeight);
                    iMaxPaneHeight = Math.max(iB, iA);
                    /*              alert(iB);
                    alert(window.frames[j].document.body.scrollHeight);
                    alert((parseInt(window.frames[j].document.body.scrollHeight) == window.frames[j].document.body.scrollHeight));
                    if (iB > iMaxPaneHeight) //
                    {
                    iMaxPaneHeight = iB;
                    //            alert("dan " + iB);
                    }
                    //      alert(iMaxPaneHeight);
                    
                    //alert(iMaxPaneHeight + " ---- " + window.frames[j].document.body.scrollHeight + " !!!! " + window.frames[j].document.title);
                    */
                    break;
                }
            }
        }
    }

    for (var i = 0; i < arrPanes.length; i++)//loop thru arrPanes
    {
        //check for a new iMaxPaneHeight with the DivContentElement
        iMaxPaneHeight = Math.max(iMaxPaneHeight, arrPanes[i].getContentElement().scrollHeight);



    }
    iMaxPaneHeight = iMaxPaneHeight + 1;
    //we now have set our iMaxPaneHeight, so update the Panes to this value
    for (var i = 0; i < arrPanes.length; i++)//loop thru arrPanes
    {
        arrPanes[i].set_height(iMaxPaneHeight); //set Pane height

        //now see if there is an iframe in the RadPane's DivContentElement (meaning it has a ContentUrl)
        var arrIframes = arrPanes[i].getContentElement().getElementsByTagName("iframe"); //get possible iframes
        if (arrIframes.length > 0)//there is an iframe (meaning it has a ContentUrl, use the first iframe)
        {
            arrIframes[0].style.height = iMaxPaneHeight + "px"; //set Pane height
            top.jsLog("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RadPane Setting Height - " + iMaxPaneHeight + "px");

            //   alert(arrIframes[0].style.height);
        }
    }
    //set splitter height
    if (iMaxPaneHeight < 200)
    { iMaxPaneHeight = 750; }
    else {
        iMaxPaneHeight += 50;
    }
    splitter_Main.set_height(iMaxPaneHeight);
    top.jsLog("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RadSplitter Setting Height - " + iMaxPaneHeight + "px");
    //alert(iMaxPaneHeight + " final height ---- " + window.frames[j].document.title);
}
