function checkTell_friend(form)

{

  // SURNAME

  /*

  if ( document.getElementById('surname').value == '' ) {

    alert('Please fill your Surname.');

    document.sipps_tell_friend.surname.focus();

    return false;

  }

  */



  // EMAIL

  if ( !checkEmail( document.getElementById('email').value)) {

    alert('Please fill your Email correctly.');

    document.sipps_tell_friend.email.focus();

    return false;

  }



  var emails = "false";

  if ( checkEmail( document.getElementById('email1').value) )

    emails = "true";

  if (checkEmail( document.getElementById('email2').value))

    emails = "true";

  if (checkEmail( document.getElementById('email3').value))

    emails = "true";

  if (checkEmail( document.getElementById('email4').value) )

    emails = "true";

  

  if ( emails == "false") {

    alert('Please fill at least one Email.');

    document.sipps_tell_friend.email1.focus();

    return false;

  }

  return true;

  

}





// function checks correct of email

function checkEmail(adresa){

   var pozice_zavinace = adresa.indexOf("@");

   var pozice_tecky = adresa.indexOf(".");

    if (pozice_zavinace < 0)

        return false;

    if (pozice_tecky < 0)

        return false;

    var cast_pred_zavinacem = adresa.substring(0,pozice_zavinace);

    var cast_po_zavinaci = adresa.substring(pozice_zavinace+1,adresa.length);

    if (cast_po_zavinaci.indexOf("@") >= 0)

        return false;

    if (cast_pred_zavinacem.length <= 0)

        return false;

    if (cast_po_zavinaci.length <= 0)

        return false;



    // ... pr(ípadné další kontroly ...



    return true;

}





// function adds link into favourite

function fav()

{

  if (navigator.appName.indexOf("Explorer")!= -1) window.external.AddFavorite("http://www.protect-me-now.co.uk/", "Protect Me Now");

    else if (navigator.userAgent.indexOf("Firefox")!= -1)

      window.sidebar.addPanel("Protect Me Now", "http://www.protect-me-now.co.uk/",""); else

        alert("To add to favourite press Control + D.");

}


//jumpmenu for mortgage tools
<!--

function MM_jumpMenu(targ,selObj,restore){ //v3.0

  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

  if (restore) selObj.selectedIndex=0;

}

//-->