// MUESTRA Y OCULTA LOS MENUES //
function showHideMenu(button,popup) {
	menuButton = document.getElementById(button);
	menuPopup = document.getElementById(popup);
	if(menuPopup.style['visibility'] == 'hidden' || menuPopup.style['visibility'] == '') {
		var posX=0;
		var posY=menuButton.offsetHeight-3;
		while (menuButton!=document.body) {
			posX+=menuButton.offsetLeft;
			posY+=menuButton.offsetTop;
			menuButton=menuButton.offsetParent;
		}
		menuPopup.style['left'] = posX;
		menuPopup.style['top'] = posY;
		menuPopup.style['visibility'] = 'visible';
	} else {
		menuPopup.style['visibility'] = 'hidden';
		menuPopup.style['left'] = -1000;
		menuPopup.style['top'] = -1000;
		posX=-1000;
		posY=-1000;
	}
}
// MUESTRA Y OCULTA LOS SUB MENUES //
function showHideSubMenu(button,popup,x,y) {
	menuButton = document.getElementById(button);
	menuPopup = document.getElementById(popup);
	if(menuPopup.style['visibility'] == 'hidden' || menuPopup.style['visibility'] == '') {
		var posX=0;
		var posY=menuButton.offsetHeight-1;
		while (menuButton!=document.body) {
			posX+=menuButton.offsetLeft;
			posY+=menuButton.offsetTop;
			menuButton=menuButton.offsetParent;
		}
		menuPopup.style['left'] = eval(posX+x);
		menuPopup.style['top'] = eval(posY+y);
		menuPopup.style['visibility'] = 'visible';
	} else {
		menuPopup.style['visibility'] = 'hidden';
		menuPopup.style['left'] = -1000;
		menuPopup.style['top'] = -1000;
	}
}
// CAMBIA EL COLOR DE FONDO DE UNA CELDA Y DESPLIEGA SUBMENUES //
function changeBgcolor(row,bgcolor,color,submenu) {
	row.style['background'] = bgcolor;
	row.style['color'] = color;
	if(submenu && submenu!=0) {
		var params = submenu.split(":");
		showHideSubMenu(params[0],params[1],params[2],params[3]);
	}
}
// VA A UNA URL DE UN MODO U OTRO DIFERENCIANDO POR LOS TARGETS //
function gotoURL(URLdir,URLtarget) {
	if(URLtarget=="_blank") {
		window.open(URLdir);
	} else if(URLtarget.charAt(0)=="_") {
		var target = URLtarget.substr(1, URLtarget.length);
		frames[target].location=URLdir;
	} else {
		var target = URLtarget;
		frames[target].location=URLdir;
	}
}
// TODAS LA SECCIONES //
var URLs = new Array(
	"http://campamentos.scholem.org.ar/historia.htm",
	"http://campamentos.scholem.org.ar/qsonCampamentos.htm",
	"http://campamentos.scholem.org.ar/actividades.htm",
	"http://www.scholem.org.ar/fotos/default2.asp",
	"http://campamentos.scholem.org.ar/niveles.html",
	"http://campamentos.scholem.org.ar/informes.htm",
	"http://campamentos.scholem.org.ar/equipoPers.html",
	"http://campamentos.scholem.org.ar/formularios.htm",
	"http://campamentos.scholem.org.ar/consejos.html",
	"http://campamentos.scholem.org.ar/preguntas.html",
	"http://campamentos.scholem.org.ar/comision.htm",
	"http://www.scholem.org.ar/NotasSeccion.asp?id=3",
	"http://campamentos.scholem.org.ar/qsonCampamentosQhcms.html",
	"http://campamentos.scholem.org.ar/qsonCampamentosPropuesta.html",
	"http://campamentos.scholem.org.ar/qsonCampamentosObjetivos.htm",
	"http://campamentos.scholem.org.ar/qsonCampamentosBoletines.html",
	"http://campamentos.scholem.org.ar/niveles2006.html",
	"http://campamentos.scholem.org.ar/niveles2007.html",
	"http://campamentos.scholem.org.ar/equipoPersMochila.html",
	"http://campamentos.scholem.org.ar/equipoPersMochilaArmar.html",
	"http://campamentos.scholem.org.ar/equipoPersBolsa.html",
	"http://campamentos.scholem.org.ar/consejos.html",
	"http://campamentos.scholem.org.ar/consejosPadres.html",
	"http://campamentos.scholem.org.ar/niveles2006_1.html",
	"http://campamentos.scholem.org.ar/niveles2006_2.html",
	"http://campamentos.scholem.org.ar/niveles2006_3.html",
	"http://campamentos.scholem.org.ar/niveles2006_Docentes.html",
	"http://campamentos.scholem.org.ar/niveles2007_1.html",
	"http://campamentos.scholem.org.ar/niveles2007_2.html",
	"http://campamentos.scholem.org.ar/niveles2007_3.html",
	"http://campamentos.scholem.org.ar/niveles2007_Docentes.html",
	"http://campamentos.scholem.org.ar/links.htm"
);
// ESTA FUNCION EXISTE POR QUE VINIENDO DESDE UN SWF HAY QUE CARGAR UNA URL EN UN TARGET DE ESTE HTML //
function GoToOnLoad(){
	var param = document.URL.split("??");
	if(param[1]){
		gotoURL(URLs[param[1]],'contenedor');
	}
}
