fotosdoBD = "";
RollArray = fotosdoBD.split(',');
var total=0;
function pegaSize(){
var yScroll;
if (window.innerHeight && window.scrollMaxY) {
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
yScroll = document.body.scrollHeight;
} else {
yScroll = document.body.offsetHeight;
}
var windowHeight;
if (self.innerHeight) {
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // IE 6 só
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // Outros
windowHeight = document.body.clientHeight;
}
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;}
arrayPageSize = new Array(pageHeight,windowHeight)
return arrayPageSize;}
var req;
var url;
function loadGrande(url){
req = null;
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = processaGrande;
req.open("GET", url, true);
req.send(null);
}else if (window.ActiveXObject){
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req){
req.onreadystatechange = processaGrande;
req.open("GET", url, true);
req.send(); }}}
function processaGrande(){
if (req.readyState == 4) {
if (req.status == 200) {
document.getElementById("RollLEG").innerHTML=req.responseText;
}else{
document.getElementById("RollLEG").innerHTML="Descrição não carregada"
}}}
function EvitaErr(img,atual){
if((RollFt.width!=0)&&(RollFt.height!=0)){
document.getElementById("RollLEG").innerHTML="
";
document.getElementById("esmaeDiv").style.display="inline";
document.getElementById("esmaeDiv").style.height=RollFt.height + 30+"px";
document.getElementById("esmaeDiv").style.width=RollFt.width + 4+"px";
document.getElementById("esmaeDiv").style.marginLeft="-"+RollFt.width/2+"px";
document.getElementById("RollLEG").style.width=RollFt.width - 102+"px";
document.getElementById("RollIMG").style.height=RollFt.height;
document.getElementById("RollIMG").style.backgroundImage="url("+img+")"
pageSize = pegaSize();
document.getElementById("RollESMAE").style.height = pageSize[0] + "px";
document.getElementById("RollESMAE").style.display="inline";
Rolnav="";
if ((total-atual)<(total-1)){
Rolnav=""};
if (atual"};
document.getElementById("RollIMG").innerHTML=Rolnav;
loadGrande(url);
}else{
RollFC="EvitaErr('"+img+"',"+atual+")";
RollTempo=setTimeout(RollFC,20);}}
function grande(img){
if (img != 0){
posiTraco=(String(RollArray[img]).length-(RollArray[img].indexOf("_")))-1;//pega posição depois do traço
ajax=String(RollArray[img]).substring(String(RollArray[img]).length, String(RollArray[img]).length-posiTraco);//pega só o nº tabela
url = "./exe/roll.asp?parte=2&noBD="+ajax+"&exibir=5846&cfg=202020,0.80,verdana,8,paf";
RollFt= new Image();
RollFt.src=("arquivos/fotos/"+RollArray[img]+".jpg");
EvitaErr("arquivos/fotos/"+RollArray[img]+".jpg",img);
}else{
document.body.style.overflow="";
document.getElementById("RollESMAE").style.display="none";
document.getElementById("esmaeDiv").style.display="none";}}