
var iPad = (navigator.userAgent.indexOf('iPad') != -1) ? true : false;
var iPhone = (navigator.userAgent.indexOf('iPhone') != -1) ? true : false;

//=========================================================
//	アンカー移動
//=========================================================
function Alert(_data) {
	alert(_data);
}

//=========================================================
//	addEventListenerのブラウザ対応版
//=========================================================
function addEventListenerEx(_type, _func) {
	if (window.addEventListener) {		//for W3C DOM
	  window.addEventListener(_type, _func, false);
	} else if (window.attachEvent) {	//for IE
	  window.attachEvent('on'+_type, _func);
	} else  {
	  window['on'+_type] = _func;
	}
}

//=========================================================
//	クライアントサイズの取得
//=========================================================
function GetClientSize() {
	var size = {};
	size.w = document.documentElement.clientWidth;
	size.h = document.documentElement.clientHeight;
	return size;
}

//=========================================================
//	URLの取得
//=========================================================
function GetURL() {
	return location.href;
}

//=========================================================
//	アンカー移動
//=========================================================
function SetLocationHash(_name) {
	location.hash = _name;
}

//=========================================================
//		ページ遷移
//=========================================================
function NavigateToURL(_url){
	if(document.all) {
		var body = document.getElementsByTagName("body")[0];
		var atag = document.createElement("a");
		atag.href   = _url;
		atag.target = "_self";
		body.appendChild(atag);
		atag.click();
		body.removeChild(atag);
	}
	else {
		document.location = _url;
	}
}

//=========================================================
//	エレメント座標の設定
//=========================================================
function SetElementPos(_name, _x, _y) {
	document.getElementById(_name).style.left = _x+'px';
	document.getElementById(_name).style.top  = _y+'px';
}

