	var TimerAl;
	var TimerAc;
	var max_fov = 100;
	var min_fov = 30;
	function controlAlejar(){
		if(document.ptviewer.fov() > max_fov){
			document.ptviewer.stopAutoPan();
			clearTimeout(TimerAl);
		}
		else
			TimerAl = setTimeout("controlAlejar()",10);
	}
	function alejar(){
		if(document.ptviewer.fov() < max_fov){
			document.ptviewer.startAutoPan(0,0,1.01);	
			TimerAl = setTimeout("controlAlejar()",10);
		}
	}
	
	function acercar(){
		if(document.ptviewer.fov() > min_fov){
			document.ptviewer.startAutoPan(0,0,0.99);
			TimerAc = setTimeout("controlAcercar()",10);
		}
	}
	
	function controlAcercar(){
		if(document.ptviewer.fov() < min_fov){
			document.ptviewer.stopAutoPan();
			clearTimeout(TimerAc);
		}
		else
			TimerAc = setTimeout("controlAcercar()",10);
	}
