function moveAd(cuid) {
    var pos = document.getElementById("ad_" + cuid);
    var ad = document.getElementById("tmpad_" + cuid);
    if (pos && ad) {
        var body = ad.parentNode;
        body.removeChild(ad);
        pos.innerHTML = '';
        pos.appendChild(ad);
        ad.style.display = 'block';
    }
}

function moveAd_nf(cuid) {
    var pos = document.getElementById("ad_nf_" + cuid);
    var ad = document.getElementById("tmpad_nf_" + cuid);
    if (pos && ad) {
        var body = ad.parentNode;
        body.removeChild(ad);
        pos.innerHTML = '';
        pos.appendChild(ad);
        ad.style.display = 'block';
    }
}
