/* $Id: baynet.js,v 1.2 2003/08/06 04:10:16 mikami Exp $ */
<!--

	/**
	 * 送信状態フラグ
	 *  treu  送信中
	 *  false 未送信
	 */
	var _sent = false;

	/**
	 * 送信状態フラグに送信中を設定する
	 */
	function setSent() {
		_sent = true;
	}

	/**
	 * 送信状態フラグに未送信を設定する
	 */
	function setUnSent() {
		_sent = false;
	}

	/**
	 * 送信可否を返す
     *
     * 戻り値
     *  true  送信可
     *  false 送信不可
     */
    function isSent() {
		if (_sent) {
			return false;
		}
		setSent();
    
		return true;
	}

	var _target = "";
	var _action = "";

	function newPage(target, action) {
		if (isSent()) {
			setSent();
			_target = target;
			_action = action;
			_target.location.href = "dummy.html";
		}
	}

	function send() {
		_target.location.replace(_action);
		wait();
	}

	function wait() {
		if (_action.indexOf(":\/\/") != -1) {
   			setUnSent();
   			return;
		}
		if (_target.document._dummy) {
			;

		} else {
   			setUnSent();
   			return;
		}
		setTimeout("wait()");
	}
//-->