function EnviaFormPassword( F ) {
	CargaPagina( "cContenido", "" , 'password.asp?clavenueva=' + F.clavenueva.value + 
	'&claveantigua=' + F.claveantigua.value + 
	'&confclavenueva=' + F.confclavenueva.value +
	'&accion=' + 'modificacion' )
}
function EnviaFormAdminUser( F ) {
	var UrlPagina = "";
	var Activo = "N";
	var AccesoFape = "N";
	var Administrador = "N";
	var Accion = F.accion.value;
	
	if(	ValidaAminUser( F ) ) {
		
		for(Ind = 0 ; Ind < 3 && !F.opcion[ Ind ].checked  ; Ind ++ );
		if( F.activo.checked ) Activo = "S";
		if( F.acceso_fape.checked ) AccesoFape = "S";
		if( F.administrador.checked ) Administrador = "S";
		
		UrlPagina = "admin.asp?asociacion="+F.asociacion.value
		+"&usuario="+F.usuario.value
		+"&clave="+F.clave.value
		+"&nombre="+F.nombre.value
		+"&apellido1="+F.apellido1.value
		+"&cargo="+F.cargo.value
		+"&apellido2="+F.apellido2.value
		+"&correo_e="+F.correo_e.value
		+"&activo="+Activo
		+"&acceso_fape="+AccesoFape
		+"&administrador="+Administrador
		+"&copia_usuario="+F.copia_usuario.value
		+"&accion="+F.accion.value
		+"&pagina="+F.pagina.value
		+"&opcion="+F.opcion[ Ind ].value;
		CargaPagina( "cContenido", "" , UrlPagina);
	}
}

function ValidaUsuarioClave( F ) {
	return( true );
}


function propiedades(obj)
{
	 var result = "";
	 ventana=open("ventana");
	 for (var i in obj)
	 {
	      result = "objeto" + "." + i + " = " + obj[i] + "<br>";
	  	ventana.document.write(result);
	 }
}

function ChequeaNavegador() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.version = navigator.appVersion
	this.v = parseInt(this.version)
	this.ns = (this.b=="ns" && this.v>=4)
	this.ns4 = (this.b=="ns" && this.v==4)
	this.ns5 = (this.b=="ns" && this.v==5)
	this.ie = (this.b=="ie" && this.v>=4)
	this.ie4 = (this.version.indexOf('MSIE 4')>0)
	this.ie5 = (this.version.indexOf('MSIE 5')>0)
	this.min = (this.ns||this.ie)
}
Navegador = new ChequeaNavegador();


function PintaCabecera( Pagina ) {
	var Menu = 	"&nbsp;";
	var Logo="";
/*
	if( Navegador.ie ) {
		Logo = "<div id='cLogo' style='position:absolute; width:52px; height:60px; z-index:7; left: 528px; top: 10px;'>"
			  +"<img src='"+ (Pagina=="Home"?".":"..")+"/img/logo40x50.jpg' alt='Federacion de Asociaciones de la Prensa de Espa&ntilde;a' width='40' height='52' border='0'>"
			  +"</div>"
	} else {
*/	
	Logo = "<a href='"+ (Pagina=="Home"?"":"../")+"home.asp' OnMouseOver=\"window.status='Federacion de Asociaciones de la Prensa de Espa&ntilde;a'; return(true);\" class='LetraGrande_Amarillo'><img src='"+ (Pagina=="Home"?".":"..")+"/img/logo40x50.jpg' alt='Federacion de Asociaciones de la Prensa de Espa&ntilde;a' width='40' height='52' border='0' align='middle'></a>&nbsp;"
//	}
	
	if( Pagina != "Home" ) {
		Menu = ""
		+"<a href='../historia/historia.asp' OnMouseOver=\"window.status='Historia'; return(true);\" class='Menu'>Historia</a>"
		+"&nbsp;<a href='../organos/organos.asp' OnMouseOver=\"window.status='&Oacute;rganos de gobierno'; return(true);\" class='Menu' title='&Oacute;rganos de gobierno'>&Oacute;rganos</a>"
		+"&nbsp;<a href='../codigo/codigo.asp' OnMouseOver=\"window.status='C&oacute;digo deontol&oacute;gico'; return(true);\" class='Menu' title='C&oacute;digo deontol&oacute;gico'>C&oacute;digo</a>"
		+"&nbsp;<a href='../estatutos/estatutos.asp' OnMouseOver=\"window.status='Estatutos'; return(true);\" class='Menu' title='Estatutos'>Estatutos</a>"
		+"&nbsp;<a href='../actas/actas.asp' OnMouseOver=\"window.status='Actas'; return(true);\" class='Menu'>Actas</a>"
		+"&nbsp;<a href='../comunicaciones/comunicaciones.asp' OnMouseOver=\"window.status='Comunicaciones'; return(true);\" class='Menu'>Comunicaciones</a>"
		+"&nbsp;<a href='../notas/notas.asp' OnMouseOver=\"window.status='Comunicados y notas de prensa'; return(true);\" class='Menu'  title='Notas de prensa'>Notas</a>"
		+"&nbsp;<a href='../publicaciones/publicaciones.asp' OnMouseOver=\"window.status='Publicaciones'; return(true);\" class='Menu'>Publicaciones</a>"
		+"&nbsp;<a href='../servicios/servicios.asp' OnMouseOver=\"window.status='Servicios'; return(true);\" class='Menu'>Servicios</a>"
		+"&nbsp;<a href='../enlaces/enlaces.asp' OnMouseOver=\"window.status='Enlaces'; return(true);\" class='Menu'>Enlaces</a>";
	}

	document.write(""
	+"<div id='cCabecera' class='cCabecera'>"
	+"<table width='90%' border='0' cellspacing='0' cellpadding='0' align='center'>"
	+"<tr>"
	+"<td width='100%' align='left' valign='bottom'>"
	+ Menu
	+"</td>"
	+"<td align='right' valign='middle'>"
	+Logo
	+"</td>"
	+"<td align='right'>"
	+"<a href='"+ (Pagina=="Home"?"":"../")+"home.asp' OnMouseOver=\"window.status='Federacion de Asociaciones de la Prensa de Espa&ntilde;a'; return(true);\" class='LetraGrande_Amarillo'>"
	+"f<font color=black>ape</font>" 
	+"</a>"
	+"</td>"
	+"</tr>"
	+"<tr>"
	+"<td colspan='3'>"
	+"<hr align='right' width='100%' size='1'>"
	+"</td>"
	+"</tr>"
	+"<tr>"
	+"<td colspan='3' class='Filete0'>"
	+"Federaci&oacute;n de Asociaciones de la Prensa de Espa&ntilde;a<br>"
	+"</td>"
	+"</tr>"
	+"</table>"
	+"</div>");
}

function PintaCapaImagenLetras( Lado ) {
    document.writeln(""
	+"<div id='cImagenLetras"+Lado+"' CLASS='cImagenLetras"+Lado+"' >"
	+"<img src='../img/letras"+Lado+".jpg' width='117' height='177' border='0'>" 
	+"</div>");
}

function PintaCapaIdPagina( IdPagina ) {
	if( IdPagina != "comunicaciones" )
	document.write(""
	+"<div id='cIdPagina' class='cIdPagina'>"
	+"<table><tr><td><font class='LetraGrande_Gris'>"+IdPagina+"&nbsp;&nbsp;</font>" 
	+"<hr width='100%' size='2' noshade class='LetraGrande_Amarillo'></td></tr></table>"
	+"</div>");
}

function PintaCapaCentral( Fondo,URL ) {	

	if (Navegador.ns ) {
		document.write(""
		+"<iframe name='cContenido"+Fondo+"'  class='cContenidoNetscape' src='"+URL+"' id='cContenido'></iframe>");
	} else if (Navegador.ie ){
		document.write(""
		+"<iframe name='iFrameBuffer' id='iFrameBuffer' style='display:none'></iframe>"
		+"<div class='cContenido"+Fondo+"' id='cContenido'>"
		+"</DIV>");
	}
	CargaPagina('cContenido',null,URL);  
}


function CargaPaginaEnlaces(IdCapa,nestref,URL) {

	var UrlEnlace = "";
	var NombreDir = "";
	var AnchoVentana=875;
	var AltoVentana=600;
	var NombreVentana="Asociacion";
	var	PosY=100;
	var	PosX=100;
	
	var ModoVentana1  ="alwaysRaised=1";
    	ModoVentana1+=",dependent=1";
    	ModoVentana1+=",directories=1";
    	ModoVentana1+=",location=1";
    	ModoVentana1+=",menubar=1";
    	ModoVentana1+=",personalbar=1";
    	ModoVentana1+=",resizable=1";
    	ModoVentana1+=",scrollbars=1"; 
    	ModoVentana1+=",status=1"; 
    	ModoVentana1+=",titlebar=1";
    	ModoVentana1+=",toolbar=1";
    	ModoVentana1+=",height="+AltoVentana;
    	ModoVentana1+=",width="+AnchoVentana;
	    ModoVentana1+=",left="+PosX
		ModoVentana1+=",top="+PosY  	  		
		
	var ModoVentana = ModoVentana1;

	NombreDir = URL.substring(0,URL.indexOf("."))
	UrlEnlace = "/" + NombreDir.toLowerCase() + "/index.asp"
	CargaPagina(IdCapa,nestref,URL);
	//VentanaAsociacion = open(UrlEnlace,NombreVentana,ModoVentana);
	//if( VentanaAsociacion.opener == null ) { VentanaAsociacion.opener = self; }
}


function CargaPagina(IdCapa,nestref,URL) {

	if (Navegador.ie) {
		parent.iFrameBuffer.document.location = URL;
	}
	else if (top.document.getElementById) {
		top.document.getElementById("cContenido").src = URL; 
	}
	
}


function FinalCargaPagina(IdCapa) {
	if (Navegador.ie) 
		document.all[IdCapa].innerHTML = parent.iFrameBuffer.document.body.innerHTML;
}

function PopUp() {
	var Atributos = "width=300,height=130,resizable=no,";
	var Posicion = "screenX=450,screenY=400"
	if( Navegador.ie ) Posicion = "left=450,top=400";
	Atributos += Posicion;
	open('patrocinio/patrocinio.asp','patrocinio',Atributos);
}	

function RecargaApp( Url ) {
	top.window.location = Url;
}