﻿function hideParentOf(ctlId, upLevel) {

    var target = document.getElementById(ctlId);

    if (target == null) return;

    //alert(ctlId + "-" + upLevel);
    
    for (var i = 0; i < upLevel; i++) {
    
        target = target.parentNode;
        if (target == null) return;
    }

    target.style.display = "none";
}

function PositionEditor(part) {
  if (document.getElementById('ctl00_cwpEditorZone') != null) {
     var EditorZoneContainer = document.getElementById('WebPart_' + part +'_EditZone')
         EditorZoneContainer.appendChild(document.getElementById('ctl00_cwpEditorZone'));
  }
} 
