/*-------------------------------------------------------------
@@ JavaScript Document
-------------------------------------------------------------*/

// Debug Site's Hostname
debug_host_list = new Array(
"e-2j.com"
);

// initialize debug flag
debug_flag = false;

// default image path
image_path = "http://www.butterfly.co.jp/img/";

// debug site image path
debug_image_path = "/img/";

// this hostname
this_hostname = location.hostname;

// checking debug site
for(i = 0; i < debug_host_list.length ; i++){
	if (this_hostname.match(debug_host_list[i])) {
		debug_flag = true;
		image_path = debug_image_path;
	}
}

// swaping image list(filename only)
data = new Array(
"global/global01ov.gif",
"global/global02ov.gif",
"global/global03ov.gif",
"global/global04ov.gif",
"global/global05ov.gif"
);

preload= new Array();
for (i=0; i<data.length; i++)
{
	preload[i] = new Image();
	preload[i].src = image_path + data[i];
}

// change image
function swapimg(imgname,chg){
	document.images[imgname].src = chg;
}


// pop up window
function html(w,h,html,target) {
	var w1;
	w1 = window.open("", target,"toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=no,copyhistory=no, width="+w+",height="+h);
	w1.location.href=html
	w1.focus();
}

function lesson(w,h,html,target) {
	var w1;
	w1 = window.open("", target,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no, width="+w+",height="+h);
	w1.location.href=html
	w1.focus();
}

function iroha(w,h,html,target) {
	var w1;
	w1 = window.open("", target,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width="+w+",height="+h);
	w1.location.href=html
	w1.focus();
}


function camp(w,h,html,target) {
	var w1;
	w1 = window.open("", target,"toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no, width="+w+",height="+h);
	w1.location.href=html
	w1.focus();
}


