con="@";

function correu(usuari, domini) {
   return usuari + con + domini;
}

function escriuCorreuLink(usuari, domini) {
   document.write("<a href='mailto:" + correu(usuari, domini) + "'>" + correu(usuari, domini) + "</a>");
}

function escriuCorreu(usuari, domini) {
   document.write(correu(usuari, domini));
}

function novaFinestraBuida(url) {
	w = screen.width;
	h = screen.height;
	valors = 'scrollbars=yes,resizable=yes,directories=yes,menubar=yes,location=yes,status=yes,titlebar=yes,toolbar=yes';
	window.open(url,'',valors);
}

function finestraVideo(url) {
	migX = 271;
	migY = 250;
	x = screen.width/2 - migX;
	y = screen.height/2 - migY;
	valors = 'width=542,height=500,left='+x+',top='+y+',scrollbars=no,resize=no';
	window.open(url,'',valors);
}

function finestraFoto(url, w, h) {
	migX = w/2;
	migY = h/2;
	x = screen.width/2 - migX;
	y = screen.height/2 - migY;
	valors = 'width='+w+',height='+h+',left='+x+',top='+y+',scrollbars=no,resize=no';
	window.open(url,'',valors);
}

function novaFinestraFoto(lang, album, foto, numF, w, h) {
	window.close();
	finestraFoto('finestra_foto.php?lang='+lang+'&album='+album+'&foto='+foto+'&numF='+numF, w, h);
}

function finestraAgenda(url) {
	migX = 300;
	migY = 200;
	x = screen.width/2 - migX;
	y = screen.height/2 - migY;
	valors = 'width=600,height=350,left='+x+',top='+y+',scrollbars=yes,resize=no';
	window.open(url,'',valors);
}

function finestraGrup(url) {
	migX = 305;
	migY = 225;
	x = screen.width/2 - migX;
	y = screen.height/2 - migY;
	valors = 'width=610,height=550,left='+x+',top='+y+',scrollbars=no,resize=no';
	window.open(url,'',valors);
}

function finestraLletra(url) {
	migX = 225;
	migY = 250;
	x = screen.width/2 - migX;
	y = screen.height/2 - migY;
	valors = 'width=450,height=500,left='+x+',top='+y+',scrollbars=yes,resize=no';
	window.open(url,'',valors);
}

function logoRandom() {
	var imatge = Math.round(Math.random()*4);
	document.write("<img src=\"imatges/logoRD"+imatge+".jpg\">");
}