if (typeof(TagContent) == 'undefined')
{
	var TagContent = 'Undefined TagContent';
}

if (typeof(GroupTagContent) == 'undefined')
{
	var GroupTagContent = 'skyblog';
}

var _stats_skyblog = 0;
if(typeof skyblog_officiel != 'undefined' && skyblog_officiel == 1)
{
	_stats_skyblog = 1;
}
if(typeof skyblog_test != 'undefined' && skyblog_test == 1)
{
	_stats_skyblog = 1;
}
if(typeof skyblog_top != 'undefined' && skyblog_top == '1')
{
	_stats_skyblog = 1;
}

if (TagContent.substring(0,7) == 'Blog / ')
{
	GroupTagContent = _estat_skyblog_get_extra_page();
	if ((TagContent.match(/^Blog \/ [0-9hiqouvwxyz]/i)) !== null)
	{
		_stats_skyblog = 1;
	}
}

if (TagContent.substring(0,7) == 'Blog / ' &&
    _stats_skyblog != 1 &&
    TagContent != 'Blog / iledefrance' &&
    TagContent != 'Blog / erreur 403' &&
    TagContent != 'Blog / erreur 404' &&
    TagContent != 'Blog / blog desactivé')
{
	TagContent = 'BlogUser';
}

if (TagContent.substring(0,8) == 'Admin / ') {
	TagContent = 'AdminUser';
	GroupTagContent = 'skyblog_admin';
	if (typeof(is_music) != 'undefined' && is_music != 0) {
		GroupTagContent += '_music';
	}

}

var _IM_estat = new Image(1,1);
function _estatl(_s,_g,_p,_c)
{
	var _S = 'http://sky.estat.com/m/web/';
	var _M = _s + '?';
	_M += 'n=' + Math.round(Math.random() * 1000000000);
	if (_g != '') {
		_M += '&g=' + _g;
	}
	_M += '&c=' + escape(_c);
	_M += '&p=' + escape(_p);
	var _R = escape(window.document.referrer);
	if (_R == 'undefined' || _R == '') {
		_R = '_bm_';
	}
	_M += '&r=' + _R;
	if (typeof(screen) == 'object') {
		_M += '&scw=' + screen.width + '&sch=' + screen.height + '&scp=' + screen.colorDepth;
	}
	_IM_estat.src = _S + _M;
}

function _estat_skyblog_get_extra_page() {
    var url = window.location.href;
    url = url.split('?')[0];

    var m = '';
    try
    {
        if((typeof(is_music) != 'undefined' && is_music != 0) ||
            (self.opener && typeof(self.opener.is_music) != 'undefined' && self.opener.is_music != 0))
        {
	    m = 'music_';
        }
    } catch (e) { }

    var rc = null;
    if ((rc = url.match(/\/[0-9]{1,}_comment_[0-9]{1,}\.html$/i)) !== null) {
        return 'skyblog_' + m + 'comment';
    }
    if ((rc = url.match(/\/liste_des_amis\.html$/i)) !== null) {
        return 'skyblog_' + m + 'liste_amis';
    }
    if ((rc = url.match(/\/amis_add\.phtml$/i)) !== null) {
        return 'skyblog_' + m + 'amis_form';
    }
    if ((rc = url.match(/\/photo\.html$/i)) !== null) {
        return 'skyblog_' + m + 'photo';
    }
    if ((rc = url.match(/\/envoyer\.phtml$/i)) !== null) {
        return 'skyblog_' + m + 'msg';
    }
    if ((rc = url.match(/\/friendsAnonyme\.phtml$/i)) !== null) {
        return 'skyblog_' + m + 'friend';
    }
    if ((rc = url.match(/\/commentaireForm\.phtml$/i)) !== null) {
        return 'skyblog_' + m + 'comment_form';
    }
    if ((rc = url.match(/\/cybercop\.phtml$/i)) !== null) {
        return 'skyblog_' + m + 'cybercop';
    }
    if ((rc = url.match(/\/404\.html$/i)) !== null) {
        return 'skyblog_' + m + 'error';
    }
    if ((rc = url.match(/\/403\.html$/i)) !== null) {
        return 'skyblog_' + m + 'error';
    }
    return 'skyblog_' + m + 'page';
}

if (typeof(tagstatsskypart1) == 'undefined')
{
	_estatl('285085190882', '213013112686', TagContent, GroupTagContent);
	var tagstatsskypart1 = 1;
}

// Prep tag metriweb (BE)
document.write('<script type="text/javascript" src="http://quick.orbus.fr/pays.js"></script>')

