var script = document.getElementById('moveadpost');
var adcontain = document.createElement('div');
adcontain.className = 'post-ad';
for( var i = 0; i < script.parentNode.childNodes.length; i++ ){
    if( !(script.parentNode.childNodes[ i ].id == 'moveadpost') )
        adcontain.appendChild( script.parentNode.childNodes[ i ] );
}
var alpha = document.getElementById('alpha-inner');
var postEntry;
for( var i = 0; i < alpha.childNodes.length; i++ ){
    if( alpha.childNodes[ i ].tagName == 'DIV' && alpha.childNodes[ i ].id.substr(0,6) == 'entry-'){
        if( alpha.childNodes[ i + 1 ] && alpha.childNodes[ i + 1 ].tagName )
            postEntry = alpha.childNodes[ i + 1 ];
        else if( alpha.childNodes[ i + 2 ] && alpha.childNodes[ i + 2 ].tagName )
            postEntry = alpha.childNodes[ i + 2 ];
        break;
    }
}

script.parentNode.parentNode.parentNode.parentNode.parentNode.style.display = 'none';

if( postEntry) alpha.insertBefore(adcontain, postEntry);
else alpha.appendChild(adcontain);