﻿function SunCity(c, updown){

	city = c.toLowerCase()

	if(city == 'london'){
		var sun=new Sun(51, 0, 0);
	}else if(city == 'berlin'){
		var sun=new Sun(52, 13, 1);
	}else if(city == 'madrid'){
		var sun=new Sun(40, 3, 1);
	}else if(city == 'rome' || city == 'rom' ){
		var sun=new Sun(41, 12, 1);
	}else if(city == 'paris'){
		var sun=new Sun(48, 2, 1);
	}else if(city == 'stockholm'){
		var sun=new Sun(59, 18, 1);
	}else if(city == 'barcelona'){
		var sun=new Sun(40, 3, 1);
	}else if(city == 'losangeles'){
		var sun=new Sun(34, 121, 8);
	}
	
	if(updown == 'set'){	
		document.write(sun.sunset());
	}else if(updown == 'rise'){
		document.write(sun.sunrise());	
	}
	
}
