//
// input 最大幅、最大高さ、イメージオブジェクト名
//
function changeImage(MAXWIDTH,MAXHEIGHT,objImage){

	// 初期設定
	ImgName = new Image();
	ImgName = objImage;
	i_width = ImgName.width;
	i_height= ImgName.height;

	if (i_width  <= 0) exit();
	if (i_height <= 0) exit();

	// 割合変数
	w_rate = 0;
	h_rate = 0;

	// 割合を求める
	w_rate = MAXWIDTH/i_width;
	h_rate = MAXHEIGHT/i_height;

	// 割合が必要かを調べる
	if (w_rate == 0 && h_rate ==0) {/*alert("変更無し");*/}
	else if (w_rate <= h_rate) { i_width *= w_rate; i_height *= w_rate;}
	else if (w_rate > h_rate) { i_width *= h_rate; i_height *= h_rate;}
	else {alert("画像エラー");}

	// 画像の大きさを再設定する
	ImgName.width  = parseInt(i_width);
	ImgName.height = parseInt(i_height);
}

//
//　テナント詳細等を開く
//
function openWin(filename){
	window.open(filename,"Detail","toolbar=0,location=0,directories=0,status=yes,menubar=0,scrollbars=yes,resizable=0,width=540,height=580");
}