var addEvent = (window.addEventListener) ?
(function(elm, type, event) {
elm.addEventListener(type, event, false);
}) : (window.attachEvent) ?
(function(elm, type, event) {
elm.attachEvent('on'+type, event);
}) :
(function(elm, type, event) {
elm['on'+type] = event;
}) ;
var Position = {
offset: function(elm) {
var pos = {};
pos.x = this.getOffset('Left', elm);
pos.y = this.getOffset('Top', elm);
return pos;
},
getOffset: function(prop, el) {
if(!el.offsetParent || el.offsetParent.tagName.toLowerCase() == "body")
return el['offset'+prop];
else
return el['offset'+prop]+ this.getOffset(prop, el.offsetParent);
}
};
var commonSyncTemp = new Array();
var Validator = {
escapeUnicode: function (str) {
return str.replace(/[^ -~]|\\/g, function(m0) {
var code = m0.charCodeAt(0);
return '\\u' + ((code < 0x10)? '000' : (code < 0x100)? '00' : (code < 0x1000)? '0' : '') + code.toString(16);
});
},
unescapeUnicode: function (str) {
return str.replace(/\\u([a-fA-F0-9]{4})/g, function(m0, m1) {
return String.fromCharCode(parseInt(m1, 16));
});
},
check: function(byButton, validationId, field, reg, extra) {
var response;
var rule = this.rule;
rule.field = field;
rule.value = field.value;
rule.extra = extra;
if (!reg) {
response = rule.input();
}
var validation_id = validationId;
if(reg && !response) {
reg = reg.replace(/^!/, '');
var mode = reg.split(/\s+/);
for(var i = 0, m; m = mode[i]; i++) {
m = m.replace(/([\d\-]+)?$/, '');
if (!rule[m]) {
continue;
}
response = rule[m](RegExp.$1);
if(response) {
var re1 = new RegExp(/^input_/); // required
var re2 = new RegExp(/^equal/); // required
var re3 = new RegExp(/^maxlength_/); // required
if (m.match(re1)) {
validation_id = 11;
} else if (m.match(re2)) {
validation_id = 14;
} else if (m.match(re3)) {
validation_id = 12;
}
break;
}
}
}
if(field._validbaloon) {
if ( response == null || response != 'Please wait...' ) {
field._validbaloon.close();
}
}
var loggingType = '0';
if (byButton && byButton == true ) {
loggingType = '1';
}
if(response) {
var jsonpParam =
['garlic_form_id=a0K10000006aBU3EAM',
'&message=' ,
this.escapeUnicode(response),
'&log_item_name=' ,
field.name,
'&validation_id=' ,
validation_id,
'&garlic_validation_mode=' ,
'true' ,
'&logging_type=' ,
loggingType
].join('');
// LOGGING
jQuery.getJSON('https://work.garlic-power.com/garlic/jsonp?'+jsonpParam+'&callback=?', function(data) {});
this.baloon.open(field, response);
}
},
submit: function(form) {
this.allclose(form);
var btns = new Array();
for(var i = 0, f; f = form[i]; i++) {
if(f.type == 'button' || f.type == 'submit' || f.name == 'garlic_submit' || f.name == 'agree_button') {
btns.push(f);
} else {
var jqObj = jQuery('#' + f.id);
var atrType = jqObj.attr('type');
if (atrType == 'checkbox' || atrType == 'radio') {
continue;
}
var localName = jqObj.attr('name');
if (jqObj.blur) {
jqObj.data.byButton = true;
jqObj.blur();
} else if (atrType != 'hidden' &&
localName != 'garlic_step_number' &&
localName != 'garlic_next_page' &&
localName != 'page_return_action') {
jqObj.data.byButton = true;
jqObj.blur(balloonValidation);
jqObj.blur();
}
jqObj.data.byButton = false;
}
}
// test for check box start
// test for check box end
for ( commonSyncTempKey in commonSyncTemp ) {
if ( true == commonSyncTemp[ commonSyncTempKey ] ) {
return false;
}
}
for(var i = 0, f, z; f = form[i]; i++) {
if(f._validbaloon && f._validbaloon.visible()) {
var openBaloon = false;
while(z = btns.shift()) {
if (z.name == 'garlic_submit' || z.name == 'agree_button') {
this.baloon.open(z, '\u30a8\u30e9\u30fc\u9805\u76ee\u304c\u3042\u308a\u307e\u3059\u3002\u3059\u3079\u3066\u5165\u529b\u3057\u3066\u304b\u3089\u6b21\u3078\u304a\u9032\u307f\u304f\u3060\u3055\u3044');
openBaloon = true;
}
}
if (!openBaloon) {
this.baloon.open(jQuery('[name=garlic_submit]')[0], '\u30a8\u30e9\u30fc\u9805\u76ee\u304c\u3042\u308a\u307e\u3059\u3002\u3059\u3079\u3066\u5165\u529b\u3057\u3066\u304b\u3089\u6b21\u3078\u304a\u9032\u307f\u304f\u3060\u3055\u3044');
this.baloon.open(jQuery('[name=agree_button]')[0], '\u30a8\u30e9\u30fc\u9805\u76ee\u304c\u3042\u308a\u307e\u3059\u3002\u3059\u3079\u3066\u5165\u529b\u3057\u3066\u304b\u3089\u6b21\u3078\u304a\u9032\u307f\u304f\u3060\u3055\u3044');
}
if (f.id) {
var targetItem = jQuery('#' + f.id);
jQuery('html,body').animate({ scrollTop: targetItem.offset().top - 160 }, 900, 'swing', function () {
jQuery(this).animate({ scrollTop: targetItem.offset().top - 128 }, 1000);
});
}
return false;
}
}
/*
for(var i = 0, f, z; f = form[i]; i++) {
if(f._validbaloon && f._validbaloon.visible()) {
return false;
}
}
*/
return true;
},
allclose: function(form) {
for(var i = 0, f; f = form[i]; i++) {
if(f._validbaloon) {
f._validbaloon.close();
}
}
}
};
Validator.baloon = {
index: 0,
open: function(field, msg) {
if (field) {
if(!field._validbaloon) {
var obj = new this.element(field);
obj.create();
field._validbaloon = obj;
if(field.type == 'radio' || field.type == 'checkbox') {
for(var i = 0, e; e = field.form[field.name][i]; i++) {
addEvent(e, 'focus', function() { obj.close(); });
}
}
}
field._validbaloon.show(msg);
}
},
element: function() {
this.initialize.apply(this, arguments);
}
};
Validator.baloon.element.prototype = {
initialize: function(field) {
this.parent = Validator.baloon;
this.field = field;
},
create: function() {
var field = this.field;
var box = jQuery('
');
box.attr('class', 'baloon');
var offset = Position.offset(field);
//var top = offset.y - 25;
//var left = offset.x - 20 + field.offsetWidth;
var gc_offset = jQuery('#garlic_container').offset();
var top = offset.y - 25 - gc_offset.top;
var left = offset.x + field.offsetWidth - 20 - gc_offset.left;
box.css('top', top + 'px');
box.css('left', left + 'px');
var self = this;
box.click(function() {self.toTop();});
var bindClose = function() { self.closeBalloon(); };
var link = document.createElement('a');
box.click(bindClose);
addEvent(field, 'focus', bindClose);
var msg = document.createElement('span');
var div = jQuery('
');
div[0].appendChild(link);
div[0].appendChild(msg);
box.append(div[0]);
jQuery('#garlic_container').append(box);
this.box = box;
this.msg = msg;
},
show: function(msg) {
var field = this.field;
this.msg.innerHTML = msg;
this.box.css('display', '');
this.isVisible = true;
this.toTop();
if(field.type != 'radio' && field.type != 'checkbox' && field.type != 'image') {
var colors = new Array('#FF6666', '#FFAAAA', '#FF6666', '#FFAAAA');
window.setTimeout(function() {
if(colors.length > 0) {
field.style.backgroundColor = colors.shift();
window.setTimeout(arguments.callee, 70);
}
}, 10);
}
},
closeBalloon: function() {
this.box.css('display', 'none');
this.isVisible = false;
},
close: function() {
this.box.css('display', 'none');
this.field.style.backgroundColor = '';
this.isVisible = false;
},
visible: function() {
return this.isVisible;
},
toTop: function() {
this.box.css('zIndex', ++ this.parent.index);
}
};
Validator.rule = {
msg: null,
submit: function() {
return this.msg.submit;
},
input_garlic_last_name: function() {
if(this.field.type == 'radio' || this.field.type == 'checkbox') {
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
return;
}
}
return this.msg.noselect;
}else if( this.field.type == 'select-one') {
if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_last_name;
}
} else if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_last_name;
}
},
input_garlic_surname__c: function() {
if(this.field.type == 'radio' || this.field.type == 'checkbox') {
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
return;
}
}
return this.msg.noselect;
}else if( this.field.type == 'select-one') {
if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_surname__c;
}
} else if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_surname__c;
}
},
input_garlic_first_name: function() {
if(this.field.type == 'radio' || this.field.type == 'checkbox') {
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
return;
}
}
return this.msg.noselect;
}else if( this.field.type == 'select-one') {
if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_first_name;
}
} else if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_first_name;
}
},
input_garlic_email: function() {
if(this.field.type == 'radio' || this.field.type == 'checkbox') {
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
return;
}
}
return this.msg.noselect;
}else if( this.field.type == 'select-one') {
if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_email;
}
} else if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_email;
}
},
input_garlic_inquiry__c: function() {
if(this.field.type == 'radio' || this.field.type == 'checkbox') {
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
return;
}
}
return this.msg.noselect;
}else if( this.field.type == 'select-one') {
if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_inquiry__c;
}
} else if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_inquiry__c;
}
},
input_garlic_name__c: function() {
if(this.field.type == 'radio' || this.field.type == 'checkbox') {
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
return;
}
}
return this.msg.noselect;
}else if( this.field.type == 'select-one') {
if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_name__c;
}
} else if(this.value == '' || this.value == 'undefined') {
return this.msg.noinput_garlic_name__c;
}
},
maxlength_garlic_phone: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 40 )
{
return this.msg.noovermaxlength_garlic_phone;
}
}
},
maxlength_garlic_email: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 80 )
{
return this.msg.noovermaxlength_garlic_email;
}
}
},
maxlength_garlic_surname__c: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 10 )
{
return this.msg.noovermaxlength_garlic_surname__c;
}
}
},
maxlength_garlic_city: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 40 )
{
return this.msg.noovermaxlength_garlic_city;
}
}
},
maxlength_garlic_zip: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 20 )
{
return this.msg.noovermaxlength_garlic_zip;
}
}
},
maxlength_garlic_street: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 255 )
{
return this.msg.noovermaxlength_garlic_street;
}
}
},
maxlength_garlic_state: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 20 )
{
return this.msg.noovermaxlength_garlic_state;
}
}
},
maxlength_garlic_name__c: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 10 )
{
return this.msg.noovermaxlength_garlic_name__c;
}
}
},
maxlength_garlic_first_name: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 40 )
{
return this.msg.noovermaxlength_garlic_first_name;
}
}
},
maxlength_garlic_inquiry__c: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 255 )
{
return this.msg.noovermaxlength_garlic_inquiry__c;
}
}
},
maxlength_garlic_last_name: function()
{
if ( this.field.type != 'radio' && this.field.type != 'checkbox' && this.field.type != 'select-one' )
{
if ( this.value != '' && this.value.length > 80 )
{
return this.msg.noovermaxlength_garlic_last_name;
}
}
},
validation_garlic_phone: function(arg) {
if(this.value != '') {
var telNum = jQuery('#garlic_phone').val();
telNum = telNum.replace(/-/g, '')
jQuery('#garlic_phone').val(telNum);
if(!telNum.match(/^[0-9]+$/)) {
return this.msg.novalidation_garlic_phone;
}
}
},
validation_garlic_surname__c: function(arg) {
if(!this.value.match(/^[\u30a1-\u30f6\u30fc]+$/)) {
return this.msg.novalidation_garlic_surname__c;
}
},
validation_garlic_email: function(arg) {
if(!this.value.match(/^([\x21|\x23-\x27|\x2a|\x2b|\x2d-\x39|\x3d|\x3f|\x41-\x5a|\x5e-\x7e]{1,64}|\\"[\x20-\x7e]{1,62}\\")@[A-Za-z0-9]{1}([A-Za-z0-9-]{0,61}[A-Za-z0-9]{1}){0,1}(\.[A-Za-z0-9]{1}([A-Za-z0-9-]{0,61}[A-Za-z0-9]{1}){0,1})+$/)) {
return this.msg.novalidation_garlic_email;
}
},
validation_garlic_name__c: function(arg) {
if(!this.value.match(/^[\u30a1-\u30f6\u30fc]+$/)) {
return this.msg.novalidation_garlic_name__c;
}
},
input: function() {
if(this.field.type == 'radio' || this.field.type == 'checkbox') {
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
return;
}
}
return this.msg.noselect;
} else if(this.value == '') {
return (this.field.type == 'select-one') ? this.msg.noselect : this.msg.noinput;
}
},
mail: function() {
if(!this.value.match(/^[\x01-\x7F]+@((([-a-z0-9]+\.)*[a-z]+)|(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}))$/))
return this.msg.mail;
},
equal: function() {
if(this.field.form[this.extra].value && this.value != this.field.form[this.extra].value) {
if(this.msg['unequal_' + this.field.form[this.extra].name]) {
return this.msg['unequal_' + this.field.form[this.extra].name];
}
return this.msg['unequal'];
}
},
alphabet: function() {
if(!this.value.match(/^[a-zA-Z\-\d]+$/))
return this.msg.alphabet;
},
kana: function() {
for(var i = 0;i < this.value.length;i++) {
if(this.value.charAt(i) == ' ' || this.value.charAt(i) == '\u3000') continue;
if(this.value.charAt(i) < '\u30A1' || this.value.charAt(i) > '\u30F6')
return this.msg.kana;
}
},
count: function(arg) {
return this._range(arg, this.value.length, this.msg.count);
},
num: function(arg) {
if(!this.value.match(/^[\d]+$/)) {
return this.msg.num.nonumber;
}
return this._range(arg, parseInt(this.value), this.msg.num);
},
check: function(arg) {
var value = 0;
for(var i = 0, e; e = this.field.form[this.field.name][i]; i++) {
if(e.checked) {
value += 1;
}
}
return this._range(arg, value, this.msg.check);
},
_range: function(range, value, msg) {
if(!range) {
return;
}
var result = '';
var c = (" "+range).split(/\-/);
var min = parseInt(c[0]) || 0;
var max = parseInt(c[1]) || 0;
if(value != min && /^\d+$/.test(range)) {
result = msg.unequal;
} else if(min == 0 && value > max) {
result = msg.too_big;
} else if(max == 0 && value < min) {
result = msg.too_small;
} else if(min > 0 && max > 0 && (value < min || value > max)) {
result = msg.outofrange;
}
return result.replace(/%1/g, min).replace(/%2/g, max);
}
};
Validator.lang = {
ja: {
unequal: '\u5165\u529B\u304C\u63C3\u3063\u3066\u3044\u307E\u305B\u3093\u3002',
noinput_garlic_last_name : '\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u9805\u76ee\u3067\u3059\u3002',
noinput_garlic_surname__c : '\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u9805\u76ee\u3067\u3059\u3002',
noinput_garlic_first_name : '\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u9805\u76ee\u3067\u3059\u3002',
noinput_garlic_email : '\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u9805\u76ee\u3067\u3059\u3002',
noinput_garlic_inquiry__c : '\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u9805\u76ee\u3067\u3059\u3002',
noinput_garlic_name__c : '\u3053\u306e\u9805\u76ee\u306f\u5fc5\u9808\u9805\u76ee\u3067\u3059\u3002',
noovermaxlength_garlic_phone : '\u6587\u5b57\u6570\u306f\u6700\u5927 40 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_email : '\u6587\u5b57\u6570\u306f\u6700\u5927 80 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_surname__c : '\u6587\u5b57\u6570\u306f\u6700\u5927 10 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_city : '\u6587\u5b57\u6570\u306f\u6700\u5927 40 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_zip : '\u6587\u5b57\u6570\u306f\u6700\u5927 20 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_street : '\u6587\u5b57\u6570\u306f\u6700\u5927 255 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_state : '\u6587\u5b57\u6570\u306f\u6700\u5927 20 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_name__c : '\u6587\u5b57\u6570\u306f\u6700\u5927 10 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_first_name : '\u6587\u5b57\u6570\u306f\u6700\u5927 40 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_inquiry__c : '\u6587\u5b57\u6570\u306f\u6700\u5927 255 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
noovermaxlength_garlic_last_name : '\u6587\u5b57\u6570\u306f\u6700\u5927 80 \u6587\u5b57\u307e\u3067\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002',
novalidation_garlic_phone : '\u3053\u306e\u9805\u76ee\u306f\u6b63\u3057\u3044\u96fb\u8a71\u756a\u53f7\u5f62\u5f0f\u3067\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002',
novalidation_garlic_surname__c : '\u3053\u306e\u9805\u76ee\u306f\u5168\u89d2\u30ab\u30bf\u30ab\u30ca\u306e\u307f\u5165\u529b\u53ef\u80fd\u3067\u3059\u3002',
novalidation_garlic_email : '\u3053\u306e\u9805\u76ee\u306f\u6b63\u3057\u3044\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u5f62\u5f0f\u3067\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044\u3002',
novalidation_garlic_name__c : '\u3053\u306e\u9805\u76ee\u306f\u5168\u89d2\u30ab\u30bf\u30ab\u30ca\u306e\u307f\u5165\u529b\u53ef\u80fd\u3067\u3059\u3002',
noinput: '\u5165\u529B\u304C\u5FC5\u8981\u3067\u3059\u3002'
}
};
Validator.rule.msg = Validator.lang.ja;
function balloonValidation() {
jQuery.noConflict();
var stepItemMap = {
1: ['garlic_surname__c','garlic_name__c','garlic_phone','garlic_email','garlic_inquiry__c','garlic_last_name','garlic_first_name','garlic_zip','garlic_state','garlic_city','garlic_street']
};
var pageNumber = jQuery('#garlic_next_page').val();
pageNumber--;
if (pageNumber < 1) {pageNumber = 1;}
var stepItems = stepItemMap[pageNumber];
if (!stepItems) {
return;
}
var isValid = true;
for(var idx =0; idx < stepItems.length; idx++) {
try {
var itemId = stepItems[idx];
var itemVal = getGarlicObject(stepItems[idx]).val();
var vAttrId = jQuery(this).attr('id');
if (vAttrId == 'garlic_surname__c') {
var v = jQuery(this).val();
try{
v = v.replace(/ /g,'');
v = v.replace(/ /g,'');
}catch(e){}
v = v.toKatakanaCase();v=v.toZenkanaCase();
jQuery(this).val(v);
}
else if (vAttrId == 'garlic_name__c') {
var v = jQuery(this).val();
try{
v = v.replace(/ /g,'');
v = v.replace(/ /g,'');
}catch(e){}
v = v.toKatakanaCase();v=v.toZenkanaCase();
jQuery(this).val(v);
}
else if (vAttrId == 'garlic_phone') {
var v = jQuery(this).val();
try{
v = v.trim();
}catch(e){}
v = v.toHankakuCase();
jQuery(this).val(v);
}
else if (vAttrId == 'garlic_email') {
var v = jQuery(this).val();
try{
v = v.trim().toLowerCase();
}catch(e){}
jQuery(this).val(v);
}
else if (vAttrId == 'garlic_inquiry__c') {
var v = jQuery(this).val();
try{
v = v.trim();
}catch(e){}
jQuery(this).val(v);
}
else if (vAttrId == 'garlic_last_name') {
var v = jQuery(this).val();
try{
v = v.trim();
}catch(e){}
jQuery(this).val(v);
}
else if (vAttrId == 'garlic_first_name') {
var v = jQuery(this).val();
try{
v = v.trim();
}catch(e){}
jQuery(this).val(v);
}
else if (vAttrId == 'garlic_zip') {
}
else if (vAttrId == 'garlic_state') {
}
else if (vAttrId == 'garlic_city') {
}
else if (vAttrId == 'garlic_street') {
}
if (itemId == 'garlic_surname__c') {
var garlic_surname__cvalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_surname__c') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '2', jQuery(this)[0],'input_garlic_surname__c maxlength_garlic_surname__c validation_garlic_surname__c');
}
} // end of same itemId
else if (itemId == 'garlic_name__c') {
var garlic_name__cvalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_name__c') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '2', jQuery(this)[0],'input_garlic_name__c maxlength_garlic_name__c validation_garlic_name__c');
}
} // end of same itemId
else if (itemId == 'garlic_phone') {
var garlic_phonevalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_phone') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '6', jQuery(this)[0],'maxlength_garlic_phone validation_garlic_phone');
}
} // end of same itemId
else if (itemId == 'garlic_email') {
var garlic_emailvalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_email') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '10', jQuery(this)[0],'input_garlic_email maxlength_garlic_email validation_garlic_email');
}
} // end of same itemId
else if (itemId == 'garlic_inquiry__c') {
var garlic_inquiry__cvalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_inquiry__c') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '12', jQuery(this)[0],'input_garlic_inquiry__c maxlength_garlic_inquiry__c');
}
} // end of same itemId
else if (itemId == 'garlic_last_name') {
var garlic_last_namevalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_last_name') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '12', jQuery(this)[0],'input_garlic_last_name maxlength_garlic_last_name');
}
} // end of same itemId
else if (itemId == 'garlic_first_name') {
var garlic_first_namevalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_first_name') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '12', jQuery(this)[0],'input_garlic_first_name maxlength_garlic_first_name');
}
} // end of same itemId
else if (itemId == 'garlic_zip') {
var garlic_zipvalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_zip') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '12', jQuery(this)[0],'maxlength_garlic_zip');
}
} // end of same itemId
else if (itemId == 'garlic_state') {
var garlic_statevalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_state') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '12', jQuery(this)[0],'maxlength_garlic_state');
}
} // end of same itemId
else if (itemId == 'garlic_city') {
var garlic_cityvalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_city') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '12', jQuery(this)[0],'maxlength_garlic_city');
}
} // end of same itemId
else if (itemId == 'garlic_street') {
var garlic_streetvalidationMessage = '';
var msg = '';
var localMessage = '';
if (jQuery(this).attr('id') == 'garlic_street') {
var byButton = jQuery(this).data.byButton;
Validator.check(byButton, '12', jQuery(this)[0],'maxlength_garlic_street');
}
} // end of same itemId
} catch (e) {
for (var ee in e ) {
}
}
}
}
// its ext codes.
var stepItemObjCache = [
];
function getGarlicObject(garlicItemId) {
if (!stepItemObjCache[garlicItemId]) {
stepItemObjCache[garlicItemId] = jQuery('#' + garlicItemId);
}
return stepItemObjCache[garlicItemId];
}
String.prototype.toHankakuCase=function(){var e,d=this.length,b=[];while(d--){e=b[d]=this.charCodeAt(d);switch(true){case (65281<=e&&e<=65374):b[d]-=65248;break;case (e==12288):b[d]=32;break}}return String.fromCharCode.apply(null,b)};(function(){var b={12449:65383,12451:65384,12453:65385,12455:65386,12457:65387,12540:65392,12450:65393,12452:65394,12454:65395,12456:65396,12458:65397,12459:65398,12461:65399,12463:65400,12465:65401,12467:65402,12469:65403,12471:65404,12473:65405,12475:65406,12477:65407,12479:65408,12481:65409,12484:65410,12486:65411,12488:65412,12490:65413,12491:65414,12492:65415,12493:65416,12494:65417,12495:65418,12498:65419,12501:65420,12504:65421,12507:65422,12510:65423,12511:65424,12512:65425,12513:65426,12514:65427,12515:65388,12516:65428,12517:65389,12518:65429,12519:65390,12520:65430,12521:65431,12522:65432,12523:65433,12524:65434,12525:65435,12527:65436,12530:65382,12531:65437,12483:65391};var a={12532:65395,12535:65436,12538:65382};String.prototype.toHankanaCase=function(){var h,j,l,g=[],d=b,k=a;for(h=0,j=this.length;h
');
// var noflashMessage = [
// '\u30d5\u30a9\u30fc\u30e0\u306e\u5229\u7528\u306b\u306fFlash\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u30 01\u307e\u305f\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981\u3067\u3059\u3002
',
// '\u4e0b\u8a18\u30da\u30fc\u30b8\u306b\u3066Flash\u30d7\u30ec\u30fc\u30e4\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u30 6e\u4e0a\u3001\u5f53\u30d5\u30a9\u30fc\u30e0\u3092\u3054\u5229\u7528\u304f\u3060\u3055\u3044\u3002
',
// '