function posAct(div){
	return document.getElementById(div). offsetTop;
	}
//*clic en FOTOS*//
function btnFotos (){
var pos = posAct('mpanel_3');
if (pos == -81) {
	expFotos();
	}
if (pos == 20) {
	conFotos();
	}
}

function expFotos () {
var pos = posAct('mpanel_3');
var obj = 20;
if (pos != obj) {
	document.getElementById('mpanel_3').style.top = posAct('mpanel_3') + 1 + 'px';
	setTimeout("expFotos()", 5);
	}
}

function conFotos () {
var pos = posAct('mpanel_3');
var obj = -81;
if (pos != obj) {
	document.getElementById('mpanel_3').style.top = posAct('mpanel_3') - 1 + 'px';
	setTimeout("conFotos()", 5);
	}
if (pos == obj){
	conRep ();
	conRet();
	}
}

//*clic en REPORTAJE*//
function btnRep (){
var pos = posAct('mpanel_2');
if (pos == 182) {
	expRep();
	}
if (pos == 222) {
	conRep();
	}
}

function expRep () {
var pos = posAct('mpanel_2');
var obj = 222;
if (pos != obj) {
	document.getElementById('mpanel_2').style.top = posAct('mpanel_2') + 1 + 'px';
	setTimeout("expRep()", 5);
	}
}

function conRep () {
var pos = posAct('mpanel_2');
var obj = 182;
if (pos != obj) {
	document.getElementById('mpanel_2').style.top = posAct('mpanel_2') - 1 + 'px';
	setTimeout("conRep()", 5);
	}
}

//*clic en RETRATOS*//
function btnRet (){
var pos = posAct('mpanel_4');
if (pos == 0) {
	expRet();
	}
if (pos == 60) {
	conRet();
	}
}

function expRet () {
var pos = posAct('mpanel_4');
var obj =60;
if (pos != obj) {
	document.getElementById('mpanel_4').style.top = posAct('mpanel_4') + 1 + 'px';
	setTimeout("expRet()", 5);
	}
}

function conRet () {
var pos = posAct('mpanel_4');
var obj = 0;
if (pos != obj) {
	document.getElementById('mpanel_4').style.top = posAct('mpanel_4') - 1 + 'px';
	setTimeout("conRet()", 5);
	}
}

function contSrc(dir, alto) {
var iframe = document.getElementById('cont');
iframe.height = alto;
if (iframe.src != dir){
	iframe.src = dir;
	}
}