// JavaScript Document
if(navigator.appName=='Netscape'){
	function conf(obj,conteudo,w,h,v){
	velocidade=v;
	var obj = document.getElementById(obj);
	obj.style.position='absolute';
	obj.style.width=w+'px';
	obj.style.height=h+'px';
	obj.innerHTML = "<input id=objN type=hidden value=0 /><div id=objMascara><div id=objMove></div></div>";
	obj.innerHTML += "<a href='javascript:;' id=\"objProximo\"></a><a href='javascript:;' id=\"objAnterior\"></a>";
	btProximo = document.getElementById('objProximo');
	btProximo.style.position = 'absolute';
	btProximo.style.left = w-(btProximo.offsetWidth/2)+'px';
	btProximo.style.zIndex = 1;
	btProximo.onclick = function()  { ObjProximo(); }
	btAnterior = document.getElementById('objAnterior');
	btAnterior.style.position = 'absolute';
	btAnterior.style.left = -(btAnterior.offsetWidth/2)+'px';
	btAnterior.style.zIndex = 1;
	btAnterior.onclick = function(){ ObjAnterior(); }
	
	objMascara = document.getElementById('objMascara');
	objMascara.style.width = w+'px';
	objMascara.style.height = h+'px';
	objMascara.style.position='absolute';
	objMascara.style.overflow='hidden';
	objMascara.style.zIndex=0;
	
	objMove = document.getElementById('objMove');
	objMove.style.position='absolute';
	objMove.style.height=w+'px';
	objMove.style.height=h+'px';
	for(i=0;i<conteudo.length;i++) objMove.innerHTML += '<div>'+conteudo[i]+'</div>';
	objDivs = objMove.getElementsByTagName('div');
	for(i=0;i<objDivs.length;i++){
		objDivs[i].style.width=w+'px';
		objDivs[i].style.height=h+'px';
//		objDivs[i].style.background='black';
	}
	objMove.style.width= (objDivs.length*w)+'px';
	
	objImg = objMove.getElementsByTagName('img');
	for(i=0;i<objImg.length;i++){
		objImg[i].style.width =	w+'px';
		objImg[i].style.height = h+'px';
	}
	n = document.getElementById('objN');
	n.value = 0;
	objPosicao = new Array();
	for(i=0;i<objDivs.length;i++) objPosicao[i]=objMove.offsetLeft-objDivs[i].offsetLeft;
	}
}
if(navigator.appName=='Microsoft Internet Explorer'){
	function conf(obj,conteudo,w,h,v){
	velocidade=v;
	var obj = document.getElementById(obj);
	obj.style.position='absolute';
	obj.style.width=w+'px';
	obj.style.height=h+'px';
	obj.innerHTML = "<input id=objN type=hidden value=0 /><div id=objMascara><div id=objMove></div></div>";
	obj.innerHTML += "<a href='javascript:;' id=\"objProximo\"></a><a href='javascript:;' id=\"objAnterior\"></a>";
	var btProximo = document.getElementById('objProximo');
	btProximo.style.position = 'absolute';
	btProximo.style.left = w-(btProximo.offsetWidth/2)+'px';
	btProximo.style.zIndex = 1;
	btProximo.onclick = function()  { ObjProximo(); }
	var btAnterior = document.getElementById('objAnterior');
	btAnterior.style.position = 'absolute';
	btAnterior.style.left = -(btAnterior.offsetWidth/2)+'px';
	btAnterior.style.zIndex = 1;
	btAnterior.onclick = function(){ ObjAnterior(); }
	
	var objMascara = document.getElementById('objMascara');
	objMascara.style.width = w+'px';
	objMascara.style.height = h+'px';
	objMascara.style.position='absolute';
	objMascara.style.overflow='hidden';
	objMascara.style.zIndex=0;
	
	var objMove = document.getElementById('objMove');
	objMove.style.position='absolute';
	objMove.style.height=w+'px';
	objMove.style.height=h+'px';
	for(i=0;i<conteudo.length;i++) objMove.innerHTML += '<div>'+conteudo[i]+'</div>';
	objDivs = objMove.getElementsByTagName('div');
	for(i=0;i<objDivs.length;i++){
		objDivs[i].style.width=w+'px';
		objDivs[i].style.height=h+'px';
//		objDivs[i].style.background='black';
	}
	objMove.style.width= (objDivs.length*w)+'px';
	
	objImg = objMove.getElementsByTagName('img');
	for(i=0;i<objImg.length;i++){
		objImg[i].style.width =	w+'px';
		objImg[i].style.height = h+'px';
	}

	n = document.getElementById('objN');
	n.value = 0;
	objPosicao = new Array();
	for(i=0;i<objDivs.length;i++) objPosicao[i]=objMove.offsetLeft-objDivs[i].offsetLeft;
	}
}
function ObjProximo(){
	contador=0;
	inicio = objMove.offsetLeft;
	for(i=0;i<objPosicao.length;i++){
		if(inicio == objPosicao[i]) contador++;
	}
	if(n.value != objDivs.length-1&&contador!=0){
		contador=0;
		inicio = objMove.offsetLeft;
		n.value++;
		fim = objPosicao[n.value];

	comeca = setInterval(function(){
	if(inicio>fim){
	inicio=inicio-velocidade;
	objMove.style.left=inicio+'px';
	}else{clearInterval(comeca)}
	},10);
	}
}
function ObjAnterior(){
	inicio = objMove.offsetLeft;
	contador=0;
	for(i=0;i<objPosicao.length;i++){
		if(inicio == objPosicao[i])
			contador++;
	}
	if(n.value != 0&&contador!=0 ){
		contador=0;
		inicio = objMove.offsetLeft;
		n.value--;
		fim = objPosicao[n.value];
	
	comeca = setInterval(function(){
	if(inicio<fim){
	inicio=inicio+velocidade;
	objMove.style.left=inicio+'px';
	}else{clearInterval(comeca)}
	},1);
	}
}