function nav_start() {
var menu = document.getElementById('navigation_menu');
var menu_text;
menu_text = '<a href="http://www.majestic.pl/index.php">News</a>';
menu_text = menu_text + '<a href="http://www.majestic.pl/index.php?site=news&action=archive">Archiwum </a>';
menu_text = menu_text + '<a href="http://www.majestic.pl/index.php?site=contact">Kontakt </a>';
menu.innerHTML = menu_text;
}

function nav_clan() {
var menu = document.getElementById('navigation_menu');
var menu_text;
menu_text = '<a href="http://www.majestic.pl/index.php?site=about">O nas </a>';
menu_text = menu_text +'<a href="http://www.majestic.pl/index.php?site=history">Historia </a>';
menu_text = menu_text + '<a href="http://www.majestic.pl/index.php?site=members">Członkowie </a>';
menu_text = menu_text + '<a href="http://www.majestic.pl/index.php?site=clanwars">Mecze Klanu  </a>';
menu_text = menu_text + '<a href="http://www.majestic.pl/?site=static&staticID=4">Sponsorzy  </a>';
menu.innerHTML = menu_text;
}

function nav_publicystyka() {
var menu = document.getElementById('navigation_menu');
var menu_text;
menu_text = '<a href="http://www.majestic.pl/index.php?site=articles">Artykuły</a>';
menu_text = menu_text + '<a href="http://www.majestic.pl/index.php?site=movies">Filmy</a>';
menu_text = menu_text + '<a href="http://www.majestic.pl/index.php?site=gallery">Galeria</a>';
menu.innerHTML = menu_text;
}

function show_box(id,id_out) {
var box = document.getElementById(id);
var box_out = document.getElementById(id_out);
box.style.display = 'block';
box_out.style.display = 'none';
}

var counter = 0;
var stop = 'prv';

function player_img() {

	var visible_flag = false;
	var divcontainer = document.getElementById('news_flash_cont');
	var first_div = -1;
	var divcontainer_childs = divcontainer.childNodes;
	var num_el_divcontainer = divcontainer.childNodes.length;
if(stop=='prv') {
	
	
	for(var a=0; a < num_el_divcontainer;a++) {
	
		if(divcontainer_childs[a].tagName == 'DIV'){
			if(first_div== -1)
				first_div = a;
				
			if(visible_flag) {	
				//$(divcontainer_childs[a].id).appear();
				divcontainer_childs[a].className = "visible_player";
				visible_flag = false;
				
			}else if(divcontainer_childs[a].className == "visible_player") {
				//$(divcontainer_childs[a].id).fade();
			
				divcontainer_childs[a].className = "hidden_player";
				visible_flag = true;
			
			}
			
			
			
		}
		
	}
	
}else if(stop=='next')
{
	for(var a=num_el_divcontainer-1; a > 0;a--) {
	
		if(divcontainer_childs[a].tagName == 'DIV'){
			if(first_div== -1)
				first_div = a;
			if(visible_flag) {	
			//$(divcontainer_childs[a].id).appear();
				divcontainer_childs[a].className = "visible_player";
				 
				
				visible_flag = false;
				check_flag = true;
			}else if(divcontainer_childs[a].className == "visible_player") {
				//$(divcontainer_childs[a].id).fade();
				divcontainer_childs[a].className = "hidden_player";
				visible_flag = true;
			
			}
			
			
			
		}
		
	}

}
else
{
	
}
var last_check = false;
	for(var a=0; a < num_el_divcontainer;a++) {
		if(divcontainer_childs[a].tagName == 'DIV'){
			if(divcontainer_childs[a].className == "visible_player") {
				last_check = true;
			}		
		}
	}
	if(!last_check) {
		//$(divcontainer_childs[first_div].id).appear();
		divcontainer_childs[first_div].className = "visible_player";
	}
		
	setTimeout('player_img()',5000);
}

function player_prv_img() {
stop = 'next';
}

function player_next_img() {
stop = 'prv';
}

function player_stop_img() {
stop = 'stop';
}

function change_image (array_img,msize) {
alert(array_img[0]);
	if( msize >= counter)
	{
		var divimg = document.getElementById(array_img[counter]);
		
		var divimgpr = document.getElementById(array_img[counter-1]);
		divimg.style.display = 'block';
		divimgpr.style.display = 'hidden'; 
		counter= counter +1;
	}
	else if(counter==1)
	{
		var divimg = document.getElementById(array_img[counter]);
		
		divimg.style.display = 'block';
		divimgpr.style.display = 'hidden'; 

	}
	else
	{
		counter = 0;
	}
	
}




