var myWidth;
var myHeight;

function bw(){
    if( typeof( window.innerWidth ) == 'number' ) {
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;

    } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {

        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;

    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {

        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
}

var pos_=0;
var speed_=1;
function donyul(){
    bw();
    pos_+=speed_;
    document.getElementById("nyulid").style.left=pos_;
    document.getElementById("nyulid").style.bottom=0;
    document.getElementById("nyulid").style.visibility="visible";
    if(pos_>(myWidth-140))
        pos_=0;
    window.setTimeout("donyul();",1);
}

