function comeca_e2() {
	var maxx=document.getElementById('fotos').offsetWidth;
	var tam=document.getElementById('listafotos').scrollLeft;
	if(tam<=maxx) {
		document.getElementById('listafotos').scrollLeft=tam-2;
		a=setTimeout('comeca_e2()', 20);
	}
}

function comeca_d2() {
	var maxx=document.getElementById('fotos').offsetWidth;
	var tam=document.getElementById('listafotos').scrollLeft;
	if(tam<maxx) {
		document.getElementById('listafotos').scrollLeft=tam+2;
		a=setTimeout('comeca_d2()', 20);
	}
}

function para3() {
	var maxx=document.getElementById('fotos').offsetWidth;
	var tam=document.getElementById('listafotos').scrollLeft;
	if(tam<maxx){
		clearTimeout(a);
	}
}

function trocaImagem(pImagem){
	var imagem = document.getElementById('imagemtrocar');
	imagem.src=GLOBAL_imgLoad.src;
	GLOBAL_imgLoad.src=pImagem;
	b=window.setTimeout(function (){
		imagem.src = GLOBAL_imgLoad.src;
		GLOBAL_imgLoad.src = 'img/load.gif';
	},3000);
}
