jumploc = "../index2.html";
refUrl = document.referrer;
w_name = window.name;
fileloc = self.location.href;

//filename1 = location.href.replace(/^.*[\\\/]/, "");
filename1 = location.href;
filename2 = filename1.replace(/.html/, "");

flagHttp = fileloc.indexOf("http://");
flag1 = refUrl.indexOf("211.15.191.4");
flag2 = refUrl.indexOf("ibpcosaka.or.jp");

//============パターン1==============//
//refUrlがある場合は同サイト内であればjump
//refUrlがない場合はw_nameがない、もしくは"_unspecifiedFrame"(メール内リンクの場合など)の場合jump
//ローカルの場合は常にjumpしない
if((refUrl != "" && flagHttp > -1&& flag1< 0 && flag2 < 0) ||  (refUrl == "" && flagHttp > -1 && (w_name == "" || w_name == "_unspecifiedFrame" ))){
	jumpURL = jumploc + "?"+ filename2;
	location.href = jumpURL;
}


//============パターン2==============//
//w_nameが"contents"でなければjump
//ローカルの場合は常にjumpしない
//if(w_name != "contents" && flagHttp > -1){
//	jumpURL = jumploc + "?"+ filename2;
//	location.href = jumpURL;
//
