// RouteID
function myOpenWindow(point,route_detail_data,myForm){
	moveFlag=false;
	tmp=route_detail_data;
	if(route_detail_data.RootDetailID){
		var routeDetailID=route_detail_data.RootDetailID;
		var destinationFlag	=route_detail_data.DestinationFlag;
		var editFlag		=route_detail_data.EditFlag;
	} else if(route_detail_data.DestinationID){
		var destinationID=""+route_detail_data.DestinationID;
	}
	//var html = "<div align='center'>" + route_detail_data.LocationName +'<form action="picturemailsend_form.html" onsubmit="window.open(\'\',\'new_point\',\'width=640,height=360\')" target="new_point" method="post">';
	var html = "<div align='center'>";
	
	if( (routeDetailID && destinationFlag=="True") || destinationID){
		if(route_detail_data.URL_PC){
			html+="<a href='"+route_detail_data.URL_PC+"' target='_blank'>" + route_detail_data.LocationName + "</a>";
		} else {
			html+=route_detail_data.LocationName;
		}
	} else {
		html+=route_detail_data.LocationName;
	}
	html+='<form action="picturemailsend_form.html" onsubmit="window.open(\'\',\'new_point\',\'width=640,height=360\')" target="new_point" method="post">';
	
	var photoExist=false;
	if(route_detail_data.Photos.length !=0){
		for(var i=0; i < route_detail_data.Photos.length; i++){
			photoObj=route_detail_data.Photos[i];
			html += "<table width='220' height='90' border='0'><tr><td align='center'><a href='#' onclick='enlargeImage(this)'><img name='photoImage' src='" + photoObj.Photo_url +"&PHOTOALBUM_MODE=2&PHOTOALBUM_SIZE_W=100&PHOTOALBUM_SIZE_H=100' border='0' /><input type='hidden' name='tmp_longitude' value='"+ route_detail_data.Longitude +"' /><input type='hidden' name='tmp_Latitude' value='"+ route_detail_data.Latitude +"' /><input type='hidden' name='Actniche_PointID' value='"+ route_detail_data.PointID +"' /><input type='hidden' name='Actniche_PhotoID' value='"+ photoObj.Photo_id +"' /></a></td></tr></table>";
			photoExist=true;
		}
	}
	if(photoExist){
		//html+="<input type='submit' name='mailPicture' value='写真をメール送信' />";
		html+="<button type='submit' name='mailPicture' style='font-size:8px'>写真をメール送信</button>";
	}
	
	if(routeDetailID){
		
		//html+="<input type='button' name='blogViewButton' value='Blog表示用タグ' onclick='RouteDetailBlogTag("+routeDetailID+")'>";
		if(destinationFlag=="True"){
			html+="<br/><span style='font-size:0.8em'>作成者: <a href='mypage.html?Login_UID=" + route_detail_data.DestinationUserID +"' target='_blank'>"+ route_detail_data.DestinationUserName +"</a></span>&nbsp;";
			html+="<input type='hidden' name='Actniche_DestinationID' value='"+ route_detail_data.RouteDetail_DestinationID + "'><button type='button' name='blogViewButton' style='font-size:8px' onclick='DestinationBlogTag(this.form)'>Blog表示用タグ</button>";
		} else {
			html+="<br/><span style='font-size:0.8em'>作成者: <a href='mypage.html?Login_UID=" + route_detail_data.RouteUserID +"' target='_blank'>"+ route_detail_data.RouteUserName +"</a></span>&nbsp;";
			html+="<button type='button' name='blogViewButton' style='font-size:8px' onclick='RouteDetailBlogTag("+routeDetailID+")'>Blog表示用タグ</button>";
		}
		if(destinationFlag=="True" && editFlag=="t"){
			html+=" <span style='font-size:0.8em'><a href='navi_modify_form.html?Actniche_DestinationID=" + route_detail_data.RouteDetail_DestinationID + "'>編集</a></span>";
		}
	} else {
		html+="<br/><span style='font-size:0.8em'>作成者: <a href='mypage.html?Login_UID=" + route_detail_data.DestinationUserID +"' target='_blank'>"+ route_detail_data.DestinationUserName +"</a></span>&nbsp;";
		html+="<input type='hidden' name='Actniche_DestinationID' value='"+ destinationID +"'><button type='button' name='blogViewButton' style='font-size:8px' onclick='DestinationBlogTag(this.form)'>Blog表示用タグ</button>";
		if(route_detail_data.EditFlag=="t"){
			html+=" <span style='font-size:0.8em'><a href='navi_modify_form.html?Actniche_DestinationID=" + destinationID + "'>編集</a></span>";
		}
	}
	html+="</form></div>";
	if(myForm){
		var infoPoint= new GPoint(myForm.tmp_Longitude.value, myForm.tmp_Latitude.value); 
		map.openInfoWindowHtml(infoPoint,html);
	} else {
		map.openInfoWindowHtml(point,html);
	}
	
}

function OpenWindowOfRoute(point,route_detail_data,myForm){
	moveFlag=false;
	tmp=route_detail_data;
	var routeDetailID	=route_detail_data.RootDetailID;
	var editFlag		=route_detail_data.EditFlag;
	
	var html = "<div align='center'>";
	
	if(route_detail_data.AreaName || route_detail_data.URL){
		html+="<a href='#' onclick='window.open(\"spotcomment_view.html?Actniche_SpotID="+route_detail_data.SpotID+"\",\"\",\"width=340,height=225,resizable=yes,scrollbars=yes\")'>"+route_detail_data.SpotName+"</a>";
	} else {
		html+=route_detail_data.SpotName;
	}
	html+='<form action="picturemailsend_form.html" onsubmit="window.open(\'\',\'new_point\',\'width=640,height=360\')" target="new_point" method="post">';
	
	var photoExist=false;
	if(route_detail_data.Photos.length !=0){
		for(var i=0; i < route_detail_data.Photos.length; i++){
			photoObj=route_detail_data.Photos[i];
			html += "<table width='220' height='90' border='0'><tr><td align='center'><a href='#' onclick='enlargeImage(this)'><img name='photoImage' src='" + photoObj.Photo_url +"&PHOTOALBUM_MODE=2&PHOTOALBUM_SIZE_W=100&PHOTOALBUM_SIZE_H=100' border='0' /><input type='hidden' name='tmp_longitude' value='"+ route_detail_data.Longitude +"' /><input type='hidden' name='tmp_Latitude' value='"+ route_detail_data.Latitude +"' /><input type='hidden' name='Actniche_PointID' value='"+ route_detail_data.PointID +"' /><input type='hidden' name='Actniche_PhotoID' value='"+ photoObj.Photo_id +"' /></a></td></tr></table>";
			photoExist=true;
		}
	}
	if(photoExist){
		html+="<button type='submit' name='mailPicture' style='font-size:8px'>写真をメール送信</button>";
	}
	
		
	//html+="<input type='button' name='blogViewButton' value='Blog表示用タグ' onclick='RouteDetailBlogTag("+routeDetailID+")'>";
	html+="<br/><span style='font-size:0.8em'>作成者: <a href='mypage.html?Login_UID=" + route_detail_data.RouteUserID +"' target='_blank'>"+ route_detail_data.RouteUserName +"</a></span>&nbsp;";
	html+="<button type='button' name='blogViewButton' style='font-size:8px' onclick='RouteDetailBlogTag("+routeDetailID+")'>Blog表示用タグ</button>";
	
	if(editFlag=="t"){
		html+=" <span style='font-size:0.8em'><a href='spot_modify_form.html?Actniche_SpotID=" + route_detail_data.RouteDetail_SpotID + "'>編集</a></span>";
	}
	html+="</form></div>";
	if(myForm){
		var infoPoint= new GPoint(myForm.tmp_Longitude.value, myForm.tmp_Latitude.value); 
		map.openInfoWindowHtml(infoPoint,html);
	} else {
		map.openInfoWindowHtml(point,html);
	}

}