﻿var tm_cms_cms_icons_selected_id="";
function tmCmsShowHideCmsIcons(id)
{
    try{
        //var
        var iconrow;
        //old selection
        if(tm_cms_cms_icons_selected_id!=''){
            try{
                iconrow = document.getElementById(tm_cms_cms_icons_selected_id);
                iconrow.style.height='0px';
                iconrow.style.visibility='hidden';
                iconrow.style.overflow='hidden';
            }catch(ex1){
                tm_cms_cms_icons_selected_id='';
            }
        }
        //new selection        
        iconrow = document.getElementById('cms' + id);        
        tm_cms_cms_icons_selected_id='cms' + id;
        iconrow.style.height='auto';
        iconrow.style.visibility='visible';
        iconrow.style.overflow='auto';
    } 
    catch(ex){}
}
function tm_cms_cms_showIcons_fetchContent(csid,ccid,cclang)
{
    try {        
        cid=ccid; //update global page variable for saving the content (see PageBody.ascx)
        var html=new CAjax().loadAjaxText('UControls/Pagebody/Handlers/LoadContent.ashx?sid=' + csid + '&cid=' + ccid + '&clang=' + cclang, '', true, false);
        setContent(html);
    }
    catch(e){alert(e);}
}