function fotogrande(valor1, valor2, valor3){
  document.getElementById('fotolarg').style.backgroundImage="url("+valor1+")";
  document.getElementById('fotolarg').style.width = valor2+'px';
  document.getElementById('fotolarg').style.height = valor3+'px';
}

var req;

function paginacao(valor, valor2, valor3, valor4){
    req = null;
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("GET", './galeria/galeria.php?p='+valor+'&r='+valor2+'&id='+valor3+'&col='+valor4, true);
        req.send(null);
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = processReqChange;
            req.open("GET", './galeria/galeria.php?p='+valor+'&r='+valor2+'&id='+valor3+'&col='+valor4, true);
            req.send();
        }
    }
}

function processReqChange()
{
    document.getElementById('fotomin').innerHTML = '<br><br><img src=\"./admin/loading.gif\">&nbsp;Carregando...';
    if (req.readyState == 4) {
        if (req.status == 200) {
            document.getElementById('fotomin').innerHTML = req.responseText;
        } else {
            alert("Houve um problema ao obter os dados:\n" + req.statusText);
        }
    }
}

