﻿function open_window(url, target, width, height){
	var win = window.open(url, target, "width=" + width + ",height=" + height + ",status=yes, scrollbars=yes, resizable=yes")
	win.focus()
}


    function  _CF_checkCFForm_1(_CF_this)
    {
        //reset on submit
        _CF_error_exists = false;
        _CF_error_messages = new Array();
        _CF_error_fields = new Object();
        _CF_FirstErrorField = null;

        //form element monthly 'FLOAT' validation checks
        if (!_CF_checknumber(_CF_this['monthly'].value, false))
        {
            _CF_onError(_CF_this, "monthly", _CF_this['monthly'].value, "半角数字で入力してください");
            _CF_error_exists = true;
        }

        //form element hourly 'FLOAT' validation checks
        if (!_CF_checknumber(_CF_this['hourly'].value, false))
        {
            _CF_onError(_CF_this, "hourly", _CF_this['hourly'].value, "半角数字で入力してください");
            _CF_error_exists = true;
        }


        //display error messages and return success
        if( _CF_error_exists )
        {
            if( _CF_error_messages.length > 0 )
            {
                // show alert() message
                _CF_onErrorAlert(_CF_error_messages);
                // set focus to first form error, if the field supports js focus().
                if( _CF_this[_CF_FirstErrorField].type == "text" )
                { _CF_this[_CF_FirstErrorField].focus(); }

            }
            return false;
        }else {
            return true;
        }
    }
