function Verificados(caso){
	var Vobj=document.getElementById(caso);
	var oculto=document.getElementById('V_'+caso);
	if(oculto.value==1){Vobj.src='img/verific_off.gif';
		oculto.value=0;}
	else{Vobj.src='img/verific_on.gif';
		oculto.value=1;}
		
	}
	
var verificado=false;
function confirmarIr(winURL,features, version){
var Comentario = window.showModalDialog(winURL,'',features);
verificado=Comentario;
if (Comentario == true && document.getElementById('verificado')) {
	if(version){document.getElementById('verificado').src='img/verific'+version+'_on.gif';}
	else{document.getElementById('verificado').src='img/verific_on.gif';}
	
	document.getElementById('politica').innerHTML='Acepta pol&iacute;tica de privacidad';
		pasaValor();
		
}
if(Comentario == false && document.getElementById('verificado')){
	if(version){document.getElementById('verificado').src='img/verific'+version+'_off.gif';}
	else{document.getElementById('verificado').src='img/verific_off.gif';}
	document.getElementById('politica').innerHTML='Ver pol&iacute;tica de privacidad&nbsp;&nbsp;';
		pasaValor();
	}

}


function checkNew(){
if(verificado==true){verificado=false;}
else{verificado=true; }
pasaValor();
}

function pasaValor(){
	if (verificado==true ) {
	document.getElementById('ocultoVerificado').value=1;
	document.getElementById('verificado').alt='Aceptada Politica\nde Privacidad'

}
	if (verificado==false ){

	document.getElementById('ocultoVerificado').value=0;
	document.getElementById('verificado').alt='Aceptar Politica\nde Privacidad'
		}
	
	}

function salir(boton){
if(boton=='aceptar'){
window.returnValue =true;
}
if(boton=='descartar'){
window.returnValue =false;

}
window.close();
}
var barraA='';
var barraB='';
var margenA='';
var margenB='';
var t;
var s;

function lanzaAltoDivSroll(FbarraA,FbarraB,FmargenA,FmargenB){
barraA=FbarraA;
barraB=FbarraB;
margenA=FmargenA;
margenB=FmargenB;
t=setInterval("altoDivSroll()",200);
}

function altoDivSroll(){
var nombre = navigator.appName;
var alto=(top.document.getElementById('pag').height)-109;
 if (nombre !== "Microsoft Internet Explorer"){ 
 alto=(top.document.getElementById('pag').document.body.scrollHeight)-109
}
 if(barraA!=''&& margenA!=''&& alto-margenA>36){
document.getElementById(barraA).style.height=alto-margenA;
}
 if(barraB!='' && margenB!=''&& alto-margenB>36){
document.getElementById(barraB).style.height=alto-margenB;
} window.clearInterval(t);
}

var a;
function ajusta(){
	var altoFrame=(top.document.getElementById('pag').height)-109
	if(altoFrame>36){parent.document.getElementById('contenido').style.height=altoFrame;
	window.clearInterval(a);
t=setInterval("altoDivSroll();",200);}
	}


function frameEntero(entero){
	if(entero==true){
	top.document.getElementById("general").rows="0,*,2";
	var a=setInterval("ajusta();", 300);}
	else{
	top.document.getElementById("general").rows="*,443,*";
	parent.document.getElementById('contenido').style.height='495px';
	setInterval('top.document.getElementById("pag").onResize =ajusta();',100);}
	}
	
var Secciones = new Array()
	Secciones [0] ='itemsub_corporativo';
	Secciones [1] ='itemsub_asociados';
	Secciones [2] ='itemsub_asociese';
	Secciones [3] ='itemsub_actividades';
	Secciones [4] ='itemsub_actualidad';

	
	var Submenu= new Array()
	Submenu [0] ='sub_asociese';
	Submenu [1] ='sub_corporativo';
	
	var conClick='';
	
		function oldColorSub(capa,objItem){

		var nItem;
		if(capa=='asociese'){
			nItem=2;
			oldColor();
			document.getElementById('itemsub_asociese').style.color='#FFFFFF';}
			
		if(capa=='corporativo'){nItem=6;
			oldColor();
			document.getElementById('itemsub_corporativo').style.color='#FFFFFF';}
		if(capa=='zona'){nItem=3;
			oldColor();
			}
			
		for ( var q = 1; q <=nItem;  q++) {
		document.getElementById(capa+'_'+q).style.backgroundColor='';
		}
		
		if(objItem!='') {objItem.style.backgroundColor='#B5E1FD'}
		if(objItem!=''&& capa=='zona') {objItem.style.backgroundColor='#FDE9BE'}
				}
	
	function oldColor(){
	for ( var j = 0; j < Secciones.length; j++) {
		document.getElementById(Secciones[j]).style.color='';}
	for ( var q = 1; q <=6;  q++) {
		document.getElementById('corporativo'+'_'+q).style.backgroundColor='';}
	for ( var r = 1; r <=2;  r++) {
		document.getElementById('asociese'+'_'+r).style.backgroundColor='';}
	for ( var h = 1; h <=3;  h++) {
		document.getElementById('zona'+'_'+h).style.backgroundColor='';}
		
		}
	function clikColor(itemsub){
		var id=itemsub.id;
		var general=id.substring(8,id.lenght)+'_1';
		conClick='';
		document.getElementById('sub_zona').style.visibility='hidden';
		oldColor();
		itemsub.style.color='#FFFFFF';
				if(document.getElementById(general)){
		document.getElementById(general).style.backgroundColor='#B5E1FD';
		}
		}
	function oldCapa(){
		if(conClick!=''){
		obj=document.getElementById(conClick);
		obj.style.visibility='visible';
		obj.style.zIndex='5';}
		}

function VerMenu(submenu,enseccion,hand)	{
	if(enseccion!=''){conClick=enseccion;}
	obj=document.getElementById(submenu);
	if(conClick!=''){
	var itemM='item'+conClick;
	for ( var g = 0; w < Submenu.length; g++) {
	document.getElementById(Submenu [g]).style.zIndex='1';}
	document.getElementById(conClick).style.zIndex='5';
	}
	if(conClick=='' && hand=='visible'){
	obj.style.visibility='visible';
	for ( var h = 0; h < Submenu.length; h++) {
	document.getElementById(Submenu [h]).style.zIndex='1';}
	obj.style.zIndex='5';
	}
	
	if(submenu!=conClick && hand=='visible'){
	obj.style.visibility='visible';
	for ( var w = 0; w < Submenu.length; w++) {
	document.getElementById(Submenu [w]).style.zIndex='1';}
	obj.style.zIndex='5';
	}

	if(conClick=='' && hand=='hidden'){
 	obj.style.visibility='hidden';
	for ( var t = 0; t < Submenu.length; t++) {
	document.getElementById(Submenu [t]).style.zIndex='5';}
	obj.style.zIndex='1';
		}
	if(enseccion=='' && hand=='none'){
	for ( var k = 0; k < Submenu.length; k++) {
		document.getElementById(Submenu [k]).style.visibility='hidden';
		}
	}
	if(submenu!=conClick && hand=='hidden'){
	obj.style.visibility='hidden';
	for ( var q = 0; q < Submenu.length; q++) {
	document.getElementById(Submenu [q]).style.zIndex='5';}
	obj.style.zIndex='1';
	}
	 }
function menuZsocios(estado){
	if(estado==true){
	parent.document.getElementById('sub_zona').style.visibility='visible';
	for ( var k = 0; k < Submenu.length; k++) {
		parent.document.getElementById(Submenu [k]).style.visibility='hidden';
		}
	}
	else{parent.document.getElementById('sub_zona').style.visibility='hidden';
	ZoldColor()
	}
}
function fueraZona(){
	document.getElementById('sub_zona').style.visibility='hidden';
	document.getElementById('Nsocio').style.display='none';}
function regitZona(){
	parent.document.getElementById('Nsocio').style.display='inline';}
	
function ZoldColor(){
	for ( var w = 0; w <=1;  w++) {
parent.document.getElementById('sub_zona'+'_'+w).style.backgroundColor='';}
	}
function resetHome(){
	oldColor();
	VerMenu('','','none');
	MM_nbGroup('down','group1','','',1);
	fueraZona();
	}	