zoom = zoomi = 1.2;

function coords(e) {
 xpos = e.layerX ? e.layerX : e.offsetX ? e.offsetX + document.body.scrollLeft : 0 ;
 ypos = e.layerY ? e.layerY : e.offsetY ? e.offsetY + document.body.scrollTop	 : 0 ;
 if( xpos==0 || ypos ==0)
	window.status='Votre navigateur n\'est pas compatible';
 else {
	 posx = Math.round((xpos*1)/(zoomi*1)/1.5);
	 posy = Math.round((ypos*1)/(zoomi*1)/1.5);
	 window.status='X: '+posx+'  Y: '+posy;
	 }
}

function zoommer(x) {
/*
var D = document.forms[0][x].options;
var i = D.selectedIndex;
if(i==0) alert('Choisir dans la liste');
else {
	zoom = D[i].value;
	zoomi = x==0? zoom : zoomi ;
	var A = x==0?'vue':'affiche';
	A = document.getElementById(A).style ;
	A.height = (x==0)? Math.round(250*1*zoom*1)+'px' : Math.round(230*1*zoom*1)+'px' ;
	A.width	= (x==0)? Math.round(300*1*zoom*1)+'px' : Math.round(280*1*zoom*1)+'px' ;
	}
*/
with(document.getElementById('affiche').style){
	height = Math.round(230*1*zoom*1)+'px' ;
	width	= Math.round(280*1*zoom*1)+'px' ;
	}
with(document.getElementById('vue').style) {
	height = Math.round(250*1*zoom*1.5)+'px' ;
	width	= Math.round(300*1*zoom*1.5)+'px' ;
	}
}

function bouger(qx,qy) {
with(document.getElementById('scrolleur')) { scrollTop=qy; scrollLeft=qx; }
}

gh = gv = 0;
bouge=false;
function glisse(h,v) {
sens = (h<0 || v<0 )? -1 : 1;
gh = (h!=0 && v==0)? gh+(5*sens) : gh;
gv = (v!=0 && h==0)? gv+(5*sens) : gv;
with(document.getElementById('scrolleur')) {v!=0? scrollTop=gv : scrollLeft=gh}
bouge=setTimeout('glisse('+h+','+v+')',100);
}
function noglis() { (!(bouge))? '' : clearTimeout(bouge); }

onload=zoommer;
