﻿/* Search hotel by keyword*/
var jsSrchDefault="ホテル名（半角英数字）";
function FindHotel(){
	if(fmhtfind.search_hotel.value==""){alert("Please input hotel name.");}
	else if(fmhtfind.search_hotel.value==jsSrchDefault){alert("Please input hotel name.");}
	else{location.href="http://reservation.passionasia.com/search_hotels.cfm/Cnty_id/Any/Cty_id/Any/sortby/1/search_hotel/"+fmhtfind.search_hotel.value+"/idx/1.htm";}
	return false;
}

var jsSrchDefault02="ホテル名（半角英数字）";
function FindHotel(){
	if(fmhtfind.search_hotel.value==""){alert("Please input hotel name.");}
	else if(fmhtfind.search_hotel.value==jsSrchDefault02){alert("Please input hotel name.");}
	else{location.href="http://reservation.passionasia.com/search_hotels.cfm/Cnty_id/Any/Cty_id/Any/sortby/1/search_hotel/"+fmhtfind.search_hotel.value+"/idx/1.htm";}
	return false;
}

var jsSrchDefault3="Eメールアドレスをご記入下さい";

function xsubscribe_02(){
	with(document.newsletter_monoplanet){
	if(email.value=="Eメールアドレスをご記入下さい"){alert('Please input "E-mail Address"'); email.focus();return false;}
	else if(!ChkEmail_02(email.value)){alert('Invalid Current "E-mail Address"'); email.focus();return false;}
	else {
	 submit();
	 }
	   }
}				
function ChkEmail_02(v){
		a1=v.indexOf('@');
		a2=v.lastIndexOf('@');
		a3=v.lastIndexOf('.');
		a4=v.length;
		if( !(a2 >= 2 && a1== a2 && a3 >= a2+3 && a4>a3+2)  ){
				//alert('Please input a complete and valid email address!  ');
		return false;
		}
	return true;
}

function SendToFriend() {
	location.href = 'http://japanese.monoplanet.com/admin/mailto.cfm?sendURL=' + location.href;
}

function SeachKeyWordBox_onclick(thisObj){
	if(thisObj.value==jsSrchDefault){thisObj.value='';}
}
function SeachKeyWordBox_onblur(thisObj){
	if(thisObj.value==''){thisObj.value=jsSrchDefault;}
}

function ClickEventImage(M_CntyID,M_NewsID)
{
	document.location='http://www.monoplanet.com/event.cfm?M_CTID='+M_CntyID+'#'+M_NewsID;
}


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);}

function Linkto(url) {
	location.href = url;
}

function mapover(id){
document.images[id].style.cursor = 'pointer';
}

function mapout(id){
document.images[id].style.cursor = 'auto';
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function xPage(obj){
	//alert(obj);
	document.location.href = 'hotel_area.cfm?LOSel=#LOSel#&M_CID=#M_FCID#&M_SList=#M_SList#&M_Page='+obj;
}


 function noblockmap(){
xdsp=(document.getElementById("show-map").style.display=='none')?'':'none';
	xsg=(document.getElementById("show-map").style.display=='none')?'<strong>Hide #qAreaMap.area_name#  Map</strong>':'<strong>Show #qAreaMap.area_name# Map</strong>'; 
	document.getElementById("show-map").style.display=xdsp;
	Pic01.innerHTML=xsg; }
	
	function ChangePage(QString , Page)
{
	window.location = '/newhotel.cfm'+QString+'&M_Page='+Page;
}

function ClickLImage2(M_URL){location.href=M_URL;}

function ticket01(){
xdsp=(document.getElementById("show-ticket01").style.display=='none')?'':'none';
document.getElementById("show-ticket01").style.display=xdsp;}

function ticket02(){
xdsp=(document.getElementById("show-ticket02").style.display=='none')?'':'none';
document.getElementById("show-ticket02").style.display=xdsp;}

function ticket03(){
xdsp=(document.getElementById("show-ticket03").style.display=='none')?'':'none';
document.getElementById("show-ticket03").style.display=xdsp;}

/* News Update*/
function fun_SelectTabNews(numReq_Tab)
{
	var num_LINode = 0
	for(var i=0; i<document.getElementById('TabNews').childNodes.length; i++)
	{
		if(document.getElementById('TabNews').childNodes[i].nodeName == 'LI')
		{
			if(numReq_Tab==num_LINode)
			{
				document.getElementById('TabNews').childNodes[i].style.backgroundImage="url('/Images/icon/btn_tabnews.gif')";
				document.getElementById("sblck"+(num_LINode+1)).style.display='';
			}
			else
			{
				document.getElementById('TabNews').childNodes[i].style.backgroundImage="url('/Images/icon/btn_tabnews_link.gif')";
				document.getElementById("sblck"+(num_LINode+1)).style.display='none';
			}
			num_LINode++;
		}
	}
}

/*gallery-clear*/
function clear() {
		document.getElementById("overviewjs").style.display='none';
		document.getElementById("accomjs").style.display='none';
		document.getElementById("facjs").style.display='none';
		document.getElementById("pooljs").style.display='none';
		document.getElementById("restaurantjs").style.display='none';
		document.getElementById("spajs").style.display='none';
		document.getElementById("golfjs").style.display='none';
		document.getElementById("mapjs").style.display='none';
		
		document.getElementById('Linkoverview').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock01()" class="gray12_3939" title="ホテル外観">ホテル外観</a>';
		document.getElementById('LinkAccom').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock02()" class="gray12_3939" title="客室">客室</a>';
		document.getElementById('LinkFac').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock03()" class="gray12_3939" title="ホテル設備">ホテル設備</a>';
		document.getElementById('LinkPool').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock04()" class="gray12_3939" title="スイミングプール">スイミングプール</a>';
		document.getElementById('LinkRes').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock05()" class="gray12_3939" title="レストラン">レストラン</a>';
		document.getElementById('LinkSpa').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock06()" class="gray12_3939" title="スパ">スパ</a>';
		document.getElementById('LinkGolf').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock07()" class="gray12_3939" title="ゴルフ">ゴルフ</a>';
		document.getElementById('LinkMap').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <a href="javascript:noblock08()" class="gray12_3939" title="所在地">所在地</a>';
}
/*gallery-overview*/
function noblock01(){
		clear();
		xdsp=(document.getElementById("overviewjs").style.display=='none')?'':'none';
		document.getElementById("overviewjs").style.display=xdsp;
		document.getElementById('Linkoverview').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>ホテル外観</b>';
}
/*gallery-Accomodation*/
function noblock02(){
		clear();
		xdsp=(document.getElementById("accomjs").style.display=='none')?'':'none';
		document.getElementById("accomjs").style.display=xdsp;
		document.getElementById('LinkAccom').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>客室</b>';
}
/*gallery-Hotel Facilities*/
function noblock03(){
		clear();
		xdsp=(document.getElementById("facjs").style.display=='none')?'':'none';
		document.getElementById("facjs").style.display=xdsp;
		document.getElementById('LinkFac').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>ホテル設備</b>';
}
/*gallery-Pool*/
function noblock04(){
		clear();
		xdsp=(document.getElementById("pooljs").style.display=='none')?'':'none';
		document.getElementById("pooljs").style.display=xdsp;
		document.getElementById('LinkPool').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>スイミングプール</b>';
}
/*gallery-Restaurant*/
function noblock05(){
		clear();
		xdsp=(document.getElementById("restaurantjs").style.display=='none')?'':'none';
		document.getElementById("restaurantjs").style.display=xdsp;
		document.getElementById('LinkRes').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>レストラン</b>';
}
/*gallery-Spa*/
function noblock06(){
		clear();
		xdsp=(document.getElementById("spajs").style.display=='none')?'':'none';
		document.getElementById("spajs").style.display=xdsp;
		document.getElementById('LinkSpa').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>スパ</b>';
}
/*gallery-Golf */
function noblock07(){
		clear();
		xdsp=(document.getElementById("golfjs").style.display=='none')?'':'none';
		document.getElementById("golfjs").style.display=xdsp;
		document.getElementById('LinkGolf').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>ゴルフ</b>';
}
/*gallery-Map*/
function noblock08(){
		clear();
		xdsp=(document.getElementById("mapjs").style.display=='none')?'':'none';
		document.getElementById("mapjs").style.display=xdsp;
		document.getElementById('LinkMap').innerHTML = '<img src="/images/Icon/bullet_orange.gif" width="6" height="16" alt="bullte"> <b>所在地</b>';
}

/*Book mark*/
function CreateBookmarkLink() {

 title = document.title; 
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

 url = location.href;
  // Blogger - Replace with <$BlogItemPermalinkURL$> 
  // MovableType - Replace with <$MTEntryPermalink$>
  // WordPress - <?php bloginfo('url'); ?>

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
 }
	
