

function histats_site_class() { // vigotti's unserialize  class
    try {
	
        this.ids = 0 ;
        this.time_offset = 0 ;
        this.timezone_id = 0 ;
        this.timezone_str = '' ;

        this.gmt_time = 0 ;
        this.site_time = 0 ;
        this.forecast_STATS_STARTn=1000;

        this.AR_ADDITIONAL_INFO = new Array();
        // current time data 
        this.ID_CALDATE_SITE = 0 ;
        


        // displayed relative data
        this.stats_pagetype = 'summary' ;
        this.stats_day = 0 ;
        this.stats_month = 0 ;
        this.stats_year = 0 ;



        this.daily_stats = new Array(); // contain array of  object
        this.monthly_stats = new Array(); // contain array of  object
        this.last60_stats = new Array(); // contain array of  object

        this.OBJ_ref = null;
        this.OBJ_traff = null;
        this.OBJ_Tvars = null;
        this.OBJ_ref_trend = new Array(); // contain a general object referer trend

        this.lht = 0 ;
      
        this.multimonthAR = new Array(); // contain some multimonth data processed



        this.add_daily_stats =  function () {
            if(!this.ARmodules) return -1;
            var lastEL = this.ARmodules.length-1
            for(var i = lastEL ; i >=0 ; i--){
                if(this.ARmodules[i]) return i ;
            }
            return 0 ;

        }

    } catch(e){
        alert("err loading javascript ,    try refreshing browser cache \n "  + e.message + "\n ");
    }
	
} // end


//var OBJ_SITE = new histats_site_class();
var OBJ_SITEs = new Array();


histats_site_class.prototype.read_additional_info  = function(AR) {
    copia_ar(AR,this.AR_ADDITIONAL_INFO);
    this.AR_ADDITIONAL_INFO['ppv'] = 0 ; 
    if(this.AR_ADDITIONAL_INFO['total_vis'] > 0 ) this.AR_ADDITIONAL_INFO['ppv'] = parseInt(( this.AR_ADDITIONAL_INFO['total_hits']/ this.AR_ADDITIONAL_INFO['total_vis'])*100)/100;
}
// build tooltip calendar for this sid
histats_site_class.prototype.f_build_date  = function() {
    this.ID_CALDATE_SITE  = G_CAL_HANDLER.crate_cal_obj();
    G_CAL_HANDLER.AR_CALENDAR[this.ID_CALDATE_SITE].build_OVER_IDS(this.ids);
    G_CAL_HANDLER.AR_CALENDAR[this.ID_CALDATE_SITE].build_html_portions();
    G_CAL_HANDLER.AR_CALENDAR[this.ID_CALDATE_SITE].print_toDIV();

    GLOBAL_DHTMLOBJ.CREATE_ELEMENT('div_DATECAL','dhtml_dailystats');
    document.getElementById('div_DATECAL').style.display="none";
//GLOBAL_DHTMLOBJ.APPEND_contentdiv_MOUSE_EVENT('div_dhtmlMENU_date_' + this.nmod);
}


// build tooltip calendar for this sid
histats_site_class.prototype.f_build_tootip_cal  = function() {
    //<div id="histats_sid_TOOLTIP_CAL" >    </div>
    }


  if(!JSCACHE) JSCACHE = [] ;
JSCACHE.push(['site.class.js',1]);
