// O p i s o v a t   s e   n e m á ! ! !                  
//                                                        
// Tyto scripty nejsou tudíž určeny k dalšímu zpracování. 
// Však jako naučný materiál smí použity být.             
//                                                        
// (c) 2004 Marek Langr * http://www.langr.biz            
//                info@langr.biz                          
//                                                        
// hledáte-li volné scripty zkuste javascript.tatousek.cz 
//                                                        
// Nebo kontaktujte fi Marek Langr k napsaní scriptu na   
// Vaše přání.                                            


function changeBgColor(elementId, bgColor, fontColor) {
 document.getElementById(elementId).style.background = bgColor;
 document.getElementById(elementId).style.color = fontColor;
}

function goLink(link) {
 window.location.href = link;
}

function showFullPhoto(path, width, height) {
 window.open(path, "", "scrollbars=yes,status=no,width=" + width + ",height=" + height + ",menubar=no,resizable=yes,directories=no");
}


function checkFormPhotographer(noName, noSurname, noEmail, noPasswd, noAgree) {
 var textAlert = "";
 
 if (document.forms['frmPhotographer']['textFirstName'].value == "") textAlert += noName + "\n";
 if (document.forms['frmPhotographer']['textLastName'].value == "") textAlert += noSurname + "\n";
 
 if (document.forms['frmPhotographer']['textEmail'].value.length <= 5) textAlert += noEmail + "\n";
 else if (document.forms['frmPhotographer']['textEmail'].value.indexOf("@", 0) == -1) textAlert += noEmail + "\n";
 
 if (document.forms['frmPhotographer']['textUserPassword'].value.length <= 3) textAlert += noPasswd + "\n";
 else if (document.forms['frmPhotographer']['textUserPassword'].value != document.forms['frmPhotographer']['textUserPasswordRevise'].value) textAlert += noPasswd + "\n";
 
 if (document.forms['frmPhotographer']['chBoxAgree'].checked != true) textAlert += "\n" + noAgree;
 
 if (textAlert == "") return false;
 else {
  alert(textAlert);
  return true;
 }
}

function checkAgree(nameForm, nameChBox, textAlert) {
 if (document.forms[nameForm][nameChBox].checked) return false;
 else {
  alert(textAlert);
  return true;
 }
}