<!--

// prepinani veci tydne
function cltydne() 
{
document.getElementById('ct2-3').style.display='none';
document.getElementById('ct2-5').style.display='none';
document.getElementById('ct2-4').style.display='none';
document.getElementById('ct2-2').style.display='block';

document.getElementById('ct-prep-over2').style.display='block';
document.getElementById('ft-prep-over2').style.display='none';
document.getElementById('ra-prep-over2').style.display='none';
document.getElementById('aa-prep-over2').style.display='none';
}
function fotydne()
{
document.getElementById('ct2-2').style.display='none';
document.getElementById('ct2-5').style.display='none';
document.getElementById('ct2-4').style.display='none';
document.getElementById('ct2-3').style.display='block';

document.getElementById('ct-prep-over2').style.display='none';
document.getElementById('ft-prep-over2').style.display='block';
document.getElementById('ra-prep-over2').style.display='none';
document.getElementById('aa-prep-over2').style.display='none';
}
function akcetydne()
{
document.getElementById('ct2-2').style.display='none';
document.getElementById('ct2-3').style.display='none';
document.getElementById('ct2-4').style.display='none';
document.getElementById('ct2-5').style.display='block';

document.getElementById('ct-prep-over2').style.display='none';
document.getElementById('ft-prep-over2').style.display='none';
document.getElementById('ra-prep-over2').style.display='none';
document.getElementById('aa-prep-over2').style.display='block';


}
function radiotydne()
{
document.getElementById('ct2-2').style.display='none';
document.getElementById('ct2-3').style.display='none';
document.getElementById('ct2-5').style.display='none';
document.getElementById('ct2-4').style.display='block';

document.getElementById('ct-prep-over2').style.display='none';
document.getElementById('ft-prep-over2').style.display='none';
document.getElementById('ra-prep-over2').style.display='block';
document.getElementById('aa-prep-over2').style.display='none';
}


// mezi oblibene
function AddFavorite(linkObj,addUrl,addTitle)
{
  if (document.all && !window.opera)
  {
    window.external.AddFavorite(addUrl,addTitle);
    return false;
  }
  else if (window.opera && window.print)
  {
    linkObj.title = addTitle;
    return true;
  }
  else if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function'))
  {
    if (window.confirm('Přidat oblíbenou stránku jako nový panel?'))
    {
      window.sidebar.addPanel(addTitle,addUrl,'');
      return false;
    }
  }
  window.alert('Po potvrzení stiskněte CTRL-D,\nstránka bude přidána k vašim oblíbeným odkazům.');
  return false;
}



// kontrola komentare
function komentuj()
{

if (document.komentar.disk_jmeno.value=='' && document.komentar.maps.value=='' && document.komentar.disk_text.value=='')
{
alert("Nebyly zadány povinné údaje:\n- jméno\n- ověřovací kód\n- text příspěvku");
return;
}
if (document.komentar.disk_jmeno.value!='' && document.komentar.maps.value=='' && document.komentar.disk_text.value=='')
{
alert("Nebyly zadány povinné údaje\n- ověřovací kód\n- text příspěvku");
return;
}
if (document.komentar.disk_jmeno.value=='' && document.komentar.maps.value!='' && document.komentar.disk_text.value=='')
{
alert("Nebyly zadány povinné údaje:\n- jméno\n- text příspěvku");
return;
}
if (document.komentar.disk_jmeno.value=='' && document.komentar.maps.value=='' && document.komentar.disk_text.value!='')
{
alert("Nebyly zadány povinné údaje:\n- jméno\n- ověřovací kód");
return;
}
if (document.komentar.disk_jmeno.value!='' && document.komentar.maps.value!='' && document.komentar.disk_text.value=='')
{
alert("Nebyly zadány povinné údaje:\n- text příspěvku");
return;
}
if (document.komentar.disk_jmeno.value!='' && document.komentar.maps.value=='' && document.komentar.disk_text.value!='')
{
alert("Nebyly zadány povinné údaje:\n- ověřovací kód");
return;
}
if (document.komentar.disk_jmeno.value=='' && document.komentar.maps.value!='' && document.komentar.disk_text.value!='')
{
alert("Nebyly zadány povinné údaje:\n- jméno");
return;
}
if (document.komentar.disk_mail.value!='')
{
mejl = new RegExp("^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$");
if (!mejl.test(document.komentar.disk_mail.value))
{
alert("Zadaná e-mailová adresa není správnou adresou elektronické pošty!\nPokud jí chcete zadat, tak ve tvaru jmeno@domena.tld");
return;
}
}


document.forms.komentar.submit();
}




// soutez

function soutez(sout_id) {

if (sout_id==''){
alert("Cyba - soutěž nenalezena.");
return;
}

if (document.sout_form.ids.value=='')
{
alert("Nekomplektní formulář");
return;
}
if (document.sout_form.ids.value=='')
{
alert("Nekomplektní formulář");
return;
}

if (document.sout_form.sout_jmeno.value=='')
{
alert("Nezadal/a jsi - Jméno");
return;
}

if (document.sout_form.sout_prijmeni.value=='')
{
alert("Nezadal/a jsi - Příjmení");
return;
}

if (document.sout_form.sout_email.value=='')
{
alert("Nezadal/a jsi - Email");
return;
}

mejl = new RegExp("^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$");
if (!mejl.test(document.sout_form.sout_email.value))
{
alert("Zadaná e-mailová adresa není správnou adresou elektronické pošty!\nZadejte jí ve tvaru jmeno@domena.tld\nAdresa bude automaticky chráněna proti spamu.");
return;
}
if (document.sout_form.sout_tip.value=='')
{
alert("Nezadal/a jsi - Tvůj tip");
return;
}

document.forms.sout_form.submit();

}



function soutez2(sout_id) {

if (sout_id==''){
alert("Cyba - soutěž nenalezena.");
return;
}

if (document.sout_form.ids.value=='')
{
alert("Nekomplektní formulář");
return;
}
if (document.sout_form.ids.value=='')
{
alert("Nekomplektní formulář");
return;
}

if (document.sout_form.sout_jmeno.value=='')
{
alert("Nezadal/a jsi - Jméno");
return;
}

if (document.sout_form.adresa.value=='')
{
alert("Nezadal/a jsi - adresu");
return;
}

if (document.sout_form.telefon.value=='')
{
alert("Nezadal/a jsi - telefon");
return;
}

if (document.getElementById('souhlas').checked == false)
{
alert("Nezadal/a jsi - souhlas s poskytnutím údajů.");
return;
}

if (document.sout_form.sout_prijmeni.value=='')
{
alert("Nezadal/a jsi - Příjmení");
return;
}

if (document.sout_form.sout_email.value=='')
{
alert("Nezadal/a jsi - Email");
return;
}

mejl = new RegExp("^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,3}$");
if (!mejl.test(document.sout_form.sout_email.value))
{
alert("Zadaná e-mailová adresa není správnou adresou elektronické pošty!\nZadejte jí ve tvaru jmeno@domena.tld\nAdresa bude automaticky chráněna proti spamu.");
return;
}
if (document.sout_form.sout_tip.value=='')
{
alert("Nezadal/a jsi - Tvůj tip");
return;
}

document.forms.sout_form.submit();

}



// filtr mp3

function mp3_show() {

if (document.getElementById('house').checked == false && document.getElementById('trance').checked == false && document.getElementById('techno').checked == false && document.getElementById('dnb').checked == false && document.getElementById('prog').checked == false && document.getElementById('electro').checked == false && document.getElementById('reggae').checked == false && document.getElementById('rap').checked == false && document.getElementById('ostatni').checked == false)
{
alert("Pro filtrování mp3 musí být zaškrtnuta aspoň jedna kategorie!");
return;
}

document.forms.mp3_form.submit();

}




// pridani radia

function pridej_radio() {

if (document.radio_form.prradio_url.value=='')
{
alert("Nezadal/a jsi odkaz na rádio do políčka WWW - např. www.adresaradia.cz");
return;
}

document.forms.radio_form.submit();



}


// hledani

function hledej() {
var str= document.forms.hledani['hledej'].value;
if (str.length<3 || str=='')
{
alert("Zadejte minimálně 3 znaky!");
return;
}
document.forms.hledani.submit();
}


// show parties

function partyshow(){
var fromDate = document.partyform.od_mesic.value + '/' + document.partyform.od_den.value + '/' + document.partyform.od_rok.value;
var toDate = document.partyform.do_mesic.value + '/' + document.partyform.do_den.value + '/' + document.partyform.do_rok.value;

if (Date.parse(fromDate) > Date.parse(toDate))
{
alert("Počáteční datum musí být menší nebo rovno datu konečnému.");
return;
}

document.forms.partyform.submit();
}


// kontrola akce

function validujakci() {

if (document.pad.akce_nazev.value=='')
{
alert("Není zadán název akce.");
return;
}

if (document.pad.akce_ucinkujici.value=='')
{
alert("Není vyplněná položka účinkující.");
return;
}

if (document.pad.akce_styl.value=='')
{
alert("Není vyplněná položka styl.");
return;
}

if (document.pad.akce_klub.value=='' && document.pad.nazev_mista.value=='')
{
alert("Není zadáno místo konání akce.");
return;
}
document.forms.pad.submit();
}

// maxidj

function maxidj(maxidj) {
var dotazovaciRetezec = "http://www.poslouchej.net/maxidj.php?dj=" +maxidj;            
window.open(dotazovaciRetezec, "_blank", "width=600,height=300");
}

//-->
