function var document getElementById d1 if parseInt style left style l

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
function l() {
var q = document.getElementById('d1');
if (parseInt(q.style.left) > 0) {
q.style.left = ((parseInt(q.style.left) - 1) + 'px');
}
}
function r() {
var q = document.getElementById('d1');
if (parseInt(q.style.left) < window.screen.availWidth) {
q.style.left = ((parseInt(q.style.left) + 1) + 'px');
}
}