/**
  * Základní JavaScriptové funkce
  *
  * @author Kateřina Bambušková <katerina.bambuskova@seznam.cz>
  * @copyright Copyright 2007, VIAKIS.NET
  * @version 5.5.2007
  */

var Br = new BrCheck()

/**
  * Funkce pro otestování prohlížeče
  *
  * @return prohlížeč
  */
function BrCheck()
{
	this.VER	= navigator.appVersion;
	this.AGENT	= navigator.userAgent.replace(/[\/]/g,' ');
	this.DOM	= document.getElementById ? true:false;

	this.OP5	= this.AGENT.indexOf("Opera 5")>-1							?true:false;
	this.OP6	= this.AGENT.indexOf("Opera 6")>-1							?true:false;
	this.OP7	= this.AGENT.indexOf("Opera 7")>-1							?true:false;
	this.OP8	= this.AGENT.indexOf("Opera 8")>-1							?true:false;
	this.OP		= (this.OP5 || this.OP6 || this.OP7 || this.OP8);

	this.IE4	= (document.all && !this.DOM && !this.OP)					        ?true:false;
	this.IE5	= (this.VER.indexOf("MSIE 5")>-1 && this.DOM && !this.OP)	?true:false; 
	this.IE6	= (this.VER.indexOf("MSIE 6")>-1 && this.DOM && !this.OP)	?true:false;
  this.IE7  = (this.VER.indexOf("MSIE 7")>-1 && this.DOM && !this.OP) ?true:false;
	this.IE		= (this.IE4 || this.IE5 || this.IE6 || this.IE7);

	this.NS4	= (document.layers && !this.DOM)							?true:false;
	this.NS7	= (this.DOM && parseInt(this.VER) >= 5 && this.AGENT.lastIndexOf('Netscape')<this.AGENT.lastIndexOf('7'))?true:false;
	this.NS6	= (this.DOM && parseInt(this.VER) >= 5 && !this.NS7)		?true:false;
	this.NS		= (this.NS4 || this.NS6 || this.NS7);

	return this;
}

/**
  * Funkce varacející objekt podle ID
  *
  * @return objekt podle ID
  */
function getE(objectID){
  return document.getElementById(objectID); 
}

/**
  * Funkce zobrazení nebo ukrytí elementu
  *
  * @param element
  */
function ShowHide(element) {
	var e = getE( element );
	if (e.style.display=="none") {
		e.style.display = "" 
  }
	else {
		e.style.display = "none" 
  };
}

/**
  * Funkce pro přidání stránky do záložek
  *
  * @param String url
  * @param String title  
  */
function Bookmark(url,title){
	if (window.sidebar){
		window.sidebar.addPanel(title, url,"");
	}
	else if( document.all){
		window.external.AddFavorite(url, title);
	}
	else{
		return true;
	}
}

/**
  * Funkce pro přidávání Cookies
  *
  * @param String strName jméno
  * @param String strData hodnota
  */
function InsertCookies(strName,strData){
	var vyprs=new Date();
	vyprs.setDate(vyprs.getDate() + 365);
	document.cookie=strName+"="+strData+"; expires="+vyprs.toGMTString()+"; path=\/;";
}

/**
  * Funkce pro přidávání Cookies pro debug
  *
  * @param String strName jméno
  * @param String strData hodnota
  */
function InsertCookiesDebug(strName,strData){
	var vyprs=new Date();
	
	if (strData == "1") {
    strData = "0";
  } else {
    strData = "1"
  }
	
	vyprs.setDate(vyprs.getDate() + 365);
	document.cookie=strName+"="+strData+"; expires="+vyprs.toGMTString()+"; path=\/;";
}

/**
  * Funkce pro testování logovacího formuláře
  *
  * @return boolean true - OK, false - chyba
  */
function LoginCheck() {
  if (document.loginForm.login.value=="") {
      window.alert ("Vyplňte Váš login!!!");
      document.loginForm.login.focus();
      return false;
  } else if (document.loginForm.password.value=="") {
      window.alert ("Vyplňte Vaše heslo!!!");
      document.loginForm.password.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s odkazy
  *
  * @return boolean true - OK, false - chyba
  */
function LinksCheck() {
  if (document.linksForm.pkLink.value=="") {
      window.alert ("Vyplňte název!!!");
      document.linksForm.pkLink.focus();
      return false;
  } else if (document.linksForm.sURL.value=="") {
      window.alert ("Vyplňte URL!!!");
      document.linksForm.sURL.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
} 

/**
  * Funkce pro testování formuláře pro práci s aktualitami
  *
  * @return boolean true - OK, false - chyba
  */
function NewsCheck() {
  if (document.newsForm.sName.value=="") {
      window.alert ("Vyplňte název!!!");
      document.newsForm.sName.focus();
      return false;
  } else if (document.newsForm.dExpired.value=="") {
      window.alert ("Vyplňte datum platnosti!!!");
      document.newsForm.dExpired.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s přidělováním přístupových práv skupinám
  *
  * @return boolean true - OK, false - chyba
  */
function GroupRightCheck() {
  if (document.GroupRightForm.fkGroup.value=="") {
      window.alert ("Vyplňte skupinu!!!");
      document.GroupRightForm.fkGroup.focus();
      return false;
  } else if (document.GroupRightForm.fkAccessRight.value=="") {
      window.alert ("Vyplňte přístupové právo!!!");
      document.GroupRightForm.fkAccessRight.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s přidělováním přístupových práv členům
  *
  * @return boolean true - OK, false - chyba
  */
function MemberRightCheck() {
  if (document.MemberRightForm.fkMember.value=="") {
      window.alert ("Vyplňte člena!!!");
      document.MemberRightForm.fkMember.focus();
      return false;
  } else if (document.MemberRightForm.fkAccessRight.value=="") {
      window.alert ("Vyplňte právo!!!");
      document.MemberRightForm.fkAccessRight.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci se zkouškami
  *
  * @return boolean true - OK, false - chyba
  */
function STVcheck() {
  if (document.STVform.sType.value=="") {
      window.alert ("Vyplňte typ!!!");
      document.STVform.sType.focus();
      return false;
  } else if (document.STVform.datum.value=="") {
      window.alert ("Vyplňte datum konání!!!");
      document.STVform.datum.focus();
      return false;
  } else if (document.STVform.cas.value=="") {
      window.alert ("Vyplňte čas!!!");
      document.STVform.cas.focus();
      return false;
  } else if (document.STVform.sExaminer.value=="") {
      window.alert ("Vyplňte jméno zkušebního komisaře!!!");
      document.STVform.sExaminer.focus();
      return false;
  } else if (document.STVform.sPlace.value=="") {
      window.alert ("Vyplňte místo konání!!!");
      document.STVform.sPlace.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
} 

/**
  * Funkce pro testování formuláře pro práci se semináři
  *
  * @return boolean true - OK, false - chyba
  */
function SeminaryCheck() {
  if (document.SeminaryForm.sType.value=="") {
      window.alert ("Vyplňte typ!!!");
      document.SeminaryForm.sType.focus();
      return false;
  } else if (document.SeminaryForm.datum.value=="") {
      window.alert ("Vyplňte datum konání!!!");
      document.SeminaryForm.datum.focus();
      return false;
  } else if (document.SeminaryForm.cas.value=="") {
      window.alert ("Vyplňte čas!!!");
      document.SeminaryForm.cas.focus();
      return false;
  } else if (document.SeminaryForm.sTutor.value=="") {
      window.alert ("Vyplňte jméno Instruktora!!!");
      document.SeminaryForm.sTutor.focus();
      return false;
  } else if (document.SeminaryForm.sPlace.value=="") {
      window.alert ("Vyplňte místo konání!!!");
      document.SeminaryForm.sPlace.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}  

/**
  * Funkce pro testování formuláře pro práci se soutěžemi
  *
  * @return boolean true - OK, false - chyba
  */
function MatchCheck() {
  if (document.MatchForm.sName.value=="") {
      window.alert ("Vyplňte název!!!");
      document.MatchForm.sName.focus();
      return false;
  } else if (document.MatchForm.datum.value=="") {
      window.alert ("Vyplňte datum konání!!!");
      document.MatchForm.datum.focus();
      return false;
  } else if (document.MatchForm.cas.value=="") {
      window.alert ("Vyplňte čas!!!");
      document.MatchForm.cas.focus();
      return false;
  } else if (document.MatchForm.sType.value=="") {
      window.alert ("Vyplňte typ!!!");
      document.MatchForm.sType.focus();
      return false;
  } else if (document.MatchForm.sPlace.value=="") {
      window.alert ("Vyplňte místo konání!!!");
      document.MatchForm.sPlace.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
} 

/**
  * Funkce pro testování formuláře pro práci s akcemi
  *
  * @return boolean true - OK, false - chyba
  */
function ActionCheck() {
  if (document.ActionForm.sName.value=="") {
      window.alert ("Vyplňte název!!!");
      document.ActionForm.sName.focus();
      return false;
  } else if (document.ActionForm.sOrganizer.value=="") {
      window.alert ("Vyplňte jméno organizátora!!!");
      document.ActionForm.sOrganizer.focus();
      return false;
  } else if (document.ActionForm.sPlace.value=="") {
      window.alert ("Vyplňte místo konání!!!");
      document.ActionForm.sPlace.focus();
      return false;
  } else if (document.ActionForm.datum.value=="") {
      window.alert ("Vyplňte datum konání!!!");
      document.ActionForm.datum.focus();
      return false;
  } else if (document.ActionForm.cas.value=="") {
      window.alert ("Vyplňte čas!!!");
      document.ActionForm.cas.focus();
      return false;
  } else if (document.ActionForm.sType.value=="") {
      window.alert ("Vyplňte typ!!!");
      document.ActionForm.sType.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci se členy
  *
  * @return boolean true - OK, false - chyba
  */
function MemberCheck() {
  if (document.MemberForm.pkMember.value=="") {
      window.alert ("Vyplňte login!!!");
      document.MemberForm.pkMember.focus();
      return false;
  } else if (document.MemberForm.sFirstName.value=="") {
      window.alert ("Vyplňte jméno!!!");
      document.MemberForm.sFirstName.focus();
      return false;
  } else if (document.MemberForm.sLastName.value=="") {
      window.alert ("Vyplňte přijmení!!!");
      document.MemberForm.sLastName.focus();
      return false;
  } else if (document.MemberForm.sRC.value=="") {
      window.alert ("Vyplňte rodné číslo!!!");
      document.MemberForm.sRC.focus();
      return false;
  } else if (document.MemberForm.datum.value=="") {
      window.alert ("Vyplňte datum!!!");
      document.MemberForm.datum.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro změnu hesla
  *
  * @return boolean true - OK, false - chyba
  */
function ChangePasswordCheck() {
  if (document.ChangePasswordForm.oldPassword.value=="") {
      window.alert ("Vyplňte staré heslo!!!");
      document.ChangePasswordForm.oldPassword.focus();
      return false;
  } else if (document.ChangePasswordForm.newPassword.value=="") {
      window.alert ("Vyplňte nové heslo!!!");
      document.ChangePasswordForm.newPassword.focus();
      return false;
  } else if (document.ChangePasswordForm.checkPassword.value=="") {
      window.alert ("Vyplňte kontrolu hesla!!!");
      document.ChangePasswordForm.checkPassword.focus();
      return false;
  } else if (document.ChangePasswordForm.checkPassword.value!=document.ChangePasswordForm.newPassword.value) {
      window.alert ("Nové heslo a kontrola hesla nejsou stejné!!!");
      document.ChangePasswordForm.checkPassword.focus();
      return false;      
  } else {
      //window.alert ("OK");
      return true;
  }
}


/**
  * Funkce pro testování formuláře pro změnu hesla
  *
  * @return boolean true - OK, false - chyba
  */
function PaymentCheck() {
  if (document.PaymentForm.fkMember.value=="") {
      window.alert ("Vyplňte plátce!!!");
      document.PaymentForm.fkMember.focus();
      return false;
  } else if (document.PaymentForm.dDate.value=="") {
      window.alert ("Vyplňte datum!!!");
      document.PaymentForm.dDate.focus();
      return false;
  } else if (document.PaymentForm.sType.value=="") {
      window.alert ("Vyplňte typ platby!!!");
      document.PaymentForm.sType.focus();
      return false;
  } else if (document.PaymentForm.nPrice.value=="") {
      window.alert ("Vyplňte částku!!!");
      document.PaymentForm.nPrice.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci se skupinami
  *
  * @return boolean true - OK, false - chyba
  */
function GroupCheck() {
  if (document.GroupForm.sName.value=="") {
      window.alert ("Vyplňte název!!!");
      document.GroupForm.sName.focus();
      return false;
  } else if (document.GroupForm.sDescription.value=="") {
      window.alert ("Vyplňte popis!!!");
      document.GroupForm.sDescription.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s technikami
  *
  * @return boolean true - OK, false - chyba
  */
function PracticeCheck() {
  if (document.PracticeForm.sName.value=="") {
      window.alert ("Vyplňte název!!!");
      document.PracticeForm.sName.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci se skupinami technik
  *
  * @return boolean true - OK, false - chyba
  */
function SetCheck() {
  if (document.SetForm.sName.value=="") {
      window.alert ("Vyplňte název!!!");
      document.SetForm.sName.focus();
      return false;
  } else if (document.SetForm.sDescription.value=="") {
      window.alert ("Vyplňte popis!!!");
      document.SetForm.sDescription.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s přístupovými právy
  *
  * @return boolean true - OK, false - chyba
  */
function AccessRightCheck() {
  if (document.AccessRightForm.sName.value=="") {
      window.alert ("Vyplňte název!!!");
      document.AccessRightForm.sName.focus();
      return false;
  } else if (document.AccessRightForm.sDescription.value=="") {
      window.alert ("Vyplňte popis!!!");
      document.AccessRightForm.sDescription.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s lekcemi
  *
  * @return boolean true - OK, false - chyba
  */
function LessonCheck() {
  if (document.LessonForm.datum.value=="") {
      window.alert ("Vyplňte datum!!!");
      document.LessonForm.datum.focus();
      return false;
  } else if (document.LessonForm.cas.value=="") {
      window.alert ("Vyplňte čas!!!");
      document.LessonForm.cas.focus();
      return false;
  } else if (document.LessonForm.fkInstructor.value=="") {
      window.alert ("Vyplňte instruktora!!!");
      document.LessonForm.fkInstructor.focus();
      return false;
  } else if (document.LessonForm.nTimeGrant.value=="") {
      window.alert ("Vyplňte časovou dotaci!!!");
      document.LessonForm.nTimeGrant.focus();
      return false;      
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci se zkušebními řády
  *
  * @return boolean true - OK, false - chyba
  */
function STVrulesCheck() {
  if (document.STVrulesForm.sType.value=="") {
      window.alert ("Vyplňte bojové umění!!!");
      document.STVrulesForm.sType.focus();
      return false;
  } else if (document.STVrulesForm.sDegree.value=="") {
      window.alert ("Vyplňte stupeň!!!");
      document.STVrulesForm.sDegree.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s technikami v lekci
  *
  * @return boolean true - OK, false - chyba
  */
function PracticeInLessonCheck() {
  if (document.PracticeInLessonForm.fkLesson.value=="") {
      window.alert ("Vyplňte lekci!!!");
      document.PracticeInLessonForm.fkLesson.focus();
      return false;
  } else if (document.PracticeInLessonForm.fkPractice.value=="") {
      window.alert ("Vyplňte techniku!!!");
      document.PracticeInLessonForm.fkPractice.focus();
      return false;
  } else if (document.PracticeInLessonForm.nSequence.value=="") {
      window.alert ("Vyplňte pořadí!!!");
      document.PracticeInLessonForm.nSequence.focus();
      return false;
  } else if (document.PracticeInLessonForm.nLenghtTime.value=="") {
      window.alert ("Vyplňte délku!!!");
      document.PracticeInLessonForm.nLenghtTime.focus();
      return false;      
  } else if (document.PracticeInLessonForm.nRepeat.value=="") {
      window.alert ("Vyplňte počet opakování!!!");
      document.PracticeInLessonForm.nRepeat.focus();
      return false;    
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s technikami ve zkušebním řádu
  *
  * @return boolean true - OK, false - chyba
  */
function PracticeInSTVrulesCheck() {
  if (document.PracticeInSTVrulesForm.fkSTVrules.value=="") {
      window.alert ("Vyplňte zkušební řád!!!");
      document.PracticeInSTVrulesForm.fkSTVrules.focus();
      return false;
  } else if (document.PracticeInSTVrulesForm.fkPractice.value=="") {
      window.alert ("Vyplňte techniku!!!");
      document.PracticeInSTVrulesForm.fkPractice.focus();
      return false;
  } else if (document.PracticeInSTVrulesForm.nSequence.value=="") {
      window.alert ("Vyplňte pořadí!!!");
      document.PracticeInSTVrulesForm.nSequence.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s hodnocením lekcí
  *
  * @return boolean true - OK, false - chyba
  */
function VatuationLessonCheck() {
  if (document.VatuationLessonForm.fkLesson.value=="") {
      window.alert ("Vyplňte lekci!!!");
      document.VatuationLessonForm.fkLesson.focus();
      return false;
  } else if (document.VatuationLessonForm.sValuation.value=="") {
      window.alert ("Vyplňte hodnocení!!!");
      document.VatuationLessonForm.sValuation.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s technikami ve skupině
  *
  * @return boolean true - OK, false - chyba
  */
function PracticeInSetCheck() {
  if (document.PracticeInSetForm.fkPractice.value=="") {
      window.alert ("Vyplňte techniku!!!");
      document.PracticeInSetForm.fkPractice.focus();
      return false;
  } else if (document.PracticeInSetForm.fkSet.value=="") {
      window.alert ("Vyplňte sadu!!!");
      document.PracticeInSetForm.fkSet.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s vykonanými zkouškami
  *
  * @return boolean true - OK, false - chyba
  */
function ExecuteSTVCheck() {
  if (document.ExecuteSTVForm.fkMember.value=="") {
      window.alert ("Vyplňte člena!!!");
      document.ExecuteSTVForm.fkMember.focus();
      return false;
  } else if (document.ExecuteSTVForm.sDegree.value=="") {
      window.alert ("Vyplňte stupeň!!!");
      document.ExecuteSTVForm.sDegree.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s členami ve skupině
  *
  * @return boolean true - OK, false - chyba
  */
function MemberInGroupCheck() {
  if (document.MemberInGroupForm.fkMember.value=="") {
      window.alert ("Vyplňte člena!!!");
      document.MemberInGroupForm.fkMember.focus();
      return false;
  } else if (document.MemberInGroupForm.fkGroup.value=="") {
      window.alert ("Vyplňte skupinu!!!");
      document.MemberInGroupForm.fkGroup.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s účastí členů na akci
  *
  * @return boolean true - OK, false - chyba
  */
function PresentActionCheck() {
  if (document.PresentActionForm.fkMember.value=="") {
      window.alert ("Vyplňte člena!!!");
      document.PresentActionForm.fkMember.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s účastí členů na soutěži
  *
  * @return boolean true - OK, false - chyba
  */
function PresentMatchCheck() {
  if (document.PresentMatchForm.fkMember.value=="") {
      window.alert ("Vyplňte člena!!!");
      document.PresentMatchForm.fkMember.focus();
      return false;
  } else if (document.PresentMatchForm.sCategory.value=="") {
      window.alert ("Vyplňte katogorii!!!");
      document.PresentMatchForm.sCategory.focus();
      return false;
  } else if (document.PresentMatchForm.nPozition.value=="") {
      window.alert ("Vyplňte pozici!!!");
      document.PresentMatchForm.nPozition.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci s účastí členů na semináři
  *
  * @return boolean true - OK, false - chyba
  */
function PresentSeminaryCheck() {
  if (document.PresentSeminaryForm.fkMember.value=="") {
      window.alert ("Vyplňte člena!!!");
      document.PresentSeminaryForm.fkMember.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci se stránkami
  *
  * @return boolean true - OK, false - chyba
  */
function PageCheck() {
  if (document.PageForm.pkPage.value=="") {
      window.alert ("Vyplňte název!!!");
      document.PageForm.pkPage.focus();
      return false;
  } else if (document.PageForm.sTitle.value=="") {
      window.alert ("Vyplňte titulku!!!");
      document.PageForm.sTitle.focus();
      return false;
  } else if (document.PageForm.sDescription.value=="") {
      window.alert ("Vyplňte popis!!!");
      document.PageForm.sDescriptionfocus();
      return false;
  } else if (document.PageForm.sKeywords.value=="") {
      window.alert ("Vyplňte klíčová slova!!!");
      document.PageForm.sKeywords.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro testování formuláře pro práci se zprávami
  *
  * @return boolean true - OK, false - chyba
  */
function MessageCheck() {
  if (document.MessageForm.fkRecipient.value=="") {
      window.alert ("Vyplňte příjemce!!!");
      document.MessageForm.fkRecipient.focus();
      return false;
  } else if (document.MessageForm.sSubject.value=="") {
      window.alert ("Vyplňte předmět!!!");
      document.MessageForm.sSubject.focus();
      return false;
  } else if (document.MessageForm.sTextMessage.value=="") {
      window.alert ("Vyplňte text zprávy!!!");
      document.MessageForm.sTextMessage.focus();
      return false;
  } else {
      //window.alert ("OK");
      return true;
  }
}

/**
  * Funkce pro potvrzení smazání záznamu
  *
  * @param record záznam
  */
function ItemDeleteConfirm(record) {
   if (confirm("Opravdu chcete tuto položku smazat?")) location.href = record;
}
/**
  * Funkce pro potvrzení smazání člena
  *
  * @param record člen
  */
function MemberDeleteConfirm(record) {
   if (confirm("Opravdu chcete tohoto člena smazat?")) location.href = record;
}

/**
  * Funkce pro potvrzení o smazání akce
  *
  * @return boolean true - OK, false - ne
  */
function ActionDeleteConfirm() {
   if (confirm("Opravdu chcete akci smazat?")) return true;
   else return false;
}

/**
  * Funkce pro potvrzení o smazání zkoušky
  *
  * @return boolean true - OK, false - ne
  */
function STVDeleteConfirm() {
   if (confirm("Opravdu chcete STV smazat?")) return true;
   else return false;
}

/**
  * Funkce pro potvrzení o smazání semináře
  *
  * @return boolean true - OK, false - ne
  */
function SeminaryDeleteConfirm() {
   if (confirm("Opravdu chcete seminář smazat?")) return true;
   else return false;
}

/**
  * Funkce pro potvrzení o smazání soutěže
  *
  * @return boolean true - OK, false - ne
  */
function MatchDeleteConfirm() {
   if (confirm("Opravdu chcete soutěž smazat?")) return true;
   else return false;
}

/**
  * Funkce pro potvrzení o smazání odkazu
  *
  * @return boolean true - OK, false - ne
  */
function LinkDeleteConfirm() {
   if (confirm("Opravdu chcete odkaz smazat?")) return true;
   else return false;
}

/**
  * Funkce pro potvrzení o smazání aktuality
  *
  * @return boolean true - OK, false - ne
  */
function NewsDeleteConfirm() {
   if (confirm("Opravdu chcete aktualitu smazat?")) return true;
   else return false;
}

/**
  * Funkce pro potvrzení o smazání stánky
  *
  * @return boolean true - OK, false - ne
  */
function PageDeleteConfirm() {
   if (confirm("Opravdu chcete stránku smazat?")) return true;
   else return false;
}

/**
  * Funkce pro potvrzení o smazání souboru
  *
  * @param url adresa
  * @param name jméno  
  */
function FileDeleteConfirm(url, name) {
    if (confirm("Opravdu chcete smazat soubor " + name + "?")) location.href = url;
}


