function ContentChanger(changer_container_name, changer_section_name, changer_link_name, all_sections_num)  {
	this.changer_container_name = changer_container_name;
	this.changer_section_name = changer_section_name;
	this.changer_link_name = changer_link_name;
	this.all_sections_num = all_sections_num;
	this.current_page_num  =  1;
}


ContentChanger.prototype.changeContent = function (section_num) {
	for(var i=1; i<=this.all_sections_num; i++) {
		$(this.changer_section_name +i).setStyle({'display':'none'}) 
	}
	$(this.changer_section_name +this.current_page_num).setStyle({'display':'block'}) 
}

ContentChanger.prototype.changeSubpage = function ( num) {
	this.current_page_num =  num;
	for(var i=1; i<=this.all_sections_num; i++) {
			$(this.changer_link_name+i).className = 'content_changer_link';
		}
	$(this.changer_link_name+num).className = 'content_changer_link_active';
	this.changeContent();
}

ContentChanger.prototype.showFirst = function () {
	$(this.changer_section_name+1).setStyle({'display':'block'});
	
	if($('content_changer_preloader')!=null) {
			$('content_changer_preloader').innerHTML = '';
	}
	
}

ContentChanger.prototype.getNext = function () {
	if(this.current_page_num>=this.all_sections_num) {
		this.changeSubpage(this.all_sections_num);
	} else {
		this.current_page_num++;
		this.changeSubpage(this.current_page_num);
	}
}


ContentChanger.prototype.getPrev = function () {
	if(this.current_page_num<=1) {
		this.changeSubpage(1);
	} else {
		this.current_page_num--;
		this.changeSubpage(this.current_page_num);
	}
}



// dodane - zmienia wyglad przyciskow
