function submete() {
	var nick=document.getElementById('nsocio').value;
	var pass=document.getElementById('senha').value;
	var cookie_date = new Date ( );  // current date & time
/*	cookie_date.setTime ( cookie_date.getTime() +30*60*1000 ); */
	document.cookie = "nsocio="+nick+";";
	document.cookie = "senha="+pass+";";
	document.cookie = "socio_aut=0;";
	parent.location="entrada_socios.php";
}

function exit() {
	document.cookie = "nsocio=;";
	document.cookie = "senha=;";
	alert('Logout efectuado');
	parent.location="index.php";
}

function imagempu(endim)
{
var generator=window.open('','name','width=1000');
 
  generator.document.write('<html>');
  generator.document.write('<body>');
  generator.document.write('<img src='+endim+'>');
  generator.document.write('</body></html>');
  generator.document.close();
}


function ver_fotos(notid,dir_fotos) {
	var xmlhttp;
	xmlhttp=new XMLHttpRequest();
	xmlhttp.open("GET","album_fotos.php?dir_fotos="+dir_fotos,true);
	xmlhttp.send(null);
	document.getElementById('album'+notid).innerHTML=xmlhttp.responseText;
}

function mostra(etiq) {
	var cookie_date = new Date ( );  // current date & time
	cookie_date.setTime ( cookie_date.getTime() +15*24*60*60*1000 );
	if (document.getElementById(etiq).style.display=="none") {
		document.getElementById(etiq).style.display="block";
		document.getElementById('im'+etiq).src="icones/menos.gif";
		document.cookie = "mostra"+etiq+"=a;expires=" + cookie_date.toGMTString();
	} else {
		document.getElementById(etiq).style.display="none";
		document.getElementById('im'+etiq).src="icones/mais.gif";
		document.cookie = "mostra"+etiq+"=f;expires=" + cookie_date.toGMTString();
	}
}


