var timerID;
var basey=0;
var baseyp=0;
var base = 1;
var basep = 1;



if (document.body)
{
var larg = (document.body.clientWidth);
var haut = (document.body.clientHeight);
} 
else
{
var larg = (window.innerWidth);
var haut = (window.innerHeight);
}
  var largcar = document.getElementById("argcarte").value;

 var templarg = larg-480;
 var finallarg = largcar-templarg;

   var hautlogo = document.getElementById("arglogo").value;
 var finalhaut = hautlogo-420;

var IE = document.all?true:false;
if (!IE) document.captureEvents(Event.MOUSEMOVE);
//document.onmousemove = getMouseXY;
var tempX = 0;
var tempY = 0;

var ns4=document.layers;
var ie4=document.all;
var ns6=document.getElementById&&!document.all;

function getMouseXY(e) {  
	if (IE) {
		tempX = event.clientX + document.body.scrollLeft;
		tempY = event.clientY + document.body.scrollTop;
	} else {
    tempX = e.pageX;
    tempY = e.pageY;
	}
	if (tempX < 0){tempX = 0}
	if (tempY < 0){tempY = 0}  
document.Show.MouseX.value = tempX;
document.Show.MouseY.value = tempY;
return true
}










function defilright() {

if (basey < finallarg) {
window.liste.scrollTo(basey,0);
basey = basey + 2;
}

}




function defilload() {



  
if (basey < finallarg && base == 1) {
window.liste.scrollTo(basey,0);
basey = basey + 2;
}
else { base = 2; }

if (base == 2 && basey > 0) {
window.liste.scrollTo(basey,0);
basey = basey - 2;
}
else { base = 1; }
//if (base == 2 && basey == 0) {
//clearInterval(timerID);
//defilement();
//}

}

function defilload2() {

if (baseyp < finalhaut && basep == 1) {
window.listedefma.scrollTo(0,baseyp);
baseyp = baseyp + 1;
}
else { basep = 2; }

if (basep == 2 && baseyp > 0) {
window.listedefma.scrollTo(0,baseyp);
baseyp = baseyp - 1;
}
else { basep = 1; }

//if (basep == 2 && baseyp == 0) {
//clearInterval(timerID2);
//defilement();
//}

}


function defilement() {

	if (document.body) {
	var larg = (document.body.clientWidth);
	var haut = (document.body.clientHeight);
	} 
	else {
	var larg = (window.innerWidth);
	var haut = (window.innerHeight);
	}
 
  var mouseX = document.Show.MouseX.value;
 
	var larga = larg/2;
	if (larga > mouseX) {

	}
	if (larga < mouseX) {

	}
	
	
}


function gotoload() {

    timerID=setInterval("defilload()",20);
	//timerID2=setInterval("defilload2()",20);

}

function gotoright() {
    timerID=setInterval("defilright()",10);
}

function defilleft() {

window.liste.scrollTo(basey,0);
if (basey > 0) { basey = basey - 2; }
}

function gotoleft() {
    timerID=setInterval("defilleft()",10);
}


function stop() {
clearInterval(timerID);
}

function stop2() {
clearInterval(timerID2);
}

function defiltop() {

window.listedefma.scrollTo(0,baseyp);
baseyp = baseyp + 2;
}

function gototop() {
    timerID2=setInterval("defiltop()",10);
}

function defilbottom() {

window.listedefma.scrollTo(0,baseyp);
if (baseyp > 0) { baseyp = baseyp - 2; }
}

function gotobottom() {
    timerID2=setInterval("defilbottom()",10);
}




function defiltop1() {

window.liste1.scrollTo(0,baseyp);
baseyp = baseyp + 2;
}

function gototop1() {
    timerID=setInterval("defiltop1()",10);
}

function defilbottom1() {

window.liste1.scrollTo(0,baseyp);
if (baseyp > 0) { baseyp = baseyp - 2; }
}

function gotobottom1() {
    timerID=setInterval("defilbottom1()",10);
}

