// Na techto strankach je vyuzivan program tinyMCE.
// Moxiecode Systems je vlastnikem autorskych prav.
// Program je distribuovan pod licenci GNU LPGL coz umoznuje vyuziti na techto strankach.
// Pokud Vas zajima vice o tomto projektu podivejte se na stranky http://tinymce.moxiecode.com/index.php

function spustTinyMCE()
{
	tinyMCE.init({
		mode : "textareas",
		theme : "advanced",
		plugins : "style,advhr,insertdatetime",
		theme_advanced_buttons1: "fontselect,fontsizeselect,separator,styleprops,separator,bold,italic,underline,strikethrough,separator,sub,sup,separator,forecolor,backcolor",
		theme_advanced_buttons2: "justifyleft ,justifycenter ,justifyright ,justifyfull ,separator,bullist,numlist,separator,outdent,indent,separator,undo,redo,insertdate,inserttime,separator,hr,advhr,separator,charmap",
		theme_advanced_buttons3: "",	
		theme_advanced_toolbar_location : "top",
		theme_advanced_toolbar_align : "left",
		theme_advanced_path_location : "bottom",
		content_css : "example_full.css",
		plugin_insertdate_dateFormat : "%d.%m.%Y",
		plugin_insertdate_timeFormat : "%H:%M:%S",
		extended_valid_elements : "hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]",
		theme_advanced_resize_horizontal : false,
		theme_advanced_resizing : true,
		nonbreaking_force_tab : true,
		apply_source_formatting : true,
		relat2ive_urls : false,
		rem2ove_script_host : false
	});
}

function  marquee(leva, prava, rychlost, smer)
{
	var akce;
	var okraj;
	var sire=0;
	var pr=prava;
	el=document.getElementById('marquee').style;
	sire=document.getElementById('marquee').offsetWidth;
	okraj=0-sire;
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		el.padding='1px';
		okraj=0;
		pr=prava-sire;
	}
	if(smer==1)
	{
		if (leva == okraj) {leva=pr-1;}
		else {leva--;}
	}
	else
	{
		if (leva == pr) {leva=okraj+1;}
		else {leva++;}
	}
	el.left=leva;
	akce='marquee('+leva+', '+prava+', '+rychlost+', '+smer+')';
	setTimeout(akce, rychlost);
}

function  marqueel(leva, prava, rychlost, smer)
{
	marquee(leva, prava, rychlost, 0);
}

function  zigzag(leva, prava, rychlost, smer)
{
	var akce;
	var okraj;
	var sire=0;
	var pr=prava;
	el=document.getElementById('marquee').style;
	sire=document.getElementById('marquee').offsetWidth;
	okraj=prava-sire-10;
	if (leva<10){leva=10;}
	if(navigator.appName=="Microsoft Internet Explorer"){el.padding='1px';}
	if(smer==1)
	{
		if (leva == 10) {smer=0;}
		else {leva--;}
	}
	else
	{
		if (leva == okraj) {smer=1;}
		else {leva++;}
	}
	el.left=leva;
	akce='zigzag('+leva+', '+prava+', '+rychlost+', '+smer+')';
	setTimeout(akce, rychlost);
}


