function gambar() {
    var d = new Date();
    var baru = d.getSeconds();
    var alamat = "wp-content/themes/al-amien_v2/images/";
    if (baru >= 0 && baru < 10) {
        document.getElementById('galeri1').style.background='url('+alamat+'satu.gif) no-repeat';
        document.getElementById('galeri2').style.background='url('+alamat+'slogan1.gif) no-repeat';
    } else if (baru >= 10 && baru < 20) {
        document.getElementById('galeri1').style.background='url('+alamat+'dua.gif) no-repeat';
        document.getElementById('galeri2').style.background='url('+alamat+'slogan2.gif) no-repeat';
    } else if (baru >= 20 && baru < 30) {
        document.getElementById('galeri1').style.background='url('+alamat+'tiga.gif) no-repeat';
        document.getElementById('galeri2').style.background='url('+alamat+'slogan3.gif) no-repeat';
    } else if (baru >= 30 && baru < 40) {
        document.getElementById('galeri1').style.background='url('+alamat+'empat.gif) no-repeat';
        document.getElementById('galeri2').style.background='url('+alamat+'slogan1.gif) no-repeat';
    } else if (baru >= 40 && baru < 50) {
        document.getElementById('galeri1').style.background='url('+alamat+'lima.gif) no-repeat';
        document.getElementById('galeri2').style.background='url('+alamat+'slogan2.gif) no-repeat';
    } else {
        document.getElementById('galeri1').style.background='url('+alamat+'enam.gif) no-repeat';
        document.getElementById('galeri2').style.background='url('+alamat+'slogan3.gif) no-repeat';
    }

// fungsi penempatan di tengah halaman
var myWidth = 0, myHeight = 0;
var ukuran = 1024;
if( typeof( window.innerWidth ) == 'number' )
{
//Non-IE
myWidth = window.innerWidth;
myHeight = window.innerHeight;
}
else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
{
//IE 6+ in 'standards compliant mode'
myWidth = document.documentElement.clientWidth;
myHeight = document.documentElement.clientHeight;
}
else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
{
//IE 4 compatible
myWidth = document.body.clientWidth;
myHeight = document.body.clientHeight;
}

if (myWidth > 1000) {
  ukuran=(myWidth-980)/2;
}
//document.getElementById('tengah').

}
