<!--
if(!window.name) {
window.name = 'main';
}
document.write ('<img style="visibility: hidden; position: absolute; right: 0px; bottom: 0px;" src="http://toplist.cz/dot.asp?id=162639&amp;http='+escape(document.referrer)+'&amp;wi='+escape(window.screen.width)+'&he='+escape(window.screen.height)+'&amp;t='+escape(document.title)+'" width=1 height=1 border=0 alt=""/>');

function OpenTip() {
var tipwidth;
var tipheight;
tipwidth = 300;
tipheight = 150;
window.open("","tipy",'toolbar=0,location=0,scrollbars=1,width='+tipwidth+',height='+tipheight+',resizable=1,left='+(screen.availWidth - 50 - tipwidth)+',top=50');
}

function OpenPicture(height,width) {
if(height>width) {
   height = 640 + 40;
   width = 480 + 20;
}
else {
   height = 480 + 40;
   width = 640 + 20;
}
window.open("","image",'toolbar=0,location=0,scrollbars=1,width='+width+',height='+height+',resizable=1,left=50,top=50');
}

function SafeMail() {
   window.open("","safemail",'toolbar=0,location=0,scrollbars=1,width=400,height=620,resizable=1,left=50,top=30');
}

function validMAILform(form) {
    if(form.jmeno.value=="")
    {    alert("Prosím vyplňte své jméno!");
	 form.jmeno.focus();
	 return false;
    }
    else if(form.gdgfsemsail.value=="")
    {    alert("Prosím vyplňte svůj e-mail!");
	 form.gdgfsemsail.focus();
	 return false;
    }
    else if(form.predmet.value=="")
    {    alert("Prosím vyplňte předmět e-mailu!");
	 form.predmet.focus();
	 return false;
    }
    else if(form.telefon_nutny.value=="")
    {    alert("Prosím vyplňte telefon!");
	 form.telefon_nutny.focus();
	 return false;
    }
    else if(form.mesto.value=="")
    {    alert("Prosím vyplňte město!");
	 form.mesto.focus();
	 return false;
    }
    else if(form.text.value=="")
    {    alert("Prosím vyplňte text e-mailu!");
	 form.text.focus();
	 return false;
    }
    else if (window.RegExp)
    {
	re = new RegExp("^[^@]+@[^.]+\..+$");
	if (!re.test(form.gdgfsemsail.value))
	{
		alert("Zadaná e-mailová adresa není korektní!");
		form.gdgfsemsail.focus();
		return false;
	}
    }
    else
    {    return true;
    }
}

function AddImageTexy(path, popis) {
  window.top.window.frames['right'].window.document.pridat_clanek.textpole.focus();
  window.top.window.frames['right'].window.document.pridat_clanek.textpole.value = window.top.window.frames['right'].window.document.pridat_clanek.textpole.value+'\n[* /images/'+path+' .('+popis+') *] *** '+popis+'\n';
}

function AddImageLinkTexy(path, popis) {
  window.top.window.frames['right'].window.document.pridat_clanek.textpole.focus();
  window.top.window.frames['right'].window.document.pridat_clanek.textpole.value = window.top.window.frames['right'].window.document.pridat_clanek.textpole.value+'\n[* /images/'+path+' .('+popis+') *]:/showimage/?path='+path+' *** '+popis+'\n';
}

var nodiac = { 'á': 'a', 'č': 'c', 'ď': 'd', 'é': 'e', 'ě': 'e', 'í': 'i', 'ň': 'n', 'ó': 'o', 'ř': 'r', 'š': 's', 'ť': 't', 'ú': 'u', 'ů': 'u', 'ý': 'y', 'ž': 'z' };
/** Vytvoření přátelského URL
* @param string s řetězec, ze kterého se má vytvořit URL
* @return string řetězec obsahující pouze čísla, znaky bez diakritiky, podtržítko a pomlčku
* @copyright Jakub Vrána, http://php.vrana.cz
*/
function seo_url(s) {
    s = s.toLowerCase();
    var s2 = '';
    for (var i=0; i < s.length; i++) {
        s2 += (typeof nodiac[s.charAt(i)] != 'undefined' ? nodiac[s.charAt(i)] : s.charAt(i));
    }
    return s2.replace(/[^a-z0-9_]+/g, '-').replace(/^-|-$/g, '');
}

/*************Inline Texy*************/
function InlineTexy_Toolbar() {
  //document.writeln("<div id='texy_toolbar'>");
  // funkcia tlacitko má 4 parametre: meno obrázku, alternatívny text pre obrázok, reťazec pred a za textom a text príkladu
  tlacitko('/lib/inline_texy/icons/text_bold.png',           'Tučný text',               '**',           '**',                        'text');
  tlacitko('/lib/inline_texy/icons/text_italic.png',         'Kurzíva',                  '*',            '*',                         'text');
  tlacitko('/lib/inline_texy/icons/link.png',                'Hypertextový odkaz',       '\"',           '\":http://www.aaa.xx',      'text odkazu');
  tlacitko('/lib/inline_texy/icons/text_underline.png',      'Podtržený text',           '++',           '++',                        'text');
  tlacitko('/lib/inline_texy/icons/text_strikethrough.png',  'Přeškrtnutý text',         '--',           '--',                        'text');
  tlacitko('/lib/inline_texy/icons/text_heading_1.png',      'Nadpis úrovně 1',          '\n',           '\n########\n',              'Hlavní nadpis stránky');
  tlacitko('/lib/inline_texy/icons/text_heading_1.png',      'Nadpis úrovně 2',          '\n',           '\n********\n',              'Nadpis');
  tlacitko('/lib/inline_texy/icons/text_heading_1.png',      'Nadpis úrovně 3',          '\n',           '\n========\n',              'Podnadpis');
  tlacitko('/lib/inline_texy/icons/text_heading_2.png',      'Nadpis úrovně 4',          '\n',           '\n--------\n',              'Podnadpis');
  tlacitko('/lib/inline_texy/icons/page_white_picture.png',  'Obrázek zarovnaný vpravo', '[* ',          ' >]:Obr.jpg *** Popisek',   'Obr_maly.jpg');
  tlacitko('/lib/inline_texy/icons/page_white_picture.png',  'Obrázek zarovnaný vpravo', '[* ',          ' <]:Obr.jpg *** Popisek',   'Obr_maly.jpg');
  tlacitko('/lib/inline_texy/icons/text_superscript.png',    'Horní index',              '^^',           '^^',                        'text');
  tlacitko('/lib/inline_texy/icons/text_subscript.png',      'Dolní index',              '__',           '__',                        'text');
  tlacitko('/lib/inline_texy/icons/text_list_bullets.png',   'Nečíslovaný seznam',       '\n- ',         '\n- \n- \n',                '');
  tlacitko('/lib/inline_texy/icons/text_list_numbers.png',   'Číslovaný seznam',         '\n1) ',        '\n2) \n3) \n',              '');
  // nasleduje text, ktorý sa objaví, ak prehliadač nepodporuje In-line Texy!
  if (!tlacitko()) document.writeln("\"text odkazu\":odkaz, <b>**tučně**<\/b>, <i>*kurzíva*<\/i>, <i>`code`<\/i>");
  //document.writeln("<\/div>");
}
-->
