function WeatherApi()
{
	// datamembers
	this.url = 'http://weer.rnews.be/widgets/client.php';

	// getters
	this.getApiKey = function() { return this.apikey; }
	this.getLanguage = function() { return this.language; }
	this.getCss = function() { return this.css; }
	this.getScrolling = function() { return this.scrolling }

	// setters
	this.setApiKey = function(apikey) { this.apikey = apikey; }
	this.setLanguage = function(language) { this.language = language; }
	this.setCss = function(css) { this.css = css; }
	this.setScrolling = function(scrolling) { this.scrolling = scrolling; }
	
	// create iframe
	this.createIFrame = function(id, width, height, url) 
	{
		// create element
		iframe = document.createElement('iframe');
		
		// set dimensions
		iframe.style.width = width + 'px';
		iframe.style.height = height + 'px';
		
		// remove border
		iframe.frameBorder = 0;

		// set source
		iframe.setAttribute('src', url);
		if(this.scrolling != undefined) iframe.setAttribute('scrolling', this.scrolling);

		// add into placeholder
		document.getElementById(id).appendChild(iframe);
	}
	
	// get forecast
	this.getForeCast = function(id, width, height, base_url, place, days, include_today)
	{
		// build url
		var url = this.url + '?api_key=' + this.getApiKey() +'&method=weather.getForeCast&place='+ place +'&days='+ days +'&include_today='+ include_today +'&base_url='+ base_url +'&language='+ this.getLanguage() +'&css=' + this.css;

		// create iFrame
		this.createIFrame(id, width, height, url);
	}
	
	// get todays weather
	this.getTodaysWeather = function(id, width, height, base_url, place)
	{
		// build url
		var url = this.url + '?api_key=' + this.getApiKey() +'&method=weather.getTodaysWeather&place='+ place +'&base_url='+ base_url +'&language='+ this.getLanguage() +'&css=' + this.css;
		
		// create iFrame
		this.createIFrame(id, width, height, url);
	}
}
