<!--
//Documento JavaScript por Moisés D. Busanya

//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//Funciones HOMEPAGE
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//

// Función de cambio de fondo dependiendo de la promo

function f_cambia_fondo(v_promo) {
		var v_capa = document.getElementById("fondo");
		var v_fondo = "edge_trailer/edge_trailer_fondo_"+v_promo+".jpg"+ "?id=" + new Date().getTime();
		v_capa.style.backgroundImage = "url(" + v_fondo + ")";
}

// Función de cambio de fondo de menú

function f_menu(v_imagen,v_capa_id) {
		var v_capa = document.getElementById(v_capa_id);
		v_capa.style.backgroundImage = "url(" + v_imagen + ")";
		 if (navigator.appName=="Netscape") {
			v_capa.style.cursor='pointer';
		} else {
			v_capa.style.cursor='hand';
		}
}

// Función de votación por estrellas

function f_estrellas(v_capa_id,v_estrella) {
		var v_capa_1 = document.getElementById(v_capa_id+"_1");
		var v_capa_2 = document.getElementById(v_capa_id+"_2");
		var v_capa_3 = document.getElementById(v_capa_id+"_3");
		var v_capa_4 = document.getElementById(v_capa_id+"_4");
		var v_capa_5 = document.getElementById(v_capa_id+"_5");
		
		v_capa_1.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_2.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_3.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_4.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_5.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		
		if (v_estrella==1)
		{
			
			v_capa_1.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
		
		}
		
		if (v_estrella==2)
		{
			
			v_capa_1.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_2.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
		
		}
		
		if (v_estrella==3)
		{
			
			v_capa_1.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_2.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_3.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
		
		}
		
		if (v_estrella==4)
		{
			
			v_capa_1.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_2.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_3.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_4.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
		
		}
		
		if (v_estrella==5)
		{
			
			v_capa_1.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_2.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_3.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_4.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
			v_capa_5.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_on.jpg)";
		
		}
}

// Función de votación por estrellas (APAGADO)

function f_estrellas_apaga(v_capa_id) {
		var v_capa_1 = document.getElementById(v_capa_id+"_1");
		var v_capa_2 = document.getElementById(v_capa_id+"_2");
		var v_capa_3 = document.getElementById(v_capa_id+"_3");
		var v_capa_4 = document.getElementById(v_capa_id+"_4");
		var v_capa_5 = document.getElementById(v_capa_id+"_5");
		
		v_capa_1.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_2.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_3.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_4.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
		v_capa_5.style.backgroundImage = "url(edge_public/img_edge/edge_star_user_off.jpg)";
}

function f_solicitud(){
	
	var errores="";
	
	if (document.frm_registro.v_nombre.value=="" || document.frm_registro.v_email.value=="" || document.frm_registro.v_evento.value=="" || document.frm_registro.v_formato.value=="" || document.frm_registro.v_localidad.value=="" || document.frm_registro.v_provincia.value=="" || document.frm_registro.v_direccion.value=="" || document.frm_registro.v_fecha.value=="" || document.frm_registro.v_hora.value=="" || document.frm_registro.v_inscripcion.value=="" || document.frm_registro.v_premios.value=="") {
		
			errores="Vous ne pouvez laisser en blanc un champ obligatoire."
		
	}
	
	var filter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

	if (!(filter.test(document.frm_registro.v_email.value))){
		errores="Les adresses electroniques indiquees ne coincident pas.";
		document.getElementById('v_email').focus();
	}
	
	 if (errores=="") {
				
		document.frm_registro.action="edge_lcg.asp";
		document.frm_registro.submit();
		
	}
	else
	{
		errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}
	
}

// Mostrar ocultar combos registro

function mostrar_ocultar(valor) {
 	document.getElementById('v_provincia_s').style.display="none";
 	document.getElementById('v_provincia_f').style.display="none";
 	document.getElementById('v_provincia_i').style.display="none";
	if (valor.value == "Spain") {
		document.getElementById('v_provincia_s').style.display="block";
	} else {
		if (valor.value == "France") {
			document.getElementById('v_provincia_f').style.display="block";
		} else {
			document.getElementById('v_provincia_i').style.display="block";
		}
	}
}

function mostrar_ocultar_b(valor) {
 	document.getElementById('v_provincia_s_b').style.display="none";
 	document.getElementById('v_provincia_f_b').style.display="none";
 	document.getElementById('v_provincia_i_b').style.display="none";
	if (valor.value == "Spain") {
		document.getElementById('v_provincia_s_b').style.display="block";
	} else {
		if (valor.value == "France") {
			document.getElementById('v_provincia_f_b').style.display="block";
		} else {
			document.getElementById('v_provincia_i_b').style.display="block";
		}
	}
}

// Valida registro

function f_valida_registro() {
 
 	errores="";
	
	var v_reg_edad=document.frm_registro.v_reg_edad.value;
	var v_fecha_js = new Date();
	dia=v_reg_edad.split("/")[0];
	mes=v_reg_edad.split("/")[1];
	anyo=v_reg_edad.split("/")[2];
		
	if (v_reg_edad.length>0) {
		if( (isNaN(dia)==true) || (isNaN(mes)==true) || (isNaN(anyo)==true) )
		{
			errores="La date de naissance indiquee est incorrecte.";
			document.getElementById('v_reg_edad').focus();
		}
		if(anyoBisiesto(anyo))
			febrero=29;
		else
			febrero=28;
		
		if ((mes<1) || (mes>12))
		{
			errores= "Le mois indique dans la date de naissance n'est pas valide. S'il vous plait, introduisez un mois correct.";
			document.getElementById('v_reg_edad').focus();
		}
		
		if ((mes==2) && ((dia<1) || (dia>febrero)))
		{
			errores= "Le jour indique dans la date de naissance n'est pas valide. S'il vous plait, introduisez un jour correct.";
			document.getElementById('v_reg_edad').focus();
		}
		
		if (((mes==1) || (mes==3) || (mes==5) || (mes==7) || (mes==8) || (mes==10) || (mes==12)) && ((dia<1) || (dia>31)))
		{
			errores= "Le jour indique dans la date de naissance n'est pas valide. S'il vous plait, introduisez un jour correct.";
			document.getElementById('v_reg_edad').focus();
		
		}
		
		if (((mes==4) || (mes==6) || (mes==9) || (mes==11)) && ((dia<1) || (dia>30)))
		{
		errores= "Le jour indique dans la date de naissance n'est pas valide. S'il vous plait, introduisez un jour correct.";
		document.getElementById('v_reg_edad').focus();
		
		}
		
		if ((anyo<1900) || (anyo>2020))
		{
		errores= "L'annee indiquee dans la date de naissance n'est pas valide. S'il vous plait, introduisez une annee entre 1900 et 2020.";
		document.getElementById('v_reg_edad').focus();
		
		}
		
		if ((v_fecha_js.getFullYear()-anyo)<18)
		{
		errores= "Vous devez etre majeur pour vous inscrire comme utilisateur d'Edge Entertainment.";
		document.getElementById('v_reg_edad').focus();
		
		}
	}
	   
	if (document.frm_registro.v_reg_clave.value != document.frm_registro.v_reg_clave_2.value){
	
		errores="Les codes indiques ne coincident pas.";
		document.getElementById('v_reg_clave').focus();
	
	}
		
	if (document.frm_registro.v_reg_email.value != document.frm_registro.v_reg_email_2.value){
	
		errores="Les adresses electroniques indiquees ne coincident pas.";
		document.getElementById('v_reg_email').focus();
		
	}
		
	if (document.frm_registro.v_reg_nickname.value.length<3){
	
		errores="Le nom de joueur doit comporter au moins 3 caracteres.";
		document.getElementById('v_reg_nickname').focus();
		
	}
		
	if (document.frm_registro.v_reg_clave.value.length<6){
	
		errores="Le mot de passe doit comporter au moins 6 caracteres.";
		document.getElementById('v_reg_clave').focus();
		
	}
	
	if (document.frm_registro.v_provincia_s.value == "0" && document.frm_registro.v_reg_pais.value == "Spain"){
	
		errores="Vous ne pouvez laisser en blanc un champ obligatoire.";
		document.getElementById('v_provincia_s').focus();
		
	}
	
	if (document.frm_registro.v_provincia_f.value == "0" && document.frm_registro.v_reg_pais.value == "France"){
	
		errores="Vous ne pouvez laisser en blanc un champ obligatoire.";
		document.getElementById('v_provincia_f').focus();
		
	}
		
	var filter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

	if (!(filter.test(document.frm_registro.v_reg_email.value))){
		errores="L'adresse electronique est incorrecte.";
		document.getElementById('v_reg_email').focus();
	}
		
	if (document.frm_registro.v_reg_nickname.value == "" || document.frm_registro.v_reg_clave.value == "" || document.frm_registro.v_reg_clave_2.value == "" || document.frm_registro.v_reg_email.value == "" || document.frm_registro.v_reg_email_2.value == "" || document.frm_registro.v_reg_nombre.value == "" || document.frm_registro.v_reg_apellidos.value == "" || document.frm_registro.v_reg_pais.value == "0" || document.frm_registro.v_reg_seguridad.value == "" || document.frm_registro.v_reg_edad.value == "")
	   errores= "Vous ne pouvez laisser en blanc un champ obligatoire.";
	   
 	if (errores=="")
	{
		document.frm_registro.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}
					

}

//Año bisiesto
function anyoBisiesto(anyo)
{
	if (anyo < 100)
	var fin = anyo + 1900;
	else
	var fin = anyo ;
	
	
	if (fin % 4 != 0)
	return false;
	else
	{
	if (fin % 100 == 0)
	{
	
	if (fin % 400 == 0)
	{
	return true;
	}
	
	else
	{
	return false;
	}
	}
	
	else
	{
	return true;
	}
	}
}

// Valida Configuracion perfil

function f_valida_cfg() {
 
 	errores="";
		   
	if (document.frm_registro.v_reg_clave.value != document.frm_registro.v_reg_clave_2.value){
	
		errores="Les codes indiques ne coincident pas.";
		document.getElementById('v_reg_clave').focus();
	
	}
		
	if (document.frm_registro.v_reg_clave.value.length<6 && document.frm_registro.v_reg_clave_2.value!=""){
	
		errores="Le mot de passe doit comporter au moins 6 caracteres.";
		document.getElementById('v_reg_clave').focus();
		
	}
		
	if (document.frm_registro.v_reg_clave_act.value == "")
	   errores= "Vous devez indiquer votre mot de passe actuel pour effectuer les changements.";
	   
 	if (errores=="")
	{
		document.frm_registro.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}
					

}

// Valida perfil

function f_valida_edita_perfil() {
 
 	errores="";
	
	fckEditor1val = FCKeditorAPI.__Instances['v_firma'].GetHTML();		
	document.getElementById('v_firma').value = fckEditor1val;
		
	if (document.frm_registro.v_reg_pais.value==0 || (document.frm_registro.v_provincia_i.value=="" && document.frm_registro.v_provincia_s.value==0 && document.frm_registro.v_provincia_f.value==0)){
	
		errores="Vous devez indiquer Pays et Departement.";
		document.getElementById('v_reg_pais').focus();
		
	}
	   
 	if (errores=="")
	{
		document.frm_registro.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}
					

}

// Valida ludoteca

function f_valida_edita_ludoteca() {
 
	errores="";
	
	if (document.frm_registro.v_top_1.value==document.frm_registro.v_top_2.value || document.frm_registro.v_top_1.value==document.frm_registro.v_top_3.value || document.frm_registro.v_top_1.value==document.frm_registro.v_top_4.value || document.frm_registro.v_top_1.value==document.frm_registro.v_top_5.value){
	
		if (document.frm_registro.v_top_2.value>0 || document.frm_registro.v_top_3.value>0 || document.frm_registro.v_top_4.value>0 || document.frm_registro.v_top_5.value>0){
		
		errores="Vous ne pouvez mettre deux Top identiques.";
		
		}
		
	}
	
	if (document.frm_registro.v_top_2.value==document.frm_registro.v_top_3.value || document.frm_registro.v_top_2.value==document.frm_registro.v_top_4.value || document.frm_registro.v_top_2.value==document.frm_registro.v_top_5.value){
	
		if (document.frm_registro.v_top_3.value>0 || document.frm_registro.v_top_4.value>0 || document.frm_registro.v_top_5.value>0){
		
		errores="Vous ne pouvez mettre deux Top identiques.";
		
		}
		
	}
	
	if (document.frm_registro.v_top_3.value==document.frm_registro.v_top_4.value || document.frm_registro.v_top_3.value==document.frm_registro.v_top_5.value){
	
		if (document.frm_registro.v_top_4.value>0 || document.frm_registro.v_top_5.value>0){
		
		errores="Vous ne pouvez mettre deux Top identiques.";
		
		}
		
	}
	
	if (document.frm_registro.v_top_4.value==document.frm_registro.v_top_5.value){
	
		if (document.frm_registro.v_top_5.value>0){
		
		errores="Vous ne pouvez mettre deux Top identiques.";
		
		}
		
	}
		
	if (document.frm_registro.v_top_1.value==0 && (document.frm_registro.v_top_2.value>0 || document.frm_registro.v_top_3.value>0 || document.frm_registro.v_top_4.value>0 || document.frm_registro.v_top_5.value>0)){
	
		errores="Vous ne pouvez mettre un Top superieur au Top 1 sans definir d'abord votre Top 1.";
		
	}
	
	if (document.frm_registro.v_top_2.value==0 && (document.frm_registro.v_top_3.value>0 || document.frm_registro.v_top_4.value>0 || document.frm_registro.v_top_5.value>0)){
	
		errores="Vous ne pouvez mettre un Top superieur au Top 2 sans definir d'abord votre Top 2.";
		
	}
	
	if (document.frm_registro.v_top_3.value==0 && (document.frm_registro.v_top_4.value>0 || document.frm_registro.v_top_5.value>0)){
	
		errores="Vous ne pouvez mettre un Top superieur au Top 3 sans definir d'abord votre Top 3.";
		
	}
	
	if (document.frm_registro.v_top_4.value==0 && (document.frm_registro.v_top_5.value>0)){
	
		errores="Vous ne pouvez mettre un Top superieur au Top 4 sans definir d'abord votre Top 4.";
		
	}
	
	if (document.frm_registro.v_top_1.value==0 && document.frm_registro.v_top_2.value==0 && document.frm_registro.v_top_3.value==0 && document.frm_registro.v_top_4.value==0 && document.frm_registro.v_top_5.value==0){
	
		errores="";
		
	}
	   
 	if (errores=="")
	{
		document.frm_registro.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}

}

// Valida Buscador amigos

function f_busca_amigos() {
 
 	errores="";
		
	if (document.frm_registro.v_buscar_ami_j.value=="" && document.frm_registro.v_buscar_ami_c.value=="" && document.frm_registro.v_buscar_ami_p.value==""){
	
		errores="Vous devez preciser votre recherche.";
		
	}
	   
 	if (errores=="")
	{
		document.frm_registro.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}
					

}

// Valida Aceptar amigos

function f_valida_amigos() {
 
 	errores="";
		
	
	   
 	if (errores=="")
	{
		document.frm_registro.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}
					

}

// Valida tema foro

function f_valida_tema() {
	
	var errores="";
	
	fckEditor1val = FCKeditorAPI.__Instances['v_texto'].GetHTML();		
	document.getElementById('v_texto').value = fckEditor1val;
	
	if ((document.frm_crear_tema.v_titulo_tema.value == "")||(document.frm_crear_tema.v_texto.value == "")) {
		errores="Vous ne pouvez laisser en blanc le Sujet et/ou le Message.";
	 }
	 
	 if (document.frm_crear_tema.v_texto.value.length < 25) {
		errores="Message trop court pour etre publie.";
	 }
	 
	 if (errores=="")
	{
				
		document.frm_crear_tema.submit();
	}
	else
	{
		
	 	document.getElementById('v_envio').value = 0;
		errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}

}

// Valida respuesta foro

function f_valida_respuesta() {
	
	var errores="";
	
	fckEditor1val = FCKeditorAPI.__Instances['v_texto'].GetHTML();		
	document.getElementById('v_texto').value = fckEditor1val;
	
	if (document.frm_crear_tema.v_texto.value == "") {
		errores="Vous ne pouvez laisser en blanc le Message.";
	 }
	 
	 if (document.frm_crear_tema.v_texto.value.length < 25) {
		errores="Message trop court pour etre publie.";
	 }
	 
	 if (errores=="")
	{
				
		document.frm_crear_tema.submit();
	}
	else
	{
		
	 	document.getElementById('v_envio').value = 0;
		errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}

}

// Valida reporte foro

function f_valida_reporte() {
	
	var errores="";
	
	fckEditor1val = FCKeditorAPI.__Instances['v_texto'].GetHTML();		
	document.getElementById('v_texto').value = fckEditor1val;
	
	if (document.frm_crear_tema.v_texto.value == "") {
		errores="Vous ne pouvez laisser en blanc le Message.";
	 }
	 
	 if (errores=="")
	{
				
		document.frm_crear_tema.submit();
	}
	else
	{
		
	 	document.getElementById('v_reportar').value = 0;
		errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}

}

// Valida mover tema foro

function f_valida_mover() {
	
	var errores="";
	 
	 if (document.frm_mover_tema.v_foro_final.value == 0) {
		errores="Choisissez el Foro Destino.";
	 }
	 
	 if (errores=="")
	{
				
		document.frm_mover_tema.submit();
	}
	else
	{
		
		errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}

}

//Contador de caracteres

function f_contador (campo, cuentacampo, limite) {
if (campo.value.length > limite) campo.value = campo.value.substring(0, limite);
else cuentacampo.value = limite - campo.value.length;
}

//Redimensiona pagina de perfil

function f_redimensiona(altura,capa){
	
	var valor = document.getElementById(capa).offsetHeight;
	
	if (valor<altura){
		
		document.getElementById(capa).style.height="730px";
	
	}
	
}

//Recalcula carrito

function f_recalcula(){
	
	var errores="";
	
	var elementos = document.frm_carrito.elements.length;
		
	for (v_i=0;v_i<=elementos-1;v_i++) {
		
		if (isNaN(document.frm_carrito.elements[v_i].value)) errores="L'une des quantites n'est pas un chiffre.";
		
	}
	
	 if (errores=="") {
				
		document.frm_carrito.action="edge_tienda_carrito.asp?etacc=3";
		document.frm_carrito.submit();
		
	}
	else
	{
		errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}
	
}

//Formaliza carrito

function f_formaliza(){
	
	var errores="";
	
	var elementos = document.frm_carrito.elements.length;
		
	for (v_i=0;v_i<=elementos-1;v_i++) {
		
		if (isNaN(document.frm_carrito.elements[v_i].value)) errores="L'une des quantites n'est pas un chiffre.";
		
	}
	
	 if (errores=="") {
				
		document.frm_carrito.action="edge_tienda_st_1.asp";
		document.frm_carrito.submit();
		
	}
	else
	{
		errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}
	
}

//Valida Pedidos Tienda
function f_valida_pedido() {
    var errores="";
	
	var filter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

	if (!(filter.test(document.frm_carrito.v_email.value))){
		errores="L'adresse electronique est incorrecte.";
		document.getElementById('v_email').focus();
	}
	
	if (document.frm_carrito.v_pago.value == 0) {
		
	   		errores= "Vous devez indiquer un Mode de Paiement.";
		
	 }
	
	if (document.frm_carrito.v_zona.value == 0) {
		
	   		errores= "Vous ne pouvez pas ne pas selectionner cette Section.";
		
	 }
	 
	 if (document.frm_carrito.v_provincia_s.value == "0" && document.frm_carrito.v_pais.value == "Spain"){
	
		errores="Es obligatorio indicar una provincia.";
		document.getElementById('v_provincia_s').focus();
		
	}
	
	if (document.frm_carrito.v_provincia_f.value == "0" && document.frm_carrito.v_pais.value == "France"){
	
		errores="Es obligatorio indicar una provincia.";
		document.getElementById('v_provincia_f').focus();
		
	}
	
	if (document.frm_carrito.v_nombre.value == "" || document.frm_carrito.v_apellidos.value == "" || document.frm_carrito.v_telefono.value == "" || document.frm_carrito.v_pais.value == 0 || (document.frm_carrito.v_provincia_s.value == 0 && document.frm_carrito.v_provincia_f.value == 0 && document.frm_carrito.v_provincia_i.value == "") || document.frm_carrito.v_localidad.value == "" || document.frm_carrito.v_direccion.value == "" || document.frm_carrito.v_codigo.value == "" || document.frm_carrito.v_email.value == "") {
		
	   		errores= "Vous ne pouvez laisser en blanc un champ obligatoire.";
		
	 }
	 
	 //Comprobamos que no deje el campo de país de envío en blanco si rellena al menos el nombre de dirección de envío
	 
	 if (document.frm_carrito.v_nombre_b.value != "" && document.frm_carrito.v_pais_b.value == 0) {
		
	   		errores= "Vous ne pouvez laisser en blanc un champ obligatoire.";
		
	 }
	
	 if (errores=="")
	{
				
		document.frm_carrito.action="edge_tienda_st_2.asp";
		document.frm_carrito.submit();
		
	}
	else
	{
		
	 	errores="\nErreur de formulaire:\n\n"+errores;
		
		alert(errores);
	}
}

function f_valida_envia_wish() {
	var filter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;
	var errores="";

	if (!(filter.test(document.frm_wish.v_email.value))){
		errores="L'adresse electronique est incorrecte.";
		document.getElementById('v_email').focus();
	}
	
	if (errores=="")
	{
		document.frm_wish.submit();
	}
	else
	{
	 	errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}
}

//Atencion Jugador

function f_atencion(){
	
	var errores="";
	
	if (document.frm_registro.v_nombre.value=="" || document.frm_registro.v_email.value=="" || document.frm_registro.v_mensaje.value=="" || document.frm_registro.v_asunto.value==0) {
		
			errores="Vous ne pouvez laisser en blanc un champ obligatoire."
		
	}
	
	var filter=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/;

	if (!(filter.test(document.frm_registro.v_email.value))){
		errores="L'adresse electronique est incorrecte.";
		document.getElementById('v_email').focus();
	}
	
	 if (errores=="") {
				
		document.frm_registro.action="edge_atencion.asp";
		document.frm_registro.submit();
		
	}
	else
	{
		errores="\nErreur de formulaire:\n\n"+errores;
		alert(errores);
	}
	
}

// Valida invitación

function f_valida_envia_invitacion() {
 
 	errores="";
		
	if (document.frm_mensajes.v_mensaje.value=="" || document.frm_mensajes.v_mensaje.value.length < 25){
	
		errores="Vous ne pouvez laisser en blanc le Message.";
		document.getElementById('v_mensaje').focus();
		
	}
	   
 	if (errores=="")
	{
		document.frm_mensajes.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment te avisa:\n\n"+errores;
		alert(errores);
	}
					

}

// Valida mensajeria privada

function f_valida_envia_mail() {
 
 	errores="";
		
	if (document.frm_mensajes.v_mensaje.value==""){
	
		errores="Vous ne pouvez laisser en blanc le Message.";
		document.getElementById('v_mensaje').focus();
		
	}
	   
 	if (errores=="")
	{
		document.frm_mensajes.submit();
	}
	else
	{
	 	errores="\nEdge Entertainment vous previent:\n\n"+errores;
		alert(errores);
	}
					

}

//+++++++++++++++++++++++++++++++++++++++++++//
//Estas funciones son de AJAX
//+++++++++++++++++++++++++++++++++++++++++++//

function llamada (url, id_contenedor)
{
    var pagina_requerida = false;
	//alert(url);
    if (window.XMLHttpRequest)
    {
        //Si es Mozilla, Safari etc
        pagina_requerida = new XMLHttpRequest ();
    } else if (window.ActiveXObject)
    {
        //pero si es IE
        try 
        {
            pagina_requerida = new ActiveXObject ("Msxml2.XMLHTTP");
        }
        catch (e)
        {
            //en caso que sea una versión antigua
            try
            {
                pagina_requerida = new ActiveXObject ("Microsoft.XMLHTTP");
            }
            catch (e)
            {
            }
        }
    } 
    else
    return false;
    pagina_requerida.onreadystatechange = function ()
    {
        //función de respuesta
        cargarpagina (pagina_requerida, id_contenedor);
    }
    pagina_requerida.open ('GET', url, true); //asignamos los métodos open y send
    pagina_requerida.send (null);
}
//Todo es correcto y ha llegado el momento de poner la información requerida
//en su sitio en la pagina xhtml
function cargarpagina (pagina_requerida, id_contenedor)
{
    if (pagina_requerida.readyState == 4 && (pagina_requerida.status == 200 || window.location.href.indexOf ("http") == - 1))
    document.getElementById (id_contenedor).innerHTML = pagina_requerida.responseText;
}

//-->