
  // Check checkbox status, and set text field disable property.
  function tm_f_CheckBoxAndText ( checkBoxObj, textObj )
  {
    if (checkBoxObj.checked)
    {
      textObj.disabled = false;
    }
    else
    {
      textObj.value = '';
      textObj.disabled = true;
    }
  }

  // Check e-mail address syntax
  function tm_f_testEmailSyntax ( email, showAlert )
  {
    if ( /^\s*[\w\-\.]+@(([\w\-]+)\.)+([a-z]{2}|com|edu|org|net|mil)\s*$/.test(email) )
    {
      return true;
    }
    else
    {
      if (showAlert&&TM_MY_ALERT_CREATED) window.myAlert(240,120,"Figyelmeztetés","A megadott e-mail cím szintaktikailag hibás.");
      return false;
    }
  }

  // Check mobil phone number syntax
  function tm_f_testMobilSyntax ( mobil, showAlert )
  {
    if ( /^(\s*(0036|06|00(\s*|\-)36)\s*(\s*|\-))?((20|30|70)\s*(\d{3}(\-?|\s*)\d{4})|60\s*(\d{3}(\-?|\s*)\d{3}))\s*$/.test(mobil) )
    {
      return true;
    }
    else
    {
      if (showAlert&&TM_MY_ALERT_CREATED) window.myAlert(240,120,"Figyelmeztetés","A megadott telefonszám szintaktikailag hibás.");
      return false;
    }
  }

  // Check form's field syntax, and send form, if it's ok.
  function tm_f_emailSubmit ( formObj )
  {
    if (formObj.mobil.value==''&&formObj.emailaddress.value=='')
    {
      if (TM_MY_ALERT_CREATED) myAlert(240,120,"Figyelmeztetés","Nem adtál meg sem telefonszámot, sem e-mail címet!");
      return;
    }
    check = true;
    if (!formObj.emailaddress.value=='')
    {
      check = check & tm_f_testEmailSyntax (formObj.emailaddress.value, true);
    }
    if (!formObj.mobil.value=='')
    {
      check = check & tm_f_testMobilSyntax (formObj.mobil.value, true)
    }
    if (check)
    {
      formObj.submit();
    }
  }

  /*
    No Right Click
    by: Mondain
  */

  if (window.Event) // Only Netscape will have the CAPITAL E.
    document.captureEvents(Event.MOUSEUP); // catch the mouse up event

  function nocontextmenu()  // this function only applies to IE4, ignored otherwise.
  {
        event.cancelBubble = true
        event.returnValue = false;
        return false;
  }

  function norightclick(e)        // This function is used by all others
  {
        if (window.Event)       // again, IE or NAV?
        {
                if (e.which == 2 || e.which == 3)
                        return false;
        }
        else
                if (event.button == 2 || event.button == 3)
                {
                        event.cancelBubble = true
                        event.returnValue = false;
                        return false;
                }
  }
  document.oncontextmenu = nocontextmenu;         // for IE5+
  document.onmousedown = norightclick;            // for all others

  function tm_f_showDudol()
  {
    window.open("dudol/popup.html","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=492,height=421");
    return;
  }

  function tm_f_showLove()
  {
    window.open("lovekviz/popup.html","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no, width=380,height=400");
    return;
  }