//<![CDATA[
/* マウスオーバーによる画像切替 */
function look(image) {
  document.war.src=image;
}
function txtCredit(mytext){
	textAreaBoxHeight = $(".credit textarea");
	ua = navigator.userAgent;
	if(mytext.match("<br>")){
		mytext = mytext.split("<br>").join("\n");
		if(mytext.length > 35 && mytext.length <= 70) {
			textAreaBoxHeight.css("height", "50");
			if(ua.indexOf('Gecko')!=-1) {
				textAreaBoxHeight.css("height", "5em");
				textAreaBoxHeight.css("overflow-y", "scroll");
			}
		}
		else if(mytext.length > 70) {
			textAreaBoxHeight.css("height", "60");
			if(ua.indexOf('Gecko')!=-1) {
				textAreaBoxHeight.css("height", "5em");
				textAreaBoxHeight.css("overflow-y", "scroll");
			}
		}
		else {
			textAreaBoxHeight.css("height", "34");
			if(ua.indexOf('Gecko')!=-1) {
				textAreaBoxHeight.css("height", "2.5em");
				textAreaBoxHeight.css("overflow-y", "auto");
			}
		}
	}
	else {
		if(mytext.length > 70 && mytext.length <= 140) {
			textAreaBoxHeight.css("height", "50");
			if(ua.indexOf('Gecko')!=-1) {
				textAreaBoxHeight.css("height", "5em");
				textAreaBoxHeight.css("overflow-y", "scroll");
			}
		}
		else if(mytext.length > 140) {
			textAreaBoxHeight.css("height", "60");
			if(ua.indexOf('Gecko')!=-1) {
				textAreaBoxHeight.css("height", "5em");
				textAreaBoxHeight.css("overflow-y", "scroll");
			}
		}
		else {
			textAreaBoxHeight.css("height", "34");
			if(ua.indexOf('Gecko')!=-1) {
				textAreaBoxHeight.css("height", "2.5em");
				textAreaBoxHeight.css("overflow-y", "auto");
			}
		}
	}
	document.txtForm.credit.value = mytext;
}

//]]>

/* メインイメージ　リサイズ用 */
function func1(img) {
/* 一旦縦横とも"auto"にして実寸を取得。長い方を"280px"に再設定。そして表示。 */
img.style.width = "auto";
img.style.height = "auto";
if (img.width > img.height) {
if (img.width > 280) img.style.width = "280px";
} else {
if (img.height > 280) img.style.height = "280px";
}
img.style.visibility = "visible";
}

/* サムネイルイメージ　リサイズ用 */
function func2(img) {
/* 一旦縦横とも"auto"にして実寸を取得。長い方を"84px"に再設定。そして表示。 */
img.style.width = "auto";
img.style.height = "auto";
if (img.width > img.height) {
if (img.width > 84) img.style.width = "84px";
} else {
if (img.height > 84) img.style.height = "84px";
}
img.style.visibility = "visible";
}


