/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


    /**
 * Funcion encargada de ejecutar una funcion en el onload
 * @autor dortega
 * @version 1.0
 * @date 10-11-2008
 * @param {Object} func
 */
function addLoadEvent(func){
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    }
    else {
        window.onload = function(){
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}
/**
 * Funcion que ejecuta el googel analytics de manera asincrona
 * @autor dortega
 * @version 1.0
 * @date 10-11-2008
 * @param (String) clave clave del google analytics
 */
function iniciarGoogleAnalyticsNuevoAsincrono(clave){
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    var s = document.createElement("script");
    s.type = "text/javascript";
    s.src = gaJsHost + "google-analytics.com/ga.js";
    s.onload = s.onreadystatechange = function(){
        if (typeof(_gat) == 'object') {
            var pageTracker = _gat._getTracker(clave);
            pageTracker._trackPageview();
        }
    };
    document.getElementsByTagName("head")[0].appendChild(s);
}

//addLoadEvent(function(){
    //iniciarGoogleAnalyticsNuevoAsincrono('UA-525210-1');
    iniciarGoogleAnalyticsNuevoAsincrono('UA-2354205-1');    
//});
