// cross-browser add-remove event to object
widthGenerico=480;
heightGenerico=272;

// Alerts genericos
function popup_web_condicionesLegales()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_web_condicionesLegales, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-web-condicionesLegales.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:600, 
									 height:390});		
	}
}
// Errores genericos
function popup_recordar_contrasena()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_errorLogIn_NoActivo, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-recordar-contrasena.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

function popup_errorGenerico()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_errorGenerico, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-errorGenerico.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

function popup_errorLogIn()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_errorLogIn, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-errorLogIn.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

function popup_errorLogIn_NoActivo()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_errorLogIn_NoActivo, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-errorLogIn-NoActivo.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

function popup_no_leggeado()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_no_leggeado, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-notLogged.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

// Alerts para la promociones genericos
function popup_promo_avisame_noLogeado()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_promo_avisame_noLogeado, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/Promociones/popup-promo-avisame-noLogeado.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:600, 
									 height:390});		
	}
}
function popup_promo_avisame_yaLogeado()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_promo_avisame_yaLogeado, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/Promociones/popup-promo-avisame-yaLogeado.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}
// Errores para el registro
function popup_registro_avisoLega()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_registro_ok, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/registro/popup-registro-avisoLegal.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:600, 
									 height:450});		
	}
}
function popup_registro_ok()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_registro_ok, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/registro/popup-registro-ok.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}
function popup_registro_NIFRepetido()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_registro_NIFRepetido, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/registro/popup-registro-error-dni.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}
function popup_registro_EmailRepetido()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_registro_EmailRepetido, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/registro/popup-registro-error-email.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

function popup_registro_LoginRepetido()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_registro_LoginRepetido, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/registro/popup-registro-error-login.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

function popup_registro_activacionCuenta()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_registro_activacionCuenta, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/registro/popup-registro-validacion-ok.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

//Modificacion de datos correcta
function popup_modificar_ok()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_modificar_ok, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/modificar/popup-modicifar-ok.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

// OK a la validaciond de los premios en la home
function popup_promoCA_ValidacionganadorMomentos()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_promoCA_ValidacionganadorMomentos, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/Promociones/conAmigos/popup-promo-validacionMomento.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

function popup_revisa_tus_datos()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_revisa_tus_datos, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-revisa-tus-datos.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:945, 
									 height:540});		
	}
}


// Contacta
function popup_contacta_ok()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_contacta_ok, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/contacta/popup-contacta-ok.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

//bajas
function popup_bajas_ok()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_bajas_ok, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-bajasOK.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}

//Apoyo a la seleccion
function popup_mensaje_apoyo_ok()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_mensaje_apoyo_ok, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/pena/popup-mensaje-apoyo-ok.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}
function popup_mensaje_malicioso()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_mensaje_malicioso, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/pena/popup-mensaje-malicioso.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}


function popup_receta_ok()
{
	if(myLightWindow == null)
	{
		setTimeout(popup_receta_ok, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/recetas/popup-recetas-ok.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}
function popup_layer_home_barril(){
	if(myLightWindow == null)
	{
		setTimeout(popup_layer_home_barril, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/layer_barril_puntos_venta.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:1000, 
									 height:680});		
	}
}

function  popup_recordatorio_registrate(){
	if(myLightWindow == null)
	{
		setTimeout(popup_recordatorio_registrate, 100);
	}
	else
	{
		myLightWindow.activateWindow({href:'/popUps/popup-recordatorio-registrate.asp',
									 title:'', 
									 caption:'', 
									 type:'external', 
									 width:widthGenerico, 
									 height:heightGenerico});		
	}
}


