﻿// JScript ファイル
sent = false;

function SendCheck(){
     if(sent){
         return false;
      }
      else{
        sent = true;
        return true;
      }
}

function SendCheckWithValidate(){
    if(sent){
        return false;
    }

    if( typeof(Page_ClientValidate) == 'function' )
    {
        if(Page_ClientValidate()){
            sent = true;
            return true;
        }
        else
        {
            return false;
        }
    }
    else
    {
        sent = true;
        return true;
    }
}

function SendCheckAndConfirm(message) {
    if (SendCheck() == false) {
        return false;
    }

    if (confirm(message) == false) {
        sent = false;
        return false;
    }

    return true;
}

function SendCheckWithValidateAndConfirm(message) {
    if (SendCheckWithValidate() == false) {
        return false;
    }

    if (confirm(message) == false) {
        sent = false;
        return false;
    }

    return true;
}
