/*
===============================
=
=	画像入れ替え
=
===============================
*/
var imgs = new Array();

function eventSet(obj, heads, tails) {
	// マウスオーバー
		obj.onmouseover = function() {
		obj.src = heads;
	}
	// マウスアウト
	obj.onmouseout = function() {
	obj.src = tails;
	}
}

function swapImage(selector, heads, tails) {
	imgs.push(heads, tails);
	// idセレクタ
	if(document.getElementById(selector)) {
		var obj = document.getElementById(selector);
		eventSet( obj, heads, tails );
	// classセレクタ
	} else if(document.getElementsByClassName(selector)) {
		for(i=0; i<document.getElementsByClassName(selector).length; i++) {
			var obj = document.getElementsByClassName(selector)[i];
			eventSet(obj, heads, tails);
		}
	}
}

function preload() {
	var img = new Array();
	for(var i=0; i<imgs.length; i++) {
		img[i] = new Image();
		img[i].src = imgs[i];
	}
}
/*
===============================
=
=	ポップアップ
=
===============================
*/
function openWin(url) {
	window.open(url,"popup","directions=0,location=0,menubar=0,scrollbars=1,status=0,toolbar=0,width=600,height=500");
}
/*
===============================
=
=	シビラ読み込み
=
===============================
*/
function sibullaSet() {
	var protocol = location.protocol;
	if (protocol == "http:") {
		document.write("<SC" + "RIPT type=\"text/javascript\" src=\"http://wv004.sibulla.com/dekatag/access?id=ZPeE0iSw\"><\/SC" + "RIPT>");
	} else {
		document.write("<SC" + "RIPT type=\"text/javascript\" src=\"https://wv004.sibulla.com/dekatag/access?id=ZPeE0iSw\"><\/S" + "CRIPT>");
	}
}
