Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: no-store
Pragma: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
X-Powered-By: JSP/2.2
Content-Type: text/html;charset=UTF-8
Date: Mon, 10 Nov 2014 10:26:01 GMT
Content-Length: 332969
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="PRAGMA" content="NO-CACHE">
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta http-equiv="EXPIRES" content="-1">
<script type="text/javascript">
try
{
parent.activateWaitFrame();
}
catch( e ) {}
</script>
<script type="text/javascript">
<!-var pageLoadStart = new Date();
window.onload = function()
{
var pageLoadEnd = new Date();
var loadTime = pageLoadEnd.getTime() - pageLoadStart.getTime();
try
{
var lsApplet = getLSApplet();
if ( lsApplet )
{
var s = new Array();
s.push( "res\x2FresWorkspace.jsp" );
s.push( loadTime );
sendRequestToServer( "ignoreCB", "POST", "modRes
}
var loggingOutManually = false;
function doLogoutAction()
{
try
{
if ( ! loggingOutManually )
{
nightAudit2Logout();
}
}catch( e ) {}
}
function getHelpURL()
{
return "http://10.20.248.73/ls-doc/help/LightSpeed_Help.htm"
}
function hasDataChanged()
{
try
{
return document.theForm.dataChanged.value;
}
catch( e )
{
return "false";
}
}
try
{
this.focus();
}
catch( e ) {}
var bAppletInitialized = false;
var bPageInitialized = false;
var curResRowIndex = 0;
var curTabIndex = 1;
var isResView = true;
var useModalDialogs = true;
var
var
var
var
var
var
var
var
var
var
var
var
var
AREA_WALKIN = "walkIn";
AREA_CHECKIN = "checkIn";
AREA_CHECKOUT = "checkOut";
AREA_RESNEW = "createRes";
AREA_ROOM_MOVE = "roomMove";
AREA_SHARE_NEW = "newShare";
AREA_SHARE_MERGE = "mergeShare";
AREA_SHARE_BREAK = "breakShare";
AREA_TRAVEL_NEW = "newTw";
AREA_TRAVEL_ADD = "addTw";
AREA_TRAVEL_BREAK = "breakTw";
AREA_SG_RECOGNITION = "sgRecognition";
AREA_CASHIER = "CASHIER";
if (window.top.activateValhallaMaint)
{
window.top.activateValhallaMaint( theStateKey, false );
}
}
else if (theStateKey.indexOf("portal") >= 0)
{
if (window.top.activatePortal)
{
window.top.activatePortal( theStateKey, false );
}
}
else if (theStateKey.indexOf("spgLink") >= 0)
{
if (window.top.activateSPGLink)
{
window.top.activateSPGLink( "modRes:8", false );
}
}
else if (theStateKey.indexOf("weather") >= 0)
{
if (window.top.activateWeather)
{
window.top.activateWeather( "modRes:8", false );
}
}
else if (theStateKey.indexOf("property") >= 0)
{
if (window.top.activateProperty)
{
window.top.activateProperty( "modRes:8", false );
}
}
else
{
document.theForm._ACTIVATE_STATE.value = theStateKey;
submitWorkspace();
}
}
function getWeatherURL()
{
return "http\x3A\x2F\x2Fwww.nws.noaa.gov\x2F";
}
function getPortalURL()
{
return "http\x3A\x2F\x2Fwww.starwoodgp.com\x2Fsmg\x2Fwrapper.jsp";
}
function appletInitialized()
{
try
{
var myLSApplet = getLSApplet();
var id = myLSApplet.getEventListenerId();
myLSApplet.setListenerName("Workspace-modRes");
}
catch( ex )
{
myTabbar.setActiveTabIndex(curTabIndex);
}
catch(e) {}
var resumeWizard = "";
if ( resumeWizard == "true" )
{
document.theForm._RESUME_WIZARD.value = "false";
resumeCurrentWizard(true);
}
}
catch( ex )
{
alert( "LightSpeed.jsp - init: " + ex.message );
}
bPageInitialized = true;
initTheFragments();
try
{
var spanObj = document.getElementById( "spnScroll" );
if ( spanObj )
spanObj.focus();
}
catch( e )
{
}
setTimeout( "bringResWindowToFront()", 300 );
}
function bringResWindowToFront()
{
if ( typeof( top.setLastResWindowFocus ) != "undefined" )
{
top.setLastResWindowFocus();
}
}
function displayPasswdExpireMsg()
{
if ( confirmResourceKey("title.placeholder",1 ) )
doChangePass();
}
function initTheFragments()
{
if ( bAppletInitialized && bPageInitialized )
{
initFragments();
}
}
function confCallBack( resultStr )
{
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
alert("Confirmation successfully printed.");
document.theForm.submit();
}
else
{
var errMsg = getField(resultStr, 1, ";");
alert("Unable to print confirmation:\n\n" + errMsg);
}
}
s.push( clubType );
s.push( "~" );
if ( ! isNullOrBlank(profileId) )
{
s.push( "sgrProfileId^" );
s.push( profileId );
s.push( "~" );
}
try
{
if ( document.theForm.clubAcctType1 )
{
setSelectedValue( document.theForm.clubAcctType1
, club1Type );
}
else if ( parentWin )
{
setSelectedValue( parentWin.document.theForm.clu
bAcctType1, club1Type );
}
}
catch( e )
{
}
try
{
if ( document.theForm.clubAcct1 )
{
setSelectedValue( document.theForm.clubAcctType1
, clubType );
document.theForm.clubAcct1.value = clubNum;
}
else if ( parentWin )
{
setSelectedValue( parentWin.document.theForm.clu
bAcctType1, clubType );
parentWin.document.theForm.clubAcct1.value = clu
bNum;
}
}
catch( e )
{
}
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"WEBPARAM", "SET", s.join("") );
if ( isNullOrBlank(clubNum) == false || isNullOrBlank(profileId)
== false )
{
showODSCopyToLocal( clubNum, profileId );
}
// now update the resvo and GuestProfile (new guest Info )
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"WEBPARAM", "updateResFromWebParms", "" );
w + ",height=" + h);
centerWindow( myModalDialog, w, h );
myModalDialog.focus();
}
}
{
submitWorkspace();
}
else
{
var errRsp = new String( getLSApplet().getRespon
seMessageById(openWsId) );
var errMsg = getField(errRsp, 1, ";");
alertMessage("Error Selecting Wholesale:<br><br>
" + errMsg);
}
}
else if (target == "SelectCft")
{
bConsumed = true;
params = "C^" + params;
var openCftId = getLSApplet().fireLightSpeedEventEx(getS
tateKey(),
"IUPDATE",
"GUEST_TYPE",
"SET",
encodeURIComponent(params),
"0");
if ( openCftId > 0 )
{
submitWorkspace();
}
else
{
var errRsp = new String( getLSApplet().getRespon
seMessageById(openCftId) );
var errMsg = getField(errRsp, 1, ";");
alertMessage("Error Selecting CFT:<br><br>" + er
rMsg);
}
}
else if (target == "OpenGroupMaster")
{
bConsumed = true;
doOpenGroupMaster( params );
}
else if (target == "findGroupMaster")
{
bConsumed = true;
setTimeout("openGroupMaster( )", 200);
}
else if (target == "doGroupCheckIn")
{
bConsumed = true;
doGroupCheckIn( );
}
else if (target == "doGroupPreBlock")
{
bConsumed = true;
doGroupPreBlock( );
}
else if (target == "doGroupUnBlock")
{
bConsumed = true;
doGroupUnBlock( );
}
//start by dinakar
else if (target == "doLaunchGroupParametersAdmin")
{
bConsumed = true;
doLaunchGroupParametersAdmin();
}
//end by dinakar
else if (target == "doGroupCheckOut")
{
bConsumed = true;
setTimeout( "doGroupCheckOut( )", 200 );
}
else if (target == "showGroupActionDlg")
{
bConsumed = true;
showGroupActionDlg( );
}
else if (target == "groupCheckInExcRPT")
{
bConsumed = true;
groupCheckInExcRPT( );
}
else if (target == "groupPreBlockExcRPT")
{
bConsumed = true;
groupPreBlockExcRPT( );
}
else if (target == "groupUnBlockExcRPT")
{
bConsumed = true;
groupUnBlockExcRPT( );
}
else if (target == "groupCheckOutExcRPT")
{
bConsumed = true;
groupCheckOutExcRPT( );
}
else if (target == "wholesaleCheckInExcRPT")
{
bConsumed = true;
wholesaleCheckInExcRPT( );
}
else if (target == "wholesaleCheckOutExcRPT")
{
bConsumed = true;
wholesaleCheckOutExcRPT( );
}
else if (target == "wholesalePreBlockExcRPT")
{
bConsumed = true;
wholesalePreBlockExcRPT( );
}
}
else if (target == "showRoomAvailability")
{
bConsumed = true;
showRoomAvailability( );
}
else if (target == "showRoomsAvail1DayDetail")
{
bConsumed = true;
showRoomsAvail1DayDetail( );
}
else if (target == "showRoomsAvailMultiDayDetail")
{
bConsumed = true;
showRoomsAvailMultiDayDetail( );
}
else if (target == "showConcierge")
{
bConsumed = true;
showConcierge( );
}
else if (target == "showWeather")
{
bConsumed = true;
showWeather( );
}
else if (target == "showPopupCalendar")
{
bConsumed = true;
showPopupCalendar( );
}
else if (target == "showCallCtrCxlRes")
{
bConsumed = true;
showCallCtrCxlRes( );
}
else if (target == "doRoomInteractiveBlock")
{
bConsumed = true;
doRoomInteractiveBlock( params );
}
else if (target == "doCodesAdmin")
{
bConsumed = true;
doCodesAdmin( params );
}
else if (target == "doRoomReconciliation")
{
bConsumed = true;
doRoomReconciliation( params );
}
else if (target == "doRoomHistory")
{
bConsumed = true;
doRoomHistory( params );
}
else if (target == "doRoomHistory")
{
bConsumed = true;
doRoomHistory( params );
}
else if (target == "openRoomStatusUpdate")
{
bConsumed = true;
openRoomStatusUpdate( params );
}
else if (target == "OpenCftMaster")
{
bConsumed = true;
var openCftId = getLSApplet().fireLightSpeedEventEx(getS
tateKey(),
"IUPDATE",
"CFT",
"OPEN",
encodeURIComponent(params),
"0");
if ( openCftId > 0 )
{
submitWorkspace();
}
else
{
var errRsp = new String( getLSApplet().getRespon
seMessageById(openCftId) );
var errMsg = getField(errRsp, 1, ";");
alert("Error Selecting CFT Master:\n\n" + errMsg
);
}
}
else if (target == "printConf")
{
bConsumed = true;
sendRequestToServer( "confCallBack", "POST", getStateKey
(), 0, "CONFIRMATION", "PRINT_CONF", params );
}
else if (target == "emailConf")
{
bConsumed = true;
sendRequestToServer( "confCallBack", "POST", getStateKey
(), 0, "CONFIRMATION", "EMAIL_CONF", params );
}
else if ( target == "doCheckIn" )
{
bConsumed = true;
params = decodeURI( params );
var resId = getField( params, 0, "^" );
var swipeStream = params.substring( (resId.length+1), (p
arams.length-1) );
createCheckInWizard( resId, false, false, swipeStream );
}
else if ( target == "doWalkIn" )
{
bConsumed = true;
var swipeStream = getField( params, 0, "^" );
createWalkInWizard( false, swipeStream );
}
else if ( target == "doCheckOut" )
{
bConsumed = true;
var resId = getField( params, 0, "^" );
createCheckOutWizard( resId, false );
}
else if ( target == "doWithdrawCheckOut" )
{
bConsumed = true;
var resId = getField( params, 0, "^" );
var guestName = getField( params, 1, "^" );
createWithDrawCheckOutWizard( resId, false, false, guest
Name );
}
else if ( target == "doRoomMove" )
{
bConsumed = true;
var resId = getField( params, 0, "^" );
var guestName = getField( params, 1, "^" );
createRoomMoveWizard( resId, guestName, false, false, ""
);
}
else if ( target == "spgSearch" )
{
bConsumed = true;
if ( handleSPGResults )
handleSPGResults( params );
}
else if (target == "MergeSelectRes")
{
bConsumed = true;
var roomSeqNum = getField( params, 0, "^" );
var guestId = getField( params, 1, "^" );
var roomSeqNumToReplace = getField( params, 2, "^" );
mergeShareWizard( guestId, roomSeqNum, roomSeqNumToRepla
ce, false );
}
else if (target == "EditRoomShare")
{
bConsumed = true;
}
else if (target == "ViewBillingPattern")
{
bConsumed = true;
var eventId = getLSApplet().fireLightSpeedEventEx(getSta
teKey(),
"IUPDATE",
"BILLING_PATTERN",
"ADD",
params,
"0");
if ( eventId > 0 )
{
submitWorkspace();
}
else
{
var errRsp = new String( getLSApplet().getRespon
seMessageById(eventId) );
var errMsg = getField(errRsp, 1, ";");
alert("Error Adding Billing Pattern:\n\n" + errM
sg);
}
}
else if (target == "AddTravelwith")
{
bConsumed = true;
var guestId = getField( params, 41, "^" );
showWait( true );
var eventId = getLSApplet().fireLightSpeedEventEx("modR
es:8",
"IUPDATE",
"TRAVELWITH",
"ADD",
guestId,
"0");
if ( eventId > 0 )
{
var response = new String( getLSApplet().getResp
onseMessageById(eventId) );
var newStateKey = getField(response, 1, ";");
submitWorkspace();
}
else
{
showWait( false );
var errRsp = new String( getLSApplet().getRespon
seMessageById(breakTwId) );
var errMsg = getField(errRsp, 1, ";");
alert("Error Adding Travelwith Reservation:\n\n"
+ errMsg);
}
}
else if (target == "CancelWizard" )
{
bConsumed = true;
this.submitWorkspace();
}
else if (target == "OpenTravelwith")
{
bConsumed = true;
var guestId = getField( params, 2, "^" );
openResWorkspace(guestId, false);
}
}
//Start: Add code for night Audit
else if( target == "openNightAuditTab" )
{
bConsumed=true;
}// END : Add code for night Audit
}
if (bConsumed == false)
eventNotifyFragments(stateKey, eventId, action, target, command,
params, dlgLevel);
}
catch( ex ){ alert( "res\x2FresWorkspace.jsp LightSpeed.jsp - lightSpeedEvent: "
+ ex.message ); }
}
function editRoom(roomIndex)
{
try // SWDTS00242317
{
showLayer();
}
catch( ignore ){} // SWDTS00242317
//alert("LightSpeed.js::editRoom(" + roomIndex + ")");
function getGuestID()
{
return "42813";
}
function getVIPCode()
{
return "";
}
function editMessage()
{
var activeStateKey = "modRes:8";
if (activeStateKey.indexOf("group") >= 0) {
doGroupMessage("", "", "", "", false, useModalDialogs);
}
else
{
doGuestMessage("42813", "PerftestData", "", false, useModalDialo
gs);
}
}
function getCurrentFunctionalArea()
{
return "modRes";
}
function resumeCurrentWizard(bShowErrMsg)
{
if ( ! bShowErrMsg ) bShowErrMsg = false;
}
var logoutMessageSent = false;
function nightAudit2Logout()
{
if ( logoutMessageSent )
{
return;
}
//alert( "night audit 2 logout: " + getStateKey() );
try
{
// Send CLOSE event to all open dialogs
var eventId = getLSApplet().broadcastLightSpeedEvent(
"CLOSE",
"",
"",
"" );
}
catch( e )
{
// ignore
}
{
return "MOD";
}
function openGuestSrv()
{
var eventId = getLSApplet().fireLightSpeedEventEx2(
getStateKey(),
"UPDATE",
"SYSTEM",
"set_external_active",
"sgResponse^",
0,
0);
var response = new String( getLSApplet().getResponseMessageById(eventId)
);
var newStateKey = "";
var status = getField( response, 0, ";" );
if ( status == "ok" )
{
newStateKey = getField( response, 1, ";" );
}
if ( top.activateStarGuestResponse )
{
top.activateStarGuestResponse( newStateKey, existsSGResponseWork
space() );
}
}
function encodeKey(guestId)
{
showKeyEncoding(guestId);
}
function getPrintFolioWindowTitle()
{
return "Print / Email Folio";
}
function getPrintRegCardSuccessMsg()
{
return "Reg card successfully printed.";
}
document.onFocus="if ( focusTable ) { focusTable(); }";
function initWS()
{
setTimeout( "initWSDelayed()", 200 );
}
function hideStdTabs()
{
try
{
var tabDiv = document.getElementById( "stdTabs" );
if ( tabDiv )
tabDiv.style.visibility = "hidden";
}
catch( e ) {}
}
// Added for StarGuest to receive therequired parameters.
function openGuestSrv(parameter)
{
//alert("openGuestSrv::parameter="+parameter);
var eventId = getLSApplet().fireLightSpeedEventEx2(
getStateKey(),
"UPDATE",
"SYSTEM",
"set_external_active",
"sgResponse^",
0,
0);
var response = new String( getLSApplet().getResponseMessageById(eventId)
);
var newStateKey = "";
var status = getField( response, 0, ";" );
if ( status == "ok" )
{
newStateKey = getField( response, 1, ";" );
}
if ( top.activateStarGuestResponse )
{
top.activateStarGuestResponse( newStateKey, existsSGResponseWork
space(), parameter, true );
}
}
function existsSGRecognitionWorkspace()
{
return false;
}
function existsSGResponseWorkspace()
{
return false;
}
function existsVahallaMaintWorkspace()
{
return false;
}
function existsPortalWorkspace()
{
return false;
}
function existsSpgLinkWorkspace()
{
return false;
}
function existsWeatherWorkspace()
{
return false;
}
function existsPropertyWorkspace()
{
return false;
}
function isIE6()
{
return false;
}
function isIE7()
{
return false;
}
function isIE8()
{
return false;
}
function isIE9()
{
return true;
}
function isIE10()
{
return false;
}
function isIE11()
{
return false;
}
function isIE12()
{
return false;
}
document.onkeydown = function handleF12KKey(ev)
{
var value = (window.external) ? event.keyCode : ev.keyCode;
if (value == KEY_F12) // F10 121
{
try
{
var closeTab = document.getElementById( "closeTab" + act
iveTabId );
if ( closeTab )
{
closeTab.click();
}
}
catch ( e ) {}
}
}
// CQ217800 - HID Swipe stability
function resetCardSwipe()
{
try
{
if ( parent.theSystemFrame.HID_reset )
{
alertMessageKey("msg.resettingComplete");
parent.theSystemFrame.HID_reset();
}
}
catch (e) {}
}
function deactivateCardSwipe()
{
try
{
if ( parent.theSystemFrame.HID_deactivate )
{
alertMessageKey("msg.deactivatingComplete");
parent.theSystemFrame.HID_deactivate();
}
}
catch (e) {}
}
//CQ217800 09-13-11 - HID Swipe stability - swipe status
function getCardSwipeStatus()
{
try
{
if ( parent.theSystemFrame.HID_status )
{
alertMessageKey("msg.cardStatus");
<SCRIPT type="text/javascript">
var isJavascriptDebugEnabled=true;
window.onbeforeunload = abortXMLHttpRequest;
function abortXMLHttpRequest()
{
if ( window.XMLHttpRequest )
{
try
{
window.XMLHttpRequest.abort();
window.XMLHttpRequest = null;
}
catch( ignore )
{
//
alert( "error: doUnloadXMLHTTP" + ignore );
}
}
//
}
var xmlReqArray = new Array();
var
var
var
var
var
UNITIALIZED_STATE
LOADING_STATE
LOADED_STATE
INTERACTIVE_STATE
COMPLETE_STATE
= 0;
= 1;
= 2;
= 3;
= 4;
var HTTPS_PORT
= "8443";
var SUCCESS_CALL
= 200
var messageDisplayed=false;
function getXMLHTTPRequestObject( )
{
if ( window.XMLHttpRequest )
{
return new XMLHttpRequest();
}
if( window.ActiveXObject )
{
window.XMLHttpRequest = function()
{
var a = [ 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP', 'Msxml2
.XMLHTTP.2.0', 'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP.4.0', 'Msxml2.XMLHTTP.5.0',
'Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.7.0' ];
var i = a.length;
while(i--)
{
try
{
return new ActiveXObject( a[i] );
}
catch (e) {}
}
return null;
};
}
return window.XMLHttpRequest ? new XMLHttpRequest() : null;
}
function sendRequestToServer( callback, getPostInd, stateKey, eventId, target, c
md, parms, overrideURL )
{
if ( typeof( target ) == "undefined" || target.length == 0 )
{
return;
}
var xmlHttpReq = null;
var csrf = "?csrfToken=" + encodeURIComponent("225faM2BL7YNwU0twrrvzw=="
) + "&csrfParameter=" + "sendToTarget.jsp";
var url = "";
if ( ! overrideURL )
url = "\x2Flightspeed/WormholeTargetServlet";
else
url = overrideURL;
if ( ! getPostInd )
getPostInd = "POST";
xmlHttpReq = getXMLHTTPRequestObject();
}
function xmlRequest(xmlHttpReq, callback)
{
this.xmlHttpReq = xmlHttpReq;
this.callback = callback;
}
function callbackChangeHandler()
{
if ( typeof(window['xmlReqArray']) == "undefined")
return;
var xmlReqLen = xmlReqArray.length;
for (var i = 0; i < xmlReqLen; i++)
{
var xmlReqObj = xmlReqArray[i];
if ( xmlReqObj == null || xmlReqObj.xmlHttpReq == null )
{
return false;
}
if (xmlReqObj.xmlHttpReq.readyState == COMPLETE_STATE)
{
if (xmlReqObj.xmlHttpReq.status == SUCCESS_CALL || xmlRe
qObj.xmlHttpReq.status == 304)
{
xmlReqArray.splice(i,1); // removes current arr
ay element
var callback = xmlReqObj.callback;
if ( callback && callback != null && callback !=
"null" && callback.length > 0 )
{
var xmlHttpReqObj = xmlReqObj.xmlHttpReq
;
var cb = new Array();
cb.push( callback );
cb.push( "(\"" );
cb.push( new String( xmlHttpReqObj.respo
nseText ) );
cb.push( "\")" );
try
{
//alert("callback: " + cb.join("
"));
eval( cb.join("") );
}
catch( e )
{
// ignore as the call back funct
ion may no longer be on the page
}
}
}
else
{
try
{
dispXMLErrMsg( );
xmlReqObj.abort();
}
catch( ignore ) {}
}
}
}
}
function dispXMLErrMsg(e)
{
var msg = "A network connection error occurred, unable to connect to the
server, retrying...";
if ( e )
{
msg += "<BR><BR>(" + (e.number & 0xffff)+ ") [" + e.description
+ "]";
}
try
{
if( ! messageDisplayed)
{
messageDisplayed=true;
alertMessage( msg );
}
}
catch( e )
{
alert( msg );
}
}
function sendSynchRequestToServer( getPostInd, stateKey, eventId, target, cmd, p
arms, overrideURL )
{
if ( typeof( target ) == "undefined" || target.length == 0 )
{
return;
}
if ( ! getPostInd )
getPostInd = "POST";
var xmlHttpReq = getXMLHTTPRequestObject();
if( xmlHttpReq && xmlHttpReq != null )
{
try
{
xmlHttpReq.open(getPostInd, url+ csrf , false);
}
catch( e )
{
dispXMLErrMsg(e);
return;
}
xmlHttpReq.setRequestHeader("Content-Type", "application/x-www-f
orm-urlencoded;charset=UTF-8"); // SWDTS00253350
var parameters =
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
parameters.push(
new Array();
"_Input=" );
stateKey );
";" );
"UTILITY" );
";" );
eventId );
";" );
";" );
target );
";" );
cmd );
";" );
encodeURIComponent(parms) );
try
{
xmlHttpReq.send( parameters.join("") );
return xmlHttpReq.responseText;
}
catch (e)
{
return "error;Unable to send request to the server";
}
}
else
{
dispXMLErrMsg();
return "error;Unable to send request to the server";
}
}
</SCRIPT>
</head>
<body topmargin="0" leftmargin="0" class="lightspeedBody">
<div align="center" id="WaitPane" class="WaitPaneHidden">
<div id="waitDiv" class="waitDiv"></div>
</div>
<div id="shadow" class="opaqueLayer"></div>
<div id="poptxt" class="poptxt" style="width: 160px"></div>
<script type="text/javascript" >createPopupMenuDiv()</script>
<form name="theForm" class="workspace" action="/lightspeed/StateController"
method="POST" onsubmit="javascript:void(0);" autocomplete="off">
<INPUT TYPE="HIDDEN" NAME="csrfToken" value="xTQsoWfwIZLJCyrSGsODRQ==">
<INPUT TYPE="HIDDEN" NAME="csrfParameter" value="LightSpeed.jsp">
<input id="_TARGET" name="_TARGET" type="HIDDEN" value="RES">
<input id="_ACTION" name="_ACTION" type="HIDDEN" value="UPDATE">
<input id="_ACTION_PAGE" name="_ACTION_PAGE" type="HIDDEN" value="/lightspe
ed/en_US/LightSpeed.jsp">
<input id="_ORIG_PAGE" name="_ORIG_PAGE" type="HIDDEN" value="/lightspeed&#
x2f;en_US/LightSpeed.jsp">
<input id="_STATE_KEY" name="_STATE_KEY" type="HIDDEN" value="modRes:8">
<input id="_EVENT_ID" name="_EVENT_ID" type="HIDDEN" value="">
<input id="_IS_EVENT_DATASOURCE" name="_IS_EVENT_DATASOURCE" type="HIDDEN" value
="">
<input id="_ACTIVATE_STATE" name="_ACTIVATE_STATE" type="HIDDEN" value="">
<input id="selectedResItemIndex" name="selectedResItemIndex" type="HIDDEN" value
="">
<input id="_RESUME_WIZARD" name="_RESUME_WIZARD" type="HIDDEN" value="">
<input id="_localContextPath" name="_localContextPath" type="HIDDEN" value="
f;lightspeed/en_US">
<input id="_protocolAndPort" name="_protocolAndPort" type="HIDDEN" value="https:
//10.20.248.73:8443">
<input id="dataChanged" name="dataChanged" type="HIDDEN" value="false">
<input id="_EXEC_FUNC" name="_EXEC_FUNC" type="HIDDEN" value="">
bHaveComments = false;
bHaveMessages = false;
bHaveSpecServ = false;
bHaveTasks
= false;
bHaveLocation = false;
bHaveVoiceMail = false;
bHaveWakeup
= false;
bHaveRemarks = false;
bHaveRoomMates = false;
bHasBackToBacks = "";
bSuppressRate = false;
cresNumber = "";
isSgActive = 'Y';
pageSessionTimedOut = false;
sessionTimedOut = false;
starGuestUp = true;
starGuestDown = false;
starGuestAccess = 2;
starGuestPermissionLevel=1;
//alert("starGuestAccess="+starGuestAccess+", starGuestPermissionLevel="+starGue
stPermissionLevel+", starGuestUp="+starGuestUp+", starGuestDown="+starGuestDown)
;
var bFlagsSet = false;
var prevGuestNum = "";
function setGuestHeaderIndictorFlags( guestNum )
{
//alert( "setGuestHeaderIndictorFlags" );
if ( bFlagsSet == true ) return;
bFlagsSet = true;
if(prevGuestNum == guestNum)
{
return;
}
prevGuestNum = guestNum;
bHaveComments = false;
bHaveMessages = false;
bHaveSpecServ = false;
bHaveTasks
= false;
bHaveLocation = false;
bHaveVoiceMail = false;
bHaveWakeup
= false;
bHaveRemarks = false;
bHaveRoomMates = false;
bHasBackToBacks = "";
bSuppressRate = false;
cresNumber="";
if ( guestNum.length > 0 )
{
var s = new Array();
s.push( guestNum );
s.push( "377" );
var response = sendSynchRequestToServer( "POST", "modRes:8", 0,
"RESERVATION", "CMD_GET_GUEST_HEADER_FLAGS", s.join("^") );
//alert(response);
var result = getField(
if ( result == "ok" )
{
bHaveComments
bHaveMessages
bHaveSpecServ
bHaveTasks
bHaveLocation
bHaveVoiceMail
bHaveWakeup
bHaveRemarks
response, 0, ";" );
=
=
=
=
=
=
=
=
getField(
getField(
getField(
getField(
getField(
getField(
getField(
getField(
response,
response,
response,
response,
response,
response,
response,
response,
1,
2,
3,
4,
5,
6,
7,
8,
";"
";"
";"
";"
";"
";"
";"
";"
);
);
);
);
);
);
);
);
catch( e ){}
}
// Stop
function setVIP( vipCode )
{
var s = new Array();
if ( vipCode == "undefined" ) vipCode = "";
if (vipCode != null && vipCode.length > 0)
{
if ( vipCode == "V1" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip1.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V2" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip2.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V3" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip3.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V4" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip4.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V5" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip5.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V0" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip0.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V6" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip6.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V7" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip7.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V8" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip8.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V9" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip9.gif' border='0' align='absmiddle' width='28' height
='28'>" );
else if ( vipCode == "V10" )
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip10.gif' border='0' align='absmiddle' width='28' heigh
t='28'>" );
else
s.push( "<IMG ondrag='return false' src='/lightspee
d/en_US/images/vip/vip.gif' border='0' align='absmiddle' width='28' height=
'28'>" );
if ( s.length > 0 )
{
if(!false)
{
guestName = formatGuestNameJS( lastName, firstNa
me, title, incognito, fromHouseList, "TLF" );
}
else if(false &&( fromHouseList ||false))
// for D
ouble Byte modified
{
if(false)
{
var romanNameOnly = "";
var guestTotalName = "";
var altNameOnly = "";
var currentAltLangCode = "";
var baltFlag = "";
var baltFg;
var guestNameorder = "";
var altLngCodeFrGst = "";
romanNameOnly = getField( guestName,
0, "~" );
altNameOnly = getField( guestName, 1,
"~" );
guestTotalName = romanNameOnl
y;
guestNameorder = 'TLF';
altLngCodeFrGst = '';
if( null != romanNameOnly )
{
guestTotalName =
formatGuestNameJS( romanNameOnly, firstName, title, incognito, fromHouseList, g
uestNameorder );
baltFg = true;
}
else if(!baltFg)
{
guestTotalName = rom
anNameOnly;
}
currentAltLangCode = getField
( guestName, 2, "~" );
if(romanNameOnly == 'null' ||
romanNameOnly == null)
{
romanNameOnly =
"";
}
if(altNameOnly == 'null' || a
ltNameOnly == null)
{
altNameOnly = ""
;
baltFlag= true;
}
var hotelNumber = 377;
var altNmView = "R";
if("" != altNameOnly )
{
guestName = prefAltNameV
iewForGuest(guestTotalName, altNameOnly, altNmView, currentAltLangCode);
baltFlag= false;
}
else if( !(isNullOrBlank( altNam
e ) || altName == "undefined") && baltFlag && !(isNullOrBlank( altLngCodeFrGst
) || altLngCodeFrGst == "undefined"))
{
guestName = prefAltNameV
iewForGuest(guestTotalName, altName, altNmView, altLngCodeFrGst);
baltFlag= false;
}
else
{
if(null != guest
TotalName && guestTotalName.length > 0)
{
guestNam
e = guestTotalName;
}
else
{
guestNam
e = romanNameOnly;
}
}
}
}
}
setGuestName( guestName, ghid );
bFlagsSet = false;
// CQ182894 - Launch Guest Profile - Start - new parameter ghid
setGuestNum( guestNum, guestName, ghid );
// CQ182894 - Launch Guest Profile - End
showStarGuestLink(guestName, hotelNumber, guestNum, lastName, clubAcctNu
mber);
setVIP( vipCode );
club = club + "";
if ( club == "undefined" ) club = "";
if ( clubAcctNumber == "undefined" ) clubAcctNumber = "";
setClub( club, clubAcctNumber, guestName );
var s = new Array();
room = room + "";
if ( room == "undefined" ) room = "";
if ( room && room.length > 0 )
{
s.push( " " );
s.push( room );
s.push( " " );
}
setRoomNum( s.join("") );
var roomNumber = room;
if (roomNumber)
{
var index = roomNumber.indexOf(",");
if (index != -1)
{
roomNumber = roomNumber.substring(0, index);
}
index = roomNumber.indexOf("<SUP>+</SUP>");
if (index != -1)
{
roomNumber = roomNumber.substring(0, index);
}
}
var s = new Array();
if ( bHaveMessages && (bHaveMessages == true || bHaveMessages == "true")
)
{
s.push( " " );
s.push( "<a id=\"guestMsgID\" ondrag=\"return false\" noborder h
ref=\"javascript:doGuestMessage('" );
s.push( guestNum );
s.push( "', '" );
s.push( guestName );
s.push( "', '" );
s.push( vipCode );
s.push( "', " );
s.push( fromHouseList );
s.push( ", true)\"><IMG ondrag=\"return false\" src=\"/ligh
tspeed/en_US/images/msgInd.gif\" align=\"absmiddle\" border=\"0\" width=\"2
8\" height=\"28\" alt=\"Messages\"></A>" );
s.push( "<span style=\"width:1px\"> </span>" );
}
setGuestMsgInd( s.join("") );
var s = new Array();
if ( bHaveLocation && (bHaveLocation == true || bHaveLocation == "true")
)
{
s.push( " " );
s.push( "<a id=\"locationID\" ondrag=\"return false\" noborder h
ref=\"javascript:doLocation('" );
s.push( guestNum );
s.push( "', '" );
s.push( guestName );
s.push( "')\"><IMG ondrag=\"return false\" src=\"/lightspee
d/en_US/images/location.gif\" align=\"absmiddle\" border=\"0\" width=\"28\"
height=\"28\" alt=\"Locations\"></A>" );
s.push( "<span style=\"width:1px\"> </span>" );
}
setGuestLocInd( s.join("") );
var s = new Array();
if ( bHaveVoiceMail && (bHaveVoiceMail == true || bHaveVoiceMail == "tru
e"))
{
s.push( " " );
;
var homestateKey = "modRes:8";
var cftCode = new Array();
if(guestType == "(C)" && cftMasterEdit == true)
{
var cftLink = "<a class=\"headerLink\" href=\"javascript
:launchViewModifyCftMaster("+hotelNumber+",'"+cftNumber+"','"+cftName+"','"+home
stateKey+"','CFT_MENU')\">"+hrefLink[1]+"</a>";
cftCode.push("(C) ");
cftCode.push(cftLink);
cftCode.push(" - ");
if(toolTipReqInd > 0)
{
cftCode.push("<span title='");
cftCode.push(compName);
cftCode.push("'>");
}
cftCode.push(cftName);
if(toolTipReqInd > 0)
{
cftCode.push("</span>");
}
grpCftWholeCode = cftCode.join("");
}
else if(guestType == "(C)" && cftMasterEdit == false)
{
var cftLink = "<a class=\"headerLink\" href=\"javascript
:launchViewCFTMaster("+hotelNumber+",'"+cftNumber+"','"+cftName+"','"+homestateK
ey+"','CFT_MENU')\">"+hrefLink[1]+"</a>";
cftCode.push("(C) ");
cftCode.push(cftLink);
cftCode.push(" - ");
if(toolTipReqInd > 0)
{
cftCode.push("<span title='");
cftCode.push(compName);
cftCode.push("'>");
}
cftCode.push(cftName);
if(toolTipReqInd > 0)
{
cftCode.push("</span>");
}
grpCftWholeCode = cftCode.join("");
}
s.push( " " );
s.push( grpCftWholeCode );
s.push( " " );
}
setGroupCftWhole( s.join("") );
var s = new Array();
if ( bHaveWakeup && (bHaveWakeup == true || bHaveWakeup == "true"))
{
s.push( "
" );
s.push( "<a id=\"wakeupID\" ondrag=\"return false\" noborder hre
f=\"javascript:doWakeUp('" );
s.push( guestNum );
setAgentID( "Galaxy\x20Customer\x20Support" );
}
catch( e )
{
var lsApplet = getLightSpeedApplet();
if ( lsApplet )
{
lsApplet.println("StdHeader.jsp:Unable to set AgentId.")
;
}
}
try
{
setGuestNum( "42813", createGuestName("", "", "PerftestData") );
}
catch( e )
{
var lsApplet = getLightSpeedApplet();
if ( lsApplet )
{
lsApplet.println("StdHeader.jsp:Unable to setguestnum.")
;
}
}
try
{
showInterfaceDownInd( true );
}
catch( e )
{
var lsApplet = getLightSpeedApplet();
if ( lsApplet )
{
lsApplet.println("StdHeader.jsp:Unable to showInterfaceD
ownInd.");
}
}
}
function showInterfaceDownInd( bShow )
{
var s = new Array();
if ( bShow == true || bShow == "true" )
{
s.push( "<IMG onclick=\"displayInterfacesDown();return false;\"
ondrag=\"return false\" src=\"/lightspeed/en_US/images/interfaceDown.g
if\" align=\"absmiddle\" border=\"0\" width=\"28\" height=\"28\" alt=\"One or mo
re interfaces are down. Click here to see a list of interfaces that are down.\"
>" );
s.push( "<span style=\"width:1px\"> </span>" );
}
guestName = guestName.slice(0,guestName.indexOf("/"));
}
hasComment = false;
guestNum = gNum;
try
{
guestNum = Trim( guestNum );
setGuestHeaderIndictorFlags( guestNum );
if ( guestNum.length > 0 )
{
//--alert("stdHeader.jsp::setGuestNum(0)");
// CQ182894 - Launch Guest Profile - Start
if(isGPEnabled == "true")
{
if((ghid) && (ghid !="") && (ghid != "
0" || ghid != 0) && (ghid != "1" || ghid != 1) && (ghid != "-1" || ghid != -1))
{
checkIfIsNewGuestProfile( );
}
}
// CQ182894 - Launch Guest Profile - End
checkIfGuestHasComments( guestNum, guestName );
checkIfGuestHasOpenTasks( guestNum, guestName );
checkIfGuestHasSpecialServices( guestNum, guestName );
checkIfGuestHasRemarks( guestNum, guestName );
checkIfGuestHasRoomMates( guestNum, guestName );
checkIfGuestHasBackToBacks( guestNum, guestName );
}
else
{
//SWDTS00253883 to clear Guest Icons in Title Bar while deselec
t the reservation
clearIndOnDeselect();
// CQ182894 - Launch Guest Profile - Start
setNewGuestProfileInd("");
// CQ182894 - Launch Guest Profile - End
setCommentInd( "" );
setTaskInd( "" );
setSpecServInd( "" );
setRemarkInd( "" );
setRoomMateInd( "" );
}
}
catch( e ) {}
}
function checkIfGuestHasSpecialServices( guestNum, guestName )
{
if ( bHaveSpecServ == true || bHaveSpecServ == "true" )
showSpecialServiceIndicator( guestNum, guestName );
else
setSpecServInd( "" );
}
s.push( "377" );
s.push( "');\"><IMG ondrag=\"return false\" src=\"/lightspe
ed/en_US/images/b2b_" + iconFileName + ".gif\"" );
s.push( " alt=\"Back To Back\" align=\"absmiddle\" border=\"0\"
width=\"28\" height=\"28\"></A><span style=\"width:1px\"> </span>" );
}
setBackToBackInd( s.join("") );
}
function setBackToBackInd( txt )
{
try
{
if ( ! txt ) txt = "";
var backToBackInd = document.getElementById( "backToBackInd" );
if ( backToBackInd ) backToBackInd.innerHTML = txt;
}
catch( e ) { }
}
function doOpenHotelUrlWindow()
{
var windowStyle = 'directories=0,location=1,menubar=0,resizable=1,scroll
bars=1,status=0,toolbar=0,width=1020,height=760';
var theWin = window.open("http\x3A\x2F\x2Fwww.starwood.com\x2F", "LightS
peed", windowStyle);
theWin.focus();
}
function doOpenHotelUrl()
{
var eventId = getLSApplet().fireLightSpeedEventEx2(
getStateKey(),
"UPDATE",
"SYSTEM",
"set_external_active",
"property^",
0,
0);
var response = new String( getLSApplet().getResponseMessageById(eventId)
);
var status = getField( response, 0, ";" );
if ( status == "ok" )
{
var stateKey = getField( response, 1, ";" );
}
top.activateProperty( stateKey, existsPropertyWorkspace() );
}
try
{
var propName = document.getElementById( "propName" );
if ( name != "" )
{
if ( propName ) propName.innerHTML = "<A id='hotelUrlID'
ondrag='return false' class='propNameHeader' href='#' onclick='javascript:doOpe
nHotelUrl()'>" + name + "</A> " + hotelSwitchStr;
}
else
{
if ( propName ) propName.innerHTML="ERROR - NO PROPERTY
IS ASSOCIATED WITH YOUR ID!";
alertMessageKey( "msg.hotelConfigureMsg" );
location.href = document.theForm._localContextPath.value
+ "/onemoment.html"
location.href = "\x2Flightspeed/StateController?_CMD=Log
out";
}
}
catch( e ) {}
}
function setAgentID( agentName )
{
try
{
if ( ! agentName ) agentName = "";
var agentID = document.getElementById( "agentID" );
if ( agentID )
agentID.innerHTML = agentName + " ";
}
catch( e ) { }
}
function setActiveTabName( theName )
{
if ( theName == "Welcome!" ) return;
var tabDesc = document.getElementById( "activeTabDesc" );
if ( tabDesc )
tabDesc.innerHTML = theName;
}
function setGuestName( infoMsg, ghid )
{
try
{
if ( ! infoMsg ) infoMsg = "";
// CQ SWDTS00214858 fix - start
var showLink = true;
// CQ SWDTS00214858 fix - end
var indent = "<span style=\"width:10px;\"> </span>";
var guestInfo = document.getElementById( "guestInfo" );
// CQ182894 - Launch Guest Profile - Start
var s = new Array();
if(infoMsg == "Welcome!")
{
s.push("Welcome!");
}
else if (infoMsg == "")
{
s.push(infoMsg);
}
else
{
infoMsg = "PerftestData";
if(isGPEnabled == "true")
{
catch( e ) { }
}
function setGuestClub( txt )
{
try
{
if ( ! txt ) txt = "";
var spgClub = document.getElementById( "spgClub" );
if ( spgClub ) spgClub.innerHTML = txt;
}
catch( e ) { }
}
function setGuestMsgInd( txt )
{
try
{
if ( ! txt ) txt = "";
var msgInd = document.getElementById( "msgInd" );
if ( msgInd ) msgInd.innerHTML = txt;
}
catch( e ) { }
}
function setGuestLocInd( txt )
{
try
{
if ( ! txt ) txt = "";
var locInd = document.getElementById( "locInd" );
if ( locInd ) locInd.innerHTML = txt;
}
catch( e ) { }
}
function setVoiceMail( voiceMailCnt )
{
var s = new Array();
if ( voiceMailCnt && voiceMailCnt > 0 )
{
s.push( " " );
s.push( "<IMG ondrag=\"return false\" src=\"/lightspeed
f;en_US/images/voiceMail.gif\" align=\"absmiddle\" border=\"0\" width=\"28\" hei
ght=\"28\" alt=\"Guest has one or more voice mail messages.\"><span style=\"widt
h:1px\"> </span>" );
}
setVoiceMailInd( s.join("") );
}
function setVoiceMailInd( txt )
{
try
{
if ( ! txt ) txt = "";
var voiceMailInd = document.getElementById( "voiceMailInd" );
if ( voiceMailInd ) voiceMailInd.innerHTML = txt;
}
catch( e ) { }
}
function setWakeupCallInd( txt )
{
try
{
if ( ! txt ) txt = "";
var wakeUpInd = document.getElementById( "wakeUpInd" );
if ( wakeUpInd ) wakeUpInd.innerHTML = txt;
}
catch( e ) { }
}
function displayInterfacesDown()
{
var fragStr = fsGetFragmentSizeString( "interfaceDown.jsp" );
var w = fsGetWidth( fragStr );
var h = fsGetHeight( fragStr );
var fh = fsGetFragementHeight( fragStr );
var url =
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
new Array();
getLocalContextPath() );
"/common/StdFragmentDlg.jsp?_STATE_KEY=" );
getStateKey() );
"&_FRAGMENT_JSP=interfaceDown.jsp" );
"&_FRAGMENT_HEIGHT=" );
fh );
"&_IS_INFODLG=true" );
"&_WINDOW_TITLE_RSRC_KEY=title.unavInterfaces" );
txt = "";
else
txt = "Room" + " <B>" + txt + "</B>";
var indent = "<span style=\"width:10px;\"> </span>";
var roomNum = document.getElementById( "roomNum" );
if ( roomNum ) roomNum.innerHTML = indent + txt;
}
catch( e ) { }
}
function setRateSched( txt )
{
try
{
if ( ! txt )
{
txt = "";
}
else if ( bSuppressRate == true || bSuppressRate == "true" )
{
txt = "Rate Plan : <B>" + txt + " Suppressed</B>";
}
else
txt = "Rate Plan" + " <B>" + txt + "</B>";
var rateSched = document.getElementById( "rateSched" );
if ( rateSched ) rateSched.innerHTML = txt;
}
catch( e ) { }
}
function setSharewith( txt )
{
try
{
if ( ! txt ) txt = "";
var sharewith = document.getElementById( "sharewith" );
if ( sharewith ) sharewith.innerHTML = "<B>" + txt + "</B>";
}
catch( e ) { }
}
function setGroupCftWhole( txt )
{
try
{
if ( ! txt )
txt = "";
var grpCftWhole = document.getElementById( "grpCftWhole" );
if ( grpCftWhole ) grpCftWhole.innerHTML = txt;
}
catch( e ) { }
}
function isAlphaNumericKeyCode(keyCode)
{
return (keyCode >= 48 && keyCode <= 57) || (keyCode >= 65 && keyCode <=
90);
}
function toolbarKeyHandler(event)
{
if ( !event && document.all ) event = window.event;
if ( ! event ) return;
var key = event.keyCode;
var bAltPressed = false;
var bConsumed = false;
if ( document.all )
bAltPressed = event.altKey;
else
bAltPressed = event.modifiers & Event.ALT_MASK;
try
{
if (bAltPressed && ( keyHT != null || keyHT != "Undefined" && is
AlphaNumericKeyCode(key) ) )
{
var char = String.fromCharCode(key);
char = char.toUpperCase();
var action = keyHT.get( char );
if ( action != null && action != "null" )
{
eval( action );
bConsumed = true;
}
if (bConsumed || bConsumed == "true" || bConsumed == tru
e)
{
event.cancelBubble = true;
event.returnValue = false;
if (event.stopPropagation) event.stopPropagation
();
if (event.preventDefault) event.preventDefault()
;
}
}
}
catch( e)
{
errorHandler( e, "toolbarKeyHandler" );
}
return bConsumed;
}
registerKeyHandler(toolbarKeyHandler,false);
function createArAgingHadr(acctNum,acctNam,contName,taskIcon,assignTo,agingCode)
{
if ( isNullOrBlank( acctNam ) || acctNam == "undefined" )
{
resetArAging();
return;
}
}
function setArAssignTo( txt )
{
try
{
if ( ! txt )
{
txt = "";
}
var roomNum = document.getElementById( "rateSched" );
if ( roomNum ) roomNum.innerHTML = txt+ " ";
}
catch( e ) { }
}
function setArAgingCode( txt )
{
try
{
if ( ! txt )
{
txt = "";
}
var roomNum = document.getElementById( "sharewith" );
if ( roomNum ) roomNum.innerHTML = txt;
}
catch( e ) { }
}
function resetArAging()
{
setTaskInd("");
createArAgingHadr("","Welcome","","","","");
}
function showUpgradeMsg()
{
alertResourceKey( "title.placeholder",2 );
}
//CQ182894 - Launch Guest Profile - Start
function checkIfIsNewGuestProfile( )
{
var s = new Array();
if ( bIsNewProfile == false || bIsNewProfile == "false" )
{
s.push( " " );
s.push( "<IMG ondrag=\"return false\" src=\"/lightspeed
f;en_US/images/new.gif\"" );
s.push( " alt=\"New Guest Profile\" align=\"absbottom\" border=\
"0\" width=\"20\" height=\"10\"><span style=\"width:1px\"> </span>" );
}
var newGuestProfileInd = document.getElementById( "newguestprofile" );
if ( newGuestProfileInd ) newGuestProfileInd.innerHTML = s.join(" ");
}
//CQ182894 - Launch Guest Profile - End
function getStateKey()
{
return "modRes:8";
}
function getLocalContextPath()
{
return "\x2Flightspeed\x2Fen_US";
}
</script>
<table border="0" width="100%" cellpadding="0" cellspacing="0" class="headerBody
" id="header"><tbody>
<tr style="height:28px">
<td align="left" nowrap valign="top" width="50%"><table cellpaddin
g="0" cellspacing="0" border="0" class="headerBody"><tbody><tr>
<td>
<div align="left" id = "guestInfo" class="headerGuest
Name">
PerftestData
</div>
</td>
<td style="width:15px;"> </td>
<!-- CQ182894 - Launch Guest Profile - Start -->
<td><div align="left" id="newguestprofile" class="headerG
uestMSG"></div></td>
<!-- CQ182894 - Launch Guest Profile - End-->
<td><div align="left" id="vip" class="headerGuestMSG"></div
></td>
<td><div align="left" id="taskInd" class="headerGuestMSG"><
/div></td>
<td><div align="left" id="remarkInd" class="headerGuestMSG"
></div></td>
<td><div align="left" id="commentInd" class="headerGuestMSG
"></div></td>
<td><div align="left" id="ssrInd" class="headerGuestMSG"></
div></td>
<td><div align="left" id="msgInd" class="headerGuestMSG"></
div></td>
<td><div align="left" id="voiceMailInd" class="headerGuestM
SG"></div></td>
<td><div align="left" id="wakeUpInd" class="headerGuestMSG"
></div></td>
<td><div align="left" id="locInd" class="headerGuestMSG"></
div></td>
<td><div align="left" id="roomMateInd" class="headerGuestMS
G"></div></td>
<td><div align="left" id="backToBackInd" class="headerGuest
MSG"></div></td>
<!-- Added for StarGuest for the StarGuest link -->
<td><div align="left" id="sgLinkIndicator" class="headerGue
stMSG"></div></td>
</tr></tbody></table></td>
<td nowrap align="left" valign="top" width="15%"><div align="left"
id="spgClub" class="headerGuestClub"></div></td>
<script type="text/javascript">
<!-var bQuickNavHasFocus = false;
function setQuickNavFocusFlag( bHasFocus )
{
bQuickNavHasFocus = bHasFocus;
if ( bQuickNavHasFocus == false )
{
var quickNavObj = document.getElementById("_quickNav");
if ( quickNavObj )
{
setSelectedValue( quickNavObj, "" );
}
}
}
function doesQuickNavHaveFocus()
{
return bQuickNavHasFocus;
}
if ( document.attachEvent )
{
document.attachEvent("onkeydown", quickNavKeyHandler);
}
else
{
document.onkeydown = quickNavKeyHandler;
}
function quickNavKeyHandler(event)
{
if ( !event && document.all ) event = window.event;
if ( ! event ) return;
var keyCode = (event.keyCode) ? event.keyCode : event.charCode;
//alert( "keyCode: " + keyCode + "has focus: " + doesQuickNavHaveFocus() );
try
{
var elem;
if (event.srcElement)
{
elem = event.srcElement;
}
else if (event.target)
{
elem = event.target;
}
var isQuickNav = elem.id == "_quickNav";
var isTextField = elem.type == "text";
{
launchTaCheckReconcile();
}
function openTACommCheckEdit()
{
launchTaCommCheckEdit();
}
function openTAVoidCheck()
{
launchTaVoidCheck();
}
//-->
</script>
<script type="text/javascript" src="/lightspeed/en_US/common/autoCompl
eteSelect.js"></script>
<select STYLE="font-family:arial;width:230px;" id="_quickNav" name="_quickNav" o
nkeydown="autoCompleteSelect(event);" onfocus="setQuickNavFocusFlag(true)" onblu
r="setQuickNavFocusFlag(false)">
<option value="openAdminTab(false,false,true,false)">ADM - Administratio
n Workspace</option>
<option value="openAdminTab(false,false,false,true)">ADMAT - Admin - Adm
inistrator Tools</option>
<option value="openAdminTab(false,false,true,false)">ADMUT - Admin - Use
r Tools</option>
<option value="openAdminTab(false,true,false,false)">CONFIG - Admin - LS
Config</option>
<option value="openAdminTab(false,false,false,false,true);">ARP - AR - P
arameters</option>
Create</option>
<option value="launchMergeGuestProfile('GUEST_PROFILE_MENU')">GP
M - Guest Profile - Merge</option>
<option value="launchSearchGuestProfile('GUEST_PROFILE_MENU','HO
ME\x3A2')">GPS - Guest Profile - Search</option>
on>
<style type="text/css">
<!-.InputStyle {
color: navy;
font-size:
9pt;
}
A.resLinkBtn, A.smResLinkSectionBtn{
color: navy;
font-weight: 700;
}
A.resLinkBtn:hover {
color: navy;
font-weight: 700;
}
SELECT {
color: navy;
font-family:
arial, helvetica, geneva, swiss, sunsans-regular, sans-serif;
font-size:
9pt;
}
-->
</style>
{
return "//10.20.248.73:8443/lightspeed/en_US/images/webstart.png";
}
//Function needed by deployJava.js
function getJavaURL()
{
return "https://10.20.248.73:8443/getjre/jre-7u10-windows-i586-p.exe";
}
var _appletArray = new Array();
_appletArray.push("jide-action.jar");
_appletArray.push("jide-common.jar");
_appletArray.push("jide-components.jar");
_appletArray.push("jide-dialogs.jar");
_appletArray.push("jide-dock.jar");
_appletArray.push("jide-grids.jar");
_appletArray.push("jide-pivot.jar");
_appletArray.push("jide-shortcut.jar");
_appletArray.push("binding.jar");
_appletArray.push("looks.jar");
_appletArray.push("forms.jar");
_appletArray.push("validation.jar");
_appletArray.push("swingx.jar");
_appletArray.push("MultiSplit.jar");
_appletArray.push("EventBus.jar");
_appletArray.push("commons-logging.jar");
_appletArray.push("commons-pool-1.3.jar");
_appletArray.push("hssf.jar");
_appletArray.push("log4j.jar");
_appletArray.push("lscommon.jar");
_appletArray.push("lsui.jar"); // NOTE DO NOT PUT HOME PAGE APPLETS IN THIS JAR
SUCH AS HOUSE LIST AND GROUPS AND WHOLESALER HOUSELIST. The reason being is to
make initial loading of the home page as fast as possible.
var _archiveJars = _appletArray.join(",");
var _cacheArchiveJars = _appletArray.join(";preload;" + appletCacheVersion + ","
) + ";preload;" + appletCacheVersion;
var _numJarsToCache = _appletArray.length;
var _cacheVersionArray = new Array();
for ( var i = 0; i < _numJarsToCache; i++ )
{
_cacheVersionArray.push(appletCacheVersion); // need the version for eac
h jar file
}
var _cacheVersions = _cacheVersionArray.join(",");
var commonAppletParameters = {
codebase:'/lightspeed/',
archive:'' + _archiveJars,
cache_option:'Plugin',
cache_archive:'' + _archiveJars,
cache_version:'' + _cacheVersions,
cache_archive_ex:'' + _cacheArchiveJars
};
var minJREVersion = '1.5.0_22';
</script>
if ( document.theForm.departTime )
{
params.push( "departTime^" );
params.push( document.theForm.departTime.value );
params.push( "^~" );
}
if ( document.theForm.clubAcctType1 )
{
params.push( "clubAcctType1^" );
params.push( getSelectedValue( document.theForm.clubAcct
Type1 ) );
params.push( "^~" );
}
if ( document.theForm.clubAcct1 )
{
params.push( "clubAcct1^" );
params.push( document.theForm.clubAcct1.value );
params.push( "^~" );
}
if ( document.theForm.vipCode )
{
params.push( "vipCode^" );
params.push( getSelectedValue( document.theForm.vipCode
) );
params.push( "^~" );
}
if ( document.theForm.incognito )
{
params.push( "incognito^" );
params.push( document.theForm.incognito.value );
params.push( "^~" );
}
if ( document.theForm.email )
{
params.push( "email^" );
params.push( document.theForm.email.value );
params.push( "^~" );
}
if ( document.theForm.noEmailReason )
{
params.push( "noEmailReason^" );
params.push( getSelectedValue( document.theForm.noEmailR
eason ) );
params.push( "^~" );
}
//SWDTS00258123 commenting starts
//SWDTS00258123 commenting ends
// added for StarGuest project - start
if ( document.theForm.OptStatus )
{
params.push( "OptStatus^" );
params.push( "sourceCode^" );
params.push( getSelectedValue( document.theForm.sourceCo
de ) );
params.push( "^~" );
}
if ( document.theForm.regionCode )
{
params.push( "regionCode^" );
params.push( getSelectedValue( document.theForm.regionCo
de ) );
params.push( "^~" );
}
if ( document.theForm.marketCode )
{
params.push( "marketCode^" );
params.push( getSelectedValue( document.theForm.marketCo
de ) );
params.push( "^~" );
}
if ( document.theForm.marketStat1 )
{
params.push( "marketStat1^" );
params.push( getSelectedValue( document.theForm.marketSt
at1 ) );
params.push( "^~" );
}
if ( document.theForm.marketStat2 )
{
params.push( "marketStat2^" );
params.push( getSelectedValue( document.theForm.marketSt
at2 ) );
params.push( "^~" );
}
if ( document.theForm.mailIndicator )
{
params.push( "mailIndicator^" );
params.push( document.theForm.mailIndicator.value );
params.push( "^~" );
}
if ( document.theForm.guestLanguage )
{
params.push( "guestLanguage^" );
params.push( getSelectedValue( document.theForm.guestLan
guage ) );
params.push( "^~" );
}
if ( document.theForm.guestSalutation )
{
params.push( "guestSalutation^" );
params.push( document.theForm.guestSalutation.value );
params.push( "^~" );
}
if ( document.theForm.aracct )
{
params.push( "aracct^" );
params.push( document.theForm.aracct.value );
params.push( "^~" );
}
if ( document.theForm.paymentMethod )
{
params.push( "paymentMethod^" );
params.push( getSelectedValue( document.theForm.paymentM
ethod ) );
params.push( "^~" );
}
if ( document.theForm.creditCardNumber )
{
var cardNum = getCCValue();
params.push( "creditCardNumber^" );
if (cardNum.length == 8 && cardNum.indexOf( "XXXX" ) > 1)
{
params.push( maskedDatabaseCCNumber ); // variab
le defined in workspaceSettlement.jsp
params.push( "^~" );
}
else if (cardNum.length > 9 && cardNum.indexOf( "XXXX" )
== -1)
{
params.push( cardNum );
params.push( "^~" );
}
else
{
params.push( "^~" );
}
if (cardNum.length > 9 && cardNum.indexOf( "XXXX" ) == 1)
{
params.push( "origCreditCardNumber^" );
params.push( cardNum );
params.push("^~");
}
}
if ( document.theForm.creditCardHolderName )
{
params.push( "creditCardHolderName^" );
var cardName = document.theForm.creditCardHolderName.val
ue;
params.push( cardName );
params.push( "^~" );
}
if ( document.theForm.guaranteeStatus )
{
params.push( "guaranteeStatus^" );
params.push( getSelectedValue( document.theForm.guarante
eStatus ) );
params.push( "^~" );
}
if ( document.theForm.creditlimit )
{
params.push( "creditlimit^" );
params.push( document.theForm.creditlimit.value );
params.push( "^~" );
}
if ( document.theForm.creditCardExpYear )
{
params.push( "creditCardExpYear^" );
params.push( document.theForm.creditCardExpYear.value );
params.push( "^~" );
}
if ( document.theForm.creditCardExpMonth )
{
params.push( "creditCardExpMonth^" );
params.push( document.theForm.creditCardExpMonth.value );
params.push( "^~" );
}
if ( document.theForm.roomPosting )
{
params.push( "roomPosting^" );
params.push( getSelectedValue( document.theForm.roomPost
ing ) );
params.push( "^~" );
}
if ( document.theForm.postingStatus )
{
params.push( "postingStatus^" );
params.push( getSelectedValue( document.theForm.postingS
tatus ) );
params.push( "^~" );
}
if ( document.theForm.voucher )
{
params.push( "voucher^" );
params.push( document.theForm.voucher.value );
params.push( "^~" );
}
if ( document.theForm.ccSwipeStream )
{
params.push( "ccSwipeStream^" );
params.push( encodeURIComponent(document.theForm.ccSwipe
Stream.value) );
params.push( "^~" );
}
if ( document.theForm.flightArrive )
{
params.push( "flightArrive^" );
params.push( document.theForm.flightArrive.value );
params.push( "^~" );
}
if ( document.theForm.flightArriveTime )
{
params.push( "flightArriveTime^" );
params.push( document.theForm.flightArriveTime.value );
params.push( "^~" );
}
if ( document.theForm.flightDepart )
{
params.push( "flightDepart^" );
params.push( document.theForm.flightDepart.value );
params.push( "^~" );
}
if ( document.theForm.flightDepartTime )
{
params.push( "flightDepartTime^" );
params.push( document.theForm.flightDepartTime.value );
params.push( "^~" );
}
if ( document.theForm.ptick )
{
params.push( "ptick^" );
params.push( document.theForm.ptick.value );
params.push( "^~" );
}
if ( document.theForm.efolioOptIn )
{
params.push( "efolioOptIn^" );
params.push( document.theForm.efolioOptIn.value );
params.push( "^~" );
}
if ( document.theForm.efolioEmailAddr )
{
params.push( "efolioEmailAddr^" );
params.push( document.theForm.efolioEmailAddr.value );
params.push( "^~" );
}
//start CQ205185 Enhancement
if ( document.theForm.keepInGp )
{
params.push( "keepInGp^" );
params.push( getSelectedValue( document.theForm.keepInGp
) );
params.push( "^~" );
}
//end CQ205185 Enhancement
if ( document.theForm.altAddress1 )
{
params.push( "altAddress1^" );
params.push( document.theForm.altAddress1.value);
params.push( "^~" );
}
if ( document.theForm.altAddress2 )
{
params.push( "altAddress2^" );
params.push( document.theForm.altAddress2.value );
params.push( "^~" );
}
if ( document.theForm.altCity )
{
params.push( "altCity^" );
params.push( document.theForm.altCity.value );
params.push( "^~" );
}
if ( document.theForm.altState )
{
params.push( "altState^" );
params.push( document.theForm.altState.value );
params.push( "^~" );
}
if ( document.theForm.altCountry )
{
params.push( "altCountry^" );
params.push( document.theForm.altCountry.value );
params.push( "^~" );
}
if ( document.theForm.altPostal )
{
params.push( "altPostal^" );
params.push( document.theForm.altPostal.value );
params.push( "^~" );
}
if ( document.theForm.altCompany )
{
params.push( "altCompany^" );
params.push( document.theForm.altCompany.value );
params.push( "^~" );
}
if ( document.theForm.altLangCd )
{
params.push( "altLangCd^" );
params.push( document.theForm.altLangCd.value );
params.push( "^~" );
}
/* Changes for CQ SWDTS00255805 */
if ( document.theForm.useAltNameAddr )
{
params.push( "useAltNameAddr^" );
if(document.theForm.useAltNameAddr.checked)
{
params.push( "Y");
}
else
{
params.push( "N");
}
params.push( "^~" );
}
if ( document.theForm.useAltDep )
{
params.push( "useAltDep^" );
if(document.theForm.useAltDep.checked)
{
params.push( "Y");
}
else
{
params.push( "N");
}
params.push( "^~" );
}
if ( document.theForm.altLang )
{
params.push( "altLang^" );
params.push( document.theForm.altLang.value );
params.push( "^~" );
}
}
//Changes for Double Bytes
}
catch ( e )
{
errorHandler( e, "getEditableFieldWebParams" );
}
return params;
}
function updateEditableFieldWebParams()
{
var webparms = getEditableFieldWebParams();
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "WEBPAR
AM", "SET", webparms.join("") );
}
var curSectionIDX = 0;
if ( document.attachEvent ) // SWDTS00250523
{
document.attachEvent("onkeydown", handleResWorkspaceKeys);
}
else
{
document.onkeydown = handleResWorkspaceKeys;
} // end SWDTS00250523
function handleResWorkspaceKeys(event) // SWDTS00250523
{
var value = (event.keyCode) ? event.keyCode : event.charCode;
var bShiftKeyPressed = event.shiftKey;
if (value == KEY_F12) // F10 121
{
try
{
var closeTab = document.getElementById( "closeTab" + act
iveTabId );
if ( closeTab )
{
closeTab.click();
}
}
catch ( e ) {}
}
if (value == KEY_F10) // F10 121
{
setTimeout( "saveReservation(\"modRes:8\")", 100 ); //
SWDTS00250523
event.cancelBubble = true;
event.returnValue = false;
event.keyCode = 0;
if (event.stopPropagation) event.stopPropagation();
return false;
}
else
if ( value == KEY_F6 || value == KEY_F7 )
{
var focusElements = document.getElementsByName("focusSection");
//alert( "focusElements: " + focusElements.length );
if ( bShiftKeyPressed || value == KEY_F7 )
{
curSectionIDX--;
if ( curSectionIDX < 0 )
{
curSectionIDX = (focusElements.length - 1);
}
}
else
{
curSectionIDX++;
if ( curSectionIDX > (focusElements.length - 1) )
{
curSectionIDX = 0;
}
}
var sectionName = focusElements[curSectionIDX].id;
{
var formElemLen = form.elements.length;
for (var i = 0; i < formElemLen; i++)
{
var inputElement = form.elements[i];
if (inputElement != null )
{
if ( inputElement.id == searchForElemId.id )
{
bFoundHidden = true;
}
if ( bFoundHidden && inputElement.focus )
{
var type = new String(inputElement.type)
;
type = type.toUpperCase();
if ( ! inputElement.disabled && ( type == "CHECK
BOX" || type == "RADIO" || type == "TEXT" || type == "SELECT-ONE" || type == "SE
LECT-MULTIPLE" ))
{
var sectionObj = document.getElementById
( sectionName + "Section" );
if ( sectionObj )
{
var vis = sectionObj.style.displ
ay;
if (vis == "none")
{
expandContract( sectionN
ame + "Section",true);
}
}
var focusElement = input
Element;
document.theForm.focus()
;
if ( sectionObj )
{
var sectionFocus
Obj = document.getElementById( sectionName );
sectionFocusObj.
focus();
setTimeout( "sen
dBackAndForwardTab()", 50 );
}
else
{
focusElement.foc
us();
}
nextField = focusElement
;
break;
}
}
}
}
}
}
catch( e ) {}
return nextField;
}
function sendBackAndForwardTab()
{
try
{
var shell = new ActiveXObject("WScript.Shell");
shell.SendKeys("+{TAB}");
shell.SendKeys("{TAB}");
shell.quit;
}
catch( e ) {}
}
function resWorkspaceInit()
{
clubTypeChanged(1);
initAddress();
emailCodeChanged();
initMarketing();
parent.activateLightSpeedFrameAfterWait();
}
var isFromB2B = false;
/******Verify Back to Back : Start*******/
function checkB2BWarnMsg()
{
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"RESERVATION", "VERIFY_B2B", "42813" );
var status = getField(resultStr, 0, ";");
var msg = getField(resultStr, 1, ";");
if ( status == "notOk" )
{
alertMessage( msg );
try
{
hideDiv( "waitDiv" );
}
catch( e ) {}
return;
}
}
/******Verify Back to Back : End*******/
function checkHouseAlerts()
{
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "Messag
es", "CHECK_HOUSE_ALERTS", "isReservation" );
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
var msg = getField( resultStr, 1, ";" );
if ( msg != null && msg.length > 0 )
{
displayHouseAlertsMsg( msg );
document.theForm.houseAlertsDisplayed.value = true;
}
}
}
function setResWorkspaceFocus()
{
try
{
var focusElements = document.getElementsByName("focusSection");
var sectionName = focusElements[0].id;
var sectionFocusObj = document.getElementById( sectionName );
if ( sectionFocusObj )
{
sectionFocusObj.focus();
setTimeout( "sendBackAndForwardTab()", 50 );
return;
}
}
catch( e )
{
// ignore
}
/*
try
{
var form = document.theForm;
if (form != null && form.elements != null && form.elements.length > 0)
{
var formElemLen = form.elements.length;
for (var i=0; i < formElemLen; i++)
{
var inputElement = form.elements[i];
if (inputElement != null && inputElement.focus )
{
var type = new String(inputElement.type);
type = type.toUpperCase();
if ( ! inputElement.disabled && ( type == "CHECKBOX" ||
type == "RADIO" || type == "TEXT" || type == "SELECT-ONE" || type == "SELECT-MUL
TIPLE" ))
{
inputElement.focus();
break;
}
}
}
}
}
catch( e ) {}
*/
}
{
//
errorHandler( e, "expandResSection" );
}
}
function validateResWorkspace()
{
if ( validateFragments( false ) == invalid )
{
return false;
}
// check time fields
try
{
if ( typeof( document.theForm.arriveTime ) != "undefined" )
{
if ( ! checkTime( document.theForm.arriveTime, "Htl Arr
Time" ) )
{
return false;
}
}
if ( typeof( document.theForm.departTime ) != "undefined" )
{
if ( ! checkTime( document.theForm.departTime, "Htl Dep
Time" ) )
{
return false;
}
}
if ( typeof( document.theForm.flightArriveTime ) != "undefined"
)
{
if ( ! checkTime( document.theForm.flightArriveTime, "Fl
t Arr Time" ) )
{
return false;
}
}
if ( typeof( document.theForm.flightDepartTime ) != "undefined"
)
{
if ( ! checkTime( document.theForm.flightDepartTime, "Fl
t Dep Time" ) )
{
return false;
}
}
}
catch( e )
{
errorHandler( e, "validateResWorkspace" );
}
updateEditableFieldWebParams();
return true;
}
var
var
var
var
var
requiresStat1
=
requiresStat2
=
requiresMarketSegment
requiresSource
=
requiresRegion
=
"false";
"true";
= "true";
"true";
"false";
alertMessageKey( "msg.marketStatOne" );
expandResSection( "RES_MARKETING" );
document.theForm.marketStat1.focus();
return invalid;
}
if ( requiresStat2 == "true" && document.theForm.marketS
tat2 && document.theForm.marketStat2.disabled == false && isNullOrBlank( getSele
ctedValueById("marketStat2") ) )
{
alertMessageKey( "msg.marketStattwo" );
expandResSection( "RES_MARKETING" );
document.theForm.marketStat2.focus();
return invalid;
}
}
}
catch( e )
{
errorHandler( e, "validateMarketing" );
}
return valid;
}
function setLanguage()
{
var value = getSelectedValueById("guestLanguage");
if (value)
{
document.theForm.guestLanguage.value = value;
}
else
{
document.theForm.guestLanguage.value = "";
}
}
function validateClub(bCanContinueWithErrors)
{
try
{
var clubType = getSelectedValue(document.theForm.clubAcctType1);
var clubNbr = document.theForm.clubAcct1.value;
if ( !isNullOrBlank(clubType) && isNullOrBlank(clubNbr) )
{
expandResSection( "RES_GUEST" );
dispErrorMsgKey("msg.clubblank", document.theForm.clubAc
ct1);
return invalid;
}
if ( !isNullOrBlank(clubType) && !isNullOrBlank(clubNbr) )
{
var ok = validateClubNbr(clubType,clubNbr);
if (ok == false)
{
expandResSection( "RES_GUEST" );
dispErrorMsgKey("msg.clubInvalid", document.theF
orm.clubAcct1);
return invalid;
}
}
}
catch( e )
{
errorHandler( e, "validateClub" );
}
return valid;
}
function incognitoCheckboxHandler(incognitoCheckBox)
{
if (incognitoCheckBox)
{
if (incognitoCheckBox.checked)
{
document.theForm.incognito.value = "Y";
}
else
{
document.theForm.incognito.value = "N";
}
}
else
{
document.theForm.incognito.value = "N";
}
}
function validateAddress(bCanContinueWithErrors)
{
try
{
if ( document.theForm.address1 && isNullOrBlank(document.theForm
.address1.value ) )
{
expandResSection( "RES_GUEST" );
return dispErrorMsg2( "Street address cannot be blank.<b
r>Enter a valid street address.", document.theForm.address1, bCanContinueWithErr
ors );
}
if ( document.theForm.city && isNullOrBlank(document.theForm.cit
y.value) )
{
expandResSection( "RES_GUEST" );
return dispErrorMsg2( "City cannot be blank.<br>Enter a
valid city.", document.theForm.city, bCanContinueWithErrors );
}
var countryCode = getSelectedValue(document.theForm.country);
var countryDesc = getSelectedText(document.theForm.country);
var countryName = new String(countryDesc);
countryName = countryName.toUpperCase();
if ( document.theForm.country && isNullOrBlank(countryCode) )
{
return dispErrorMsg2( "Country cannot be blank.<br>Enter
a valid country.", document.theForm.country, bCanContinueWithErrors );
if ( countryCode.length > 0 )
document.theForm.guestCountry.value = countryDes
c;
else
document.theForm.guestCountry.value = "";
}
if ( bAddAddress == true )
{
addAddress();
}
}
catch( e )
{
errorHandler( e, "validateAddress" );
}
}
function validateEmail(bCanContinueWithErrors)
{
try
{
if ( document.theForm.email )
{
var emailValue = document.theForm.email.value;
if ( !isNullOrBlank(emailValue) )
{
if ( !isValidEmail(emailValue) )
{
if ( isNullOrBlank( getSelectedValue(doc
ument.theForm.noEmailReason) ))
{
expandResSection( "RES_GUEST" );
document.theForm.email.disabled
= false;
return dispErrorMsg2( "Enter a v
alid email address.", document.theForm.email, bCanContinueWithErrors );
}
}
}
var reasonVal = getSelectedValue(document.theForm.noEmai
lReason);
if ( isNullOrBlank(emailValue) && isNullOrBlank(reasonVa
l) )
{
expandResSection( "RES_GUEST" );
return dispErrorMsg2( "Supply a reason for not p
roviding an email address.", document.theForm.noEmailReason, bCanContinueWithErr
ors );
}
}
}
catch( e )
{
errorHandler( e, "validateEmail" );
}
}
function updateGuestInfoFromProfile()
{
try
{
var result = sendSynchRequestToServer( "POST", "modRes:8", 0, "R
ESERVATION", "CMD_GET_GUEST_INFO_POROFILE_DATA", "" );
var status = new String(getField(result, 0, ";"));
status = status.toUpperCase();
if ( status == "OK")
{
var temp = getField( result, 1, ";" );
if ( temp.length > 0 )
{
document.theForm.address1.value = temp;
}
else
{
document.theForm.address1.value = "";
}
temp = getField( result, 2, ";" );
if ( temp.length > 0 )
{
document.theForm.address2.value = temp;
}
else
{
document.theForm.address2.value = "";
}
temp = getField( result, 3, ";" );
if ( temp.length > 0 )
{
document.theForm.city.value = temp;
}
else
{
document.theForm.city.value = "";
}
temp = getField( result, 4, ";" );
if ( temp.length > 0 )
{
setSelectedValue( document.theForm.country, temp
);
setStateProv();//setting state province data.@RS
-SWDTS00252981
}
else
{
setSelectedValue( document.theForm.country, "" )
;
setStateProv();//setting state province data.@RS
-SWDTS00252981
}
temp = getField( result, 5, ";" );
if ( temp.length > 0 )
{
setSelectedValue( document.theForm.stateCode, te
mp );
}
else
{
setSelectedValue( document.theForm.stateCode, ""
);
}
temp = getField( result, 6, ";" );
if ( temp.length > 0 )
{
document.theForm.postalCode.value = temp;
}
else
{
document.theForm.postalCode.value = "";
}
temp = getField( result, 7, ";" );
if ( temp.length > 0 )
{
document.theForm.email.value = temp;
if ( typeof( document.theForm.efolioEmailAddr )
!= "undefined" ) // added SWDTS00239679
{
try
{
////SWDTS00239469-Email addr added in th
e Guest info screen should add the email to the email folio towards the bottom o
f the screen
document.theForm.efolioEmailAddr.value
= temp;
}
catch(e)
{
}
}
}
temp = getField( result, 8, ";" );
//KR : SWDTS00181849 : Sept 15 2009
//if ( temp.length > 0 )
//{
setSelectedValue( document.theForm.noEmailReason
, temp );
//}
temp = getField( result, 9, ";" );
if ( temp.length > 0 )
{
document.theForm.company.value = temp;
}
else
{
document.theForm.company.value = "";
}
temp = getField( result, 10, ";" );
if ( temp.length > 0 )
{
document.theForm.incognito.value = temp;
}
temp = getField( result, 11, ";"
);
if ( temp.length > 0 )
{
setSelectedValue( document.theForm.clubAcctType1
, temp );
}
temp = getField( result, 12, ";" );
if ( temp.length > 0 )
{
document.theForm.clubAcct1.value = temp;
}
else
{
document.theForm.clubAcct1.value = "";
}
temp = getField( result, 13, ";" );
if ( temp.length > 0 )
{
setSelectedValue( document.theForm.vipCode, temp
);
}
}
}
catch( e )
{
errorHandler( e, "updateGuestInfoFromProfile" );
}
}
function resWorkspaceValidate(bCanContinueWithErrors)
{
bInValidate = true;
var
var
var
for
{
formObj = document.theForm;
formElems = formObj.elements;
theLen = formElems.length;
( var i = 0; i < theLen; i++ )
var obj = formElems[i];
var objType = obj.type;
if ( objType == "text" )
{
var nm = obj.name;
if ( nm.indexOf( "roomNum" ) != -1 )
{
if ( ! isBlank( obj.value ) )
{
if ( ! confirmMessageKey( "ci.RoomNotBlank" ) )
{
bInValidate = false;
return invalid;
}
}
}
}
}
try
{
removeAllSpecialCharsFromAllFormTxtFields( );
//KR : SWDTS00172120 : validate zip code here
postalCodeValidate();
if ( validateEmail(bCanContinueWithErrors) == invalid )
{
return invalid;
}
if ( validateClub(bCanContinueWithErrors) == invalid )
{
return invalid;
}
if ( validateExtendedBlockReason( ) == invalid )
{
return invalid;
}
if(!validateCriticalData(document.theForm._STATE_KEY.value))
{
reloadRes();
return invalid;
}
function validateSpgAmenity()
{
return true;
}
function getAmenityEligibility()
{
var amenityEligible = "";
var chkAmenityCheckBox = null;
try
{
chkAmenityCheckBox = document.getElementById("amenityEligibility
Indicator");
if ( null != chkAmenityCheckBox && typeof(chkAmenityCheckBox) !=
"undefined" )
{
if (chkAmenityCheckBox.checked)
{
amenityEligible = "Y";
}
else
{
amenityEligible = "N";
}
}
}
catch(e)
{
amenityEligible = "";
}
return amenityEligible;
}
function getSnaResClubAcct1()
{
var clubType;
var clubNum = "";
try
{
clubType = document.theForm.clubAcctType1.value;
if ( clubType == "SPG" )
{
clubNum = Trim( document.theForm.clubAcct1.value );
}
}
catch(e)
{
clubNum = "";
}
if( clubNum == null || clubNum === undefined )
{
clubNum = "";
}
return clubNum;
}
function reloadRes()
{
try
{
sendSynchRequestToServer( "POST", getStateKey(), 0, "RESERVATION
", "ROLLBACK_ALL_RES_DATA", "" );
}
catch( e )
{
errorHandler( e, "reloadRes" );
}
}
function validateExtendedBlockReason( )
{
try
{
var resultStr = sendSynchRequestToServer( "POST", document.theFo
rm._STATE_KEY.value, 0, "UpdateExtendedRoomBlock", "VALIDATE_EBR", "" );
var status = getField(resultStr,0,";");
if (status == "error")
{
alertMessageKey("msg.extdBlkReasonMsg");
return false;
}
else
{
return true;
}
}catch( e )
{
errorHandler( e, "validateExtendedBlockReason" );
return false;
}
}
function validateClubNbr(cType,cNbr)
{
var s = new Array();
s.push( 377 );
s.push( "^" );
s.push( cType );
s.push( "^" );
s.push( cNbr );
var resultStr = sendSynchRequestToServer( "POST", document.theForm._STAT
E_KEY.value, 0, "CLUB_NUMBER", "VALIDATE", s.join("") );
var status = getField(resultStr,0,";");
if (status == "false")
{
expandResSection( "RES_GUEST" );
return false;
}
else
{
return true;
}
}
function clubTypeChanged(clubIndex)
{
try
{
var disableFields;
if (clubIndex == 1)
{
disableFields = isNullOrBlank(getSelectedValue(document.
theForm.clubAcctType1));
if (disableFields)
{
initText(document.theForm.clubAcct1, "");
}
document.theForm.clubAcct1.disabled = disableFields;
}
}
catch( e ) { }
}
function validateSPGClubNbr()
{
var clubType = document.theForm.clubAcctType1.value;
if ( clubType == "SPG" )
{
var clubNum = Trim( document.theForm.clubAcct1.value );
if ( clubNum.length > 0 )
{
var s = new Array();
s.push( clubType );
s.push( clubNum );
s.push( "PerftestData" );
var resultStr = sendSynchRequestToServer( "POST", docume
nt.theForm._STATE_KEY.value, 0, "SPG", "spgValidate", s.join("^") );
var status = getField( resultStr, 0, ";" );
var msg = getField( resultStr,1, ";" );
if ( status == "NAMECHANGE" )
{
if ( msg && msg.length > 0 && confirmWebMsg( msg
) )
{
// just let them continue. We need a pr
ofile id for hte handleSPGResults to work properly
// now show the ODS Copy to Local
//
handleSPGResults( "SPG^"
+ clubNum + "^^" );
}
else
{
document.theForm.clubAcctType1.value = "
";
}
}
else if ( status != "ok" )
{
expandResSection( "RES_GUEST" );
if ( msg.length == 0 )
{
msg = "spg.msg.err";
alertMessageKey( msg );
}
else if ( msg.length > 0 )
{
alertMessage( msg );
}
document.theForm.clubAcctType1.value = "";
}
}
}
}
function showExtBlkToolTip(selId)
{
var selEbr;
var desc;
var tooltip = "Extended\x20Block\x3A";
try
{
if(null != selId && selId != "")
{
selEbr = document.getElementById(selId);
if(null != selEbr && selEbr.selectedIndex > 0 )
{
desc = selEbr.options[selEbr.selectedIndex].inne
rHTML;
if(null != desc && desc != "")
{
desc = desc.split("-");
tooltip = tooltip+" "+desc[1];
showTip(tooltip);
}
}
else
{
hideTip();
}
}
}
catch(e){
}
}
function updateShowAllocatedType(theCheck, seqNum )
{
var s = new Array();
s.push( seqNum );
s.push( "^" );
if( theCheck.checked )
{
s.push( "Y" );
}
else
{
s.push( "N" );
}
try
{
var resultStr = sendSynchRequestToServer( "POST", getStateKey(),
0, "UpdateExtendedRoomBlock", "UPDATE_SHOWHIDE_CHECK", s.join("") );
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
resDataChanged();
}
}
catch(e){}
}
function enableDisableExtdBlkReason( bChecked, seqNum )
{
var bSelectId = seqNum+"_extdBlkReason";
try
{
var bSelected = document.getElementById( bSelectId );
if( bSelected != null && !( bSelected === undefined ) )
{
if( bChecked )
{
bSelected.disabled = false;
}
else
{
bSelected.disabled = true;
}
}
}
catch(e)
{
}
return;
}
function doExtdBlkReasonCodeChange( theSelect, seqNum )
{
try
{
if( theSelect != null && !( theSelect === undefined ) )
{
var s = new Array();
s.push( seqNum );
s.push( "^" );
var indx = theSelect.selectedIndex;
if( indx >= 0 )
{
s.push(theSelect.options[indx].value );
}
s.push("^");
var resultStr = sendSynchRequestToServer( "POST", getSta
teKey(), 0, "UpdateExtendedRoomBlock", "SET_EXTENDED_BLOCK_REASON", s.join("") )
;
resDataChanged();
}
}
catch(e)
{
}
}
function disableSpgAmenity( disableVal )
{
var selAmenity = null;
try
{
}
catch( e )
{
alert( "Error in disableSpgAmenity ");
}
return;
}
function isEligibleForAmenity( )
{
var valid = false;
var eligibilityIndicator = null;
var params = new Array();
var primaryRes = null;
var resultStr = null;
var status = null;
try
{
eligibilityIndicator = document.getElementById("amenityE
ligibilityIndicator").checked;
if(eligibilityIndicator)
{
eligibilityIndicator = "Y";
}
else
{
eligibilityIndicator = "N";
}
params.push(eligibilityIndicator);
params.push("^");
resultStr = sendSynchRequestToServer( "POST", document.t
heForm._STATE_KEY.value, 0, "SPG", "amenityEligibility", params.join("") );
status = getField( resultStr, 0, ";" );
resultStr = getField( resultStr, 1, ";" );
primaryRes = getField( resultStr, 1, "^" );
if( "Y" == Trim(status))
{
valid = true;
}
}
catch( e )
{
alert( "Error in isEligibleForAmenity" );
}
return valid;
}
function changeSpgAmenity(theSelect)
{
updateSpgAmenity(theSelect);
}
function updateSpgAmenity( theSelect )
{
try
{
}
catch( e )
{
alert( "Error in updateSpgAmenity");
}
return;
}
function showSpgAmenityDailog( )
{
var amenityLevelData = null;
var amenityLevelCode = null;
var eligibilityIndicator = null;
var fragStr = fsGetFragmentSizeString( "confirmSPGAmenity.jsp" );
var fh = fsGetFragementHeight( fragStr );
var h = fsGetHeight( fragStr );
var myModalDialog = false;
var params = new Array();
var resultStr = null;
var spgAmenityElem = null;
var status = null;
var selIndex = null;;
var url = new Array();
var w = fsGetWidth( fragStr );
try
{
eligibilityIndicator = document.getElementById("amenityEligibili
tyIndicator").checked;
if(eligibilityIndicator)
{
eligibilityIndicator = "Y";
}
else
{
eligibilityIndicator = "N";
}
params.push(eligibilityIndicator);
params.push("^");
resultStr = sendSynchRequestToServer( "POST", document.theForm._
STATE_KEY.value, 0, "SPG", "amenityEligibility", params.join("") );
status = getField( resultStr, 0, ";" );
amenityLevelData = getField( resultStr, 1, ";" );
amenityLevelCode = getField( amenityLevelData, 0, "^" );
if( "Y" == Trim(status))
{
url.push( getLocalContextPath() );
url.push( "/common/StdFragmentDlg.jsp?_STATE_KEY=" );
url.push( getStateKey() );
url.push( "&_WINDOW_TITLE_RSRC_KEY=spg.title.Amenity" );
url.push( "&_DIALOG_LEVEL=" );
url.push( (getLSApplet().getDialogLevel() + 1) );
url.push( "&_DIALOG_ID=confirmSPGAmenity" );
url.push( "&_initialMessage=spg.title.Amenity");
url.push( "&_PARAMS=");
url.push( Trim(amenityLevelCode) );
url.push( "&_FRAGMENT_JSP=../edit/confirmSPGAmenity.jsp" );
url.push( "&_FRAGMENT_HEIGHT=" );
url.push( fh );
url.push( "&_ACTION_OK=onDlgOK()" );
url.push( "&_ACTION_CANCEL=onDlgCancel()" );
url.push( "&_UNLOAD_ACTION=onDlgCancel()");
url.push( "&_TEXT_OK_RSRC_KEY=common.label.yes" );
url.push( "&_TEXT_CANCEL_RSRC_KEY=common.label.no" );
myModalDialog = window.showModalDialog(url.join(""),"","
dialogWidth:" + w + "px; dialogHeight: " + h + "px; scroll: No; center: Yes; hel
p: No; resizable: No; Status:No; unadorned: Yes;");
//Focus if cancelled
spgAmenityElem = document.theForm.spgAmenity;
if(!myModalDialog)
{
if( !( spgAmenityElem == null || spgAmenityElem
=== undefined ) )
{
if( !spgAmenityElem.disabled )
{
spgAmenityElem.focus();
url = new Array();
url.push("FOCUS_AMENITY"
);
url.push("Y");
sendSynchRequestToServer
( "POST", "modRes:8", 0, "WEBPARAM", "SET", url.join("^") );
}
}
}
else
{
spgAmenityElem = document.theForm.spgAmenity;
if(spgAmenityElem != null && myModalDialog != "^
")
{
setSelectedValue(spgAmenityElem, myModal
Dialog);
resDataChanged();
}
myModalDialog = true;
}
}
}
catch(e)
{
alert( "Error Openning showAmenityDailog");
}
return myModalDialog;
}
function focusAmenity()
{
try
{
var spgAmenityElem = document.theForm.spgAmenity;
if( !( spgAmenityElem == null || spgAmenityElem == undefined ) )
{
if( !spgAmenityElem.disabled )
{
spgAmenityElem.focus();
}
}
}
catch(e)
{
}
}
function resDataChanged()
{
try
{
document.theForm.dataChanged.value = true;
}
catch(e)
{
alert( "Error changing dataChanged flag" );
}
}
/************************************************************\
* This javascript function is invoked to check if spg amenity is not selected
\************************************************************/
function showAmenityDailogValidate( )
{
var showdialog = false;
var selAmenity = null;
var selIndex = null;
try
{
if ( false && false && isEligibleForAmenity( ) )
{
selAmenity = document.theForm.spgAmenity;
if( selAmenity == null || selAmenity === undefin
ed)
{
showdialog = false;
}
else
{
selIndex = selAmenity.selectedIndex;
if( selIndex > 0 )
{
showdialog = false;
}
else
{
showdialog = true;
}
}
}
else
{
showdialog = false;
}
}
catch(e)
{
alert( "Error in showAmenityDailogValidate: " );
}
return showdialog;
}
function changeEligibilityIndicator(theSelect)
{
fieldInfoChanged(theSelect);
var amenityIndicatorSel = document.theForm.amenityEligibilityInd
icator;
var amenitySel = document.theForm.spgAmenity;
var params = new Array();
var resultStr = null;
var eligibilityData = null;
var primaryRes = null;
var prevAmenityEligibilty = null;
var amenityLevelCode = null;
var eligibilityIndicator = null;
var valid = true;
var status = null;
if( null != amenityIndicatorSel && amenityIndicatorSel != undefi
ned && amenityIndicatorSel.checked )
{
eligibilityIndicator = "Y";
}
else
{
if(null != amenitySel && amenitySel != undefined && amen
itySel.selectedIndex != 0)
{
if(!confirmMessageKey("msg.amenityRemove", "NO")
)
{
amenityIndicatorSel.checked = true;
return;
}
}
eligibilityIndicator = "N";
}
params.push(eligibilityIndicator);
params.push("^");
resultStr = sendSynchRequestToServer( "POST", document.theForm._
STATE_KEY.value, 0, "SPG", "amenityEligibility", params.join("") );
status = getField( resultStr, 0, ";" );
eligibilityData = getField( resultStr, 1, ";" );
amenityLevelCode = getField(eligibilityData, 0, "^");
primaryRes = getField(eligibilityData, 1, "^");
prevAmenityEligibilty = getField(eligibilityData, 2, "^");
if("Y" == Trim(status) && "Y" != Trim(primaryRes))
{
if("Y" == eligibilityIndicator)
{
valid = confirmMessageKey("confirm.amenityNonPri
mShare");
}
if(!valid)
{
amenityIndicatorSel.checked = false;
}
}
if( valid )
{
if("Y" == Trim(status) && "" != Trim(amenityLevelCode))
{
changeSpgAmenityOptions( amenityLevelCode );
}
else
{
disableSpgAmenity( true );
}
if("Y" != eligibilityIndicator)
{
disableSpgAmenity( true );
}
params = new Array();
params.push(eligibilityIndicator);
params.push("^");
resultStr = sendSynchRequestToServer( "POST", getStateKe
y(), 0, "UpdateExtendedRoomBlock", "UPDATE_AMENITY_ELIGIBILITY", params.join("")
);
}
resDataChanged();
}
function changeSpgAmenityOptions( amenityLevelCode )
{
var eligibilityIndicator = null;
var msg = null;
var params = new Array();
var resultStr = null;
var status = null;
var selIndex = null;
var selAmenity = null;
try
{
selAmenity = document.theForm.spgAmenity;
if ( false && false )
{
if("" != Trim(amenityLevelCode))
{
params = new Array();
params.push(amenityLevelCode);
params.push( 377 );
resultStr = sendSynchRequestToServer( "POST", do
cument.theForm._STATE_KEY.value, 0, "RESERVATION", "SPG_AMENITY", params.join("^
") );
status = getField( resultStr, 0, ";" );
msg = getField( resultStr,1, ";" );
populateAmenityOptions(msg);
}
else
{
selAmenity.options[0].selected = true;
disableSpgAmenity( true );
}
}
}
catch( e )
{
alert( "Error in changeSpgAmenityOptions: " );
}
return;
}
function populateAmenityOptions(msg)
{
var selAmenity = document.theForm.spgAmenity;
var selectedIndex = selAmenity.selectedIndex;
var selVal = selAmenity.options[ selectedIndex ].value;
selAmenity.options.length = 0;
selAmenity.options[0]=new Option("-- Select Amenity --", "", fal
se, false);
var optionArray = msg.split("~");
var i = 0;
var cnt = optionArray.length - 1;
var opt = null;
var elemVal = null;
var optionVal = null;
if(cnt>0)
{
while( i < cnt )
{
opt = optionArray[i].split("^");
elemVal = opt[0]+" - "+opt[1];
optionVal = opt[0];
optionVal = Trim( optionVal );
selVal = Trim( selVal );
if( selVal == optionVal )
{
selAmenity.options[i+1]=new Option( elem
Val, opt[0], false, true );
}
else
{
selAmenity.options[i+1]=new Option( elem
Val, opt[0], false, false );
}
i++;
}
}
disableSpgAmenity( false );
}
{
var countryCode = getSelectedValue( document.theForm.country );
if ( ! countryCode || countryCode.length < 1 )
{
oldCountryCode = countryCode;
var stateCodeObj = document.getElementById( "stateCode"
);
clearOptionListByObject( stateCodeObj );
stateCodeObj.options.length = 0;
addOption( stateCodeObj, "--- Select a Country to view S
tate/Province ---", "", false );
return;
}
if ( oldCountryCode == countryCode )
{
return;
}
oldCountryCode = countryCode;
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"Address", "getStateCodes", countryCode );
var reqStateDiv = document.getElementById( "stateDiv" );
if ( reqStateDiv )
reqStateDiv.innerHTML = "State/Pro<U>v</U>ince";
var status = getField( resultStr, 0, ";" );
var stateCodeObj = document.getElementById( "stateCode" );
if ( status == "ok" )
{
var newData = getField( resultStr, 1, "~" );
var theLen = getField( newData, 0, "^" );
clearOptionListByObject( stateCodeObj );
stateCodeObj.options.length = 1;
//
);
var itemCode = getField( itemRec, 0, ";"
);
var itemTxt = getField( itemRec, 1, ";"
);
addOption( stateCodeObj, itemTxt, itemCo
de, false );
}
sortSelect( stateCodeObj );
}
else
{
addOption( stateCodeObj, "--- No State/Province
---", "", false );
}
}
else
{
addOption( stateCodeObj, "--- Select a Country to view S
tate/Province ---", "", false );
}
}
catch( e ) {}
}
function postalCodeChanged()
{
try
{
//KR : SWDTS00183465 : Oct 02 2009
var postalCode = Trim(document.theForm.postalCode.value);
var countryCode = Trim(document.theForm.country.value);
var s = new Array();
s.push( postalCode );
s.push( Trim( document.theForm.country.value ) );
//if ( s.join("").length >= 4)
if (postalCode.length > 0) // && countryCode.length > 0) // Coun
try code length check commented for SWDTS00226795
{
sendRequestToServer( "postalCodeResponse", "POST", "modR
es:8", 0, "Address", "getPostalCode", s.join("^") );
}
}
catch( e ) {}
}
var bAddAddress = false;
function postalCodeResponse( response )
{
try
{
bAddAddress = false;
var status = new String(getField(response, 0, ";"));
status = status.toUpperCase();
var numReturned = getField( response, 1, ";" );
var zip = getField( response, 2, ";" );
if ( numReturned == 1 )
{
var addrRec = getField( response, 1, "~" );
if ( status == "OK")
{
setPostalData( addrRec );
}
}
else if ( numReturned > 1 )
{
showPostalCodeList( response );
}
}
catch( e )
{
}
}
//KR : SWDTS00172120 : July 09 2009
function postalCodeValidate()
{
try
{
//KR : SWDTS00183465 : Oct 02 2009
var postalCode = Trim(document.theForm.postalCode.value);
var countryCode = Trim(document.theForm.country.value);
var s = new Array();
s.push( postalCode );
s.push( countryCode );
if (postalCode.length > 0 && countryCode.length > 0)
{
var response = sendSynchRequestToServer( "POST", "modRes
:8", 0, "Address", "getPostalCode", s.join("^") );
postalCodeValidateResponse( response );
}
}
catch( e ) {}
}
//KR : SWDTS00172120 : July 09 2009
function postalCodeValidateResponse(response)
{
try
{
bAddAddress = false;
var status = new String(getField(response, 0, ";"));
status = status.toUpperCase();
var numReturned = getField( response, 1, ";" );
var zip = getField( response, 2, ";" );
if ( numReturned == 1 )
{
// do nothing
}
else if ( numReturned > 1 )
{
// do nothing
}
else
{
var zip = document.theForm.postalCode.value;
{
bAddAddress = true;
addAddress();
setTimeout("document.theForm.city.focus()", 500)
;
//
//
}
else
{
//
//
clearPostalInfo();
}
}
}
catch( e )
{
}
}
function addAddress()
{
try
{
var zipCode
var parms =
parms.push(
parms.push(
parms.push(
parms.push(
parms.push(
parms.push(
= "" + document.theForm.postalCode.value;
new Array();
document.theForm.postalCode.value );
document.theForm.city.value );
getSelectedValue( document.theForm.country) );
getSelectedText( document.theForm.country) );
getSelectedValue( document.theForm.stateCode ) );
getSelectedText( document.theForm.stateCode ) );
if ( parms.length > 1)
{
var responseMsg = sendSynchRequestToServer( "POST", docu
ment.theForm._STATE_KEY.value, 0, "Address", "addPostalCode", parms.join("^" ) )
;
var status = new String(getField(responseMsg, 0, ";"));
status = status.toUpperCase();
if ( status == "OK")
{
}
else
{
var msg = zipCode + " was not successfully added
.";
msg += "<BR><BR>" + getField( responseMsg, 1, ";
" );
alertDialog( "\x2Flightspeed\x2Fen_US", "modRes:
8", msg );
}
}
}
catch( e )
{
alert( "add address error: " + e.message );
}
}
function clearPostalInfo()
{
try
{
document.theForm.postalCode.value = "";
document.theForm.city.value = "";
setSelectedValue( document.theForm.country, "");
setStateProv();
bAddAddress = false;
setTimeout("setPostalCodeFocus()", 500);
}
catch( e )
{
}
}
function setPostalCodeFocus()
{
try
{
document.theForm.postalCode.focus();
}
catch( e )
{
}
}
function setPostalData( addrRec )
{
try
{
if ( addrRec && addrRec.length > 0 )
{
var cityName = getField(addrRec, 0, ";");
var stateCode = getField(addrRec, 1, ";");
var countryCode = getField(addrRec, 2, ";");
document.theForm.city.value = cityName;
setSelectedValue( document.theForm.country, countryCode)
;
setStateProv();
oldCountryCode = countryCode;
if (stateCode != null || stateCode != "")
{
setSelectedValue( document.theForm.stateCode, st
ateCode );
}
else
{
setSelectedValue( document.theForm.stateCode, ""
);
}
}
else
{
clearPostalInfo();
}
}
catch( e )
{
}
}
function showPostalCodeList( responseData )
{
try
{
var fragStr = fsGetFragmentSizeString( "postalCodeList" );
var
var
var
var
var
sizable=1,width=" +
var
ATE_KEY=modRes:8";
url
url
url
url
de.value;
url
w = fsGetWidth( fragStr );
h = fsGetHeight( fragStr );
fh = fsGetFragementHeight( fragStr );
windowName = "PostalCode";
windowStyle = "scrollbars=0,location=0,status=1,menubar=0,re
w + ",height=" + h;
url = "\x2Flightspeed\x2Fen_US/common/StdFragmentDlg.jsp?_ST
+=
+=
+=
+=
+= "&_RESPONSE_DATA=" + responseData;
if (window.showModalDialog)
{
var dataRec = window.showModalDialog( encodeURI(url),"",
"dialogWidth:" + w + "px; dialogHeight: " + h + "px; center: Yes; help: No; res
izable: No; Status:No; unadorned: Yes;");
setPostalData(dataRec);
}
else
{
windowStyle += ",modal=yes";
url += "&_OPENER_DISABLE=true";
url += "&_RESULT_CALLBACK=setPostalData";
var myModalDialog = window.open(encodeURI(url), windowNa
me, windowStyle);
centerWindow( myModalDialog, w, h );
myModalDialog.focus();
}
}
catch( e ) {}
}
//SWDTS00239469-Email addr added in the Guest info screen should add the email t
o the email folio towards the bottom of the screen
function emailChanged(obj)
{
try
{
//Get-R Done CQ_257659 Starts
var reasonVal = document.theForm.noEmailReason;
reasonVal.selectedIndex = 0;
//Get-R Done CQ_257659 Ends
document.theForm.efolioEmailAddr.value = obj.value;
}
catch(e)
{
}
}
function emailCodeChanged()
{
try
{
if ( ! isNullOrBlank( getSelectedValue(document.theForm.noEmailR
eason) ))
{
document.theForm.email.value = "";
}
}
catch( e ) { alert( "emailCodeChanged error: " + e ); }
}
function doCapitalize( obj )
{
try
{
fieldInfoChanged(obj);
}
catch( e ) {}
}
}
}
var bInValidate = false;
function roomNumberKeyHandlerNotCI( roomNmId, seqNum, origAccomCode )
{
var bConsumed = false;
if ( !event && document.all ) event = window.event;
var key = (event.keyCode) ? event.keyCode : event.charCode;
bConsumed = true;
if ( bInValidate )
{
return;
}
var roomNumObj = document.getElementById( roomNmId );
if ( roomNumObj )
{
var roomNum = roomNumObj.value;
roomNum = Trim( roomNum );
if ( roomNum.length > 0 )
{
getRoomNumberNotCI(roomNumObj, seqNum, origAccomCode );
}
}
if (bConsumed)
{
event.cancelBubble = true;
event.returnValue = false;
}
return bConsumed;
}
}
function overrideRateNotCI(exText, codes)
{
try
{
var height = 400;
var url = new Array();
url.push("\x2Flightspeed\x2Fen_US/common/StdFragmentDlg.jsp?_STA
TE_KEY=modRes:8");
url.push("&_DIALOG_ID=OverrideRate");
url.push("&_DIALOG_LEVEL=0");
url.push("&_FRAGMENT_JSP=../edit/rateOverride.jsp");
url.push("&_FRAGMENT_HEIGHT=100%");
url.push("&_NO_BUTTONS=true");
url.push("&_WINDOW_TITLE_RSRC_KEY=title.overrideRate");
url.push("&overrideCodes=");
url.push(codes);
url.push("&parentHasOverrideText=true");
document.theForm._tempOverrideText.value=escape(exText);
if (useModalDialogs)
{
var result = window.showModalDialog( encodeURI( url.join
("") ), this, "dialogHeight: " + height + "px; dialogWidth: 650px; dialogTop: px
; dialogLeft: px; center: Yes; help: No; resizable: Yes; Status:No; unadorned:
Yes;");
document.theForm._tempOverrideText.value = "";
if (result == undefined || result == "CANCEL")
{
return false;
}
}
else
{
window.open(launchString, "OverrideRate", "scrollbars=0,
location=0,status=1,menubar=0,resizable=1,width=650,height=" + height);
}
return true;
}
catch (e)
{
errorHandler(e, "AdvRoomSelection.jsp::overrideRate");
return false;
}
}
var tempRoom = "";
var tempSeq = "";
function updateSelectedRoomNotCI( roomNum, seq, accomCode, bAutoAdjRate, bMergeS
hare, checkInValue, fdStat, hkStat, inspStat )
{
tempRoom = roomNum;
tempSeq = seq;
var bCheckIn = false;
function getHomeStateKey()
{
return "HOME:2";
}
function getLocalContextPath()
{
return "\x2Flightspeed\x2Fen_US";
}
//-->
</script>
<!-- CQ182894 - Launch Guest Profile - Start - Added ghid -->
<script type="text/javascript">
var addMenu = new PopupMenu('add');addMenu.addMenuItem('advDeposit', " &nbs
p;Advance Deposit", "javascript:editAdvDeposit()", 'D',false);addMenu.addMenuIte
m('bank', " Bank Authorization List", "javascript:editBankAuth()", 'Q
',false);addMenu.addMenuItem('billing', " Billing Patterns", "javascr
ipt:viewBillingPattern()", 'B',false);addMenu.addMenuItem('cft', " CF
T", "javascript:addResItem('RES_CFT')", 'T',false);addMenu.addMenuItem('Checks',
" Checks", "javascript:showCheckWindow()", '1',false);addMenu.addMen
uItem('comment', " Comment (Internal)", "javascript:addEditComment('R
ES_COMMENT')", 'C',false);addMenu.addMenuItem('group', " Group", "jav
ascript:addResItem('RES_GROUP')", 'G',false);addMenu.addMenuItem('location', "&n
bsp; Guest Location", "javascript:doLocation('42813','PerftestData')", 'L',
false);addMenu.addMenuItem('message', " Guest Message", "javascript:d
oGuestMessage('42813','PerftestData','','false','true')", 'M',false);addMenu.add
MenuItem('wakeup', " Guest Wake-up", "javascript:doWakeUp('42813','Pe
rftestData')", 'W',true);addMenu.addMenuItem('gsurvey', " Guest Surve
y", "javascript:addResItem('RES_GSURVEY')", 'U',false);addMenu.addMenuItem('iden
tity', " Identity", "javascript:doEditGuestProfile('Identity')", 'I',
false);addMenu.addMenuItem('immigration', " Immigration", "javascript
:doEditGuestProfile('Immigration')", '2',false);addMenu.addMenuItem('luggage', "
Luggage Tags", "javascript:editLuggageTags()", '8',true);addMenu.add
MenuItem('bundle', " Non-Room Inventory Bundle", "javascript:doAddBun
dle()", 'Y',false);addMenu.addMenuItem('promotion', " Promotions", "j
avascript:showPromotions()", 'P',false);addMenu.addMenuItem('remark', " &nb
sp;Remark (External)", "javascript:addResItem('RES_REMARK')", 'K',false);addMenu
.addMenuItem('room', " Room", "javascript:addResItem('RES_ROOM')", 'R
',false);addMenu.addMenuItem('roommate', " RoomMate", "javascript:add
RoomMate('42813','PerftestData')", 'o',false);addMenu.addMenuItem('secAddr', "&n
bsp; Secondary Address", "javascript:doEditGuestProfile('SecondaryAddress')
", 'N',false);addMenu.addMenuItem('ssr', " Special Service", "javascr
ipt:addSpecialService('RES_SSR')", 'S',false);addMenu.addMenuItem('addTask', "&n
bsp; Task", "javascript:doAddTask()", '3',false);addMenu.addMenuItem('agent
', " Travel Agency", "javascript:addResItem('RES_TRAVELAGENT')", 'E',
false);addMenu.addMenuItem('travelWith', " Travelwith", "javascript:a
ddTravelwith()", 'H',false);addMenu.addMenuItem('bankAuth', " Voice A
uthorization", "javascript:doVoiceAuthCredit()", 'z',false);addMenu.addMenuItem(
'visa', " Visa", "javascript:doEditGuestProfile('Visa')", 'V',false);
addMenu.addMenuItem('wholesaler', " Wholesaler", "javascript:addResIt
em('RES_WHOLESALE')", '9',false);
var actionMenu = new PopupMenu('action');actionMenu.addMenuItem('Check In', "&nb
sp; Check-In <B>PerftestData (42813)</B>", "javascript:createCheckInWizard(
'42813',false,true)", 'I', false);actionMenu.addMenuSeperator();actionMenu.addMe
nuItem('newTwRes', " Create Travelwith Reservation", "javascript:newT
ravelwithWizard(false)", 'H', false);actionMenu.addMenuSeperator();actionMenu.ad
dMenuItem('transferStays', " Transfer Stay <B>PerftestData (42813)</B
>", "javascript:showTransferLookup('50517598;42813;MODIFY_RESERVATION;')", 'T');
actionMenu.addMenuSeperator();actionMenu.addMenuItem('copySameDates', " &nb
sp;Copy Same Dates Different Guest", "javascript:copySameDatesDiffGuest(false, f
="setGuestCountry();setStateProv();" onkeydown="autoCompleteSelect(event);if(do
cument.all){setStateProv();}" ><option value="" selected>--- Country ---</option
><option value="AUTC" title="AUSTRALIAN TRAVELERS CHECKS">AUSTRALIAN TRAVELERS
CHECKS</option><option value="AF" title="Afghanistan">Afghanistan</option><opti
on value="AL" title="Albania">Albania</option><option value="DZ" title="Algeri
a">Algeria</option><option value="AD" title="Andorra">Andorra</option><option v
alue="AO" title="Angola">Angola</option><option value="AI" title="Anguilla">An
guilla</option><option value="AQ" title="Antarctica">Antarctica</option><option
value="AG" title="Antigua & Barbuda">Antigua & Barbuda</option><option value="
AR" title="Argentina">Argentina</option><option value="AM" title="Armenia">Arm
enia</option><option value="AW" title="Aruba">Aruba</option><option value="AU"
title="Australia">Australia</option><option value="AT" title="Austria">Austria
</option><option value="AZ" title="Azerbaijan">Azerbaijan</option><option value
="BS" title="Bahamas">Bahamas</option><option value="BH" title="Bahrain">Bahra
in</option><option value="BD" title="Bangladesh">Bangladesh</option><option val
ue="BB" title="Barbados">Barbados</option><option value="BY" title="Belarus">B
elarus</option><option value="BE" title="Belgium">Belgium</option><option value
="BZ" title="Belize">Belize</option><option value="BJ" title="Benin">Benin</op
tion><option value="BM" title="Bermuda">Bermuda</option><option value="BT" tit
le="Bhutan">Bhutan</option><option value="BO" title="Bolivia">Bolivia</option><
option value="BA" title="Bosnia Herzegovina">Bosnia Herzegovina</option><option
value="BW" title="Botswana">Botswana</option><option value="BR" title="Brazil
">Brazil</option><option value="VG" title="British Virgin Islands">British Virg
in Islands</option><option value="BN" title="Brunei">Brunei</option><option val
ue="BG" title="Bulgaria">Bulgaria</option><option value="BF" title="Burkina Fa
so">Burkina Faso</option><option value="BI" title="Burundi">Burundi</option><op
tion value="CATC" title="CANADIAN TRAVELERS CHECKS">CANADIAN TRAVELERS CHECKS</
option><option value="KH" title="Cambodia">Cambodia</option><option value="CM"
title="Cameroon">Cameroon</option><option value="CA" title="Canada">Canada</op
tion><option value="CV" title="Cape Verde">Cape Verde</option><option value="KY
" title="Cayman Islands">Cayman Islands</option><option value="CF" title="Cent
ral African Republic">Central African Republic</option><option value="TD" title
="Chad">Chad</option><option value="CL" title="Chile">Chile</option><option val
ue="CN" title="China">China</option><option value="CX" title="Christmas Island
s">Christmas Islands</option><option value="CC" title="Cocos/Keeling Islands">C
ocos/Keeling Islands</option><option value="CO" title="Colombia">Colombia</opti
on><option value="KM" title="Comoros">Comoros</option><option value="CG" title
="Congo">Congo</option><option value="CK" title="Cook Islands">Cook Islands</op
tion><option value="CR" title="Costa Rica">Costa Rica</option><option value="CI
" title="Cote D Ivoire">Cote D Ivoire</option><option value="HR" title="Croati
a">Croatia</option><option value="CU" title="Cuba">Cuba</option><option value="
CY" title="Cyprus">Cyprus</option><option value="CS" title="Czech Republic">Cz
ech Republic</option><option value="YD" title="Democratic Yemen">Democratic Yem
en</option><option value="DK" title="Denmark">Denmark</option><option value="DJ
" title="Djibouti">Djibouti</option><option value="DM" title="Dominica">Domini
ca</option><option value="DO" title="Dominican Republic">Dominican Republic</op
tion><option value="EC" title="Ecuador">Ecuador</option><option value="EG" tit
le="Egypt">Egypt</option><option value="SV" title="El Salvador">El Salvador</op
tion><option value="GQ" title="Equartorial Guinea">Equartorial Guinea</option><
option value="EE" title="Estonia">Estonia</option><option value="ET" title="Et
hiopia">Ethiopia</option><option value="EU" title="European Monetary Union">Eur
opean Monetary Union</option><option value="FK" title="Falkland Islands/Malvina
s">Falkland Islands/Malvinas</option><option value="FO" title="Faroe Islands">F
aroe Islands</option><option value="FJ" title="Fiji">Fiji</option><option value
="FI" title="Finland">Finland</option><option value="FR" title="France">France
</option><option value="GF" title="French Guiana">French Guiana</option><option
value="PF" title="French Polynesia">French Polynesia</option><option value="GA
" title="Gabon">Gabon</option><option value="GM" title="Gambia">Gambia</option
><option value="XA" title="Gaza">Gaza</option><option value="GE" title="Georgi
a, Republic Of Georgia">Georgia, Republic Of Georgia</option><option value="DE"
2</TD>
<TD valign="top" class="resCol4" nowrap><select style="width:176" id="marketStat
2" disabled name="marketStat2" size="1" onChange="fieldInfoChanged(this)" onkey
down="autoCompleteSelect(event)"><OPTION value='' selected>-- Select Marketing S
tat2 --</OPTION><OPTION value='CAIR'>CAIR - CATERING AIRLINE</OPTION><OPTION val
ue='CBIN'>CBIN - BANQUETS IN HOUSE</OPTION><OPTION value='COUT'>COUT - CATERING
OUTSIDE</OPTION><OPTION value='DAYU'>DAYU - DAY USE</OPTION><OPTION value='GAIN'
>GAIN - Internationl (Group Assoc.)</OPTION><OPTION value='GANA'>GANA - National
(Group Association)</OPTION><OPTION value='GCBM'>GCBM - Business Meeting (Group
Corp)</OPTION><OPTION value='GCGO'>GCGO - Government (Group Corporate)</OPTION>
<OPTION value='GCIC'>GCIC - Incentive (Group Corp)</OPTION><OPTION value='GLOT'>
GLOT - Other (Group Leisure)</OPTION><OPTION value='GLTS'>GLTS - Tour Series (Gr
oup Tour)</OPTION><OPTION value='GLTT'>GLTT - One Time Tour ( Group Leisure)</OP
TION><OPTION value='GSMF'>GSMF - Other/SMERF (Group Leisure)</OPTION><OPTION val
ue='OTCO'>OTCO - Complimentary (Other)</OPTION><OPTION value='OTCR'>OTCR - Crew
(Other)</OPTION><OPTION value='OTPE'>OTPE - Permanent (Other)</OPTION><OPTION va
lue='OTTO'>OTTO - Contract Tradeout (Other)</OPTION><OPTION value='TCCV'>TCCV Contracted Volume (Tran Corp)</OPTION><OPTION value='TCNC'>TCNC - Non Contracted
(Tran Corp)</OPTION><OPTION value='TCVL'>TCVL - Corp. Volume LRA (Tran Corp)</O
PTION><OPTION value='TCVN'>TCVN - Corp Volume NLRA ( Tran Corp)</OPTION><OPTION
value='TGOV'>TGOV - Government (Transient)</OPTION><OPTION value='TLCW'>TLCW - W
holesaler/FIT (Tran Leisure)</OPTION><OPTION value='TLDI'>TLDI - Discounts (Tran
Leisure)</OPTION><OPTION value='TLPA'>TLPA - Packages (Tran Leisure)</OPTION><O
PTION value='TOPA'>TOPA - TRANS OPAQUE</OPTION><OPTION value='TRES'>TRES - Restr
icted (Trans Restricted</OPTION><OPTION value='TSPG'>TSPG - SPG Awards (Tran Lei
sure)</OPTION><OPTION value='TSRD'>TSRD - Restricted SW</OPTION></select></TD>
<TD valign="top" class="resCol5" nowrap> </TD>
<TD valign="top" class="resCol6" nowrap> </TD>
<TD valign="top" class="resCol7" nowrap> </TD>
<TD valign="top" class="resCol8" nowrap> </TD>
</TR>
</TBODY></TABLE>
</DIV>
<TABLE cellspacing="2" cellpadding="0" border="0" class="resSectionLine" width="
100%"><TBODY><TR><TD class="resSectionCol0"><A href="#" onkeypress="hrefHandleKe
yDown(expandContractViaKey('RES_HKPACKAGES-31-0Section',true))" onclick="expandC
ontract('RES_HKPACKAGES-31-0Section',true)"><DIV id="RES_HKPACKAGES-31-0SectionI
mage"><IMG border='0' src='/lightspeed/en_US/images/minus.gif' width='16' height
='16'></DIV></A></TD><TD nowrap class="resSectionCol1"><A href="#" onmouseover="
showTip('Edit Housekeeping Packages')" onmouseout="hideTip()" onkeypress="hrefHa
ndleKeyDown(hkDoDisplayPackagesForEdit('3'))" onclick="hkDoDisplayPackagesForEd
it('3')" class="smResLinkSectionBtn"><IMG border='0' src='/lightspeed/en_US/im
ages/smallIcons/edit.gif' width='11' height='11'></A> <A class="resSe
ctionLabel" href="#" id="RES_HKPACKAGES-31-0"onkeypress="hrefHandleKeyDown(expan
dContractViaKey('RES_HKPACKAGES-31-0Section',true))" onclick="expandContract('RE
S_HKPACKAGES-31-0Section',true)"><input type="hidden" id="_RES_HKPACKAGES-31-0Fo
cus" value=""/>Housekeeping Packages Information</A></TD><TD class="resSectionCo
l2"> </TD></TR></TBODY></TABLE>
<!--RES_HKPACKAGES--><DIV id="RES_HKPACKAGES-31-0Section" style="display:block">
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" onkeydown="worksp
aceKeyHandler(window.event)">
<TBODY>
<TR class="resContentLine">
<script type="text/javascript">function hkDoDisplayPackagesForEdit(resLength_) {
hkDoDisplayPackages(0, 'CREATE', resLength_); }</script>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap> </TD>
<SCRIPT type="text/javascript">
//Added For Double Bytes.This method toggles the display of the combo box on
//check/unchecking the department code checkbox
function toggleDepComboDisplay()
{
try
{
if(!document.getElementById("useAltDep").checked)
{
document.getElementById("useAltDep").value = false;
document.getElementById("altLang").style.display = 'none
';
}
else
{
document.getElementById("useAltDep").value = true;
document.getElementById("altLang").style.display = 'inli
ne';
document.getElementById("altLang").disabled = false;
}
if(document.getElementById("useAltNameAddr").checked)
{
document.getElementById("useAltNameAddr").value = true;
}
else
{
document.getElementById("useAltNameAddr").value = false;
}
}
catch(e)
{
errorHandler(e, "efolio.jsp - toggleDepComboDisplay():");
}
}
function efolioInit()
{
try
{
if ( "Y" == "N" )
{
document.theForm.optIn.checked = true;
document.theForm.efolioEmailAddr.disabled = false;
}
else
{
document.theForm.optIn.checked = false;
document.theForm.efolioEmailAddr.disabled = true;
}
}
catch( e )
{
errorHandler(e, "efolio.jsp::efolioInit");
}
}
function efolioValidate( continueOnError )
{
try
{
if ( document.theForm.optIn.checked == true )
{
var emailAddr = Trim( document.theForm.efolioEmailAddr.v
alue );
var isGood = isValidEmail( emailAddr )
if ( isGood == false )
{
if ( emailAddr.length == 0 )
{
alertMessageKey( "msg.missingEmail" );
}
else
{
alertMessage( "Please enter a valid emai
l address." );
}
document.theForm.efolioEmailAddr.focus();
return invalid;
}
}
}
catch( e )
{
errorHandler(e, "efolio.jsp::efolioValidate");
return invalid;
}
return valid;
}
// Handle opt in changes
function optInChanged()
{
if ( document.theForm.optIn.checked )
{
document.theForm.efolioOptIn.value = "Y";
document.theForm.efolioEmailAddr.disabled = false;
if(document.theForm.useAltNameAddr)
{
document.theForm.useAltNameAddr.disabled = false;
}
if(document.theForm.useAltDep)
{
document.theForm.useAltDep.disabled = false;
}
if(document.theForm.altLang)
{
document.theForm.altLang.disabled = false;
}
}
else
{
document.theForm.efolioOptIn.value = "N";
document.theForm.efolioEmailAddr.disabled = true;
if(document.theForm.useAltNameAddr)
{
document.theForm.useAltNameAddr.disabled = true;
}
if(document.theForm.useAltDep)
{
document.theForm.useAltDep.disabled = true;
}
if(document.theForm.altLang)
{
document.theForm.altLang.disabled = true;
}
}
}
// Enable or disable Opt In checkbox
function disableOptIn( disable )
{
document.theForm.optIn.disabled = disable;
}
registerFragment( "efolio", true, true, false );
</SCRIPT>
<STYLE type="text/css">
.eFolioBox {
background-color: white;
border-color: NAVY;
border-style: solid;
border-width: 2px;
padding-right: 2px;
}
</STYLE>
<INPUT NAME="efolioOptIn" TYPE="HIDDEN" VALUE="N">
<input type="hidden" name="focusSection" id="eFolioFocus"/>
<input type="hidden" id="_eFolioFocusFocus"/>
<TABLE width="100%" class="eFolioBox" cellspacing="0" cellpadding="0">
<TBODY><TR>
<TD align="left" nowrap><TABLE class="defaultEditor" border="0" cellspac
ing="2" cellpadding="2" style="background-color:white; padding-right:2px;"><TBOD
Y><TR>
<TD width="15"> </TD>
<TD align="right"><INPUT type="checkbox" id="optIn" name="optIn"
value="" onclick="javascript:optInChanged();setDataChanged(true);"><LABEL class
="msgData" for="optIn" style="padding-left:2px">Email Folio to</LABEL></TD>
<TD align="left" class="msgLabel"><INPUT class="InputStyle" type
="text" id="efolioEmailAddr" name="efolioEmailAddr" value="Has Not Bee
n Asked For Email" size="32" onchange="setDataChanged(true);" onf
ocus="javascript:this.select()"></td>
</TR>
</TBODY></TABLE></TD>
</TR></TBODY>
</TABLE>
</td>
</tr>
<tr>
<td>
<style type="text/css">
.settlement {
background-color: #EFEFEF;
color: navy;
font: bold 12px "Trebuchet MS", Verdana, Arial, sans-serif;
}
</style>
guestLastName = "PerftestData";
guestFirstName = "";
readonlyRes = false;
resStatus = "MOD";
resStatusCO = "CO";
bIsResMode = true;
if ( "NGTD" != "" )
{
initSelectById( "guaranteeStatus", "NGTD" );
}
document.theForm.postingStatusCheck.checked = true;
document.theForm.keepInGp.checked = false;
// Enable View Full CC # only when the agent permission, CC # and exp da
te is available.
// Exp date is not available in case of CO guest and the CC is purged.
var viewCCBtn = document.getElementById( "_viewFullCC" );
if ( viewCCBtn ) viewCCBtn.disabled = true;
var copyIcon = document.getElementById( "copy" );
if ( copyIcon ) copyIcon.disabled = true;
var searchGpBtn = document.getElementById( "search" );
if ( searchGpBtn ) searchGpBtn.disabled = true;
/*Code changes for CQ SWDTS00256872 - ends */
if (readonlyRes)
{
if ( true == false )
{
var btn = document.getElementById("_searchBtn");
if (btn) btn.disabled = false;
btn = document.getElementById("_resetArBtn");
if (btn) btn.disabled = false;
}
var viewFull = document.getElementById( "_viewF
ullCC" );
var copyIcon = document.getElementById( "copy" )
;
var pasteIcon = document.getElementById( "paste"
);
var searchGP = document.getElementById( "search"
);
if(viewFull)
{
viewCCBtn.disabled = true;
document.getElementById("viewCcImg").src
='/lightspeed/en_US/images/creditCards16x24disabled.png';
}
if(copyIcon)
{
copyIcon.disabled = true;
document.getElementById("copyImg
").src='/lightspeed/en_US/images/copyDisabled.png';
}
if(pasteIcon)
{
pasteIcon.style.display = 'none';
}
if(searchGP)
{
searchGP.disabled = true;
}
}
if ( ( "" == getCCValue() ) &&
( "CA" == document.theForm.paymentMethod.value ) &&
( "PerftestData," == document.theForm.creditCardHolderName.va
lue ) &&
( cnpNumber.length > 1 ) &&
( "" == document.theForm.ccExpDate.value ) )
{
cnpAlreadyEntered = true;
}
bHasInited = true;
}
catch( e )
{
errorHandler( e, "payInit()" );
}
try
{
document.theForm._creditLimit.value = "";
return dispErrorMsg2( "Credit limit cannot be negative."
, document.theForm._creditLimit, false );
}
}
else
{
return;
}
}
function updateSettlementInfo()
{
try
{
var params = new Array();
if ( document.theForm.aracct )
{
params.push( "aracct^" );
params.push( document.theForm.aracct.value );
params.push( "^~" );
}
if ( document.theForm.paymentMethod )
{
params.push( "paymentMethod^" );
params.push( getSelectedValue( document.theForm.paymentM
ethod ) );
params.push( "^~" );
}
if(document.getElementById("creditCardNumber"))
{
var cardNum = getCCValue();
params.push( "creditCardNumber^" );
if (cardNum.length == 8 && cardNum.indexOf( "XXXX" ) > 1)
{
params.push( cardNum );
params.push( "^~" );
}
else if (cardNum.length > 9 && cardNum.indexOf( "XXXX" )
== -1)
{
params.push( cardNum );
params.push( "^~" );
}
else
{
params.push( "^~" );
}
if (cardNum.length > 9 && cardNum.indexOf( "XXXX" ) == 1)
{
params.push( "origCreditCardNumber^" );
params.push( cardNum );
params.push("^~");
}
}
if ( document.theForm.creditCardHolderName )
{
params.push( "creditCardHolderName^" );
var cardName = document.theForm.creditCardHolderName.val
ue;
params.push( cardName );
params.push( "^~" );
}
if ( document.theForm.guaranteeStatus )
{
params.push( "guaranteeStatus^" );
params.push( getSelectedValue( document.theForm.guarante
eStatus ) );
params.push( "^~" );
}
if ( document.theForm.creditlimit )
{
params.push( "creditlimit^" );
params.push( document.theForm.creditlimit.value );
params.push( "^~" );
}
if ( document.theForm.creditCardExpYear )
{
params.push( "creditCardExpYear^" );
params.push( document.theForm.creditCardExpYear.value );
params.push( "^~" );
}
if ( document.theForm.creditCardExpMonth )
{
params.push( "creditCardExpMonth^" );
params.push( document.theForm.creditCardExpMonth.value );
params.push( "^~" );
}
if ( document.theForm.roomPosting )
{
params.push( "roomPosting^" );
params.push( getSelectedValue( document.theForm.roomPost
ing ) );
params.push( "^~" );
}
if ( document.theForm.postingStatus )
{
params.push( "postingStatus^" );
params.push( getSelectedValue( document.theForm.postingS
tatus ) );
params.push( "^~" );
}
if ( document.theForm.voucher )
{
params.push( "voucher^" );
params.push( document.theForm.voucher.value );
params.push( "^~" );
}
if ( document.theForm.ccSwipeStream )
{
params.push( "ccSwipeStream^" );
params.push( encodeURIComponent(document.theForm.ccSwipe
Stream.value) );
params.push( "^~" );
}
//start CQ205185 Enhancment
if(isGpEnable)
{
if ( document.theForm.keepInGp )
{
params.push( "keepInGp^" );
params.push( getSelectedValue( document.theForm.
keepInGp ) );
params.push( "^~" );
}
}
//end CQ205185 Enhancment
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"WEBPARAM", "SET", params.join("") );
}
catch( e ) {}
}
function getCCNumber()
{
return origCCNumber;
}
function payValidate(bCanContinueWithErrors)
{
var validateFields = "true";
if (readonlyRes == true)
return valid;
removeAllSpecialCharsFromAllFormTxtFields();
var valType = getSelectedValueById("paymentMethod");
if ( validateFields == "true" && isNullOrBlank( valType ) )
{
return dispErrorMsg2( "Select the method of payment.", document.
theForm.paymentMethod );
}
if ( validateFields == "true" && isCreditCard(document.theForm.paymentMe
thod, settlementArray) )
{
var valName = document.theForm.creditCardHolderName.value = Trim
( document.theForm.creditCardHolderName.value );
setCCValue( Trim( getCCValue()) );
var valNumber = getCCValue();
if ( isNullOrBlank( valNumber ) )
{
setCCFocus();
return dispErrorMsg2( "Enter a valid card number.", docu
ment.getElementById("creditCardNumber"), bCanContinueWithErrors );
}
if( valNumber.length <= 9 && valNumber.indexOf( "XXXX" ) == -1 )
{
setCCFocus();
return dispErrorMsg2("Enter a credit card number of at l
east 10 digits", document.getElementById("creditCardNumber"), bCanContinueWithEr
rors);
}
if ( isNullOrBlank( valName ) )
{
return dispErrorMsg2( "Card Holder Name can not be blank
.\nEnter a valid card holder name.", document.theForm.creditCardHolderName, bCan
ContinueWithErrors );
}
var ccNum = getCCValue();
var checkCCValid = shouldCheckDigits( document.theForm.paymentMe
thod, settlementArray );
var paymentType = getSelectedValueById( "paymentMethod" );
var isValid = validateCC(ccNum, origCCNumber, "XXXX", "377", che
ckCCValid, paymentType);
if(isValid!= null && isValid == -1)
{
setCCFocus();
return invalid;
}
else if(isValid!= null && isValid == -2)
{
setCCFocus();
return dispErrorMsg2( "Masked credit card number has cha
nged and is invalid. Enter a valid credit card number and expiration date.", do
cument.getElementById("creditCardNumber"), false );
}
if ( ccNum.length > 9 && ccNum.indexOf( "XXXX" ) == -1 && checkC
CValid)
{
var ccType = ccNumberToCardType(ccNum);
if (ccType == null || ccType == "")
{
return dispErrorMsg2( "Credit card number is inv
alid. Enter a valid credit card.", document.getElementById("creditCardNumber"),
bCanContinueWithErrors );
}
if ( ccType != getSelectedValueById( "paymentMethod" ) )
{
var ccName = getselectionOptionText( document.th
eForm.paymentMethod, ccType )
document.theForm.postingStatus.value = "P";
}else{
document.theForm.postingStatus.value = "N";
}
if(isGpEnable)
{
if ( document.theForm.keepInGp.checked )
{
document.theForm.keepInGp.value = "P";
}
else
{
document.theForm.keepInGp.value = "N";
}
}
if ( typeof marketingValidate == 'function' )
{
if ( marketingValidate( bCanContinueWithErrors, true ) == valid
)
{
advDepo();
}
}
else
{
advDepo();
}
new Array();
"\x2Flightspeed\x2Fen_US/common/StdFragmentDlg.jsp?_STATE
"&_DIALOG_LEVEL=" );
(getLSApplet().getDialogLevel() + 1) );
urlArray.push(
urlArray.push(
urlArray.push(
urlArray.push(
urlArray.push(
urlArray.push(
urlArray.push(
urlArray.push(
urlArray.push(
"&_FRAGMENT_JSP=../cashiering/cnp/CardNotPresent.jsp" );
"&_FRAGMENT_HEIGHT=" );
fh );
"&_WINDOW_TITLE_RSRC_KEY=cnp.title" );
"&_SETTLE_ID=" );
document.theForm.paymentMethod.value );
"&_CARD_NUM=" );
ccnum );
"&_ACTION_OK=doOK()" );
try
{
if (useModalDialogs && window.showModalDialog)
{
var result = window.showModalDialog( encodeURI(urlArray.
join("")), "" , "dialogWidth: " + w + "px; dialogHeight: " + h + "px; center: Y
es; help: No; resizable: Yes; Status:No; unadorned: Yes;");
if ( result != "CANCEL" )
{
cnpNumber = result;
var e = document.getElementById("cardNotPresent"
);
e.value = cnpNumber;
updateCnpWebParam( cnpNumber );
cnpAlreadyEntered = true;
}
}
else
{
if (useModalDialogs)
{
windowStyle += ",modal=yes";
urlArray.push( "&_OPENER_DISABLE=true" );
}
var myModalDialog = window.open(encodeURI(urlArray.join(
"")), windowName, windowStyle);
centerWindow( myModalDialog, w, h );
myModalDialog.focus();
}
}
catch( e ) { alert( e.message ); }
}
function updateCnpWebParam( value )
{
var val;
if ( value == null || value == "" )
val = "false";
else
val = value;
var parm = "cardNotPresent^" + val + "~";
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "WEBPAR
AM", "SET", parm );
}
function advDepo()
{
}
creditCardSwipeCallback = creditCardSwiped;
registerKeyHandler(creditCardSwipeKeyHandler, true);
function sendLSKey2Browser( key )
{
try
{
if ( key == "F9" && typeof(setQuickNavFocus) != "undefined" ) //
SWDTS00251663
{
setTimeout( "setQuickNavFocus()", 50);
return;
} // end SWDTS00251663
var eventObj = document.createEventObject("onkeypress");
var dt = new Date();
var milli = dt.getMilliseconds();
eventObj.id = milli;
eventObj.altKey = true;
var code = ( key.charCodeAt(0) * 1 );
eventObj.keyCode = code;
document.fireEvent("onkeypress", eventObj );
}
catch( e ) { alert( "sendLSKey2Browser error: " + e.message ); }
}
function creditCardSwiped(firstName, middleInit, lastName, cardNumber, expMonth,
expYear, swipeStream)
{
try
{
try
{
expYear = 2000 + parseInt(expYear*1);
}
catch( e ) {}
var cardHolderName = new Array();
if (firstName != null)
{
cardHolderName.push( firstName );
}
if (middleInit != null)
{
cardHolderName.push( middleInit );
}
cardHolderName.push( lastName );
var ccType = ccNumberToCardType(cardNumber);
if (!false)
{
sendSwipeToServer("modRes:8", swipeStream);
}
hasSwipeStream = true;
document.theForm.creditCardHolderName.disabled = false;
document.theForm.creditCardHolderName.value = Trim( cardHolderName.j
oin(" ") );
disableCC(false);
setCCValue(cardNumber);
document.theForm.voucher.disabled = false;
initSettlementFields();
setSelectedValueById("paymentMethod", ccType);
setCcExpMonthYear(expMonth, expYear, false);
setGuaranteeStatus( ccType );
cardNumChanged();
if ( isAutoNoPost(document.theForm.paymentMethod, settlementArray) )
{
document.theForm.postingStatus.value = "N";
document.theForm.postingStatusCheck.checked = false;
}
else
{
document.theForm.postingStatus.value = "P";
document.theForm.postingStatusCheck.checked = true;
}
// Show Housekeeping Special Services Confirmation dlg
}
catch( e )
{
errorHandler( e, "creditCardSwiped" );
return invalid;
}
}
function ccNumberToCardType(cardNumber)
{
var ccType = remoteCCNumberToTypeCode(cardNumber); // remote
if (ccType == null)
{
ccType = "";
}
return ccType;
}
function initSettlementFields()
{
try
{
setCcExpDateEnabled( true );
if ( ! readonlyRes )
{
disableById( "guaranteeStatus", false );
}
var gtdStatus = getGuaranteedStatus(document.theForm.paymentMeth
od, settlementArray);
if (gtdStatus != null && gtdStatus.length > 0)
{
initSelectById("guaranteeStatus", gtdStatus);
}
if ( isCreditCard(document.theForm.paymentMethod, settlementArra
y) )
{
if ( ! isMaxCardReach && isGpEnable )
{
document.theForm.keepInGp.disabled=false;
}
if (document.theForm.creditCardHolderName.value == "" &&
getSelectedIndex(document.theForm.paymentMethod) > 0 )
{
var s = (guestFirstName != null && guestFirstNam
e.length > 0) ? guestFirstName : "";
if (guestLastName != null && guestLastName.lengt
h > 0)
s += " " + guestLastName;
document.theForm.creditCardHolderName.value = s;
}
document.theForm.creditCardHolderName.disabled = false;
disableCC(false);
if ( bankIsActive(document.theForm.paymentMethod, settle
mentArray) )
{
document.theForm._creditLimit.disabled = true;
}
ccDataChanged();
var ccNum = getCCValue();
if ( ccNum.length > 9 && ccNum.indexOf( "XXXX" ) == -1 )
{
var ccType = ccNumberToCardType(getCCValue());
if (ccType == "" || ccType != paymentMethod)
{
setCCValue("");
if ( bHasInited == true )
{
nullifyWebParmCardNum();
}
clearExpirationFields();
}
}
else
{
setCCValue( "");
if ( bHasInited == true )
{
nullifyWebParmCardNum();
}
clearExpirationFields();
}
}
else
{
if(isGpEnable)
{
document.theForm.keepInGp.disabled=true;
}
if ( viewCCBtn )
{
document.getElementById("viewCcImg").src='/light
speed/en_US/images/creditCards16x24disabled.png';
}
paymentCopy.disabled = true;
document.getElementById("copyImg").src='/lightspeed/en_U
S/images/copyDisabled.png';
SearchGP.disabled = true;
document.theForm.creditCardHolderName.disabled = true;
document.theForm.creditCardHolderName.value = "";
disableCC(true);
setCCValue("");
enableViewCC();
if ( ! readonlyRes )
{
document.theForm._creditLimit.disabled = false;
// credit limit is always enabled for non-bank settlement types, regardless whet
her bank is active or not
}
clearExpirationFields();
setCcExpDateEnabled( false );
ccDataChanged();
}
showSwipeCardMsg(shouldEnabledCardReader(document.theForm.paymen
tMethod, settlementArray));
// SWDTS00262378
if ( isAutoNoPost(document.theForm.paymentMethod, settlementArra
y) )
{
document.theForm.postingStatus.value = "N";
document.theForm.postingStatusCheck.checked = false;
}
else
{
document.theForm.postingStatus.value = "P";
document.theForm.postingStatusCheck.checked = true;
}
// SWDTS00262365
if ( isAutoNoPost(document.theForm.paymentMethod, settlementArra
y) )
{
document.theForm.postingStatus.value = "N";
document.theForm.postingStatusCheck.checked = false;
}
else
{
document.theForm.postingStatus.value = "P";
document.theForm.postingStatusCheck.checked = true;
}
setGuaranteeStatus( paymentMethod );
//start CQ205185 Enhancment
var isOnlyCash = "Only credit card payment types can be stored i
n the guest profile.";
var isMaxCreditCard = "The guest profile already has the maximum
allowed credit cards.";
if(isGpEnable){
if(isMaxCardReach!=true && document.theForm.keepInGp.dis
abled==true ){
document.theForm.keepInGp.title=isOnlyCash;
document.getElementById('paymentCheckLabel').tit
le=isOnlyCash;
}
if(isMaxCardReach==true && document.theForm.keepInGp.dis
abled==true){
document.theForm.keepInGp.title=isMaxCreditCard;
document.getElementById('paymentCheckLabel').tit
le=isMaxCreditCard;
}
if(document.theForm.keepInGp.disabled==false){
document.theForm.keepInGp.title="";
document.getElementById('paymentCheckLabel').tit
le="";
}
}
//end CQ205185 Enhancment
}
catch( e )
{
errorHandler( e, "paymentTypeChanged" );
}
}
var guarHT = new hashTable( );
guarHT.put( "AX", "GTD");
guarHT.put( "BCC", "NGTD");
guarHT.put( "BQT", "GTD");
guarHT.put( "BW", "GTD");
guarHT.put( "C80", "NGTD");
guarHT.put( "C90", "NGTD");
guarHT.put( "CA", "NGTD");
guarHT.put( "CB", "GTD");
guarHT.put( "CK", "GTD");
guarHT.put( "CUP", "GTD");
guarHT.put( "DB", "GTD");
guarHT.put( "DC", "GTD");
guarHT.put( "DCUP", "NGTD");
guarHT.put( "DEP", "GTD");
guarHT.put( "DI", "GTD");
guarHT.put( "EC", "GTD");
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
guarHT.put(
"GC", "NGTD");
"GCC", "NGTD");
"GX", "NGTD");
"INTA", "NGTD");
"INTV", "NGTD");
"IPO", "GTD");
"JC", "GTD");
"MCO", "DEP");
"ML", "NGTD");
"OL", "GTD");
"OLTA", "NGTD");
"PPD", "DEP");
"PRE", "NGTD");
"RP", "NGTD");
"SA", "GTD");
"TA", "GTD");
"TVL", "NGTD");
"VCH", "GTD");
"VM", "GTD");
"XPS", "GTD");
"XS", "GTD");
"ZC", "NGTD");
"ZCA", "NGTD");
"ZD", "NGTD");
"ZG", "NGTD");
"ZJ", "NGTD");
"ZO", "NGTD");
"ZV", "NGTD");
"ZX", "NGTD");
}
var result = launchArAcctSearch("RES_MODIFY" , "HOME:2", launchData);
if (null != result && undefined != result)
{
var resultData = result.split("^");
var arName = unescape(resultData[1]);
var arAcctNo=unescape(resultData[0]);
var arCustNum = arAcctNo.substring(0, arAcctNo.indexOf(":"));
var params = arCustNum + " - " + arName;
setCustomerNumber( params );
}
else
{
document.theForm._aracct.value = "";
setCustomerNumber( "" );
}
//CR 54 end
}
function showSwipeCardMsg(show)
{
var e = document.getElementById("tableCaption");
if (e != null)
{
if (show == false)
{
e.innerHTML="Settlement";
}
else
{
e.innerHTML="Settlement - Swipe card or manually enter c
ard number now";
}
}
}
function remoteCCNumberToTypeCode(ccNum)
{
var ccType = null;
var s = ccNum;
s += "^";
s += "377";
s += "^";
var resultStr = sendSynchRequestToServer( "POST", document.theForm._STAT
E_KEY.value, 0, "CREDIT_CARD", "VALIDATE", s )
var status = getField(resultStr, 0, ";");
if ( status == "ok" )
{
ccType = getField(resultStr, 3, ";");
}
else
{
var msg = getField(resultStr, 1, ";");
}
return ccType;
}
function payEvent(stateKey, eventId, action, target, command, params, dlgLevel)
{
if ( target == "GETCUSTNUM" )
{
if ( null != params && params.length > 0 )
{
setCustomerNumber( params );
}
}
else if (action == "CARDDATA")
{
processCardSwipe(params, true);
}
}
function setCustomerNumber( arInfoStr )
{
try
{
if ( null != arInfoStr && arInfoStr.length > 0 )
{
document.theForm.aracct.value = getField( arInfoStr, 0,
" - " );
document.theForm._aracct.value = arInfoStr;
}
else
{
document.theForm.aracct.value = "";
document.theForm._aracct.value = "";
}
}
catch( e )
{
errorHandler( e, "setCustomerNumber" );
}
}
function lookupARNum( )
{
var arNum = Trim(document.theForm._aracct.value);
if ( typeof( arNum ) != "undefined" )
{
arNum = Trim(arNum);
}
if ( typeof( arNum ) != "undefined" && arNum.length > 0 )
{
var resultStr = sendSynchRequestToServer( "POST", document.theFo
rm._STATE_KEY.value, 0, "RESERVATION", "LOOKUP_AR_NUM", arNum );
var status = getField(resultStr, 0, ";");
if ( status == "ok" )
{
var arInfoStr = getField(resultStr, 1, ";");
var arStatus = getField(resultStr, 2, ";");
var isAuthorized = true;
//Remove authorization as per defect SWDTS00258147
if ( arStatus == "MGR" )
{
var windowName = "mgrOver";
var url = "\x2Flightspeed\x2Fen_US/common/StdFra
gmentDlg.jsp?_STATE_KEY=modRes:8";
url += "&_DIALOG_LEVEL=" + (getLSApplet().getDia
logLevel() + 1);
url += "&_FRAGMENT_JSP=authenticateMgrOverride.j
sp";
url += "&_FRAGMENT_HEIGHT=100%";
url += "&_WINDOW_TITLE_RSRC_KEY=amAuthentReq";
url += "&_MSG_RSRC_KEY=amNoPermission";
url += "&_permissionID=ARMgrOver";
url = encodeURI( url );
if ( ! window.showModalDialog( url,"","dialogWid
th: 660px; dialogHeight: 220px; center: Yes; help: No; resizable: Yes; Status:N
o; unadorned: Yes;") )
{
document.theForm._aracct.value =
"";
return;
}
}
if (arStatus == "HOLD" )
{
errorMessageKey( "arHoldErrMsg" );
document.theForm._aracct.value = "";
return;
}
setCustomerNumber(arInfoStr);
}
else
{
doSearchCustomerNumber(arNum);
//
alertMessageKey( "res.errror.unableToValidateARNum" );
//resetArNumber();
}
}
else
{
setCustomerNumber("");
}
}
function viewFullCC()
{
if (getCCValue() != "")
{
var expMth = document.getElementById(ccExpMonthId).value;
var expYr = document.getElementById(ccExpYearId).value;
var webParams = "creditCardExpYear^" + expYr + "~"+"creditCardEx
pMonth^" + expMth + "~";
sendWebParamsToServer("modRes:8", webParams);
}
var url = new Array();
url.push( getLocalContextPath() );
url.push( "/common/StdFragmentDlg.jsp?_STATE_KEY=" );
url.push( getStateKey() );
url.push( "&_DIALOG_LEVEL=" );
url.push( (getLSApplet().getDialogLevel() + 1) );
url.push( "&_FRAGMENT_JSP=../edit/viewFullCC.jsp" );
url.push( "&_FRAGMENT_HEIGHT=20%" );
url.push( "&_WINDOW_TITLE_RSRC_KEY=label.viewFullCC.title" );
url.push( "&_IS_INFODLG=true" );
url.push( "&_ACTION=ACTION_INIT" );
url.push( "&_SHOW_CLOSE=false" );
url.push( "&_INIT=true" );
url.push( "&LISTEN_DIALOG_DISPLAYED=true" );
url.push( "&_MODULECC=common");
var result = window.showModalDialog(url.join(""), this, "dialogWidth: 600px;
dialogHeight: 100px; center: Yes; help: No; resizable: Yes; Status:No; unadorne
d: Yes;");
return result;
}
function viewFullCCCB( resultStr )
{
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
var ccNum = getField(resultStr, 1, ";");
var ccExpDate = document.getElementById( ccExpDateSavedId ).valu
e;
if ( ccNum.length > 0 )
{
var msg = new Array();
msg.push( "Card Number: " );
msg.push( ccNum );
msg.push( "<BR>Expires: " );
msg.push( ccExpDate );
alertDialog( "\x2Flightspeed\x2Fen_US", "modRes:8", msg.
join("") );
}
else
{
alertMessageKey( "ccNumNotReturned");
}
}
else
{
var errMsg = getField(resultStr, 1, ";");
if (errMsg)
errMsg = errMsg;
else
errMsg = "";
alertWebKey( errMsg );
}
}
function getCreditCardNumSettlementInfo()
{
try
{
var settlementParms = new Array();
settlementParms.push( getCCValue() );
settlementParms.push( "^" );
settlementParms.push( origCCNumber );
}
catch ( e )
{
errorHandler( e, "getCreditCardNumSettlementInfo" );
}
return settlementParms;
}
function updateCreditCardSettlementInfo()
{
var settlementParms = getCreditCardNumSettlementInfo();
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "CREDIT
_CARD", "maskCreditCardNoForDisplay", settlementParms.join("") );
var status = getField(resultStr, 0, ";");
if ( status != "ok" )
{
var msg = getField(resultStr, 1, ";");
alertMessage( msg );
}
else
{
var maskedCcNum = getField(resultStr, 1, ";");
if (null != maskedCcNum && maskedCcNum != "")
{
setCCValue(maskedCcNum);
}
}
return true;
}
function nullifyWebParmCardNum()
{
sendRequestToServer( "", "POST", "modRes:8", 0, "CREDIT_CARD", "nullifyW
ebParamCardNum", "" );
}
function cardNumChanged()
{
"origCreditCardNumber^" );
ccNum );
"^~" );
"creditCardNumber^" );
ccNum );
params.push( "^~" );
var paymentMethod = getSelectedValueById( "paymentMethod" );
params.push( "paymentMethod^" );
params.push( paymentMethod );
params.push( "^~" );
var webParams = params.join("");
sendWebParamsToServer("modRes:8", webParams);
updateCreditCardSettlementInfo();
}
var viewCCBtn = document.getElementById( "_viewFullCC" );
if ( viewCCBtn )
{
viewCCBtn.disabled = (ccNum == "");
if(viewCCBtn.disabled)
document.getElementById("viewCcImg").src='/light
speed/en_US/images/creditCards16x24disabled.png';
else
document.getElementById("viewCcImg").src='/light
speed/en_US/images/creditCards16x24.png';
}
var paymentCopy = document.getElementById( "copy" );
//var paymentPaste = document.getElementById( "paste" );
var SearchGP = document.getElementById( "search" );
if(paymentCopy)
{
paymentCopy.disabled = true;
document.getElementById("copyImg").src='/lightspeed/en_US/images
/copyDisabled.png';
//paymentPaste.disabled = true;
SearchGP.disabled = true;
SearchGP.style.opacity = 0.4;
}
return true;
}
function paymentChange(event)
{
{
var oldValue = document.theForm._origPaymentMethod.value;
autoCompleteSelect(event);
var newValue = document.theForm.paymentMethod.value;
if ( newValue != oldValue && newValue != "" )
{
paymentTypeChanged();
document.theForm._origPaymentMethod.value = getSelectedV
alueById("paymentMethod");
}
}
}
function updateCreditLimit( event )
{
if ( !event && document.all ) event = window.event;
var foreignCreditLimit = document.theForm._creditLimit.value;
//var normalizedValue = getCurrencyApplet().numberToValue( foreignCredit
Limit );
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "CURREN
CY", "FORMAT_NUMBER_TO_VALUE", foreignCreditLimit );
var normalizedValue = "";
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
normalizedValue = getField( resultStr, 1, ";" );
}
if ( isNaN( normalizedValue ) )
{
document.theForm._creditLimit.value = "";
return dispErrorMsg2( "Enter a valid amount for the credit limit
.", document.theForm._creditLimit, false );
}
if ( normalizedValue < 0.0 )
{
document.theForm._creditLimit.value = "";
return dispErrorMsg2( "Credit limit cannot be negative.", docume
nt.theForm._creditLimit, false );
}
document.theForm.creditlimit.value = normalizedValue;
}
function onClickPostingAllowed()
{
if ( document.theForm.postingStatusCheck.checked )
{
document.theForm.postingStatus.value = "P";
}
else
{
document.theForm.postingStatus.value = "N";
}
var parm = "postingStatus^" + document.theForm.postingStatus.value;
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "WEBPAR
AM", "SET", parm );
}
//start CQ205185 Enhancment
function onClkKeepInGpChk(){
if ( document.theForm.keepInGp.checked )
{
document.theForm.keepInGp.value = "P";
}
else
{
document.theForm.keepInGp.value = "N";
}
var parm = "keepInGp^" + document.theForm.keepInGp.value;
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "WEBPAR
AM", "SET", parm );
}
//end CQ205185 Enhancment
function getStateKey()
{
return "modRes:8";
}
function getLocalContextPath()
{
return "\x2Flightspeed\x2Fen_US";
}
function enableViewCC()
{
var viewCCBtn = document.getElementById( "_viewFullCC" );
var valNumber = getCCValue();
if ( isNullOrBlank( valNumber ) )
{
if ( viewCCBtn )
{
viewCCBtn.disabled = true;
viewCCBtn.src='/lightspeed/en_US/images/creditCa
rds16x24disabled.png';
document.getElementById("viewCcImg").src
='/lightspeed/en_US/images/creditCards16x24disabled.png';
}
}
if( valNumber.indexOf( "XXXX" ) == 0 )
{
if ( viewCCBtn )
{
viewCCBtn.disabled = false;
viewCCBtn.src='/lightspeed/en_US/images/creditCa
rds16x24.png';
document.getElementById("viewCcImg").src
='/lightspeed/en_US/images/creditCards16x24.png';
}
}
var paymentCopy = document.getElementById( "copy" );
//var paymentPaste = document.getElementById( "paste" );
var SearchGP = document.getElementById( "search" );
var valNumber = getCCValue();
var ccExpDateValue= document.theForm.ccExpDate.value;
var nameOnCard = document.theForm.creditCardHolderName.value;
if ( isNullOrBlank( valNumber ) && paymentCopy)
{
paymentCopy.disabled = true;
document.getElementById("copyImg").src='/lightsp
eed/en_US/images/copyDisabled.png';
//paymentPaste.disabled = true;
SearchGP.disabled = true;
SearchGP.style.opacity = 0.4;
}
if( valNumber.indexOf( "XXXX" ) == 0)
{
if(isNullOrBlank(nameOnCard)||isNullOrBlank(ccExpDateVal
ue))
{
paymentCopy.disabled = true;
document.getElementById("copyImg").src='/lightsp
eed/en_US/images/copyDisabled.png';
}
else
{
paymentCopy.disabled = false;
document.getElementById("copyImg").src='/lightsp
eed/en_US/images/copy.png';
}
//paymentPaste.disabled = false;
SearchGP.disabled = false;
}
}
registerFragment("pay", true, true, true);
function ccExpiryDateChanged()
{
setTimeout("delayedExpiryDateChanged()", 500);
}
function delayedExpiryDateChanged()
{
var params = new Array();
if ( document.theForm.creditCardExpYear )
{
params.push( "creditCardExpYear^" );
params.push( document.theForm.creditCardExpYear.value );
params.push( "^~" );
}
if ( document.theForm.creditCardExpMonth )
{
params.push( "creditCardExpMonth^" );
params.push( document.theForm.creditCardExpMonth.value );
params.push( "^~" );
}
var webParams = params.join("");
sendWebParamsToServer("modRes:8", webParams);
}
/**
*
Method added for copying the credit card information.
*/
function paymentCopy()
{
var count = getCopiedCcCount();
var settlementParms = new Array();
var paymentMethod = getSelectedValueById( "paymentMethod" );
var ccExpDateValue= document.theForm.ccExpDate.value;
var nameOnCard = document.theForm.creditCardHolderName.value;
settlementParms.push(origCCNumber);
settlementParms.push("^");
settlementParms.push(paymentMethod);
settlementParms.push("^");
settlementParms.push(ccExpDateValue);
settlementParms.push("^");
settlementParms.push(nameOnCard);
settlementParms.push("^");
settlementParms.push("RES_MOD");
if(count < '4')
{
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"CREDIT_CARD", "CMD_GET_FULL_CC_NUM_PAYMENT_COPY", settlementParms.join("") );
var status = getField(resultStr, 0, ";");
var paste = document.getElementById("paste");
if(!readonlyRes)
{
paste.style.display="block";
}
return true;
}
else
{
var res = confirmMessageKey("msg.copyPasteCreditCard");
if(res)
{
doShowCopiedCC(settlementParms);
}
}
}
/**
* Method added for displaying credit cards for pasting
*/
function doShowCopiedCC(settlementParms)
{
var ccCount = getCopiedCcCount();
var pasteBtn = document.getElementById("paste");
if(ccCount>0)
{
var url = new Array();
url.push( getLocalContextPath() );
url.push( "/common/StdFragmentDlg.jsp?_STATE_KEY=" );
url.push( getStateKey() );
url.push( "&_FRAGMENT_JSP=../cashiering/copiedCcRecord.jsp" );
url.push( "&_FRAGMENT_HEIGHT=40%" );
url.push( "&_WINDOW_TITLE_RSRC_KEY=label.CcTempStore.title" );
url.push( "&_IS_INFODLG=false" );
url.push( "&_ACTION=ACTION_INIT" );
url.push( "&_INIT=true" );
url.push( "&_SETTLEMENT_PARAM=" );
if(typeof(settlementParms) != "undefined")
{
url.push(settlementParms.join(""));
}
url.push( "&_LISTEN_DIALOG_DISPLAYED=true" );
url.push( "&_MODULECC=workspaceSettlement");
url.push( "&_SRC_STATE=");
url.push("modRes:8");
var result = window.showModalDialog(url.join(""), this, "dialogWidth
: 900px; dialogHeight: 260px; center; help: No; resizable: Yes; Status:No; unado
rned: Yes;");
if(typeof(result) != "undefined")
{
var resultArr = result.split("^");
var action = resultArr[0];
var param = new Array();
param.push(resultArr[1]);
param.push("modRes:8");
param.push("workspaceSettlement");
if(typeof(action) != "undefined" && action=="OK")
{
var resultStr = sendSynchRequestToServer( "POST", "
modRes:8", 0, "CREDIT_CARD", "CMD_GET_COPIED_CC_INFO_ON_OK", param.join("^") );
updatePaymentInfo(resultStr);
}
}
var count = getCopiedCcCount();
if(count >0 && !readonlyRes)
{
pasteBtn.style.display="block";
}
else
{
pasteBtn.style.display="none";
}
return result;
}
else
{
alertMessageKey("msg.copyPasteNoCreditCard");
pasteBtn.style.display = "none";
return true;
}
}
/**
*
Method added for updating payment information after after pasting a cred
it card information.
*/
function updatePaymentInfo(resultStr)
{
var data = resultStr.split(";");
document.theForm.paymentMethod.value = data[3];
paymentTypeChanged();
fieldInfoChanged(document.theForm.paymentMethod);
setCCValue(data[1]);
cardNumChangedFromCopyPaste(data[2]);
ccDataChanged();
fieldInfoChanged(document.getElementById( "creditCardNumber" ));
enableViewCC();
var str = data[5];
var res = str.replace(" / ", "-");
var exp = str.split("/");
var mon = exp[0];
var yy = exp[1];
var ccExpDateField = document.theForm.ccExpDate;
if(typeof(mon) != "undefined" && typeof(yy) != "undefined")
{
mon = mon.replace(/^\s+|\s+$/g, '');
yy = yy.replace(/^\s+|\s+$/g, '');
var expDate = mon.concat("-").concat(yy);
ccExpDateField.value = expDate;
}
else
{
ccExpDateField.value = data[5];
}
ccDataChanged();
setFullCCtoServer();
ccExpiryDateChanged();
ccExpDateChanged(document.theForm.ccExpDate, 'ccExpDateSaved', 'ccExpDat
eApplet', 'MM-yyyy', '1402642800000',null, null, true, 'Credit Card');
document.theForm.creditCardHolderName.value = data[4];
enableCopy();
}
/**
* Method to send cardnumber to server.
*/
function setFullCCtoServer()
{
sendSynchRequestToServer( "POST", "modRes:8", 0, "CREDIT_CARD", "CMD_SET
_FULL_CC_COPY_PASTE", "" );
}
/**
*
Method Searches for a guest profile for after clicking on Search Guest P
rofile button.
*/
function doSearchGuestProfile()
{
var settlementParms = getCreditCardNumSettlementInfo();
var ccNum = settlementParms[0];
ccNum = origCCNumber.substring(4,origCCNumber.length+1);
var paymentMethod = getSelectedValueById( "paymentMethod" );
var ccExpDateValue= document.theForm.ccExpDate.value;
var nameOnCard = document.theForm.creditCardHolderName.value;
settlementParms.push("^");
settlementParms.push(paymentMethod);
settlementParms.push("^");
settlementParms.push(ccExpDateValue);
launchSearchGP(settlementParms);
return true;
}
function launchSearchGP(launchdata)
{
}
/**
*
Method returns preveously opened searchGuestProfile window name from ses
sion.
*/
function getWinName()
{
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "CREDIT
_CARD", "CMD_GET_FROM_SESSION", "" );
return getField(resultStr, 1, ";");
}
/**
*
*/
function getRequiredInfo(lookupResults)
{
var reqInfo=new Array();
if (lookupResults != null && lookupResults.length > 0)
{
reqInfo[0] = getField(lookupResults, 0, "^");
reqInfo[1] = getField(lookupResults, 1, "^");
}
return reqInfo;
}
function showTipCc(theText,bool)
{
if(typeof(bool) != "undefined" && bool != null && bool == "block")
{
if (writetxt && theText != null )
{
writetxt( theText, false );
}
else if ( writetxt )
{
writetxt( 0, false ); // hide popup
}
}
}
/**
* Disable Ctrl+C and Ctrl+v
*/
function disableCopyPaste()
{
var keystroke = String.fromCharCode(event.keyCode).toLowerCase();
if (event.ctrlKey && (keystroke == 'c' || keystroke == 'v'))
{
event.returnValue = false; // disable Ctrl+C
}
}
/**
* Enable Copy Icon After insertion of all cc field
*/
function enableCopy()
{
}
/* Method added end for CQ SWDTS00256872 */
</script>
<input
<input
<input
<input
<input
<input
<div class="defaultEditor">
<TABLE cellspacing="2" cellpadding="0" border="0" class="resSectionLine"
width="100%">
<TBODY>
<TR>
<TD class="resSectionCol0">
</TD>
<TD nowrap class="resSectionCol1">
<a class="resSectionLabel">
Payment Information
</a>
</TD>
<TD class="resSectionCol2">
</TD>
</TR>
</TBODY>
</TABLE>
<table width="100%" cellspacing="1" cellpadding="1" class="defaultEditor
">
<tbody>
<tr>
<td align="right" nowrap class="msgData">
<font color="#cc0000">*</font>Payment
</td>
<td nowrap align="left">
<select size="1" id="paymentMethod" name
="paymentMethod"
accesskey="p" onchange="paymentT
ypeChanged();fieldInfoChanged(this);"
onkeydown="paymentChange(event);
" >
<option value="" selected>
-- Select Payment Type </option>
</select>
</td>
<td align="right" class="msgData">
Card Number
</td>
<td nowrap>
<style type="text/css">
.fake-input-enabled
{
background-color:white;
border-style:inset;
border-width:thin;
width: 95pt;
height: 16pt;
position: inherit;
float: left;
}
.fake-input-disabled
{
background-color:#fafafa;
border-style:inset;
border-width:thin;
width: 95pt;
height: 16pt;
position: inherit;
float: left;
}
.fake-input-enabled-html5
{
background-color: white;
border-top: 2px solid #646464;
border-left: 2px solid #646464;
border-right: 1px solid #e1e1e1;
border-bottom: 1px solid #e1e1e1;
height: 13pt;
position:inherit;
float: left;
float:top;
line-height: 18px;
width: 102pt;
}
.fake-input-disabled-html5
{
background-color: #fafafa;
border-top: 2px solid #646464;
border-left: 2px solid #646464;
border-right: 1px solid #e1e1e1;
border-bottom: 1px solid #e1e1e1;
height: 13pt;
position:inherit;
float: left;
float:top;
line-height: 18px;
width: 102pt;
}
</style>
<script type="text/javascript">
var lastCCValue = "";
var showErrorMsgInPanel = "false";
var isHTML5Page = "false";
var maxCreditCardLength = "19";
function selectCCText(elm)
{
if(document.body.createTextRange)
{
var range = document.body.createTextRange();
range.moveToElementText(elm);
range.select();
}
else if(window.getSelection)
{
var range = document.createRange();
range.selectNodeContents(elm);
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);
}
}
function unSelectCCText(elm)
{
return false;
}
function getCCValue()
{
try
{
ccNumObj = document.getElementById("creditCardNumber");
if ( typeof( ccNumObj ) != "undefined" )
{
return Trim( ccNumObj.innerHTML );
}
else
{
return "";
}
}
catch( e )
{
return "";
}
}
function setCCValue(value)
{
document.getElementById("creditCardNumber").innerHTML = value;
$("#creditCardNumber").attr("value",$("#creditCardNumber").html());
lastCCValue = value;
}
function getCCLength()
{
return getCCValue().length();
}
function disableCC(bDisable)
{
var divObject = document.getElementById("creditCardNumber");
if ( typeof( bDisable ) == "undefined" )
{
bDisable = true;
}
if ( bDisable || bDisable == "true" || bDisable == "TRUE" )
{
divObject.contentEditable = 'false';
divObject.designMode = 'off';
if(false == isHTML5Page || "false" == isHTML5Page)
{
$("#creditCardNumber").removeClass("fake-input-enabled")
;
$("#creditCardNumber").addClass("fake-input-disabled");
}
else
{
$("#creditCardNumber").removeClass("fake-input-enabled-h
tml5");
$("#creditCardNumber").addClass("fake-input-disabled-htm
l5");
}
}
else
{
divObject.contentEditable = 'true';
divObject.designMode = 'on';
if(false == isHTML5Page || "false" == isHTML5Page)
{
$("#creditCardNumber").removeClass("fake-input-disabled"
);
$("#creditCardNumber").addClass("fake-input-enabled");
}
else
{
$("#creditCardNumber").removeClass("fake-input-disabled-
html5");
$("#creditCardNumber").addClass("fake-input-enabled-html
5");
}
}
void 0;
}
function enableCC()
{
disableCC( false );
}
function setCCFocus()
{
document.getElementById("creditCardNumber").focus();
selectCCText(document.getElementById("creditCardNumber"));
setTimeout( "document.getElementById(\"creditCardNumber\").focus()", 100
);
}
$(function()
{
$("#creditCardNumber").keypress(function()
{
if(event.which != 8 && $("#creditCardNumber").html().length < ma
xCreditCardLength)
{
{
$("#creditCardNumber").attr("value",$("#creditCa
rdNumber").html());
if(true == showErrorMsgInPanel || "true" == show
ErrorMsgInPanel)
{
validateCCOnKeyPress(this,event);
}
else
{
if ( typeof( editKeyBoard ) != "undefine
d" )
{
if ( typeof( onKeypressCCNum ) !
= "undefined" )
{
onKeypressCCNum();
}
if ( typeof( keybCCNumber ) != "
undefined" )
{
editKeyBoard(this,keybCC
Number,event);
}
$(function()
{
$("#creditCardNumber").focus(function()
{
if($("#creditCardNumber").html()!="")
{
$("#creditCardNumber").attr("value",$("#creditCardNumber
").html());
selectCCText(this);
}
});
});
$(function()
{
$("#creditCardNumber").keydown(function()
{
if(typeof(disableCopyPaste) != "undefined")
{
disableCopyPaste();
}
});
});
$(function()
{
$("#creditCardNumber").blur(function()
{
if($("#creditCardNumber").html()!="")
{
var bDataChanged = false;
var curValue = getCCValue();
if ( curValue != lastCCValue )
{
bDataChanged = true;
}
$("#creditCardNumber").attr("value",$("#creditCardNumber
").html());
if ( bDataChanged )
{
if ( typeof( ccDataChanged ) != "undefined" )
{
ccDataChanged();
}
if ( typeof( cardNumChanged ) != "undefined" )
{
cardNumChanged();
}
if ( typeof( validateCCforButtons ) != "undefine
d" )
{
enableAddPaymentButton();
}
if ( typeof( RefundCardChange ) != "undefined" )
{
RefundCardChange();
}
if ( typeof( maskCCNum ) != "undefined" )
{
maskCCNum(getCCValue());
}
if ( typeof( fieldInfoChanged ) != "undefined" )
{
fieldInfoChanged(this);
}
if ( typeof( setActualSpgPayCc ) != "undefined"
)
{
setActualSpgPayCc(this);
}
if ( typeof( validateCardNum ) != "undefined" )
{
validateCardNum(this);
}
if ( typeof( onChangeCardnum ) != "undefined" )
{
onChangeCardnum();
}
if ( typeof( onGMDataChange ) != "undefined" )
{
onGMDataChange();
}
if ( typeof( checkPaymentMandatory ) != "undefin
ed" )
{
checkPaymentMandatory();
}
if ( typeof( doPaymentCardNumberChanged ) != "un
defined" )
{
doPaymentCardNumberChanged();
}
}
}
else
{
if ( typeof( validateCCforButtons ) != "undefined" )
{
enableAddPaymentButton();
}
if( typeof(enableDisableViewCCBtn) != "undefined")
{
enableDisableViewCCBtn();
}
if ( typeof( onGMDataChange ) != "undefined" )
{
onGMDataChange();
}
if ( typeof( clearMsg ) != "undefined" )
{
clearMsg();
}
}
if ( typeof( enableViewCC ) != "undefined" )
{
enableViewCC();
}
if ( typeof( enableCopy ) != "undefined" )
{
enableCopy();
}
unSelectCCText(this);
});
});
</script>
<div class="InputStyle fake-input-disabled" id="creditCardNumber" name="creditCa
rdNumber" maxlength="19" size="20" accesskey=C >
</div>
ccExpDateId = "ccExpDate";
ccExpDateSavedId = "_ccExpDateSaved";
ccExpMonthId = "creditCardExpMonth";
ccExpYearId = "creditCardExpYear";
function getExpDateValue()
{
var expDateValue=null;
if(document.getElementById('ccExpDate'))
{
expDateValue=ccExpDateValue=document.getElementById('ccE
xpDate').value;
}
return expDateValue;
}
</script>
<div style="float:left;position:relative">
<script type="text/javascript" src="/lightspeed/en_US/applets/deployJava.js"></s
cript>
<script type="text/javascript">
// The following instructs Internet Explorer to use the latest installed version
of Java
var appletClassID = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93";
var appletCacheVersion = "0000.0000.0000.5CB9";
// The following instructs Internet Explorer to use 1.5.0 version of Java if ava
ilable.
// However, if the machine has both 1.5 and 1.6 JRE's installed, this only works
if the
// latest 1.5.0 version is installed, i.e. 1.5.0_22.
// It also causes issue with the browser asking to run active X component for th
e
// 1.5.x JRE even if it is already installed (SWDTS00211719).
//var appletClassID = "clsid:CAFEEFAC-0015-0000-0000-ABCDEFFEDCBA";
// Function needed by deployJava.js
function getWebStartPng()
{
return "//10.20.248.73:8443/lightspeed/en_US/images/webstart.png";
}
//Function needed by deployJava.js
function getJavaURL()
{
return "https://10.20.248.73:8443/getjre/jre-7u10-windows-i586-p.exe";
}
var _appletArray = new Array();
_appletArray.push("jide-action.jar");
_appletArray.push("jide-common.jar");
_appletArray.push("jide-components.jar");
_appletArray.push("jide-dialogs.jar");
_appletArray.push("jide-dock.jar");
_appletArray.push("jide-grids.jar");
_appletArray.push("jide-pivot.jar");
_appletArray.push("jide-shortcut.jar");
_appletArray.push("binding.jar");
_appletArray.push("looks.jar");
_appletArray.push("forms.jar");
_appletArray.push("validation.jar");
_appletArray.push("swingx.jar");
_appletArray.push("MultiSplit.jar");
_appletArray.push("EventBus.jar");
_appletArray.push("commons-logging.jar");
_appletArray.push("commons-pool-1.3.jar");
_appletArray.push("hssf.jar");
_appletArray.push("log4j.jar");
_appletArray.push("lscommon.jar");
_appletArray.push("lsui.jar"); // NOTE DO NOT PUT HOME PAGE APPLETS IN THIS JAR
SUCH AS HOUSE LIST AND GROUPS AND WHOLESALER HOUSELIST. The reason being is to
make initial loading of the home page as fast as possible.
$0.00
<A href="#" onkeypress="hrefHand
leKeyDown(editAdvDeposit())" onclick="javascript:editAdvDeposit()" class="smResL
inkBtn"><IMG border='0' src='/lightspeed/en_US/images/smallIcons/edit.gif' widt
h='11' height='11'></A>
</td>
</tr>
<!-- //start CQ205185 Enhancment -->
<tr><td width=8%></td>
<td nowrap class="msgData" align="left" >
<input type="checkbox" id="keepInGp"
name="keepInGp" onclick="onClkKe
epInGpChk()" onchange="fieldInfoChanged(this);" >
<label for="keepInGp" id="paymentCheckLa
bel" title="">Keep In Guest Profile
</label>
</td>
<td></td>
<!-- CCCP Changes Start -->
</tr>
<!-- //end CQ205185 Enhancment -->
<tr>
<td align="right" class="msgData">
Name On Card
</td>
<td nowrap align="left">
<input class="InputStyle" type="text" id
="creditCardHolderName"
name="creditCardHolderName" valu
e="PerftestData,"
size="32" accesskey="n" onchange
="fieldInfoChanged(this);enableCopy();" onfocus="this.select()" >
</td>
<td align="right" class="msgData">
GTD Status
</td>
<td align="left" nowrap>
<select size="1" id="guaranteeStatus" na
me="guaranteeStatus"
accesskey="g" onchange="fieldInf
oChanged(this);"
onkeydown="autoCompleteSelect(ev
ent);" >
<option value="">
-- Select Guarantee Stat
us -</option>
<option value="DEP" title="DEP
- Deposit Received">DEP - Deposit Received</option><option value="GTD" title="G
TD - Guaranteed">GTD - Guaranteed</option><option value="NGTD" title="NGTD - No
n-Gtd">NGTD - Non-Gtd</option>
</select>
<span class="msgData">Balance</s
pan> $0.00
</td>
<td align="right" class="msgData">
Credit Limit
</td>
<td align="left" nowrap>
<input type="text" class=\"InputStyle\"
name="_creditLimit" maxlength="12" size="10"
onfocus="this.select()"
onchange="updateCreditLimit(even
t);fieldInfoChanged(this);"
onkeypress="editKeyBoard(this,ke
ybNumericAmount,event);"
onblur="formatCreditLimit(this);
">
</td>
<td align="right" class="msgData">
Deposit Recv'd
</td>
<td>
$0.00
</td>
</tr>
<tr>
<td align="right" class="msgData">
Room & Tax
</td>
<td>
<select size="1" id="roomPosting" name="
roomPosting"
onkeydown="autoCompleteSelect(ev
ent);" onchange="updateEditableFieldWebParams();fieldInfoChanged(this);" >
<OPTION value='A' selected>A - G
uest Folio A</OPTION><OPTION value='B'>B - Guest Folio B</OPTION><OPTION value='
D'>D - Guest Folio D</OPTION><OPTION value='E'>E - Guest Folio E</OPTION><OPTION
value='F'>F - Guest Folio F</OPTION><OPTION value='G'>G - Guest Folio G</OPTION
><OPTION value='H'>H - Hidden Folio</OPTION><OPTION value='I'>I - Hidden Folio</
OPTION><OPTION value='J'>J - Hidden Folio</OPTION><OPTION value='K'>K - Hidden F
olio</OPTION>
}
</select>
</td>
<td align="right" class="msgData">
AR Account
</td>
<td align="left" class="msgData">
<table>
<tr>
<td align="left" nowrap>
<input type="text" name=
"_aracct" id="_aracct" class=\"InputStyle\"
size="44" onchange="lookupARNum
();fieldInfoChanged(this);"
onfocus="this.select()" >
</td>
<td align="left" >
<script type="te
xt/javascript">createAquaBtn( "", "_searchBtn", "javascript:doSearchCustomerNumb
er()", "", false, "<IMG border=0 src=/lightspeed/en_US/images/magnify.
gif width='18' height='15'>", 20, 20 );</script>
</td>
</tr>
</table>
</td>
<td align="right" class="msgData">
Voucher
</td>
<td>
<input type="text" name="voucher" id="vo
ucher" class=\"InputStyle\"
value="" size="14" onchange="fie
ldInfoChanged(this);"
maxlength="14" onfocus="this.sel
ect()" >
</td>
<td nowrap class="msgData" colspan="2">
<input type="checkbox" id="postingStatus
Check" onchange="fieldInfoChanged(this);"
name="postingStatusCheck" onclic
k="onClickPostingAllowed()" >
<label for="postingStatusCheck">
Posting Allowed
</label>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript">
function loadFramePreference()
{
try
{
var count = 0;
if ( getCopiedCcCount )
{
count = getCopiedCcCount();
}
var readOnly = false
var pasteIcon = document.getElementById( "paste" );
if(count>0 && count<=4)
{
if ( pasteIcon )
{
pasteIcon.style.display = 'block';
pasteIcon.disabled = false;
}
}
else
{
if ( pasteIcon )
{
pasteIcon.style.display = 'none';
}
}
if(readOnly)
{
if ( pasteIcon )
{
pasteIcon.style.display = 'none';
}
}
$(document).find('a[id^=RES_BACK_TO_BACK]')[0].scrollIntoView();
isFromB2B = false;
parent.activateLightSpeedFrameAfterWait( );
}
catch ( e )
{
}
}
function setFromB2BEditFlag()
{
var params = new Array();
params.push( "scrollb2b^" );
params.push( "true" );
params.push( "^~" );
var resultStr = sendSynchRequestToServer( "POST", "HOME:2", 0, "WEBPARAM", "SET"
, params.join("") );
}
function openReservationDialogInSearch( newStateKey, winTitle, winId, guestInfo
)
{
try
{
var fragStr = fsGetFragmentSizeString( "reservationApplet.jsp" )
;
var w = fsGetWidth( fragStr );
var h = fsGetHeight( fragStr );
if ( newStateKey.indexOf("infoRes") === 0 )
{
h = "742";
}
var fh = h;
var url =
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
url.push(
new Array();
getLocalContextPath() );
"/common/StdFragmentDlg.jsp?_STATE_KEY=" );
newStateKey );
"&_DIALOG_LEVEL=" );
(getLSApplet().getDialogLevel() + 1) );
"&_FRAGMENT_JSP=../edit/res/reservationApplet.jsp" );
"&_FRAGMENT_HEIGHT=" );
fh );
"&_WINDOW_TITLE_RSRC_KEY=" );
winTitle );
"&_GUEST_INFO=" );
guestInfo );
"&_NO_BUTTONS=true" );
<SCRIPT type="text/javascript">
var myTabbar = new Toolbar('tabs', true);
myTabbar.setActiveTabIndex('1');
myTabbar.addTabItem('/lightspeed/en_US/images/toolbar/home.gif','Home\x20\x2D\x2
0377\x3CBR\x3ESheraton\x20Waikiki', null, 'selectWorkspace(0, "HOME:2")',null,fa
lse, '2', 'closeWorkspace(0, "HOME:2", "Home\x20\x2D\x20377\x3CBR\x3ESheraton\x2
0Waikiki")','','');
myTabbar.addTabItem('/lightspeed/en_US/images/toolbar/resMod.gif','PerftestData\
x3CBR\x3EConfirmation\x2042813','tab_1','selectWorkspace(1, "modRes:8")',null,fa
lse, '2', 'closeWorkspace(1, "modRes:8", "PerftestData\x3CBR\x3EConfirmation\x20
42813")','saveReservation("modRes:8")','');
</SCRIPT>
<script type="text/javascript">myTabbar.renderTabbar(12);</SCRIPT>
<IMG ondrag="return false" border="0" alt="SSL Secured Key Size: 128 bit CipherS
uite: TLS_RSA_WITH_AES_128_CBC_SHA" src="/lightspeed/en_US/images/secu
reInd.gif" width="13" height="16">
</div>
</div>
<div style="position: absolute; bottom: 0px; right: 20px; font-size: 7pt; font-f
amily: 'Times New Roman'; background-color: #ebebf5;">
<script>
function processCCKeyDown( theFunction )
{
try
{
if (!event) event = window.event;
if (!event) return;
var keyCode = event.keyCode ? event.keyCode : event.charCode;
if ( keyCode == KEY_SPACE )
{
eval( theFunction );
if ( event.returnValue ) event.returnValue = false;
event.cancelBubble = true;
if (event.stopPropagation) event.stopPropagation();
return false;
}
}
catch( e )
{
}
}
</script>
<a href="#" style="font-size: 9pt; margin-right: 14px;" ondrag="return false"
onkeydown="processCCKeyDown('resetCardSwipe()')"
onclick="resetCardSwipe()">Reset Card Swipe</a>
<SCRIPT type="text/javascript">
var __myLSApplet = null;
function getLSApplet()
{
if ( __myLSApplet ) return __myLSApplet;
__myLSApplet = document.getElementById("LSApplet");
return __myLSApplet;
}
</SCRIPT>
function getJavaURL()
{
return "https://10.20.248.73:8443/getjre/jre-7u10-windows-i586-p.exe";
}
var _appletArray = new Array();
_appletArray.push("jide-action.jar");
_appletArray.push("jide-common.jar");
_appletArray.push("jide-components.jar");
_appletArray.push("jide-dialogs.jar");
_appletArray.push("jide-dock.jar");
_appletArray.push("jide-grids.jar");
_appletArray.push("jide-pivot.jar");
_appletArray.push("jide-shortcut.jar");
_appletArray.push("binding.jar");
_appletArray.push("looks.jar");
_appletArray.push("forms.jar");
_appletArray.push("validation.jar");
_appletArray.push("swingx.jar");
_appletArray.push("MultiSplit.jar");
_appletArray.push("EventBus.jar");
_appletArray.push("commons-logging.jar");
_appletArray.push("commons-pool-1.3.jar");
_appletArray.push("hssf.jar");
_appletArray.push("log4j.jar");
_appletArray.push("lscommon.jar");
_appletArray.push("lsui.jar"); // NOTE DO NOT PUT HOME PAGE APPLETS IN THIS JAR
SUCH AS HOUSE LIST AND GROUPS AND WHOLESALER HOUSELIST. The reason being is to
make initial loading of the home page as fast as possible.
var _archiveJars = _appletArray.join(",");
var _cacheArchiveJars = _appletArray.join(";preload;" + appletCacheVersion + ","
) + ";preload;" + appletCacheVersion;
var _numJarsToCache = _appletArray.length;
var _cacheVersionArray = new Array();
for ( var i = 0; i < _numJarsToCache; i++ )
{
_cacheVersionArray.push(appletCacheVersion); // need the version for eac
h jar file
}
var _cacheVersions = _cacheVersionArray.join(",");
var commonAppletParameters = {
codebase:'/lightspeed/',
archive:'' + _archiveJars,
cache_option:'Plugin',
cache_archive:'' + _archiveJars,
cache_version:'' + _cacheVersions,
cache_archive_ex:'' + _cacheArchiveJars
};
var minJREVersion = '1.5.0_22';
</script>
<DIV id="LSAppletDIV"></DIV>
<SCRIPT type="text/javascript">
createLightSpeedControl("LSAppletDIV", "1", "1", "LSApplet",
"1.5",
"0000.0000.0000.5CB9",
"null",
"modRes:8",
"https://10.20.248.73:8443\x2Flightspeed/WormholeServlet",
"false", "false", "res\x26\x23x2f\x3BresWorkspace.jsp",
"setTimeout('appletInitialized()', 50)", "setTimeout('lightSpeedEvent()'
, 50)");
</SCRIPT>
</body>
<!-- from msdn http://support.microsoft.com/kb/222064 -->
<head>
<meta http-equiv="PRAGMA" content="NO-CACHE">
<meta http-equiv="CACHE-CONTROL" content="NO-CACHE">
<meta http-equiv="EXPIRES" content="-1">
</head>
</html>