next.onclick = function() {
var max = 1000;
var x=1;
x = x <= 0 ? max : x >= max ? 0 : x+216;
slideimg.style.marginLeft = parseInt(document.getElementById('slideimg').style.marginLeft) -x + 'px';
}
prew.onclick = function() {
var x = 1;
var max = 1000;
x = x <= 0 ? max : x >= max ? 0 : x+216;
slideimg.style.marginLeft = parseInt(document.getElementById('slideimg').style.marginLeft)+x + 'px';
}
next.onclick = function() {
var max = 1000;
x +=216;
if (x < 0) {
x = max;
} else if (x > max) {
x = 0;
}
slideimg.style.marginLeft = parseInt(document.getElementById('slideimg').style.marginLeft)+ x + 'px';
}
next.onclick = function() {
slideimg.style.marginLeft = parseInt(document.getElementById('slideimg').style.marginLeft) -216 + 'px';
}