//*************************************************************************************************
//Assign static parameters 
//*************************************************************************************************
latitude = 54.7 //degrees N
longitude = 11.1 //degrees E
elevation = 3 //station elevation in feet above sea-level
pi = 3.14159265 //define numeric value of PI
degrees_to_radians = pi / 180.0 //PI radians per 180 degrees
radians_to_degrees = 1 / degrees_to_radians
solar_constant = 1025 //Watts per sq meter on horizontal surface
attenuation_factor = .25 //attentuation constant for max solar intensity calculations
solar_zero_offset = 281 //Shifts sine curve for solar computations consistent with calendar


//*********************************
//Text Month Names
//*********************************
text_month = new Array(12)
text_month[1] = "Januar"
text_month[2] = "Februar"
text_month[3] = "Marts"
text_month[4] = "April"
text_month[5] = "Maj"
text_month[6] = "Juni"
text_month[7] = "Juli"
text_month[8] = "August"
text_month[9] = "September"
text_month[10] = "Oktober"
text_month[11] = "November"
text_month[12] = "December"

//*********************************
//Number of Days in Month
//*********************************
days_in_month = new Array(12)
days_in_month[1] = 31
days_in_month[2] = 29
days_in_month[3] = 31
days_in_month[4] = 30
days_in_month[5] = 31
days_in_month[6] = 30
days_in_month[7] = 31
days_in_month[8] = 31
days_in_month[9] = 30
days_in_month[10] = 31
days_in_month[11] = 30
days_in_month[12] = 31

//*********************************
//Starting and Ending Dates for DST
//*********************************
DST_start = new Array(8)
DST_start[2003] = 6 //Sunday (date) in April that DST begins
DST_start[2004] = 4
DST_start[2005] = 3
DST_start[2006] = 2
DST_start[2007] = 1
DST_start[2008] = 6
DST_start[2009] = 5
DST_start[2010] = 4
DST_end = new Array(8)
DST_end[2003] = 26 //Sunday (date) in October that DST ends
DST_end[2004] = 31
DST_end[2005] = 30
DST_end[2006] = 29
DST_end[2007] = 28
DST_end[2008] = 26
DST_end[2009] = 25
DST_end[2010] = 31

//*********************************
//Starting day of year through 2010
//*********************************
first_day_of_year = new Array(8)
first_day_of_year[2003] = 4 //Onsdag
first_day_of_year[2004] = 5 //Torsdag
first_day_of_year[2005] = 7 //Lørdag
first_day_of_year[2006] = 1 //Søndag
first_day_of_year[2007] = 2 //Mandag
first_day_of_year[2008] = 3 //Tirsdag
first_day_of_year[2009] = 5 //Torsdag
first_day_of_year[2010] = 6 //Fredag

//*********************************
//Text names for days of the week
//*********************************
text_day = new Array(7)
text_day[1] = "Søndag"
text_day[2] = "Mandag"
text_day[3] = "Tirsdag"
text_day[4] = "Onsdag"
text_day[5] = "Torsdag"
text_day[6] = "Fredag"
text_day[7] = "Lørdag"
