// Swap Image
function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


//Alart Box Message
function JumpConfirm1() {
	if(confirm('三井不動産株式会社のぺージに移動します。')){window.open("http://www.mitsuifudosan.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm2() {
	if(confirm('ららぽーとマネジメント株式会社のぺージに移動します。')){window.open("http://www.lalaport.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm3() {
	if(confirm('三井ガーデンホテルズのぺージに移動します。')){window.open("http://www.gardenhotels.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm4() {
	if(confirm('MIDCITYのぺージに移動します。')){window.open("http://www.midcity.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm5() {
	if(confirm('SAISON CARDのぺージに移動します。')){window.open("http://www.saisoncard.co.jp/lineup/ca126.html ","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm6() {
	if(confirm('NEXCO（ネクスコ）東日本のぺージに移動します。')){window.open("http://www.e-nexco.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm7() {
	if(confirm('首都高速ウェブサイトのぺージに移動します。')){window.open("http://www.shutoko.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm8() {
	if(confirm('シーサイドラインのぺージに移動します。')){window.open("http://www.seasideline.co.jp/station_guide/torihama/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm9() {
	if(confirm('駅前探検倶楽部のぺージに移動します。')){window.open("http://ekitan.com/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm10() {
	if(confirm('MIDCITYのぺージに移動します。')){window.open("http://www.midcity.jp/special/mop_card/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm11() {
	if(confirm('ヴィッセル神戸のぺージに移動します。')){window.open("http://www.vissel-kobe.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm12() {
	if(confirm('ウェルカムナビからの検索はこちら')){window.open("http://welcomenavi.jp/route/mrnavi.cgi?content=wzf9meqfpt&landmk=portobazar","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm13() {
	if(confirm('三井不動産リゾート 鳥羽国際ホテルのぺージに移動します。')){window.open("http://www.tobahotel.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm14() {
	if(confirm('三井不動産リゾート 「合歓の郷Hotel&Resort」のぺージに移動します。')){window.open("http://www.nemunosato.com/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm15() {
	if(confirm('八重山アイランドリゾート 「はいむるぶし」のぺージに移動します。')){window.open("http://www.haimurubushi.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm16() {
	if(confirm('キロロリゾートのぺージに移動します。')){window.open("http://www.kiroro.co.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm17() {
	if(confirm('SAISON CARD Netアンサーのぺージに移動します。')){window.open("https://netanswerplus.saisoncard.co.jp/WebPc/welcomeSCR.do","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm18() {
	if(confirm('三井不動産レジデンシャル関西支店のぺージに移動します。')){window.open("http://www.31sumai.com/mfr/kansai","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm19() {
	if(confirm('淀屋橋odonaのぺージに移動します。')){window.open("http://www.odona.jp/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConfirm20() {
	if(confirm('E-NEXCOドライブプラザのぺージに移動します。')){window.open("http://www.driveplaza.com/travel/sendai_miyagi_ana/","","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}
}

function JumpConf(url) {
	if(confirm('三井アウトレットパーク以外のサイトへ移動します。')){
		window.open(url,null);
	}
}

function JumpConfcn(url) {
	if(confirm('将链接至日本三井奥特莱斯之外的网页')){
		window.open(url,null);}
}


//ShopWinOpen
function ShopWin(Link){
	window.open(Link,'shop','resizable=0,scrollbars=1,menubar=0,directories=0,status=0,location=0,width=540');
}

//EventWinOpen
function EventWin(Link){
	window.open(Link,'event','resizable=1,scrollbars=1,menubar=0,directories=0,status=0,location=0,width=640');
}

window.focus();

//Portal to Facility
function FaciOP(faci){
	window.open(faci,'mopfaci');
}
//Facility goback Portal
function GoPortal(num){
	if(kaiso == 1){
		Pass = '../';
	} else if(kaiso == 2){
		Pass = '../../';
	} else if(kaiso == 3){
		Pass = '../../../';
	}
	if(num == 0){
		Link = Pass+'index2.html';
	} else if(num == 1){
		Link = Pass+'others/link.html';
	} else if(num == 2){
		Link = Pass+'others/rules.html';
	} else if(num == 3){
		Link = Pass+'others/privacypolicy.html';
	}
	if(!window.opener || window.opener.closed){
		window.open(Link,'mop');
	} else {
		if(num == ''){
			window.opener.focus();
		} else {
			window.opener.location.href=Link;
		}
	}
}

//WinOpen Popwin
function WinOpen(wLink){
	window.open(wLink,'check','resizable=1,scrollbars=1,menubar=0,directories=0,status=0,location=0');
}

function popwin(link,haba,takasa) {
	window.open(link,'job','resizable=0,scrollbars=1,width='+haba+',height='+takasa);
}

//osaka ev_space winopen
function EvSpWin(Link){
	window.open(Link,'sheet','resizable=0,scrollbars=1,menubar=1,directories=0,status=0,location=0,width=640');
}

//OpenWindow
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);}

//Smart Phone insert LinkButton
function smartButton(){
	var smart = '';
	var smartArry = new Array('iphone','ipod','android');
	var faciArray = new Array('sapporo','sendai','iruma','makuhari','tama','yokohama','nagashima','shiga','osaka','kobe','kurashiki');
	var mopKey = 'mop_sp2pc';
	var ua = navigator.userAgent.toLowerCase();
	for(i=0;i<smartArry.length;i++){
		if(ua.indexOf(smartArry[i]) != -1){
			smart = 'smart';
		}
	}
	if(smart == 'smart'){
		var nowfaci = '';
		var ps,ps2;
		var path = location.pathname.split("/");
		for(i=0;i<faciArray.length;i++){
			if(path[1].indexOf(faciArray[i],0) != -1){
				nowfaci = path[1];
			}
		}
		var pcnt = path.length;
		if(nowfaci == ''){
			if(pcnt == 2){
				ps = '';
			}else if(pcnt == 3){
				ps = '../';
			}else if(pcnt == 4){
				ps = '../../';
			}
			ps2 = ps;
		} else {
			if(pcnt == 3){
				ps = '../';
				ps2 = '';
			}else if(pcnt == 4){
				ps = '../../';
				ps2 = '../';
			}else if(pcnt == 5){
				ps = '../../../';
				ps2 = '../../';
			}
		}

		var param = location.search;
		if(param == '?showpc'){
			writeCookie(mopKey,1,1)
		}

		var spToPc = getCookie(mopKey);
		if(spToPc == ''){
			location.href = ps2 + 'sp/';
		} else {
			var elem = document.createElement('div');
			elem.innerHTML = '<a href="'+ps2+'sp/"><img src="'+ps+'sp/img/btn_smart.png" width="965" height="140" border="0"></a>';
			elem.style.width = '100%';
			elem.style.backgroundColor = '#666';
			elem.style.textAlign = 'center';
			var cont = document.body.firstChild;
			cont.parentNode.insertBefore(elem, cont);
		}
	
		//window.alert('pcnt=' + pcnt + '\nnowfaci=' + nowfaci + '\nps2=' + ps2 + '\nspToPc=' + spToPc);
	}
}

function getCookie(key){
	tmp=document.cookie+';';
	tmp1=tmp.indexOf(key, 0);
	if(tmp1 != -1){
		tmp = tmp.substring(tmp1, tmp.length);
		start=tmp.indexOf("=", 0)+1;
		end=tmp.indexOf(";", start);
		return(unescape(tmp.substring(start, end)));
	} else {
		return("");
	}
}

function writeCookie(key,value, expdays){
	t = new Date;
	t.setTime(t.getTime() + expdays * 24 * 60 * 60 * 1000);
	document.cookie = key + '=' + value + '; expires=' + t.toGMTString() + '; path=/';
}

//window.alert('default.js loaded!');


