//Switch pro ukazování galerií
//----------------------------
function vypni (kterou) {
document.getElementById('fotky'+kterou).style.display = 'none';
document.getElementById('schovej'+kterou).style.display = 'none';
document.getElementById('ukaz'+kterou).style.display = 'inline';
document.getElementById('title'+kterou).style.borderBottom = '1px solid gray';}

function zapni (kterou) {
document.getElementById('fotky'+kterou).style.display = 'block';
document.getElementById('schovej'+kterou).style.display = 'inline';
document.getElementById('ukaz'+kterou).style.display = 'none'
document.getElementById('title'+kterou).style.borderBottom = '0px solid #EAEAEA';}


//Switch pro menu
//---------------
function zapnimenu (subitem)
{
document.getElementById(subitem).style.visibility = 'visible';
document.getElementById('explain-motto').style.visibility = 'hidden';
switch (subitem)
  {
  case "ismul-pacienti" :
  document.getElementById('explain-pacienti').style.visibility = 'visible';
  break;
  case "ismul-vipafirmy" :
  document.getElementById('explain-vipafirmy').style.visibility = 'visible';
  break;
  case "ismul-odbornici" :
  document.getElementById('explain-odbornici').style.visibility = 'visible';
  break;
  case "ismul-klinika" :
  document.getElementById('explain-klinika').style.visibility = 'visible';
  break;
  }
}

function vypnimenu (subitem) {
document.getElementById(subitem).style.visibility = 'hidden';
document.getElementById('explain-motto').style.visibility = 'visible';
switch (subitem)
  {
  case "ismul-pacienti" :
  document.getElementById('explain-pacienti').style.visibility = 'hidden';
  break;
  case "ismul-vipafirmy" :
  document.getElementById('explain-vipafirmy').style.visibility = 'hidden';
  break;
  case "ismul-odbornici" :
  document.getElementById('explain-odbornici').style.visibility = 'hidden';
  break;
  case "ismul-klinika" :
  document.getElementById('explain-klinika').style.visibility = 'hidden';
  break;
  }}


//kontrola dotazníku VIP - lidé
//-----------------------------
function checkform1(viplide)
{
	var telefon = document.getElementById('viplideform').phone.value;
	var email = document.getElementById('viplideform').email.value;
    var check1_ok = (telefon && email) != "";
    if (check1_ok == false) alert('Vyplňte telefon a e-mail!');
	return check1_ok;
}
function checkform2(viplide)
{
	var mail_obsah = document.getElementById('viplideform').email.value.indexOf("@",0);
	var mail_obsah_ne = (mail_obsah) < 0;
	if (mail_obsah_ne == true) 
	{
	alert('Nesrpávný formát e-mailu!');
	return false;
	}
	else return true;
}
function checkvipl(viplide)
{
			var telamail_check_ok = checkform1 ();
			if (document.getElementById('viplideform').email.value != "")
			{
      var mail_check_ok = checkform2 ();
			}
      var all_ok = (telamail_check_ok && mail_check_ok) == true;
			if (all_ok == false) return false;
			return all_ok;
}


//kontrola dotazníku VIP - firmy
//------------------------------
function checkform3(vipfirmy)
{
	var spolecnost = document.getElementById('vipfirmyform').spolecnost.value;
	var zastupce = document.getElementById('vipfirmyform').zastupce.value;
    var check1_ok = (spolecnost && zastupce) != "";
    if (check1_ok == false) alert('Vyplňte jméno společnosti i zástupce!');
	return check1_ok;
}

function checkvipf(vipfirmy)
{
			var spolazast_check_ok = checkform3 ();
      var all_ok = (spolazast_check_ok) == true;
			if (all_ok == false) return false;
			return all_ok;
}


//kontrola dotazníku Klinika
//--------------------------
function checkform4(klinika)
{
	var telefon = document.getElementById('klinika').phone.value;
	var email = document.getElementById('klinika').email.value;
    var check1_ok = (telefon && email) != "";
    if (check1_ok == false) alert('Vyplňte telefon a e-mail!');
	return check1_ok;
}
function checkform5(viplide)
{
	var mail_obsah = document.getElementById('klinika').email.value.indexOf("@",0);
	var mail_obsah_ne = (mail_obsah) < 0;
	if (mail_obsah_ne == true) 
	{
	alert('Nesrpávný formát e-mailu!');
	return false;
	}
	else return true;
}
function checkklinika(klinika)
{
			var telamail_check_ok = checkform4 ();
			if (document.getElementById('klinika').email.value != "")
			{
      var mail_check_ok = checkform5 ();
			}
      var all_ok = (telamail_check_ok && mail_check_ok) == true;
			if (all_ok == false) return false;
			return all_ok;
}


//zapínání kontaktů teamu kliniky
//-------------------------------
function showteam(who)
{
  var allPageTags=document.getElementsByTagName("*"); 
  for (i=0; i<allPageTags.length; i++)
  { 
    if (allPageTags[i].className=='kontaktteamu')
    { 
    allPageTags[i].style.visibility='hidden';
    }
  } 
  document.getElementById(who).style.visibility = 'visible';
  
}

