function clickar(param)
{
document.getElementById('principal').className=param;
document.getElementById('info2').style.visibility= "visible";
}

function clickar2()
{
document.getElementById('info2').style.visibility= "visible";
}


function visibleinfo()
{
//document.getElementById('compromiso').style.visibility= "hidden";
document.getElementById('info').style.display= "block";
}

function visibleinformacion()
{
document.getElementById('infocompromiso').style.display= "none";
document.getElementById('info').style.display= "block";
}

function ampliar(direccion){
//alert(direccion);	
window.open('ventanaFotos.asp?url_gr='+direccion,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=100,height=100,screenX=1,screenY=1,top=10,left=10');
}

function borreMenu(){
	for(i=1;i<=7;i++){
		if(document.getElementById("submenu"+i)){
			document.getElementById("submenu"+i).style.display="none";	
		}
		/*document.getElementById("apartado"+i).className="casi";*/
	}
}

function borreMenuA(){
	for(i=1;i<=5;i++){
		if(document.getElementById("submenuA"+i)){
			document.getElementById("submenuA"+i).style.display="none";	
			document.getElementById("apartadoA"+i).className="";
		}
		/*document.getElementById("apartado"+i).className="casi";*/
	}
}
function borreMenuAgenda(){
	for(i=1;i<3;i++){
		document.getElementById("submenuAgenda"+i).style.display="none";	
		document.getElementById("apartadoAgenda"+i).className="";
		/*document.getElementById("apartado"+i).className="casi";*/
	}
}

function verMenu(num,name){
	borreMenu();
	document.getElementById("submenu"+num).style.display="block";
	/*document.getElementById(name).className="si";*/
}

function verMenuA(num,name){
	borreMenuA();
	document.getElementById("apartadoA"+num).className="menuelegido";
	document.getElementById("submenuA"+num).style.display="block";
}

function verMenuAgenda(num,name){
	borreMenuAgenda();
	document.getElementById("apartadoAgenda"+num).className="menuelegido";
	document.getElementById("submenuAgenda"+num).style.display="block";
}
function borreMenuFolletos(){
	
	for(i=1;i<4;i++){
		document.getElementById("submenuespecial"+i).style.display="none";	
		document.getElementById("especial"+i).className="";
		/*document.getElementById("apartado"+i).className="casi";*/
	}
}

function verMenuFolletos(num,name,pdf){
	var pepe=document.getElementById("enviar")
	document.getElementById("submenuespecial1").style.display="block";
	/*document.write('<input type="button" id="enviar" value="Enviar" onClick="ar()"/>')*/
	/*pepe.Attributes.Add('onClick',"return compruebaValores('"+ pdf + "')");*/
	/*pepe.style.display="none";*/
	pepe.onclick = function () { return compruebaValores(pdf); }
	
}


function compruebaPais(cual) {
	if ((cual.value == 'Selecione') || (cual.value == 'Estados Unidos de America') || (cual.value == 'Canada') || (cual.value == 'Japon') || (cual.value == 'Reino Unido de Gran Bretana e Irlanda del Norte')) {
		
		return false;

	}
	return true;
}

function compruebaValores(parte) {

	var pais = compruebaPais(document.getElementById('residencias'));
	if (!pais) {
		alert('País Incorrecto');
		return false;
	}
	if (document.getElementById('sic').checked == false) {
		alert('Debe Aceptar las condiciones');
		return false;
	}
	document.getElementById("submenuespecial1").style.display="none";
	window.open("http://www.riofisa.com/pdf/"+parte+".pdf", "Ventana" , "width=600,height=600,resizable=yes");return false;
}

function abreIndra(){
window.open ("https://www.juntas.indra.es/RIOFISA-JE/Marcos.jsp","principal","height=500; width=570; left=227; top=134; location=no; menubar=no; resizable=no; scrollbars=no; status=yes; toolbar=no; fullscreen=no");

   }
