// JavaScript Document

 //mailto
function mailReservation()
{
	window.location.href="mailto:hktravel-shibuya@hotmail.co.jp?subject=Reservation";
} 


function mailOpinion()
{
	window.location.href="mailto:hktravel-shibuya@hotmail.co.jp?subject=Opinion";
} 

//gotoHome
function GotoHome()
{
	document.location = "index.html";
}

//address1

function ShowAddress1()
{
	window.open("http://maps.google.co.jp/maps?hl=ja&q=%E6%9D%B1%E4%BA%AC%E9%83%BD%E6%B8%8B%E8%B0%B7%E5%8C%BA%E7%A5%9E%E5%AE%AE%E5%89%8D2-19-15&lr=&um=1&ie=UTF-8&sa=N&tab=wl","_blank");
}
//address2

function ShowAddress2()
{
	window.open("http://maps.google.co.jp/maps?q=%E6%9D%B1%E4%BA%AC%E9%83%BD%E6%B8%8B%E8%B0%B7%E5%8C%BA%E6%A1%9C%E4%B8%98%E7%94%BA2-3&hl=ja&ie=UTF-8&tab=nl","_blank");
}
//
function ChangePic(obj,strChangeFlg)
{
	if(strChangeFlg == "larger"){
		obj.src = obj.src.replace("MenuNum", "MenuNum_Large");
	}else{
		obj.src = obj.src.replace("MenuNum_Large", "MenuNum");			
	}
}

//メニュータイトル設定
function menuSet(menuTitleObject,singleAndSetFlag){
	var menuTitleNum = null;
	var forLength = null;
	if(singleAndSetFlag=="single"){
		menuTitleNum = 0;
		forLength = menuTitleObject.length - 5;
	}else{
		menuTitleNum = menuTitleObject.length - 5;
		forLength = menuTitleObject.length;			
	}
 	for(;menuTitleNum < forLength;menuTitleNum++){
		showTitle(menuTitleObject[menuTitleNum]);
		menuItem(menuTitleObject[menuTitleNum]);
	}	
}

//メニューリスト設定
function menuItem(titleName){
	var menuItemInfor = myJSONObject[titleName];
	for(var menuItemNum = 0;menuItemNum < menuItemInfor.length;menuItemNum++){
		var menuItemInforRow = menuItemInfor[menuItemNum];
		var showInformation = new ShowInformation(menuItemInforRow.num,menuItemInforRow.name,menuItemInforRow.comment,menuItemInforRow.value,menuItemInforRow.remark);
		showItem(showInformation);
	}
}


//メニュータイトル表示
function showTitle(titleName){
		var strDiv = "<div><a name=\"" + titleName + "\"><img src=\"images/bar_" + titleName + ".jpg\" width=\"460\" height=\"20\"></a></div>";
		document.write(strDiv);
}
//メニューリスト表示
function showItem(showInformation){
		var strDiv = "<div style=\"background-color:#FFCCFF;width:460px;\">";
		strDiv += "<table width=\"100%\">";
		strDiv += "<tr><td align=\"left\">" + showInformation.showName() + showInformation.showComment() + showInformation.showRemark() + "</td>";
		strDiv += "<td align=\"right\" style=\"font-size:smaller; font-weight:bolder\">" + showInformation.showValue() + "</td></tr>";
		strDiv += "<tr><td colspan=\"2\" align=\"right\">";
		strDiv += showInformation.showNum() + "</td></tr></table>";
		strDiv += "</div><div style=\"width:460px;\">&nbsp;</div>";
		document.write(strDiv);
}



//メニューリスト詳細
function ShowInformation(num,name,comment,value,remark)
{
	this.NUM = num;
	this.NAME = name;
	this.COMMENT = comment;
	this.VALUE = value;
	this.REMARK = remark;
}
//番号
ShowInformation.prototype.showNum = function()
{
	var strNum = "<img onMouseOver='ChangePic(this,\"larger\")' onMouseOut='ChangePic(this,\"smaller\")' src=\"images/MenuNum/" + this.NUM + ".jpg\">";
	return strNum;
} 
//名前
ShowInformation.prototype.showName = function()
{
	var strName = "<font size=\"3\" color=\"#3300CC\">" + this.NUM + "." + this.NAME + "</font>";
	return strName;
} 
//コメント
ShowInformation.prototype.showComment = function()
{
	var strComment = "<font size=\"-1\">" + this.COMMENT + "</font>";
	return strComment;
} 
//値段
ShowInformation.prototype.showValue = function()
{
	var strValue = this.VALUE;
	return strValue;
} 
//備考
ShowInformation.prototype.showRemark = function()
{
	var strRemark = "<font size=\"-1\" color=\"red\">" + this.REMARK + "</font>";
	return strRemark;
} 
