// JavaScript Document

function ValidatorObjednavka(theForm)
{ if (theForm.jmeno.value == "")
  { alert("Vyplňte prosím Vaše jméno a příjmení");
    theForm.jmeno.focus();
    return (false);
  }
  if (theForm.ulice.value == "")
  { alert("Vyplňte prosím ulici");
    theForm.ulice.focus();
    return (false);
  }
  if (theForm.mest.value == "")
  { alert("Vyplňte prosím město");
    theForm.jmeno.focus();
    return (false);
  }
  if (theForm.psc.value == "")
  { alert("Vyplňte prosím PSČ");
    theForm.psc.focus();
    return (false);
  }
  if (theForm.telefon.value == "")
  { alert("Vyplňte prosím Váš telefon");
    theForm.telefon.focus();
    return (false);
  }
return (true);
}

function autobazar_jv2(znacka_v,znacka_p){
  with (document.theForm) {
  if (znacka_v!='') {

    znacka=eval(znacka_v);
    while (znacka.length<idcountry2.options.length)
      idcountry2.options[(idcountry2.options.length-1)]=null;
    for (i=0; i<znacka.length; i++)
      eval("idcountry2.options[i]=new Option("+znacka[i]+")");
    if (idcountry.options[0].value=="") idcountry.options[0]=null;
	if (znacka_p != "") idcountry2.options[znacka_p].selected = true;
  }
 }
}

function CatDisable()	{
	if (document.theForm.idakce[1].selected) {
		document.theForm.idsport.disabled = false;
		document.theForm.idtyp.disabled = true
	}
	else if (document.theForm.idakce[2].selected) {
		document.theForm.idtyp.disabled = false;
		document.theForm.idsport.disabled = true
	}
	else if (document.theForm.idakce[3].selected) {
		document.theForm.idtyp.disabled = true;
		document.theForm.idsport.disabled = true
	}

	else {
		document.theForm.idsport.disabled = false;
		document.theForm.idtyp.disabled = false
	}
}

function TypDisable()	{
	if (document.theForm.idsport[0].selected) {
		document.theForm.idtyp.disabled = false
	}
	else {
		document.theForm.idtyp.disabled = true
	}
}

function SportDisable()	{
	if (document.theForm.idtyp[0].selected) {
		document.theForm.idsport.disabled = false
	}
	else {
		document.theForm.idsport.disabled = true
	}
}

function openWindow()	{
window.open("","Photogalery",'toolbar=0,location=0,scrollbars=0,width=50,height=50,resizable=1,top=100,left=100');}

function RedirPage(){
	parent.location.href=('zajezdy.asp?chan=true&idakce='+ document.theForm.idakce.value +'&idsport='+ document.theForm.idsport.options[document.theForm.idsport.selectedIndex].value)
}

function RedirPageB(){
	parent.location.href=('zajezdy.asp?chan=true&idakce='+ document.theForm.idakce.value +'&idtyp='+ document.theForm.idtyp.options[document.theForm.idtyp.selectedIndex].value)
}

function RedirPageC(){
	parent.location.href=('zajezdy.asp?idakce='+ document.theForm.idakce.value +'&idtyp='+ document.theForm.idtyp.value +'&idsport='+ document.theForm.idsport.value +'&idcountry='+ document.theForm.idcountry.options[document.theForm.idcountry.selectedIndex].value)
}