function moveInicializa() {
    heightnum = parseInt(document.getElementById('content').style.height);
    topnum = parseInt(document.getElementById('content').style.top);
}

function moveLeft() {
    intervalo = setInterval("moveGaleria(0)",20);
}

function moveRight() {
    intervalo = setInterval("moveGaleria(1)",20);
}

function moveGaleria(direcao) {
    if (undefined == window.topnum) {
        moveInicializa();
    }
    if (direcao == 0) {
        if (topnum < 0) {
            topnum += 5;
            document.getElementById('content').style.top = topnum;
        } else {
            moveStop();
        }
    } else {
        if (heightnum > 425 && topnum > 425 - heightnum) {
            topnum -= 5;
            document.getElementById('content').style.top = topnum;
        } else {
            moveStop();
        }
    }
}

function moveStop() {
    if (window.intervalo) {
        clearInterval(intervalo);
    }
}

function popup(windowNome, windowUrl, windowWidth, windowHeight){
	windowTop		= screen.height/2 - windowHeight/2;
	windowLeft		= screen.width/2 - windowWidth/2;
	windowOpcoes	= 'width=' + windowWidth + ', height=' + windowHeight + ', top=' + windowTop + ', left=' + windowLeft + ''
	windowPopup		= window.open(windowUrl, windowNome, windowOpcoes);
}

function subMenuOver(objeto) {
 	document.getElementById(objeto).style.visibility = 'visible';
}

function subMenuOut(objeto) {
 	document.getElementById(objeto).style.visibility = 'hidden';
}

function changeColorOver(objeto) {
 	objeto.style.backgroundColor = '#F9EFD7';
}

function changeColorOut(objeto, cor) {
 	objeto.style.backgroundColor = cor;
}