// OCULTAR CORREU
usuario="info"
dominio="bikeparks.es"
conector="@"

function dame_correo(){
   return usuario + conector + dominio;
}

// aquesta printa la imatge amb el sobre i el text
function escribe_enlace_correo(){
	document.write("<a href='mailto:" + dame_correo() + "' title='" + dame_correo() + "'><img src='logos/ico_email.gif' width='21' height='9' border='0' align='absmiddle'>" + dame_correo() + "</a>");
}

// aquesta només printa el text
function escribe_enlace_correo2(){
	document.write("<a href='mailto:" + dame_correo() + "' title='" + dame_correo() + "'>" + dame_correo() + "</a>");
}

/*** POLÍTICA DE PRIVACITAT i AVÍS LEGAL ***/
function politicaPrivacidad() {
	window.open('politica-privacidad.htm','politicaprivacidad','scrollbars=yes,width=500,height=400');
}
function avisoLegal() {
	window.open('aviso-legal.htm','avisolegal','scrollbars=no,width=500,height=400');
}

/*** COMPROVA CAMPS OBLIGATORIS ***/
function CompruebaCamposObligatorios() {
	if (document.form1.nom.value == "") {
		alert('Debe introducir el nombre de la persona de contacto');
		return;
	}

	if (document.form1.email.value == "") {
		alert('Debe introducir un e-mail de contacto');
		return;
	}
	document.form1.submit();
}

function mostra_img(path, nom) {
	var img_gran = document.getElementById("img_gran");
	if (img_gran != null) {
		img_gran.src = "/img/" + path;

		var nom_gran = document.getElementById("nom_gran");
		nom_gran.innerHTML = nom;

		// evitem que segueixi la URI de l'anchor
		return false;
	} else {
		// no existeix l'id -> per tant s'ha d'anar a la página com si no hi hagués JS actiu
		return true;
	}
}

function mostra_vid(youtubeId, nom) {
	var vid_gran = document.getElementById("vid_gran");
	if (img_gran != null) {
		alert(vid_gran.innerHTML);
		//vid_gran.innerHTML = youtubeId;

		var nom_gran = document.getElementById("nom_gran");
		nom_gran.innerHTML = nom;

		// evitem que segueixi la URI de l'anchor
		return false;
	} else {
		// no existeix l'id -> per tant s'ha d'anar a la página com si no hi hagués JS actiu
		return true;
	}
}


