


function get_user_name(){
	var sName = '';
	
	var oAjax = new WBE_AjaxClass();
	oAjax.clear();
	var xmlObj = oAjax.throwEventXML('user_get_first_name');
	
	if (xmlObj) {
		sName = oAjax.getXMLNodeValue(xmlObj, 'name');
		if (!is_set(sName)) sName = '';
	}
	
	return sName;
}

function lngUrl(url, lng)
{
	var lng_url = '';
	var a_sUrl = url.split('/');
	
	if (a_sUrl.length > 0) {
		a_sUrl[a_sUrl.length -1] = lng + '__' + a_sUrl[a_sUrl.length -1];
		lng_url = a_sUrl.join('/');
	}
	else {
		lng_url = lng + '__' + url;
	}
	
	return lng_url;
}

function is_set(obj)
{
	if (typeof obj != 'undefined') 
	{
		if (obj) 
		{
			if (obj != null)
			{
				return true;
			}
		}
	}
	
	return false;
}

function show_alert_subscription() {
	var sUrl = document.location.href;
	if (sUrl.indexOf('wbe_subscriber_confirm') > 0) alert('Se ha suscrito correctamente al boletín');
	if (sUrl.indexOf('wbe_subscriber_delete') > 0) alert('Se han borrado sus datos de la suscripcion al boletín');
}
	
function addLytebox() {

    obj = document.body;

    if (obj.addEventListener)
    {
        initLightbox();
    }
    else if (obj.attachEvent)
    {
        document.body.onload = function() {initLightbox();};
    }
}
