function clickPhoto() {

}

function abreforum(url) {
    window.open(url,"_blank","toolbar=no,status=no,scrollbars=yes,resizable=no,menubar=no,width=502,height=400");
}

function abre(url,janela,larg,alt,scroll,pos1,pos2){
    window.open(url,janela,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+scroll+",resizable=no,copyhistory=no,top="+pos1+",left="+pos2+",screenY="+pos1+",screenX="+pos2+",width="+larg+",height="+alt);
}

function select(id) {
    var bigphoto = document.getElementById("bigphoto");
    var note = document.getElementById("bigphotonote");
    var el = document.getElementById(id);
    var t = id.substr(0);
    var s = t.substr(t.indexOf("_")+1);
    var i = t.substring(0,t.indexOf("_"));
    bigphoto.src = "img/loader.gif";
    bigphoto.src = "logos/"+s+".jpg";
    bigphoto.alt = i;
    note.innerHTML = el.getElementsByTagName("img")[0].alt;
}
function next() {
    var bigphoto = document.getElementById("bigphoto");
    var id = bigphoto.alt;
    var a = document.getElementById("photoholder").getElementsByTagName("a");
    var t = "photo"+id+"_";
    var temp = t+" - ";
    for (var i=0; i<a.length-1; i++) {
        temp = temp + a[i].id.substring(0,t.length) + " - ";
        if (a[i].id.substring(0,t.length)==t) {
            select(a[i+1].id);
            break;
        }
    }
    var c = 0;
    for (var j=0; j<a.length; j++) {
        if (a[j].className=="show") {
            c = j;
            break;
        }
    }
    if (i>c+4) change(5);
}
function change(d) {
    var a = document.getElementById("photoholder").getElementsByTagName("a");
    var c = 0;
    for (var i=0; i<a.length; i++) {
        if (a[i].className=="show") {
            c = i;
            break;
        }
    }
    c = c + d;
    if (c<0) c=0;
    if (c>a.length-5) c = a.length-5;
    document.getElementById("left").getElementsByTagName("a")[0].style.display=(c==0?"none":"block");
    document.getElementById("right").getElementsByTagName("a")[0].style.display=(c==a.length-5?"none":"block");
    for (var i=0; i<a.length; i++) a[i].className = (((i<c)||(i>c+4))?"hide":"show");
}
