﻿
var timer;
var step = 0;
function startup()
{
  timer = setInterval("update()",100);
}

function pixel(item)
{
    return String(item) + "px";
}

function update()
{
    back1 =  document.getElementById("background_motion1");
    back2 =  document.getElementById("background_motion2");
    container2 =  document.getElementById("container");
  
    back1.style.marginLeft = pixel(step);
    back2.style.marginTop = pixel(step);
    
    back1.style.width = pixel(document.body.clientWidth + 10 - step);
    back1.style.height = pixel(document.body.clientHeight + 20);
    back2.style.width = pixel(document.body.clientWidth + 10);
     back2.style.height = pixel(container2.clientHeight + 20 - step);
    step -= 1;
    if (step < -256)
        step = 0;
}
