/** Pozor interaktuje s funkci Map.getLayersBy()
* Bylo nutne vybre udelat vlastnim cyklem
*/

//Prepsane na funkci a sousteno na konci inicializace mapy z map_init();
function OLBG_setSlider(map) {
//window.addEvent('domready', function(){

	// Second Example
	//var el = $('setValue'), value = 0;

	
	var updateValue = function(){
		// Sets the color of the output text and its text to the current color
		//el.set('text', value);
		//alert('update');
		map.layers[3].setOpacity(value/50);
		map.layers[4].setOpacity(value/50);
	};
	
	//alert('inicializace');
	var slider = new Slider($('green'), $('green').getElement('.knob'), {
		steps: 50,  // Steps from 0 to 255
		//wheel: true, // Using the mousewheel is possible too
		onChange: function(){
			// Based on the Slider values set an RGB value in the color array
			value = this.step;
			// and update the output to the new value
			updateValue();
		}
	}).set(37);
//});

}
	
/*
function mootool() {

	// Second Example
	var el = $('setValue'), value = 0;
	
	var updateValue = function(){
		// Sets the color of the output text and its text to the current color
		el.set('text', value);
	};
	alert('msg');
	var slider = new Slider($('green'), $('green').getElement('.knob'), {
		steps: 100,  // Steps from 0 to 255
		//wheel: true, // Using the mousewheel is possible too
		onChange: function(){
			// Based on the Slider values set an RGB value in the color array
			value = this.step;
			// and update the output to the new value
			updateValue();
		}
	}).set(50);
	//});

}

*/

