
<div id="ml_memberregister_container" class="ml-container"></div>

<script type="text/javascript">
	var isSafari = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor);
	var getSessionId = function () {
		return sessionStorage.getItem("session_id") == null ? "" : sessionStorage.getItem("session_id");
	};
	var createSessionId = function () {
		if(getSessionId()=="") {
			sessionStorage.setItem("session_id", "<?php echo session_id(); ?>");
		}
	};
	var session_id = "";
	if (isSafari) {
		createSessionId();
		session_id = getSessionId();
	}							
	var registerMLObj = new registerML({
		session_id: session_id,
		registration_container: "ml_memberregister_container",
		registration_form_name: "ml_registration_form",
		registration_form_register_name: "ml_register_form_register",
		paypal_form_name: "ml_memberlogin_paypal_form",

		load_register_form_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionRegisterForm&pjSelect=<?php echo $_GET['pjSelect'];?><?php echo isset($_GET['group_id']) ? '&group_id=' . $_GET['group_id'] : "";?>",
		check_email_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionCheckEmail",
		check_captcha_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionCheckCaptcha",
		get_fee_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionGetFee",
		get_payment_form_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionGetPaymentForm",
		registration_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionRegisterSave",
		load_captcha_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionCaptcha&rand=",
		thankyou_page: "<?php echo $tpl['option_arr']['o_thankyou_page']; ?>",
		set_group_id_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionSetGroup",
		google_login_url: "<?php echo PJ_INSTALL_URL; ?>index.php?controller=pjFront&action=pjActionGoogleLogin",

		select_group: "<?php echo $_GET['pjSelect']; ?>",
		
		validation: {
			error_email_invalid: "<?php echo pjSanitize::clean($front_validation['email_invalid']); ?>",
			error_email_used: "<?php echo pjSanitize::clean($front_validation['email_used']); ?>",
			error_birthday_invalid: "<?php echo pjSanitize::clean($front_validation['birthday_invalid']); ?>",
			error_captcha_incorrect: "<?php echo pjSanitize::clean($front_validation['captcha_incorrect']); ?>"
		},
		message: {
			info: "<?php echo pjSanitize::clean(__('front_label_register_info', true, false)); ?>",
			load: "<?php echo pjSanitize::clean(__('front_label_register_load_payment', true, false)); ?>",
			success: "<?php echo pjSanitize::clean(__('front_label_register_success', true, false)); ?>",
			error: "<?php echo pjSanitize::clean(__('front_label_register_error', true, false)); ?>"
		}
	});
</script>