/* ------------------------------------------------ */
/*              新規ウィンドウを開く                */
/* ------------------------------------------------ */
function windowopen(url,size,imagename){
	window.open(url,imagename,size,'scrollbars=no','resizable=no','scrollbars=no','menubar=no','toolbar=no','location=no','directories=no','status=no');
}

/* ------------------------------------------------ */
/*              ウィンドウを閉じる　　              */
/* ------------------------------------------------ */
function CloseWin(){
    window.close();
}

/* ------------------------------------------------ */
/*              ポップアップの画像表示              */
/* ------------------------------------------------ */
function imgChange(imagID){
	filename = window.name;
	srcArrey = filename.split("_");
	srcname = srcArrey[0]+'/images/album/'+srcArrey[1]+'/'+srcArrey[2]+'.jpg';
	document.getElementById(imagID).src=srcname;
	document.getElementById(imagID).alt=srcArrey[2];
	document.getElementById(imagID).width=imageSize();
	//window.moveTo(displayLeft(),displayTop());

}

/* ------------------------------------------------ */
/*              Imageサイズ変更   　　              */
/* ------------------------------------------------ */

function imageSize() {

	if(document.all){ // IE用
	winWidth = document.body.clientWidth;
	}
	else{
	winWidth = innerWidth;
	}
	imageWidth = winWidth+10;
	
	return imageWidth;
}

/* ------------------------------------------------ */
/*              Windowセンター移動　　              */
/* ------------------------------------------------ */
function displayLeft() {

	var dspWidth=screen.width;
	if(document.all){ // IE用
	winWidth = document.body.clientWidth;
	}
	else{
	winWidth = innerWidth;
	}
	winWidth = winWidth/2;
	var winLeft=dspWidth/2-winWidth;

	return winLeft;
}

function displayTop() {
	var dspHeight=screen.height;
	if(document.all){ // IE用
	winHight = document.body.clientHeight;
	}
	else{
	winHight = innerHeight;
	}
	winHight = winHight/2;
	var winTop=dspHeight/2-winHight;
  
	return winTop;
}