/*ポップアップ画面表示*/

var pop = new Array(2);

//フィッティングポップアップ
function openwindow_fitting3(){
	pop[0] = window.open('http://www.sskamo.co.jp/fitting/base.html', 'fitting3', 'resizable=1,scrollbars=1,status=1,screenX=20,screenY=20,left=20,top=20,width=1024,height=716');
}

//フィッティングポップアップ
function openwindow_fitting2(){
	pop[0] = window.open('http://www.sskamo.co.jp/fitting/base.html', 'fitting2', 'resizable=1,scrollbars=1,status=1,screenX=20,screenY=20,left=20,top=20,width=1024,height=716');
}

//フィッティングポップアップ
function openwindow_fitting(){
	pop[0] = window.open('fitting/base.html', 'fitting', 'resizable=1,scrollbars=1,status=1,screenX=20,screenY=20,left=20,top=20,width=1024,height=716');
}

//イベントポップアップ
function openwindow_event(){
	pop[0] = window.open('/popup/event.html', 'event', 'resizable=1,scrollbars=1,status=1,screenX=20,screenY=20,left=20,top=20,width=320,height=800');
}

//マーキングポップアップ
function openwindow_marking(){
	pop[0] = window.open('/popup/marking.html', 'marking', 'resizable=1,scrollbars=1,status=1,screenX=20,screenY=20,left=20,top=20,width=780,height=680');
}

//ウイッシュリストについてポップアップ
function openwindow_wishlist(){
	pop[0] = window.open('/popup/wishlist.html', 'wishlist', 'resizable=1,scrollbars=1,status=1,screenX=20,screenY=20,left=20,top=20,width=780,height=450');
}

//サイズポップアップ
function openwindow_size(url){
	var h;
	switch (url) {
	case '001':	//アディダス
	case '002':	//アンブロ
	case '003':	//ナイキ
	case '004':	//ルコック
	case '006':	//アシックス
	case '014':	//ロット
	case '016':	//リーボック
		h=680;
		break;
	case '005':	//プーマ
	case '007':	//ディアドラ
	case '008':	//カッパ
	case '010':	//ミズノ
	case '020':	//Jリーグエンタープライズ
	case '023':	//マラカナ
	case '027':	//uhlsport
	case '053':	//アンダーアーマー

		h=400;
		break;
	default:
		h=680;
	}
	pop[1] = window.open('/popup/size_brand'+url+'.html', 'size', 'resizable=1,scrollbars=1,status=1,screenX=0,screenY=0,left=0,top=0,width=780,height='+h);
}

//商品詳細画像ポップアップ
function openwindow_itemimage(){
	var wx =(screen.width  - 480);
	var wy =(screen.height - 470) /2 ;
	pop[2] = window.open('/popup/itemimage_add.html', 'itemimage', 'resizable=1,scrollbars=0,status=1,width=450,height=470,top='+wy+',left='+wx+',screenX='+wx+',screenY='+wy);
}

function set_selectjpg(jpgfile){
	document.myform.elements["selectjpg"].value=jpgfile;
	openwindow_itemimage();
}

function set_addjpg(jpgfile){
	var imagesrc;
	imagesrc = "/itemimage_add/" + opener.document.myform.elements["selectjpg"].value;
	document.images['addjpg'].src = imagesrc;
	focus();
}

//親ウィンドウが閉じられた・移動したとき、ポップアップを閉じる
function closewindow(){
	var i;
	for(i=0;i<pop.length;i++){
		if(pop[i] && !pop[i].closed) pop[i].close();
	}
}
function openwindow_kyoto(){
	pop[3] = window.open('/kyoto/index.html', 'kyoto', 'resizable=0,scrollbars=0,status=0,screenX=20,screenY=20,width=629,height=730');
}
