
function confirmf1(message) {
var tel_num = $('#telnumber').val();
if(tel_num.length < 6)
{
$('#confirm').modal({
      closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
      position: ["20%",],
      overlayId: 'confirm-overlay',
      containerId: 'confirm-container', 
      onShow: function (dialog) {
         var modal = this;

         $('.message', dialog.data[0]).append(message);

         // if the user clicks "yes"
         $('.yes', dialog.data[0]).click(function () {
            
            $('#anketakasko').submit();
            
            modal.close();
         });
         
         $('.no', dialog.data[0]).click(function () {
           $('#telnumber').focus();
            // close the dialog
            modal.close();
         });
         
      }
   });
}
else
{
$('#anketakasko').submit();
}

}


function confirmf2(message) {
var tel_num = $('#telnumber2').val();
if(tel_num.length < 6)
{
$('#confirm2').modal({
      closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
      position: ["20%",],
      overlayId: 'confirm-overlay',
      containerId: 'confirm-container', 
      onShow: function (dialog) {
         var modal = this;

         $('.message', dialog.data[0]).append(message);

         // if the user clicks "yes"
         $('.yes', dialog.data[0]).click(function () {
            
            $('#newavtoform').submit();
            
            modal.close();
         });
         
         $('.no', dialog.data[0]).click(function () {
           $('#telnumber2').focus();
            // close the dialog
            modal.close();
         });
         
      }
   });
}
else
{
$('#newavtoform').submit();
}

}

function confirmf3(message) {
var tel_num = $('#telnumber3').val();
if(tel_num.length < 6)
{
$('#confirm3').modal({
      closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
      position: ["20%",],
      overlayId: 'confirm-overlay',
      containerId: 'confirm-container', 
      onShow: function (dialog) {
         var modal = this;

         $('.message', dialog.data[0]).append(message);

         // if the user clicks "yes"
         $('.yes', dialog.data[0]).click(function () {
            
            $('#anketaavtokredit').submit();
            
            modal.close();
         });
         
         $('.no', dialog.data[0]).click(function () {
           $('#telnumber3').focus();
            // close the dialog
            modal.close();
         });
         
      }
   });
}
else
{
$('#anketaavtokredit').submit();
}

}






