/*
	maruamyu.net common library
		ver. 2011-09-02
			written by mirai-iro.
*/

if(typeof(maruamyu) == 'undefined'){var maruamyu = {};}

//--------------------------------------------------------------------------------

if(typeof(maruamyu.config) == 'undefined'){maruamyu.config = {};}

maruamyu.config.ie6 = false;

(function(){
	if(document.all){
		if(navigator.appVersion.indexOf('MSIE 6') >= 0){	// IE6
			maruamyu.config.ie6 = true;
		}
		
		// HTML5 for IE (html5-enabling-script)
		var html5tags = 'abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video'.split(',');
		for(var i=0; i<html5tags.length; i++){document.createElement(html5tags[i]);}
	}
})();

maruamyu.config.enableDHTML = (typeof(document.getElementById) != 'undefined') ? true : false;

//	maruamyu.config.project = 'maruamyu';

//--------------------------------------------------------------------------------

if(typeof(maruamyu.param) == 'undefined'){maruamyu.param = {};}

maruamyu.param.head = function(){return document.getElementsByTagName('head').item(0);}
maruamyu.param.body = function(){return document.getElementsByTagName('body').item(0);}

//--------------------------------------------------------------------------------

function $(input_id)
{
	if(arguments.length > 1){
		var i, i_max, elements;
		
		i_max = arguments.length;
		elements = [];
		
		for(i=0; i<i_max; i++){
			elements.push($(arguments[i]));
		}
		
		return elements;
	}
	
	return document.getElementById(input_id);
}

//--------------------------------------------------------------------------------

function get_now_time()
{
	var tt = new Date();
	return Math.floor( tt.getTime() / 1000 );
}

maruamyu.config.wdays = {};
maruamyu.config.wdays.ja = ['日','月','火','水','木','金','土'];
maruamyu.config.wdays.en = ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];

function my_fmt_time(in_time, mode)
{
	var tt = new Date();
	
	tt.setTime(in_time * 1000);
	
	return null;	// pending
}

//--------------------------------------------------------------------------------

function popWin(getURL,sizeX,sizeY,target)
{
	var putOption = 'scrollbars=yes,close=yes,width='+sizeX+',height='+sizeY;
	var windowHandler = null;
	
	if(screen.width <= sizeX || screen.height <= sizeY){putOption = '';}
	
	if(target){windowHandler = window.open(getURL,target,putOption);}
	else{windowHandler = window.open(getURL,'_blank',putOption);}
	
	windowHandler.focus();
	
	return windowHandler;
}

//--------------------------------------------------------------------------------

function intval(str){ return parseInt(str); }

function my_intval(str)
{
	str = str.toString();
	
	str = str.replace(/０/g,'0');
	str = str.replace(/１/g,'1');
	str = str.replace(/２/g,'2');
	str = str.replace(/３/g,'3');
	str = str.replace(/４/g,'4');
	str = str.replace(/５/g,'5');
	str = str.replace(/６/g,'6');
	str = str.replace(/７/g,'7');
	str = str.replace(/８/g,'8');
	str = str.replace(/９/g,'9');
	
	return intval(str);
}

function htmlspecialchars(str)
{
	str = str.toString();
	
	str = str.replace(/&/g,'&amp;');
	str = str.replace(/"/g,'&quot;');
	str = str.replace(/</g,'&lt;');
	str = str.replace(/>/g,'&gt;');
	str = str.replace(/\'/g,'&#39;');
	
	return str;
}

function htmlspecialchars_decode(str)
{
	str = str.toString();
	
	str = str.replace(/&quot;/ig,'"');
	str = str.replace(/&lt;/ig,'<');
	str = str.replace(/&gt;/ig,'>');
	str = str.replace(/&#39;/ig,'\'');
	str = str.replace(/&amp;/ig,'&');
	
	return str;
}

var my_htmlspecialchars = htmlspecialchars;
var my_htmlspecialchars_decode = htmlspecialchars_decode;

var rawurlencode = encodeURIComponent;
var rawurldecode = decodeURIComponent;

function my_rawurlencode(str){return rawurlencode( my_htmlspecialchars_decode(str) );}
function my_rawurldecode(str){return my_htmlspecialchars( rawurldecode(str) );}

//--------------------------------------------------------------------------------

function query_str2array(str)
{
	var query_obj = {};
	
	if(str && str.length > 0){
		var tmp = str.split('&');
		var i,tmp2,key,value;
		
		for(i=0; i<tmp.length; i++){
			if(tmp[i] && tmp[i].length > 0){
				tmp2 = tmp[i].split('=');
				key = my_rawurldecode(tmp2[0]);
				value = my_rawurldecode(tmp2[1]);
				
				if(!query_obj[key]){query_obj[key] = '';}
				
				query_obj[key] += value;
			}
		}
	}
	
	return query_obj;
}

function query_array2str(query_obj)
{
	if(typeof(query_obj) == 'undefined'){return '';}
	
	var key, query_str;
	
	query_str = '';
	
	for( key in query_obj ){
		if(typeof(query_obj[key]) == 'undefined'){continue;}
		query_str += '&'+ my_rawurlencode(key) +'='+ my_rawurlencode(query_obj[key]);
	}
	
	if(query_str.length > 0){query_str = query_str.substr(1);}
	
	return query_str;
}

function enable_form_input(p_form)
{
	if(!p_form){return false;}
	
	var param = p_form.elements;
	if(!param){return false;}
	
	var i, i_max;	i_max = param.length;
	for(i=0; i<i_max; i++){param[i].disabled = false;}
	
	return true;
}

function disabled_form_input(p_form)
{
	if(!p_form){return false;}
	
	var param = p_form.elements;
	if(!param){return false;}
	
	var i, i_max;	i_max = param.length;
	for(i=0; i<i_max; i++){param[i].disabled = true;}
	
	return true;
}

function get_form_input(p_form)
{
	if(!p_form){return false;}
	
	var query_str, i, i_max, value, j, j_max;
	
	i_max = p_form.elements.length;
	if(i_max < 1){return '';}
	
	query_str = '';
	
	for(i=0; i<i_max; i++){
		if(!p_form.elements[i].name){continue;}
		
		value = '';
		
		if(p_form.elements[i].type == 'button' || p_form.elements[i].type == 'submit' || p_form.elements[i].type == 'reset'){continue;}
		else if(p_form.elements[i].type == 'checkbox' || p_form.elements[i].type == 'radio'){
			if(p_form.elements[i].checked){
				value = p_form.elements[i].value;
			}
		}
		else if(p_form.elements[i].type.indexOf('select') == 0){
			j_max = p_form.elements[i].options.length;
			for(j=0; j<j_max; j++){
				if(p_form.elements[i].options[j].selected){
					value += p_form.elements[i].options[j].value;
				}
			}
		}
		else{
			value = p_form.elements[i].value;
		}
		
		query_str += '&' + my_rawurlencode(p_form.elements[i].name) + '=' + my_rawurlencode(value);
	}
	
	if(query_str != ''){query_str = query_str.substr(1);}
	
	return query_str;
}

//--------------------------------------------------------------------------------

function get_window_width()
{
	if(document.documentElement && document.documentElement.clientWidth){return document.documentElement.clientWidth;}
	if(document.body && document.body.clientWidth){return document.body.clientWidth;}
	return window.innerWidth;
}

function get_window_height()
{
	if(document.documentElement && document.documentElement.clientHeight){return document.documentElement.clientHeight;}
	if(document.body && document.body.clientHeight){return document.body.clientHeight;}
	return window.innerHeight;
}

function get_page_width()
{
	var page_width, window_width;
	
	if(window.innerHeight && window.scrollMaxY){page_width = document.body.scrollWidth;}
	else if(document.body.scrollHeight > document.body.offsetHeight){page_width = document.body.scrollWidth;}
	else{page_width = document.body.offsetWidth;}
	
	window_width = get_window_width();
	
	return (page_width < window_width) ? window_width : page_width;
}

function get_page_height()
{
	var page_height, window_height;
	
	if(window.innerHeight && window.scrollMaxY){page_height = window.innerHeight + window.scrollMaxY;}
	else if(document.body.scrollHeight > document.body.offsetHeight){page_height = document.body.scrollHeight;}
	else{page_height = document.body.offsetHeight;}
	
	window_height = get_window_height();
	
	return (page_height < window_height) ? window_height : page_height;
}

//--------------------------------------------------------------------------------

function scroll_to_top()
{
	/*
		var current_x, current_y;
		
		if(document.all){	// IE
			current_x = document.body.scrollLeft;
			current_y = document.body.scrollTop;
		}
		else{
			current_x = window.pageXOffset;
			current_y = window.pageYOffset;
		}
		
		alert('current_x = '+ current_x +', current_y = '+ current_y);
		
		scrollBy(-current_x, -current_y);
	*/
	
	scroll(0,0);
	
	return true;
}

//--------------------------------------------------------------------------------

function xhr_open()
{
	if(window.XMLHttpRequest){return new XMLHttpRequest();}
	
	if(typeof window.ActiveXObject == "function"){
		try{
			return new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e){
			try{
				return new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e2){
				return null;
			}
		}
	}
	
	return null;
}

function load_json_data(json_url)
{
	var param_head = maruamyu.param.head();
	if(!param_head){return false;}
	
	json_url += '&noCacheIE='+ (new Date()).getTime();
	
	var param_json = document.createElement('script');
	param_json.setAttribute('type', 'text/javascript');
	param_json.setAttribute('src', json_url);
	
	param_head.appendChild(param_json);
	return true;
}

//--------------------------------------------------------------------------------

function add_event(target_obj, event_name, func)
{
	if(typeof(target_obj) == 'undefined'){return false;}
	
	if(target_obj.addEventListener){
		target_obj.addEventListener(event_name, func, false);
		return true;
	}
	else if(target_obj.attachEvent){
		target_obj.attachEvent('on'+event_name, func);
		return true;
	}
	else if(target_obj[event_name] != 'undefined'){
		target_obj['on'+event_name] = func;
		return true;
	}
	
	return false;
}

function remove_event(target_obj, event_name, func)
{
	if(typeof(target_obj) == 'undefined'){return false;}
	
	if(target_obj.removeEventListener){
		target_obj.removeEventListener(event_name, func, false);
		return true;
	}
	else if(target_obj.detachEvent){
		target_obj.detachEvent('on'+event_name, func);
		return true;
	}
	else if(target_obj[event_name] != 'undefined'){
		target_obj['on'+event_name] = func;
		return true;
	}
	
	return false;
}

function add_onload(func)
{
	/*
		if(window.addEventListener){window.addEventListener('load', func, false);}
		else if(window.attachEvent){window.attachEvent('onload', func);}
		else{window.onload = func;}
	*/
	add_event(window, 'load', func);
}

//--------------------------------------------------------------------------------

function css_add_rule(selector, declarations)
{
	if(typeof(document.styleSheets) == 'undefined' || !document.styleSheets | document.styleSheets.length < 1){return false;}
	
	var p_sheets = document.styleSheets[0];
	
	if(document.all){	// for IE
		p_sheets.addRule(selector, declarations);
	}
	else{	// for Mozzila
		var css_str = ''+ selector +'{'+ declarations +'}';
		p_sheets.insertRule(css_str, p_sheets.cssRules.length);
	}
	
	return true;
}

//--------------------------------------------------------------------------------

if(typeof(maruamyu.overlay) == 'undefined'){maruamyu.overlay = {};}

maruamyu.overlay.windowCnt = 0;
maruamyu.overlay.windowHandler = [];

maruamyu.overlay.window_init_title = 'つうしんちゅう……';
maruamyu.overlay.window_init_msg = '<p>つうしん しています...</p><p class="pos_center"><img src="/img/plz_wait_l.gif" alt="wait..." title="通信中です..." width="75" height="75"></p>';

maruamyu.overlay.window = function()
{
	// ---------------------------------------- propertys
	
	this.enable = false;
	
	this.no = maruamyu.overlay.windowCnt;
	maruamyu.overlay.windowCnt++;
	
	this.pos_x = 0;
	this.pos_y = 0;
	
	this.width = 0;
	this.height = 0;
	
	this.param = {
		base: null,
		win: null,
		win_title: null,
		win_body: null,
		win_close: null,
		win_close_btn: null
	};
	
	// ---------------------------------------- methods
	
	this.init = function(disable_close)
	{
		return this.open(maruamyu.overlay.window_init_title, maruamyu.overlay.window_init_msg, disable_close);
	}
	
	this.open = function(in_title, in_body, disable_close)
	{
		if(!this.enable){return false;}
		
		if(in_title && in_title != ''){this.param.win_title.innerHTML = in_title;}
		if(in_body && in_body != ''){this.param.win_body.innerHTML = in_body;}
		
		if(disable_close){
			this.param.win_close_btn.disabled = true;
		}
		else{
			this.param.win_close_btn.disabled = false;
			
			// window close button
			var close_btn_container = document.createElement('p');
			close_btn_container.setAttribute('class', 'action_btn');
			close_btn_container.setAttribute('className', 'action_btn');	// for IE互換モード
			this.param.win.appendChild(close_btn_container);
			
			var close_btn = document.createElement('input');
			close_btn.setAttribute('type', 'button');
			close_btn.setAttribute('value', 'このページ内ウィンドウを閉じる');
			close_btn_container.appendChild(close_btn);
			
			var window_no = this.no;
			add_event( close_btn, 'click', function(){ maruamyu.overlay.windowHandler[window_no].close(); } );
		}
		
		var p_overlay = $('maruamyu_overlay_'+ this.no);
		setTimeout( function(){ p_overlay.style.display = 'block'; }, 100 );
		
		return true;
	}
	
	this.close = function()
	{
		if(!this.enable){return false;}
		
		var p_overlay = $('maruamyu_overlay_'+ this.no);
		setTimeout( function(){ p_overlay.style.display = 'none'; }, 100 );
		
		return true;
	}
	
	this.resize = function(in_width, in_height)
	{
		if(!this.enable){return false;}
		
		var winW,winH;
		winW = get_window_width();
		winH = get_window_height();
		
		if(in_width > 0){
			this.width = in_width;
			if(this.width > winW){this.width = winW;}
		}
		if(in_height > 0){
			this.height = in_height;
			if(this.height > winH){this.height = winH;}
		}
		
		this.pos_x = intval( (winW - this.width ) / 2 );
		this.pos_y = intval( (winH - this.height) / 2 ) - 24;	if(this.pos_y < 1){this.pos_y = 0;}
		
		// window position
		this.param.win.style.left = '' + this.pos_x + 'px';
		this.param.win.style.top = '' + this.pos_y + 'px';
		
		// window width/height
		this.param.win_body.style.width = '' + this.width + 'px';
		this.param.win_body.style.height = '' + this.height + 'px';
		
		return true;
	}
	
	// ---------------------------------------- init
	
	var winW,winH,windowW,windowH;
	
	winW = get_window_width();
	winH = get_window_height();
	
	if(winW < 800 || winH < 500){return false;}
	
	if(!document.getElementById){return false;}
	
	var p_body_tag = document.getElementsByTagName('body');
	if(!p_body_tag){return false;}
	
	var p_overlay = $('maruamyu_overlay_'+ this.no);
	if(!p_overlay){
		var img_overlay_mask = new Image(100,100);
		img_overlay_mask.src = '/img/overlay_mask.png';
		
		// overlay container
		this.param.base = document.createElement('div');
		this.param.base.setAttribute('class', 'maruamyu_overlay');
		this.param.base.setAttribute('className', 'maruamyu_overlay');	// for IE互換モード
		this.param.base.setAttribute('id', 'maruamyu_overlay_'+ this.no);
		p_body_tag[0].appendChild(this.param.base);
		
		// window container
		this.param.win = document.createElement('div');
		this.param.win.setAttribute('class', 'maruamyu_overlay_window');
		this.param.win.setAttribute('className', 'maruamyu_overlay_window');
		this.param.base.appendChild(this.param.win);
		
		// modify z-index
		var p_base_style = this.param.base.currentStyle || document.defaultView.getComputedStyle(this.param.base, '');
		var p_win_style  = this.param.win.currentStyle  || document.defaultView.getComputedStyle(this.param.win, '');
		this.param.base.zIndex = intval(p_base_style.zIndex) + 2 * this.no;
		this.param.win.zIndex  = intval(p_win_style.zIndex)  + 2 * this.no;
		
		// window title
		this.param.win_title = document.createElement('h2');
		this.param.win_title.setAttribute('class', 'maruamyu_overlay_window_title');
		this.param.win_title.setAttribute('className', 'maruamyu_overlay_window_title');
		this.param.win_title.innerHTML = maruamyu.overlay.window_init_title;
		this.param.win.appendChild(this.param.win_title);
		
		// window body
		this.param.win_body = document.createElement('div');
		this.param.win_body.setAttribute('class', 'maruamyu_overlay_window_body');
		this.param.win_body.setAttribute('className', 'maruamyu_overlay_window_body');
		this.param.win_body.innerHTML = maruamyu.overlay.window_init_msg;
		this.param.win.appendChild(this.param.win_body);
		
		// window close button
		this.param.win_close = document.createElement('p');
		this.param.win_close.setAttribute('class', 'maruamyu_overlay_window_close');
		this.param.win_close.setAttribute('className', 'maruamyu_overlay_window_close');
		this.param.win.appendChild(this.param.win_close);
		
		// window close button
		this.param.win_close_btn = document.createElement('input');
		this.param.win_close_btn.setAttribute('type', 'button');
		this.param.win_close_btn.setAttribute('value', '×');
		this.param.win_close_btn.setAttribute('class', 'maruamyu_overlay_window_close_btn');
		this.param.win_close_btn.setAttribute('className', 'maruamyu_overlay_window_close_btn');
		this.param.win_close_btn.setAttribute('title', 'このページ内ウィンドウを閉じる');
		this.param.win_close.appendChild(this.param.win_close_btn);
		
		var window_no = this.no;
		add_event( this.param.win_close_btn, 'click', function(){ maruamyu.overlay.windowHandler[window_no].close(); } );
	}
	
	// ウィンドウ全体のサイズをここで調整
	windowW = intval(winW * 80 / 100);
	windowH = intval(winH * 70 / 100);
	
	this.enable = true;
	maruamyu.overlay.windowHandler[this.no] = this;
	this.resize( windowW, windowH );
	
	if(maruamyu.config.ie6){	// for IE6
		this.param.base.style.position = 'absolute';
		this.param.base.style.width = '' + winW + 'px';
		this.param.base.style.height = '' + winH + 'px';
		//this.param.base.style.filter = 'alpha(opacity=25)';
		//this.param.base.style.backgroundColor = '#f0f0f0';
		this.param.win.style.borderColor = '#999999';
	}
	
	//----------------------------------------
	return true;
}

//--------------------------------------------------------------------------------

maruamyu.cookie = {};
maruamyu.cookie.data = {};

maruamyu.cookie.load = function()
{
	maruamyu.cookie.data = {};
	
	var cookie = document.cookie;
	if(!cookie || cookie == ''){return null;}
	
	cookie = cookie.replace(/; /g,'&');
	maruamyu.cookie.data = query_str2array(cookie);
	
	return true;
}

maruamyu.cookie.get = function(key)
{
	return maruamyu.cookie.data[key];
}

maruamyu.cookie.set = function(key, value, expire)
{
	maruamyu.cookie.data[key] = value;
}

//--------------------------------------------------------------------------------

maruamyu.chk_page_layout = function()
{
	var e0, e1, i, j, height_this, height_left, height_right, height_max;
	
	e0 = document.getElementsByTagName('div');
	
	for(i=0; i<e0.length; i++){
		if(e0[i].className == 'container_layout_all'){
			e1 = e0[i].getElementsByTagName('div');
			
			height_left = 0;
			height_right = 0;
			
			for(j=0; j<e1.length; j++){
				height_this = e1[j].clientHeight;
				
				switch(e1[j].className){
					case 'container_layout_contents_left':
					case 'container_layout_menu_left':
						height_left += height_this;
					break;
					
					case 'container_layout_contents_right':
					case 'container_layout_menu_right':
						height_right += height_this;
					break;
				}
			}
			
			height_max = (height_left > height_right) ? height_left : height_right;
			
			e0[i].style.height = '' + (height_max + 16) + 'px';
		}
	}
}

//--------------------------------------------------------------------------------

// デバイス情報

maruamyu.config.device = {};

maruamyu.config.device.is3ds = false;

maruamyu.config.device.code = {
	'touch': 3,
	'mobile': 2,
	'pc': 1,
	'any' : 0
};

maruamyu.config.device.detect = maruamyu.config.device.code.any;

// デバイス判定
(function(){
	var device_list = [];
	
	device_list[maruamyu.config.device.code.touch] = {
		'name' : 'スマートフォン',
		'detect' : ['iPhone','iPod','iPad', 'Android', 'PlayStation Vita']	// 'Nintendo DSi','Nintendo 3DS'
	};
	
	device_list[maruamyu.config.device.code.mobile] = {
		'name' : 'ケータイ',
		'detect' : ['DoCoMo', 'SoftBank','Vodafone','J-PHONE', 'KDDI','UP.Browser', 'WILLCOM', 'emobile', 'Nitro']
	};
	
	device_list[maruamyu.config.device.code.pc] = {
		'name': 'PC',
		'detect' : ['/']
	};
	
	var ua = navigator.userAgent;
	var device_key, device_code, detect, i, i_max;
	
	for( device_key in maruamyu.config.device.code ){
		device_code = maruamyu.config.device.code[device_key];
		detect = device_list[device_code].detect;
		
		if(!detect || (i_max = detect.length) < 1){continue;}
		
		for(i=0; i<i_max; i++){
			if(ua.indexOf(detect[i]) >= 0){
				maruamyu.config.device.detect = device_code;
				break;
			}
		}
		
		if(maruamyu.config.device.detect != maruamyu.config.device.code.any){break;}
	}
	
	if(ua.indexOf('Nintendo DSi') >= 0 || ua.indexOf('Nintendo 3DS') >= 0){
		maruamyu.config.device.detect = maruamyu.config.device.code.touch;
		maruamyu.config.device.is3ds = true;
	}
	
})();

//--------------------------------------------------------------------------------

// onload functions

if(document.all){css_add_rule('img', '-ms-interpolation-mode: bicubic;');}

(function(){
	maruamyu.cookie.load();
	
	// プロジェクトコード取得
	/*
	var result = location.href.match(new RegExp('https?://([^/]+)(/|$)'));
	if(result && result.length > 1){
		var domain = result[1];
		
		if(domain.indexOf('twit-c.net') >= 0){maruamyu.config.project = 'twtr';}
		if(domain.indexOf('imas.maruamyu.net') >= 0 || domain.indexOf('imas-db.jp') >= 0){maruamyu.config.project = 'imas';}
		if(domain.indexOf('bbdx.maruamyu.net') >= 0){maruamyu.config.project = 'bbdx';}
		if(domain.indexOf('pokemon.maruamyu.net') >= 0){maruamyu.config.project = 'pokemon';}
		// htn, closing
	}
	*/
	
	if(maruamyu.config.device.detect == maruamyu.config.device.code.touch){
		var param_head = maruamyu.param.head();
		
		if(param_head){
			
			// touch用スタイルシートのロード
			if(!$('maruamyu_touch_stylesheet')){
				var make_link_touch_style_sheet = document.createElement('link');
				make_link_touch_style_sheet.setAttribute('rel', 'stylesheet');
				make_link_touch_style_sheet.setAttribute('type', 'text/css');
				make_link_touch_style_sheet.setAttribute('media', 'screen,print');
				make_link_touch_style_sheet.setAttribute('href', '/css/touch.css');
				make_link_touch_style_sheet.setAttribute('id', 'maruamyu_touch_stylesheet');
				param_head.appendChild(make_link_touch_style_sheet);
			}
			
			// viewport
			var meta_viewport = document.getElementsByName('viewport');
			if(!meta_viewport || meta_viewport.length < 1){
				var make_meta_viewport = document.createElement('meta');
				
				make_meta_viewport.setAttribute('name', 'viewport');
				
				if(maruamyu.config.device.is3ds || screen.width >= 640){
					make_meta_viewport.setAttribute('content', 'width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no');
				}
				else{
					make_meta_viewport.setAttribute('content', 'width=640,minimum-scale=0.5,maximum-scale=1.0');
				}
				
				param_head.appendChild(make_meta_viewport);
			}
			
			// format-detection
			var meta_format_detection = document.getElementsByName('format-detection');
			if(!meta_format_detection || meta_format_detection.length < 1){
				var meta_format_detection = document.createElement('meta');
				meta_format_detection.setAttribute('name', 'format-detection');
				meta_format_detection.setAttribute('content', 'telephone=no,address=no');
				param_head.appendChild(meta_format_detection);
			}
		}
		
		// label処理 for iOS
		add_onload(function(){
			var label_list = document.getElementsByTagName('label');
			if(label_list && label_list.length > 0){
				var i, p_label, p_checkbox;
				
				for(i=0; i<label_list.length; i++){
					p_label = label_list[i];
					if(p_label){
						p_checkbox = $(p_label.getAttribute('for'));
						if(p_checkbox){
							add_event(p_label, 'click', function(){;});
						}
					}
				}
			}
		});
		
	} else if(maruamyu.config.device.detect == maruamyu.config.device.code.mobile){
		;
	} else {
		add_onload(maruamyu.chk_page_layout);
	}
	
})();

