// This file was created for http://www.ine-pps.nl 

// Discribe the themes
// Select theme for the site to "dynamic" or "static"

//var theme="Dynamic";																		
var theme="colorful";
// Debugging lines
//theme="static"; 			// FORCE THIS THEME
//theme_daylight="dag";	 	// FORCE THIS DAYLIGHT THEME
var back_pic = new Array();								// don't touch this
	back_pic[0]="";
var music_file = new Array();	// don't touch this
	music_file[0]="";
	
var background_opacity=0;								//Percentage visible
var box_opacity=75;
var box_left_opacity=25;
var let_it_snow = 0;		
var box_color = new Array();							// don't touch this
    box_color=[80,80,80];									//rgb value
var blink_box_color = new Array();						// don't touch this
    blink_box_color=[80,80,80];							//rgb value
var default_onmouseout_color_rgb = new Array() // don't touch this
    default_onmouseout_color_rgb=[255,255,255];
var default_onmouseover_color_rgb = new Array() // don't touch this
    default_onmouseover_color_rgb=[240,180,80];
var welcome_text;
var thisdate = new Date();
var current_hour=thisdate.getHours();
var current_month=thisdate.getMonth();
var current_day=thisdate.getDate();
var current_year=thisdate.getYear();
var new_year=0;
var current_dayoftheweek=thisdate.getDay();

if(current_month==0) {		// don't touch this!
	new_year=current_year;
} else {
	new_year=current_year+1;
}

// If theme is "dynamic", check for hour of the day
function detect_theme_daylight() {
	//Variation on day  / night
	if(current_hour>=7 && current_hour<9)		return "donker";		//2
	if(current_hour>=9 && current_hour<11)		return "schemerig";		//2
	if(current_hour>=11 && current_hour<17)	return "dag";			//6
	if(current_hour>=17 && current_hour<20)	return "schemerig";		//3
	if(current_hour>=20 && current_hour<22)	return "donker";		//2
	if(current_hour>=22 || current_hour<7)		return "nacht";			//9
}

var theme_daylight=detect_theme_daylight();


// Month 0 = januari
// Day 1 = day 1


// ************************* List of themes ****************************
// Options to set with a theme:
//	- theme
//	- welcome_text
//	- box_color
//	- box_opacity
//	- box_left_opacity
//	- background opacity
//	- blink_box_color
//	- default_onmouseout_color_rgb
//	- default_onmouseover_color_rgb
//	- back_pic[]
//	- music_file[]
//	- let_it_snow

// Debug theme
if(theme=="debug") { 
		
		back_pic[0] = images_path+"/backgrounds/background1.jpg";
		welcome_text="- DEBUG MODE -";
		box_color = sand;		
	}

// just colors
else if(theme=="colorful") { 
		
		welcome_text="WELCOME to WWW.INE-PPS.NL!";
		let_it_snow=0;
		box_color = sand;			
		background_opacity=10;		
		box_opacity=70;
		box_left_opacity=25;
		back_pic[0] = images_path+"/backgrounds/fantasy1.jpg";
	}
	
	
// Valentine's day | feb 14
else if(current_month==1 && current_day==14) { 
		
		theme="Valentines day";
		welcome_text="Valentine's Day";
		let_it_snow=0;
		box_color = pink;			
		background_opacity=10;		
		box_opacity=70;
		box_left_opacity=25;
		back_pic[0] = images_path+"/backgrounds/background_valentine1.jpg";
	}
	
// World animal day | okt 4
else if(current_month==9 && current_day==4) { 	

		theme="Animals day"; 
		welcome_text="World Animal Day";
		let_it_snow=0;
		box_color = sand;
		background_opacity=10;		
		box_opacity=70;
		box_left_opacity=25;
		back_pic[0] = images_path+"/backgrounds/background_dierendag1.jpg";
	}

// Birthday | okt 25
else if(current_month==9 && current_day==25) { 
	
		theme="Birthday"; 
		welcome_text="Today, oktober 25th, is my Birthday!!";
		box_color = pink;
		background_opacity=10;
		box_opacity=80;
		box_left_opacity=25;
		back_pic[0] = images_path+"/backgrounds/background_birthday.jpg";
	}


// Christmas | december 12 tm 26
else if(current_month==11 && current_day>=12 && current_day<=26) { 

		theme="Christmas"; 
		welcome_text="Merry Christmas!!";
		let_it_snow=1;
		box_color = sand;			
		background_opacity=10;		
		box_opacity=70;
		box_left_opacity=25;
		back_pic[0] = images_path+"/backgrounds/background_christmas.jpg";
	}

// Newyear | december 27 tm 31 and january 1 tm 2
else if((current_month==11 && current_day>=27) || (current_month==0 && current_day<=1)) { 

		theme="Newyear"; 
		welcome_text="Best wishes for "+new_year+"!!!";
		box_color = red;		
		background_opacity=5;	
		box_opacity=75;
		box_left_opacity=25;
		back_pic[0] = images_path+"/backgrounds/background_newyear2.jpg";
		back_pic[1] = images_path+"/backgrounds/background_newyear3.jpg";
		back_pic[2] = images_path+"/backgrounds/background_newyear4.jpg";
		back_pic[3] = images_path+"/backgrounds/background_newyear6.jpg";
		back_pic[4] = images_path+"/backgrounds/background_newyear5.jpg";
	}


// Static theme on every sunday or forced
//else if(current_dayoftheweek==0 || theme=="static") { 

		//theme="static";
		//welcome_text="WELCOME to www.ine-pps.nl!";		
		//box_color = gold1;			
		//background_opacity=5;				
		//box_opacity=75;
		//box_left_opacity=25;
	//}
	
// No special occurrance
else {										
		theme="Dynamic"; 
		welcome_text="WELCOME to www.ine-pps.nl!";
		let_it_snow=0;
		
		switch(theme_daylight) {
		
			case "dag" :		//box_color =orangesandlight;	
								box_color =sand;	
								background_opacity=15;	
								box_opacity=80;
								box_left_opacity=25;
								default_onmouseover_color_rgb=[240,190,100];
								break;
								
			case "schemerig" :	box_color = redsandlight;	
								background_opacity=15;	
								box_opacity=80;
								box_left_opacity=15;
								default_onmouseover_color_rgb=[240,180,80];
								break;                
								
			case "donker" :		box_color= purplesandlight;	
								background_opacity=15;	
								box_opacity=80;
								box_left_opacity=20;
								default_onmouseover_color_rgb=[240,180,80];
								break;  
								
			case "nacht" :		box_color= bluesandlight;	
								background_opacity=10;	
								box_opacity=80;
								box_left_opacity=20;
								default_onmouseover_color_rgb=[240,180,80];
								break;  								
			
			default : 			box_color = redsandlight;	
								background_opacity=10;				
								box_opacity=80;
								box_left_opacity=25;
								default_onmouseover_color_rgb=[240,180,80];
								break;
			
		}
	 }

// *********************** End list of themes **************************



	
