/*ポップアップ画面表示*/

var pop = new Array(2);

//マーキングポップアップ
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=630,height=580');
}

//サイズポップアップ
function openwindow_size(url){
	var h;
	switch (url) {
	case '001':	//アディダス
	case '002':	//アンブロ
	case '003':	//ナイキ
	case '004':	//ルコック
	case '006':	//アシックス
		h=680;
		break;
	case '005':	//プーマ
	case '007':	//ディアドラ
	case '008':	//カッパ
		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=580,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');
}

