<!--

var SERVER_NAME;
var CONTEXTPATH;
var WARN_MESSAGE;

function setServerName(servername) { SERVER_NAME = servername; }
function setContextPath(contextpath) { CONTEXTPATH = contextpath; }
function setWarnMessage(warningmassage) { WARN_MESSAGE = warningmassage; }

function clickNextContent(action, request) {
document.forms[0].action = CONTEXTPATH + "/" + action;
document.forms[0].target = "content";
document.forms[0].request.value = request;
document.forms[0].submit();
}
function clickNextContent2(action, request) {
document.forms[0].action = "http://" + SERVER_NAME + CONTEXTPATH + "/" + action;
document.forms[0].target = "content";
document.forms[0].request.value = request;
document.forms[0].submit();
}
function clickNextContentConfirm(action, request) {
 if (confirm('' + WARN_MESSAGE)) {
 document.forms[0].action = CONTEXTPATH + "/" + action;
 document.forms[0].target = "content";
 document.forms[0].request.value = request;
 document.forms[0].submit();
 }
}
function clickNextTop(action) {
document.forms[0].action = CONTEXTPATH + "/" + action;
document.forms[0].target = "_top";
document.forms[0].submit();
}
function clickNextSelf(action, request) {
document.forms[0].action = CONTEXTPATH + "/" + action;
document.forms[0].target = "_self";
document.forms[0].request.value = request;
document.forms[0].submit();
}
function clickNextSelf2(action, request) {
document.forms[0].action = "http://" + SERVER_NAME + CONTEXTPATH + "/" + action;
document.forms[0].target = "_self";
document.forms[0].request.value = request;
document.forms[0].submit();
}
function clickNextSelf3(action, request) {
document.forms[0].action = "https://" + SERVER_NAME + CONTEXTPATH + "/" + action;
document.forms[0].target = "_self";
document.forms[0].request.value = request;
document.forms[0].submit();
}
function clickNextSelfConfirm(action, request) {
 if (confirm('' + WARN_MESSAGE)) {
 document.forms[0].action = CONTEXTPATH + "/" + action;
 document.forms[0].target = "_self";
 document.forms[0].request.value = request;
 document.forms[0].submit();
 }
}
function clickNextNewWindow(action) {
document.forms[0].action = "http://" + SERVER_NAME + CONTEXTPATH + "/" + action;
document.forms[0].target = "_blank";
document.forms[0].submit();
}
function clickNextMyPage(action) {
mypage = window.open("https://" + SERVER_NAME + CONTEXTPATH + "/" + action,"mypage");
mypage.focus();
}
function clickNextMyPageSubDomain(action) {
mypage = window.open(action,"mypage");
mypage.focus();
}
function clickHimoPage(action) {
mypage = window.open(CONTEXTPATH + "/" + action,"mypage");
mypage.focus();
}
function clickHimo2Page(action) {
mypage = window.open(CONTEXTPATH + "/" + action,"mypage2");
mypage.focus();
}
function clickNextPop( action , width , height ) {
mypage = window.open(CONTEXTPATH + "/" + action,"mypage", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+ width +",height="+ height );
mypage.focus();
}
function clickNextPop2( action , width , height ) {
mypage = window.open(CONTEXTPATH + "/" + action,"mypage2", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width="+ width +",height="+ height );
mypage.focus();
}
function clickNextPop3( action , width , height ) {
mypage = window.open(CONTEXTPATH + "/" + action,"mypage3", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width="+ width +",height="+ height );
mypage.focus();
}
function openMapWindowSpot(spotID) {
swidth = screen.width - 550 - 15;
wo=window.open("http://" + SERVER_NAME + CONTEXTPATH + "/NT002Map.html?SPOT_ID=" + spotID, "WindowOpen", "toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=550,height=660,left="+  swidth  +",top=0");
wo.focus();
}
function openMapWindowEvent(spotID) {
swidth = screen.width - 550 - 15;
wo=window.open("http://" + SERVER_NAME + CONTEXTPATH + "/NT002Map.html?SPOT_ID=" + spotID, "WindowOpen", "toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=550,height=660,left="+  swidth  +",top=0");
wo.focus();
}
function openCouponWindowSpot(spotID){
swidth = screen.width - 550 ;
wo=window.open("./OD003Coupon.html?SPOT_ID=" + spotID, "WindowOpen", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=550,height=660,left="+  swidth  +",top=0");
wo.focus();
}
var subWin;
function closeSubWin(){
 if(subWin != null && !subWin.closed){
 subWin.close();
 }
}
function openSubToAddFavorite(sendPage){
  subWin = window.open(CONTEXTPATH + "/favorite.html?send_page="+sendPage,"WindowOpen", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=100,height=100,left=1000000,top=1000000");
  subWin.close();
  window.focus();
  window.external.addFavorite(window.location,"東京のおでかけ情報満載 Let's Enjoy TOKYO | レッツエンジョイ東京");
}

function openSubWindowRight(theURL,winName,features,window_width,window_height) {
  swidth = screen.width - window_width - 15;
  window.open(theURL,winName,features+",width="+ window_width +",height="+ window_height +",left="+ swidth +",top=0");
}

function openPopupWindow() {
window.open("","icon",'toolbar=0,location=0,scrollbars=0,width=270,height=395,resizable=0');
}

function openTokutenWindow() {
 swidth = screen.width - 270 - 15;
 window.open(CONTEXTPATH + "/OD013TokutenIcon.html","WindowOpen","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=270,height=255,left="+ swidth +",top=0");
}

function openHotelChargeWindow(){
 swidth = screen.width -270 -15;
 window.open(CONTEXTPATH + "/OD013HotelChargeNotice.html","WindowOpen","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=270,height=265,left="+ swidth +",top=0");
}

function openCouponWin( sSpotID ) 
{
    swidth = screen.width - 550 - 15;
    window.open( "http://" + SERVER_NAME + CONTEXTPATH + '/OD003Coupon.html?SPOT_ID=' +  sSpotID , 'WindowOpen' ,  "toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=550,height=660,left="+swidth+",top=0" );
}

function openCouponWinURL( sURL ) 
{
    swidth = screen.width - 550 - 15;
    window.open( sURL , 'WindowOpen' ,  "toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=550,height=660,left="+swidth+",top=0" );
}

var clickFlg = false;

function clickNextSelfOnce(action, request) 
{
 if( clickFlg == false ) 
 {
	 clickFlg = true;
	 document.forms[0].action = CONTEXTPATH + "/" + action;
	 document.forms[0].target = "_self";
	 document.forms[0].request.value = request;
	 document.forms[0].submit();
 }
}

// -->
