function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/* jump MENU */
function jumpMENU(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}

//背景色変更
function chbgcolor(tg, clr){
	tg.style.backgroundColor = clr;
}

//画像縮小リサイズ処理
function resizeImage(AT_width, AT_height, AT_name){
	//ページ内画像数取得
	var imgLen = document.images.length;
	
	//全画像に対して実行
	for(var i=0; i<imgLen; i++){
		//画像のオブジェクト取得
		var imgObj = document.images[i];
		//クラス名が指定された物のみ実行
		if(imgObj.className == AT_name){
			//画像表示
			var w = imgObj.width;
			var h = imgObj.height;
			var ww = w;
			var hh = h
			
			ww = AT_height * w / h;;
			hh = AT_height;
			if(ww > AT_width+15){
				ww = AT_width+15;
			}
			
			imgObj.width = ww;
			ww = "" + ww;
			imgObj.style.width = ww + "px";
			imgObj.height = hh;
			hh = "" + hh;
			imgObj.style.height = hh + "px";
			imgObj.style.visibility = "visible";
		}
	}
}

//背景色変更
function chbgcolor(tg, clr){
	tg.style.backgroundColor = clr;
}

//ポップアップイメージ
function openimage(filename,width,height){
	var html = new Array();
	html[0] = "<html><head><title>PHOTO</title>\n";
	html[1] = "<style type=\"text/css\"><!--\n";
	html[2] = "body{margin:0}\n";
	html[3] = "--></style></head>\n";
	html[4] = "<body marginwidth=\"0\" marginheight=\"0\">\n"
	html[5] = "<div><a href='javascript:window.close()' title='ウィンドウを閉じる'><img src=\"";
	html[6] = filename;
	html[7] = "\" border=\"0\" width=\""+width+"\" height=\""+height+"\"></a></div></body></html>\n"
	
	var windowsize;
	windowsize = "width="+width+",height="+height;
	
	newWindow = window.open('','',windowsize+",scrollbars=no");
	newWindow.document.open();
	newWindow.document.write(html.join(""));
	newWindow.document.close();
	
	return false;
}

// カテゴリメニュークリック
function setcate(num) {
	document.leftmenu.ct.value = num;
	document.leftmenu.submit();
}
