

function moveAd (cuid) {
  var pos = document.getElementById("adPlacement"+cuid);
  var ad = document.getElementById("adFactory"+cuid);
  if (pos && ad) {
    // setting height of sorrounding div to "auto" to enable expanding ads
    var body = ad.parentNode;
    body.removeChild (ad);
    pos.innerHTML='';
    pos.appendChild (ad);
  }
}

