Sei sulla pagina 1di 211

HTTP/1.

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

:8", 0, "SYSTEM", "CMD_LOG_LOAD_TIME", s.join("^") );


}
}
catch ( e )
{
}
}
function ignoreCB(response)
{
}
// -->
</script>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" >
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="Expires" content="0">
<title>LightSpeed</title>
<link rel="StyleSheet" href="&#x2f;lightspeed&#x2f;en_US/theme/master.css">
<link rel="StyleSheet" href="&#x2f;lightspeed&#x2f;en_US/theme/workspace.css">
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/windowfu
ncs.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/buttons.
js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/lightspe
ed.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/popupmen
u.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/hashtabl
e.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/fragment
Size.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/wizard.j
s"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/workspac
e.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/confirmA
lert.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/dateAndT
ime.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/javascript/popt
xt.js"></script>

<script type="text/javascript" >


if ( top.window.attachEvent )
{
top.window.attachEvent("onbeforeunload", doLogoutAction);
}
else
{
top.window.onbeforeunload = doLogoutAction;

}
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";

var AREA_HOME = "HOME";


var AREA_RESMOD = "modRes";
var AREA_ADMIN = "admin";
var AREA_RESNEW = "createRes";
var AREA_GROUP = "group";
var AREA_GROUP = "group";
var AREA_WHOLESALE_ = "wholesale";
var AREA_CFT = "cft";
var AREA_STANDBY = "standby";
var AREA_SYSTEM = "system";
var AREA_WITHDRAW_CHECKOUT = "withdrawCO";
var AREA_HOTEL_MOVE = "hotelMove";
var AREA_HOTEL_COPY = "hotelCopy";
var AREA_INFORES = "infoRes"
var AREA_RATEINQ = "rateinquiry"
var AREA_SG_RESPONSE = "sgResponse"
var AREA_VAHALLA_MAINT = "valhallaMaint"
var AREA_PORTAL = "portal"
var AREA_SPGLINK = "spgLink"
var AREA_WEATHER = "weather"
var AREA_PROPERTY = "property"
var HK_ENABLED = "true";
//Add for Night Audit
var AREA_NIGHTAUDIT = "NightAudit";
//END: Add for Night Audit
//Variable for AR Home
var AREA_AR_HOME = "arAging";
function selectWorkspace(selectIndex, theStateKey)
{
if ( savingRes ) // SWDTS00247179
{
return;
} // SWDTS00247179
// alert("LightSpeed.jsp.selectWorkspace()::selectIndex="+selectIndex+
", theStatekey="+theStateKey);
// alert("LightSpeed.jsp.selectWorkspace()");
if (theStateKey.indexOf("sgRecognition") >= 0)
{
if (window.top.activateStarGuestRecognition)
{
window.top.activateStarGuestRecognition( "", theStateKey
, false );
}
}
if (theStateKey.indexOf("sgResponse") >= 0)
{
//alert("LightSpeed.jsp.selectWorkspace() AREA_SG_RESPONSE");
if (window.top.activateStarGuestResponse)
{
//alert("LightSpeed.jsp.selectWorkspace() window.top.activat
eStarGuestResponse");
window.top.activateStarGuestResponse( theStateKey, false
);
}
}
else if (theStateKey.indexOf("valhallaMaint") >= 0)
{

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 )
{

alert( "LightSpeed.jsp - appletInitialized: " + ex.message );


}
bAppletInitialized = true;
init();
}
function getStateKey()
{
return "modRes:8";
}
function getLocalContextPath()
{
return "\x2Flightspeed\x2Fen_US";
}
function getSSLProtocolAndPort()
{
return "https://10.20.248.73:8443";
}
function isReadOnlyRes()
{
return false;
}
function init()
{
try
{
initPopTxt();
}
catch( e ) {}
try
{
initStdWaitDiv("waitDiv");
if ( typeof( initTheHeader ) != "undefined" ) // start SWDTS0023
9021
{
try
{
initTheHeader();
}
catch ( e ) {}
}
if ( typeof( workspaceKeyHandler ) != "undefined" )
{
registerKeyHandler(workspaceKeyHandler,false);
}
if ( typeof( focusTable ) != "undefined" )
{
focusTable();
focusTable(); // caLled twice for some reason
} // end SWDTS00239021
try
{

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);
}
}

function handleSPGResults( params )


{
try
{
var clubType = getField( params, 0, "^" );
var clubNum = getField( params, 1, "^" );
var profileId = getField( params, 2, "^" );
var club1 = "";
var club1Type = "";
var club2 = "";
var s = new Array();
if ( isNullOrBlank(club2) )
{
// copy only if club 1 is not blank copy club 1 into clu
b 2
if ( ! isNullOrBlank(club1) && club1Type != "SPG" )
{
s.push( "clubAcct2^~" );
s.push( "clubAcctType2^~" );
}
}
// now set club 1
s.push( "clubAcct1^" );
s.push( clubNum );
s.push( "~clubAcctType1^" );

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", "" );

// for the editable workspace panels, we will need to update the


fields on the screen so that when
// the submit workspace occurs it does not overrite the changes
try
{
setSelectedValue( document.theForm.clubAcctType1, clubTy
pe );
document.theForm.clubAcct1.value = clubNum;
document.theForm.clubAcct1.disabled = false;
}
catch( e )
{
}
setTimeout( "submitWorkspace()", 500 );
}
catch( e )
{
errorHandler( e, "handleSPGResults" );
}
}
function showODSCopyToLocal( spgNum, profId )
{
var w = "700";
var h = "700";
var fh = "100%";
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( "&_CALLER_ID=" );
url.push( getLSApplet().getEventListenerId() );
url.push("&_FRAGMENT_HEIGHT=" );
url.push( fh );
url.push( "&_EDIT_INDEX=" );
url.push( curResRowIndex );
url.push( "&_INIT=true" );
url.push( "&_PROFILE_ID=" );
url.push( profId );
url.push( "&_SPG_NUM=" );
url.push( spgNum );
url.push( "&_FRAGMENT_JSP=../edit/spg/spgODSCopyToLocal.jsp" );
url.push( "&_WINDOW_TITLE_RSRC_KEY=title.SPGODSCopyReservation"
);
if (useModalDialogs && window.showModalDialog)
window.showModalDialog( encodeURI( url.join("") ),this,"
dialogWidth: " + w + "px; dialogHeight: " + h + "px; center: Yes; help: No; res
izable: Yes; Status:No; unadorned: Yes;");
else
{
if (useModalDialogs)
{
windowStyle += ",modal=yes";
url.push( "&_OPENER_DISABLE=true" );
}
var myModalDialog = window.open(encodeURI( url.join("")
), "SPG_Copy", "scrollbars=0,location=0,status=1,menubar=0,resizable=1,width=" +

w + ",height=" + h);
centerWindow( myModalDialog, w, h );
myModalDialog.focus();
}
}

function lightSpeedEvent(stateKey, eventId, action, target, command, params, dlg


Level)
{
//alert("lightSpeedEvent action: " + action + " target: " + target + " params: "
+ params + " command: " + command + " dlgLevel: " + dlgLevel );
try
{
var bConsumed = false;
document.theForm._EVENT_ID.value = eventId;
document.theForm._ACTION.value = action;
if (target == "ADV_DEPOSIT" && action == "UPDATE" )
{
var dataChg = getField( params, 0, "^" );
bConsumed = true;
if ( dataChg == true || dataChg == "true" )
{
document.theForm.dataChanged.value = true;
if ( dlgLevel <= 1 || dlgLevel == "1" || dlgLevel == "0"
)
submitWorkspace();
}
}
else if ( target == "changeState" )
{
var switchToState = "" + params;
document.theForm._ACTIVATE_STATE.value = switchToState;
bConsumed = true;
document.theForm.submit();
}
else if (action == "GP" && (target == "WORKSPACE" && command == "UPDATE"
))
{
bConsumed = true;
submitWorkspace();
}
else if (action == "UPDATE" || (target == "WORKSPACE" && command == "UPD
ATE"))
{
if ( params.indexOf( "dataChanged=true" ) > 0 )
document.theForm.dataChanged.value = true;
bConsumed = true;
if ( dlgLevel <= 1 || dlgLevel == "1" || dlgLevel == "0" )
submitWorkspace();
}

else if (action == "CLOSE")


{
bConsumed = true;
submitWorkspace();
}
else if (action == "DIALOG" && command =="OK")
{
if (target == "OpenReservation")
{
bConsumed = true;
var guestId = getField( params, 0, "^" );
openResWorkspace(guestId, false);
}
else if (target == "SelectGroup")
{
params = "G^" + params;
bConsumed = true;
var openGroupId = getLSApplet().fireLightSpeedEventEx(ge
tStateKey(),
"IUPDATE",
"GUEST_TYPE",
"SET",
params,
"0");
if ( openGroupId > 0 )
{
submitWorkspace();
}
else
{
var errRsp = new String( getLSApplet().getRespon
seMessageById(openGroupId) );
var errMsg = getField(errRsp, 1, ";");
alertMessage("Error Selecting Group:<br><br>" +
errMsg);
}
}
else if (target == "SelectWholesale")
{
bConsumed = true;
params = "W^" + params;
var openWsId = getLSApplet().fireLightSpeedEventEx(getSt
ateKey(),
"IUPDATE",
"GUEST_TYPE",
"SET",
params,
"0");
if ( openWsId > 0 )

{
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 == "wholesaleUnBlockExcRPT")


{
bConsumed = true;
wholesaleUnBlockExcRPT( );
}
else if (target == "findWholeSaleMaster")
{
bConsumed = true;
setTimeout("openWholesaleMaster( )", 200);
}
else if (target == "doWholesalerCheckIn")
{
bConsumed = true;
doWholesalerCheckIn( );
}
else if (target == "doWholesalerPreBlock")
{
bConsumed = true;
doWholesalerPreBlock( );
}
else if (target == "doWholesalerUnBlock")
{
bConsumed = true;
doWholesalerUnBlock( );
}
else if (target == "doWholesalerCheckOut")
{
bConsumed = true;
setTimeout( "doWholesalerCheckOut( )", 200 );
}
else if (target == "showWholesalerActionDlg")
{
bConsumed = true;
showWholesalerActionDlg( );
}
else if (target == "OpenWholesaleMaster")
{
bConsumed = true;
doOpenWholesaleMaster( params );
}
else if (target == "doRoomBlock")
{
bConsumed = true;
doRoomBlock( params );
}
else if (target == "doRoomUnblock")
{
bConsumed = true;
doRoomUnblock( params );
}
else if (target == "showHouseCounts")
{
bConsumed = true;
showHouseCounts( );
}
else if (target == "showRoomsAvailDetail")
{
bConsumed = true;
showRoomsAvailDetail( );

}
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);
}

else if (target == "DeleteTravelwith")


{
bConsumed = true;
var guestId = getField( params, 2, "^" );
showWait( true );
var breakTwId = getLSApplet().fireLightSpeedEventEx(getS
tateKey(),
"IUPDATE",
"TRAVELWITH",
"BREAK",
guestId,
"0");
if ( breakTwId > 0 )
{
submitWorkspace();
}
else
{
showWait( false );
var errRsp = new String( getLSApplet().getRespon
seMessageById(breakTwId) );
var errMsg = getField(errRsp, 1, ";");
alert("Error Deleting Travelwith Reservation:\n\
n" + errMsg);
}
}
else if (target == "QuickBlockQuery")
{
bConsumed = true;
}
else if (target == "showChangeLog")
{
bConsumed = true;
showChangeLog();
}
else if (target == "showTaskTracker")
{
bConsumed = true;
showTaskTracker();
}
else if (target == "showTemplateMaint")
{
bConsumed = true;
showTemplateMaint();
}
else if ( target == "creditlimit" )
{
bConsumed = true;
if ( "res/resWorkspace.jsp" == "res\x2FresWorkspace.jsp"
)
{
if ( updateCreditLine )
updateCreditLine( params );
}

}
//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 + ")");

// now update the resvo and GuestProfile (new guest Info )


var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "WEBPAR
AM", "updateResFromWebParms", "" );
// Launch the AdvRateSearch dialog
var cfg = {
launchPointId: "modRes",
windowTitle: "label.selectRoomRate",
updateState: true,
showAddRemoveRoomBtn: true,
addRoom: true,
revalidateRate: false
};
var retVal = showAdvRateSearchApplet(cfg);
//alert("LightSpeed.js::editRoom(95), retVal: " + retVal);
if (retVal == "1")
{
submitWorkspace();
}
try // SWDTS00242317
{
hideLayer();
}
catch( ignore ){} // SWDTS00242317
}
function getGuestName()
{
return "PerftestData";
}

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
}

setTimeout( "logoutNow()", 100 );


logoutMessageSent = true;
}
function doLogOut()
{
if ( logoutMessageSent )
{
return;
}
var isLogoutConfirm = confirmMessageKey("logoutConfirm");
if ( getStateKey() == "null" || isLogoutConfirm )
{
loggingOutManually = true;
try
{
initStdWaitAppletDiv("waitDiv");
}
catch( e ) {}
try
{
showWait(true);
}
catch( e ) {}
var eventId = getLSApplet().broadcastLightSpeedEvent(
"CLOSE",
"",
"",
"" );
setTimeout( "logoutNow()", 100 );
}
if(isLogoutConfirm)
{
logoutMessageSent = true;
}
}
function logoutNow()
{
parent.location.href = "\x2Flightspeed/StateController?_CMD=Logout&HTTP_
PORT=8080";
}
function getNonSecureSchemeServerPort()
{
return "http://10.20.248.73:8080";
}
function getCantSettleAcctMsg()
{
return "Cannot settle accounts for guests that are not in house.";
}
function getResStatus()

{
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");

var swipeStatus = parent.theSystemFrame.HID_status();


alertMessage ("Swipe Status: " + swipeStatus);
}
}
catch (e) {}
}
</script>

<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 xmlReqLen = xmlReqArray.length;


for (var i = 0; i < xmlReqLen; i++)
{
try
{
if ( typeof( xmlReqArray[i] ) != "undefined" )
{
xmlReqArray[i].abort();
xmlReqArray[i] = 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();

if( xmlHttpReq && xmlHttpReq != null )


{
var xmlObj = new xmlRequest( xmlHttpReq, callback );
xmlReqArray.push( xmlObj );
try
{
xmlHttpReq.open(getPostInd, url + csrf , true);
}
catch( e )
{
dispXMLErrMsg(e);
return;
}
xmlHttpReq.setRequestHeader("Content-Type", "application/x-www-f
orm-urlencoded;charset=UTF-8"); // SWDTS00253350
if ( callback && callback != "undefined" )
{
xmlHttpReq.onreadystatechange = callbackChangeHandler;
}
var parameters = new Array();
parameters.push( "_Input=" );
parameters.push( stateKey );
parameters.push( ";" );
parameters.push( "UTILITY" ); // stateAction
parameters.push( ";" );
parameters.push( eventId );
parameters.push( ";" );
parameters.push( ";" ); // This extra separator is needed to ke
ep the parameters in their expected positions -- DO NOT REMOVE
parameters.push( target );
parameters.push( ";" );
parameters.push( cmd );
parameters.push( ";" );
parameters.push( encodeURIComponent(parms) );
try
{
xmlHttpReq.send( parameters.join("") );
}
catch (e)
{
try
{
alertMessageKey( "msg.unablToSend" );
}
catch( e )
{
alert( "Unable to Send Request to Server" );
}
}
}
else
{
dispXMLErrMsg();
}

}
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;
}

var url = "";


var csrf = "?csrfToken=" + encodeURIComponent("225faM2BL7YNwU0twrrvzw=="
) + "&csrfParameter=" + "sendToTarget.jsp";
if ( ! overrideURL )
{
//alert(getPostInd+","+stateKey+","+eventId+","+target+","+cmd+"
,"+parms+","+overrideURL )
url = "\x2Flightspeed/WormholeTargetServlet";
}
else
url = overrideURL;

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="&#x2f;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="&#x2f;lightspe
ed&#x2f;en_US&#x2f;LightSpeed.jsp">
<input id="_ORIG_PAGE" name="_ORIG_PAGE" type="HIDDEN" value="&#x2f;lightspeed&#
x2f;en_US&#x2f;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="&#x2
f;lightspeed&#x2f;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="">

<LINK rel="StyleSheet" href="https://10.20.248.73:8443&#x2f;lightspeed&#x2f;en_U


S/theme/header.css" type="text/css">
<script type="text/javascript">
var
var
var
var
var
var
var
var
var
var
var
var

bHaveComments = false;
bHaveMessages = false;
bHaveSpecServ = false;
bHaveTasks
= false;
bHaveLocation = false;
bHaveVoiceMail = false;
bHaveWakeup
= false;
bHaveRemarks = false;
bHaveRoomMates = false;
bHasBackToBacks = "";
bSuppressRate = false;
cresNumber = "";

// CQ182894 - Launch Guest Profile - Start


var bIsNewProfile = true;
var isGPEnabled = "true";
var altLngEnable = "false";
// CQ182894 - Launch Guest Profile - End
// Added for the StarGuest Project
// Start
var sessionTimedOut = false; // variable to check whether the session has timed
out or not
var connectionStatus = false; // variable to check whether the connection to Sta
rGuest is up or not
var pageSessionTimedOut = false; // variable to check whether the page has timed
out or not
var isConnectionSlow = false; // variable added to check whether the StarGuest c
onnection is slow or not.
var isSgActive = false; // variable added to check if StarGuest is active for th
e property or not.
var starGuestUp=false;
var starGuestDown=false;
var starGuestPermissionLevel;
// CQ_213581 SPG_Transformation changes start
var spgSnaAlert = "N";
// CQ_213581 SPG_Transformation changes end
// End
//connectionStatus = false;
isConnectionSlow = false;
isStarGuestUser = true;

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,

";"
";"
";"
";"
";"
";"
";"
";"

);
);
);
);
);
);
);
);

bHaveRoomMates = getField( response, 9, ";" );


bSuppressRate = getField( response, 10, ";" );
cresNumber = getField( response, 11, ";" );
// CQ182894 - Launch Guest Profile - Start
bIsNewProfile = getField( response, 12, ";" );
bHasBackToBacks = getField( response, 13, ";" );
// CQ182894 - Launch Guest Profile - End
//alert(cresNumber);
}
}
}
function checkStarGuestSession()
{
var parameters = new Array();
parameters.push('hotelNum');
parameters.push("^");
parameters.push(377);
parameters.push("~");
var resultStr = sendSynchRequestToServer( "POST", getStateKey(), 0, "STARGUE
ST", "SG_UP", parameters.join(""));
var status = getField( resultStr, 0, ";" );
var sgUp = getField( resultStr, 1, ";" );
if(sgUp == "true")
{
starGuestUp=true;
}
else
{
starGuestUp=false;
// var t=setTimeout("checkStarGuestSession()",30000);
}
//alert("StarGuest UP="+starGuestUp+", Resultstr="+resultStr);
}
// Added for StarGeust
// Start
function showStarGuestLink(guestName, hotelNumber, guestNum, lastName, spgNum)
{
// Code Changes for CQ SWDTS00255898 start
var idxAlt = guestName.indexOf("/");
if( null != idxAlt && idxAlt >1 )
{
guestName = guestName.slice(0,guestName.indexOf("/"));
}
// Code Changes for CQ SWDTS00255898 end
var firstName="";
var names=guestName.split(",");
if(names[0])
{
lastname=names[0];
}
if(names[1])
{
firstName=names[1];
firstName = LTrim(firstName);
}

var s = new Array();


var strHotelNum = '377';
var _sgSearchURLwithGuest = "&_sgSearchURL=targetType=reservation?proper
tyId=" + strHotelNum + "?guestNum=" + guestNum + "?firstName=" + firstName + "?l
astName=" + lastname + "?spgNum=" + spgNum+"?resConf="+cresNumber;
var
_sgSearchURLwithoutGuest = "&_sgSearchURL=targetType=home?proper
tyId=" + strHotelNum ;
if(isSgActive)
{
checkStarGuestSession();
}
if(guestName != null && guestName!= "Welcome!" && starGuestUp == true)
{
s.push( "<a ondrag='return false' noborder href=\"javascript:moveToS
G('");
s.push( _sgSearchURLwithGuest );
s.push( "')\">" );
s.push( "<img ondrag='return false' src='&#x2f;lightspeed&#x2f;e
n_US/images/starGuest.png' border='0' align='absmiddle' width='28' height='28' a
lt='StarGuest'>" );
s.push( "</a>" );
if ( s.length > 0 )
{
s.push( "<span style=\"width:1px\">&nbsp;</span>" );
}
}
else if(guestName == null || guestName == "Welcome!" && starGuestUp == t
rue && sessionTimedOut == false && pageSessionTimedOut == false )
{
//s.push( "<a ondrag='return false' noborder href='javascript:mo
veToSG( )'>");
s.push( "<a ondrag='return false' noborder href=\"javascript:mov
eToSG('");
s.push( _sgSearchURLwithoutGuest );
s.push( "')\">" );
s.push( "<img ondrag='return false' src='&#x2f;lightspeed&#x2f;e
n_US/images/starGuest.png' border='0' align='absmiddle' width='28' height='28' a
lt='StarGuest'>" );
s.push( "</a>" );
if ( s.length > 0 )
{
s.push( "<span style=\"width:1px\">&nbsp;</span>" );
}
}
setSGLink( s.join("") );
}
// This function sets the StarGuestLink
function setSGLink( txt )
{
try
{
if ( ! txt || txt == "null" ) txt = "";
var link = document.getElementById("sgLinkIndicator");
if( link ) link.innerHTML = txt;
}

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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;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='&#x2f;lightspee
d&#x2f;en_US/images/vip/vip10.gif' border='0' align='absmiddle' width='28' heigh
t='28'>" );
else
s.push( "<IMG ondrag='return false' src='&#x2f;lightspee
d&#x2f;en_US/images/vip/vip.gif' border='0' align='absmiddle' width='28' height=
'28'>" );
if ( s.length > 0 )
{

s.push( "<span style=\"width:1px\">&nbsp;</span>" );


}
}
setGuestVIP( s.join("") );
}
function setClub( club, clubAcctNumber, guestName )
{
var s = new Array();
club = club + "";
if ( club == "undefined" ) club = "";
if ( clubAcctNumber == "undefined" ) clubAcctNumber = "";
if ( club && club.length > 0)
{
if ( clubAcctNumber && clubAcctNumber.length > 0 && club.indexOf
("SPG") == 0 )
{
// Replace any ' or " in the guestname with `. Otherwise, causes
JavaScript
// error for names like O'Brien. CQ233543
var idxAlt = guestName.indexOf("/");
if( null != idxAlt && idxAlt > 1 )
{
guestName = guestName.slice(0,guestName.indexOf("/"));
}
var tempGuestName = guestName;
tempGuestName = tempGuestName.replace(/\'/, "`");
tempGuestName = tempGuestName.replace(/\"/, "`");
guestName = tempGuestName;
s.push( "&nbsp;&nbsp;<A id=\"spgSummaryID\" class=\"spgH
eaderLink\" href=\"javascript:doShowSPGSummary('" );
s.push( guestName );
s.push( "','" );
s.push( clubAcctNumber );
s.push( "')\">" );
s.push( club );
s.push( "</A>" );
}
else
s.push( club );
}
setGuestClub( s.join("") );
}
function setRateSchedule( rateSched, hotelNumber, guestNum, guestName )
{
var s = new Array();
rateSched = rateSched + "";
if ( rateSched == "undefined" ) rateSched = "";
var len = rateSched.length;
var idxAlt = guestName.indexOf("/");
if( null != idxAlt && idxAlt >1 )
{
guestName = guestName.slice(0,guestName.indexOf("/"));
}
if ( rateSched && len > 0 )
{
var supIdx = rateSched.indexOf("<SUP>");

var bSup = false;


if ( supIdx > 0 )
{
rateSched = rateSched.substring( 0, supIdx );
bSup = true;
}
s.push( "&nbsp;&nbsp;<A id=\"rateDisplayID\" class=\"headerLink\
" href=\"javascript:doRateDisplay('" );
s.push( hotelNumber );
s.push( "', '" );
s.push( guestNum );
s.push( "', '" );
s.push( guestName );
s.push( "', true)\">" );
s.push( rateSched );
s.push( "</A>" );
if ( bSup )
s.push( "<SUP>+</SUP>" );
}
setRateSched( s.join("") );
}
function createHeaderStr( fromHouseList, guestNum, lastName, firstName, title, v
ipCode, hasMsg, hasLoc, club, room, rateSched, shareWithNum, grpCftWholeCode, vo
iceMailCnt, incognito, hotelNumber, clubAcctNumber, spgNum, interfaceDown, backT
oBackTooltip, ghid , guestAltName,altLngCodeFrGst)
{
//alert("createHeaderStr");
//alert("stdHeader.jsp::createHeaderStr(" + guestNum + "," + lastName + "), back
ToBackTooltip: " + backToBackTooltip);
// alert("fromHouseList = " + fromHouseList + ", guestNum = " + guestNum + ", la
stName = " + lastName + ", firstName = " + firstName + ", title = " + title + ",
vipCode = " + vipCode + ", hasMsg = " + hasMsg + ", hasLoc = " + hasLoc + ", cl
ub = " + club + ", room = " + room + ", rateSched = " + rateSched + ", shareWith
Num = " + shareWithNum + ", grpCftWholeCode = " + grpCftWholeCode + ", voiceMail
Cnt = " + voiceMailCnt + ", incognito = " + incognito + ", hotelNumber = " + hot
elNumber + ", clubAcctNumber = " + clubAcctNumber);
var altName = "";
var altLngCodeFrGst = "";
if ( isNullOrBlank( lastName ) || lastName == "undefined" )
{
resetGuestName();
return;
}
if ( !(isNullOrBlank( guestAltName ) || guestAltName == "undefin
ed") )
{
altName = guestAltName;
}
if ( !(isNullOrBlank( altLngCodeFrGst ) || altLngCodeFrGst == "u
ndefined") )
{
altLngCodeFrGst = altLngCodeFrGst;
}
var guestName = lastName;
if ( !(lastName == "Welcome!") )
{

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=\"&#x2f;ligh
tspeed&#x2f;en_US/images/msgInd.gif\" align=\"absmiddle\" border=\"0\" width=\"2
8\" height=\"28\" alt=\"Messages\"></A>" );
s.push( "<span style=\"width:1px\">&nbsp;</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=\"&#x2f;lightspee
d&#x2f;en_US/images/location.gif\" align=\"absmiddle\" border=\"0\" width=\"28\"
height=\"28\" alt=\"Locations\"></A>" );
s.push( "<span style=\"width:1px\">&nbsp;</span>" );
}
setGuestLocInd( s.join("") );
var s = new Array();
if ( bHaveVoiceMail && (bHaveVoiceMail == true || bHaveVoiceMail == "tru
e"))
{
s.push( " " );

s.push( "<IMG ondrag=\"return false\" src=\"&#x2f;lightspeed&#x2


f;en_US/images/voiceMail.gif\" align=\"absmiddle\" border=\"0\" width=\"28\" hei
ght=\"28\" alt=\"Guest has one or more voice mail messages.\">" );
s.push( "<span style=\"width:1px\">&nbsp;</span>" );
}
setVoiceMailInd( s.join("") );
rateSched = rateSched + "";
if ( rateSched == "undefined" ) rateSched = "";
setRateSchedule( rateSched, hotelNumber, guestNum, guestName );
var s = new Array();
shareWithNum = shareWithNum + "";
if ( shareWithNum == "undefined" ) shareWithNum = "";
if ( shareWithNum && shareWithNum.length > 0 )
{
s.push( " " );
s.push( shareWithNum );
s.push( " " );
}
setSharewith( s.join("") );
var s = new Array();
var cftEnabled = true;
var cftMasterEdit = true;
var guestType = "";
grpCftWholeCode = grpCftWholeCode + "";
if ( grpCftWholeCode == "undefined" || ! grpCftWholeCode || grpCftWholeC
ode == "null" ) grpCftWholeCode = "";
if ( grpCftWholeCode && grpCftWholeCode.length > 0 )
{
s.push( " " );
s.push( grpCftWholeCode );
s.push( " " );
guestType = grpCftWholeCode.split(" ")[0];
}
if(cftEnabled && grpCftWholeCode.length > 0 && guestType == "(C)")
{
s = new Array();
var toolTipReqInd = grpCftWholeCode.indexOf("^");
if(toolTipReqInd > 0)
{
var cftIdName = grpCftWholeCode.split("^");
var compName = cftIdName[1];
grpCftWholeCode = cftIdName[0];
}
var hrefLink = grpCftWholeCode.split(" ");
var guestType = hrefLink[0];
var cftNumber = hrefLink[1];
var i = 0;
for(; i < grpCftWholeCode.length; i++)
{
if("-" == grpCftWholeCode.charAt(i))
{
break;
}
}
var cftName = grpCftWholeCode.slice(++i, grpCftWholeCode.length)

;
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 );

s.push( "', '" );


s.push( guestName );
s.push( "')\"><IMG ondrag=\"return false\" src=\"&#x2f;lightspee
d&#x2f;en_US/images/wakeupInd.gif\" align=\"absmiddle\" border=\"0\" width=\"28\
" height=\"28\" alt=\"Wake-up Calls\"></A>" );
s.push( "<span style=\"width:1px\">&nbsp;</span>" );
}
setWakeupCallInd( s.join("") );
}
var currentSelectedIndex = 0;
function initTheHeader()
{
try
{
showStatusIcon();
}
catch( e )
{
var lsApplet = getLightSpeedApplet();
if ( lsApplet )
{
lsApplet.println("StdHeader.jsp:Unable to showStatus Ico
n.");
}
}
try
{
setPropName( 'Sheraton\x20Waikiki' );
}
catch( e )
{
var lsApplet = getLightSpeedApplet();
if ( lsApplet )
{
lsApplet.println("StdHeader.jsp:Unable to setPropName Ic
on.");
}
}
try
{
createHeaderStr( false, "42813", "PerftestData", "", "", "", false, false
, "", "", "PERF", "", "", "0", false, "377", "","","","","50517598", "", "");
}
catch( e )
{
var lsApplet = getLightSpeedApplet();
if ( lsApplet )
{
lsApplet.println("StdHeader.jsp:Unable to header info cr
eateHeaderStr");
}
}
try
{

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=\"&#x2f;lightspeed&#x2f;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\">&nbsp;</span>" );
}

var interfaceDownObj = document.getElementById( "interfaceDownDiv" );


if ( interfaceDownObj )
interfaceDownObj.innerHTML = s.join("");
}
function resetGuestName()
{
createHeaderStr( false, "", "Welcome!", "", "", "", "", "", "", "", "", ""
, "", "", false, "", "", "","" ,"");
setGuestNum( "", "" );
}
//SWDTS00253883 to clear GuestProfile Indicators when we deselect Guest From Hou
seList
function clearIndOnDeselect()
{
try
{
var ssrInd = document.getElementById( "ssrInd" );
ssrInd.innerHTML = "";
var vip= document.getElementById( "vip" );
vip.innerHTML = "";
var taskInd= document.getElementById( "taskInd" );
taskInd.innerHTML = "";
var remarkInd= document.getElementById( "remarkInd" );
remarkInd.innerHTML = "";
var commentInd= document.getElementById( "commentInd" );
commentInd.innerHTML = "";
var msgInd= document.getElementById( "msgInd" );
msgInd.innerHTML = "";
var voiceMailInd= document.getElementById( "voiceMailInd" );
voiceMailInd.innerHTML = "";
var wakeUpInd= document.getElementById( "wakeUpInd" );
wakeUpInd.innerHTML = "";
var locInd= document.getElementById( "locInd" );
locInd.innerHTML = "";
var roomMateInd= document.getElementById( "roomMateInd" );
roomMateInd.innerHTML = "";
var roomMateInd= document.getElementById( "roomMateInd" );
roomMateInd.innerHTML = "";
var newGuestProfileInd = document.getElementById( "newguestprofi
le" );
newGuestProfileInd.innerHTML = "";
var sgLinkIndicator=document.getElementById( "sgLinkIndicator" )
;
sgLinkIndicator.innerHTML = "";
}
catch(e)
{
//todo nothing
}
}
var guestNum = "";
var hasComment = false;
function setGuestNum( gNum, guestName, ghid )
{
var idxAlt = guestName.indexOf("/");
if( null != idxAlt && idxAlt >1 )
{

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( "" );
}

function showSpecialServiceIndicator( guestNum, guestName )


{
var s = new Array();
if ( bHaveSpecServ == true || bHaveSpecServ == "true" )
{
// Replace any ' or " in the guestname with `. Otherwise, causes Jav
aScript
// error for names like O'Brien. CQ233543
var tempGuestName = guestName;
tempGuestName = tempGuestName.replace(/\'/, "`");
tempGuestName = tempGuestName.replace(/\"/, "`");
guestName = tempGuestName;
s.push( " " );
s.push( "<a ondrag=\"return false\" noborder href=\"javascript:d
oShowGuestSpecialServicesList('" );
s.push( guestNum );
s.push( "','" );
s.push( guestName );
s.push( "','" );
s.push( "377" );
s.push( "');\"><IMG ondrag=\"return false\" src=\"&#x2f;lightspe
ed&#x2f;en_US/images/specialServices.gif\"" );
s.push( " alt=\"Special Services\" align=\"absmiddle\" border=\"
0\" width=\"28\" height=\"28\"></A><span style=\"width:1px\">&nbsp;</span>" );
}
setSpecServInd( s.join("") );
}
function setSpecServInd( txt )
{
try
{
if ( ! txt ) txt = "";
var ssrInd = document.getElementById( "ssrInd" );
if ( ssrInd ) ssrInd.innerHTML = txt;
}
catch( e ) { }
}
function checkIfGuestHasComments( guestNum, guestName )
{
if ( bHaveComments == true || bHaveComments == "true" )
showGuestCommentIndicator( true, guestNum, guestName );
else
setCommentInd( "" );
}
function showGuestCommentIndicator( hasComment, guestNum, guestName )
{
var s = new Array();
if ( hasComment && (hasComment == true || hasComment == "true"))
{
// Replace any ' or " in the guestname with `. Otherwise, causes Jav
aScript
// error for names like O'Brien. CQ233543
var tempGuestName = guestName;
tempGuestName = tempGuestName.replace(/\'/, "`");
tempGuestName = tempGuestName.replace(/\"/, "`");
guestName = tempGuestName;

s.push( " " );


s.push( "<a ondrag=\"return false\" noborder href=\"javascript:d
oShowGuestComments('" );
s.push( guestNum );
s.push( "','" );
s.push( guestName );
s.push( "');\"><IMG ondrag=\"return false\" src=\"&#x2f;lightspe
ed&#x2f;en_US/images/comment.gif\"" );
s.push( " alt=\"Comments\" align=\"absmiddle\" border=\"0\" widt
h=\"28\" height=\"28\"></A><span style=\"width:1px\">&nbsp;</span>" );
}
setCommentInd( s.join("") );
}
function setCommentInd( txt )
{
try
{
if ( ! txt ) txt = "";
var commentInd = document.getElementById( "commentInd" );
if ( commentInd ) commentInd.innerHTML = txt;
}
catch( e ) { }
}
function checkIfGuestHasOpenTasks( guestNum, guestName )
{
// bHaveTasks = true;
if ( bHaveTasks == true || bHaveTasks == "true" )
showTaskIndicator( true, guestNum, guestName, "RES" );
else
setTaskInd( "" );
}
function showTaskIndicator( hasTask, guestNum, guestName, taskType )
{
var s = new Array();
if ( hasTask && (hasTask == true || hasTask == "true"))
{
s.push( " " );
s.push( "<a ondrag=\"return false\" noborder href=\"javascript:s
howGuestTaskTracker('" );
s.push( guestNum );
s.push( "','" );
s.push( guestName );
s.push( "','" );
s.push( taskType );
s.push( "');\"><IMG ondrag=\"return false\" src=\"&#x2f;lightspe
ed&#x2f;en_US/images/task.gif\"" );
s.push( " alt=\"Task Tracker\" align=\"absmiddle\" border=\"0\"
width=\"28\" height=\"28\"></A><span style=\"width:1px\">&nbsp;</span>" );
}
setTaskInd( s.join("") );
}
function setTaskInd( txt )
{
try
{

if ( ! txt ) txt = "";


var taskInd = document.getElementById( "taskInd" );
if ( taskInd ) taskInd.innerHTML = txt;
}
catch( e ) { }
}
function checkIfGuestHasRemarks( guestNum, guestName )
{
if ( bHaveRemarks == true || bHaveRemarks == "true" )
showGuestRemarkIndicator( true, guestNum, guestName );
else
setRemarkInd( "" );
}
function showGuestRemarkIndicator( hasRemark, guestNum, guestName )
{
var s = new Array();
if ( hasRemark && (hasRemark == true || hasRemark == "true"))
{
s.push( " " );
s.push( "<a ondrag=\"return false\" noborder href=\"javascript:d
oShowGuestRemarks('" );
s.push( guestNum );
s.push( "','" );
s.push( guestName );
s.push( "');\"><IMG ondrag=\"return false\" src=\"&#x2f;lightspe
ed&#x2f;en_US/images/remark.gif\"" );
s.push( " alt=\"Remarks\" align=\"absmiddle\" border=\"0\" width
=\"28\" height=\"28\"></A><span style=\"width:1px\">&nbsp;</span>" );
}
setRemarkInd( s.join("") );
}
function setRemarkInd( txt )
{
try
{
if ( ! txt ) txt = "";
var remarkInd = document.getElementById( "remarkInd" );
if ( remarkInd ) remarkInd.innerHTML = txt;
}
catch( e ) { }
}
function checkIfGuestHasRoomMates( guestNum, guestName )
{
if ( bHaveRoomMates == true || bHaveRoomMates == "true" )
showGuestRoomMateIndicator( true, guestNum, guestName );
else
setRoomMateInd( "" );
}
function showGuestRoomMateIndicator( hasRoomMate, guestNum, guestName )
{
var s = new Array();
if ( hasRoomMate && (hasRoomMate == true || hasRoomMate == "true"))
{
// Replace any ' or " in the guestname with `. Otherwise, causes Jav
aScript

// error for names like O'Brien.


var tempGuestName = guestName;
tempGuestName = tempGuestName.replace(/\'/, "`");
tempGuestName = tempGuestName.replace(/\"/, "`");
guestName = tempGuestName;
s.push( " " );
s.push( "<a ondrag=\"return false\" noborder href=\"javascript:d
oShowGuestRoomMates('" );
s.push( guestNum );
s.push( "','" );
s.push( guestName );
s.push( "');\"><IMG ondrag=\"return false\" src=\"&#x2f;lightspe
ed&#x2f;en_US/images/roommate.gif\"" );
s.push( " alt=\"RoomMate\" align=\"absmiddle\" border=\"0\" widt
h=\"28\" height=\"28\"></A><span style=\"width:1px\">&nbsp;</span>" );
}
setRoomMateInd( s.join("") );
}
function setRoomMateInd( txt )
{
try
{
if ( ! txt ) txt = "";
var roomMateInd = document.getElementById( "roomMateInd" );
if ( roomMateInd ) roomMateInd.innerHTML = txt;
}
catch( e ) { }
}
function checkIfGuestHasBackToBacks( guestNum, guestName )
{
if ( bHasBackToBacks.length > 0 )
showBackToBackIndicator( true, guestNum, guestName, bHasBackToBa
cks );
else
setBackToBackInd( "" );
}
function showBackToBackIndicator( hasB2B, guestNum, guestName, iconFileName )
{
var s = new Array();
if ( hasB2B && (hasB2B == true || hasB2B == "true") && iconFileName != "
null" )
{
// Replace any ' or " in the guestname with `. Otherwise, causes Jav
aScript
// error for names like O'Brien. CQ233543
var tempGuestName = guestName;
tempGuestName = tempGuestName.replace(/\'/, "`");
tempGuestName = tempGuestName.replace(/\"/, "`");
guestName = tempGuestName;
s.push( " " );
s.push( "<a ondrag=\"return false\" noborder href=\"javascript:d
oShowBackToBackList('" );
s.push( guestNum );
s.push( "','" );
s.push( guestName );
s.push( "','" );

s.push( "377" );
s.push( "');\"><IMG ondrag=\"return false\" src=\"&#x2f;lightspe
ed&#x2f;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\">&nbsp;</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() );
}

// Added for StarGuest


// Start
function showStatusIcon()
{
var s = new Array();
var strHotelNum = '377';
var _sgSearchURLwithGuest = '&_sgSearchURL=targetType=reservation?pr
opertyId=377?guestNum=42813?firstName=?lastName=PerftestData?spgNum=';
var _sgSearchURLwithoutGuest = '&_sgSearchURL=targetType=reservation
?propertyId=377';
s.push( " " );
if(starGuestDown == true)
{
s.push( "<IMG ondrag=\"return false\" src=\"&#x2f;lights
peed&#x2f;en_US/images/starGuestDown.gif\"" );
s.push( " alt=\"The network connection has been lost bet
ween Galaxy and StarGuest. Contact your on-site System Administrator.\" align=\"
absmiddle\" border=\"0\" width=\"28\" height=\"28\"><span style=\"width:1px\">&n
bsp;</span>" );
}
else if(isConnectionSlow == true)
{
s.push( "<IMG ondrag=\"return false\" src=\"&#x2f;lights
peed&#x2f;en_US/images/starGuestSlow.gif\"" );
s.push( " alt=\"StarGuest communication is slow\" align=
\"absmiddle\" border=\"0\" width=\"28\" height=\"28\"><span style=\"width:1px\">
&nbsp;</span>" );
}
setStatusIcon( s.join("") );
}
// This function sets the Status icon of StarGuest connection.
function setStatusIcon( txt )
{
try
{
if ( ! txt ) txt = "";
var iconName = document.getElementById( "iconName" );
if ( iconName ) iconName.innerHTML = txt;
}
catch( e ) { }
}
//End
// CQ_213581 SPG_Transformation changes start
/************************************************************\
* This javascript function is invoked to show the alert Icon for Suite Night con
firmed
* Res with no physical room
\************************************************************/
function showSuitNightAlertIcon()
{
var s = new Array();
s.push( " " );
var iconText = "";
var iconDiv;
try
{

if( spgSnaAlert == "Y" )


{
var resultStr = sendSynchRequestToServer( "POST", "modRe
s:8", 0, "WORKSPACE", "SNA_ALERT_STATUS", "" );
spgSnaAlert = getField( resultStr, 1, ";" );
if( spgSnaAlert == null || spgSnaAlert === undefined ||
spgSnaAlert == "" || spgSnaAlert == "null" )
{
spgSnaAlert = "N";
}
}
if( spgSnaAlert == "Y" || spgSnaAlert == "O" || spgSnaAlert == "
R")
{
s.push( "<a href='#' " );
s.push( "onclick='javascript:openSnaAler
tPage()'" );
s.push( ">");
if( spgSnaAlert == "R")
{
s.push("<IMG ondrag=\"return false\" src
=\"&#x2f;lightspeed&#x2f;en_US/images/SnaConfirmedAlert.gif\"" );
}
else
{
s.push("<IMG ondrag=\"return false\" src=\"&
#x2f;lightspeed&#x2f;en_US/images/alertsFlash.gif\"" );
}
s.push( " alt=\"Reservation&#x20;Alerts&#x20;and
&#x20;Actions\" align=\"absmiddle\" border=\"0\" width=\"28\" height=\"28\"></a>
<span style=\"width:1px\">&nbsp;</span>" );
iconText = s.join("");
iconDiv = document.getElementById("suiteNightAle
rt");
if( !(iconDiv === undefined) & iconDiv != null )
{
iconDiv.innerHTML = iconText;
}
}
else
{
if( spgSnaAlert == "N" )
{
iconDiv = document.getElementById("suiteNightAlert");
if( !(iconDiv === undefined) & iconDiv != null )
{
iconDiv.innerHTML = iconText;
}
}
}
}
catch( e ) { }
}
/************************************************************\
* This javascript function is invoked to show the alert Icon for Suite Night con
firmed

* Res with no physical room


\************************************************************/
function openSnaAlertPage()
{
var fragStr = fsGetFragmentSizeString( "suiteNightAwardConfirmedList.jsp
" );
var w = fsGetWidth( fragStr );
var h = fsGetHeight( fragStr );
var fh = fsGetFragementHeight( fragStr );
var url = new Array();
url.push( getLocalContextPath() );
url.push( "/common/StdFragmentDlg.jsp?_STATE_KEY=" );
url.push( getStateKey());
url.push( "&_WINDOW_TITLE_RSRC_KEY=sna.list.title");
url.push( "&_FRAGMENT_JSP=suiteNightAwardConfirmedList.jsp");
url.push( "&_FRAGMENT_HEIGHT=" );
url.push( fh );
url.push( "&_NO_BUTTONS=true" );
url.push( "&_UNLOAD_ACTION=doClose()");
try
{
var windowStyle = "scrollbars=0,location=0,status=0,menubar=0,re
sizable=1,width="+w+",height="+h;
var snaDialog = window.open(url.join(""), "wakeup", windowStyle)
;
centerWindow( snaDialog, w, h );
snaDialog.focus();
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "WORKSP
ACE", "DISALARM_SNA_ALERT", "O^" );
}
catch (e)
{
alert("Exception in suiteNightAwardConfirmedList.jsp = " + e.message);
}
}
// CQ_213581 SPG_Transformation changes end
function setPropName( name )
{
var spanIt = "";
var hotelSwitchStr = spanIt;

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>&nbsp;&nbsp;" + 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 + "&nbsp;&nbsp;";
}
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;\">&nbsp;</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")
{

if((ghid) && (ghid !="") && (ghi


d != "0" || ghid != 0) && (ghid != "1" || ghid != 1) && (ghid != "-1" || ghid !=
-1) && showLink )
{
if(altLngEnable == "true")
{
s.push("<A id=\"guestProfileID\" class=\
"headerAltGuestName\" title=\"Click to Launch Guest Profile\" href=\"javascript
:launchViewModifyGuestProfile('");
}
else
{
s.push("<A id=\"guestProfileID\" class=\
"headerGuestName\" title=\"Click to Launch Guest Profile\" href=\"javascript:la
unchViewModifyGuestProfile('");
}
s.push(ghid);
s.push("', '");
s.push("label.viewmodguestprofile");
s.push("', '");
s.push(infoMsg);
s.push("', '");
s.push("HOME:2");
s.push("')\">");
s.push(infoMsg);
s.push("</A>");
}
else
{
s.push(infoMsg);
}
}
else
{
s.push(infoMsg);
}
}
guestInfo.innerHTML = indent + s.join("");
//Code added to display formated Guest name in case of modify reservati
on when property is alternate language enabled
//code ended for above requirement
// CQ182894 - Launch Guest Profile - End
setActiveTabName( infoMsg );
}
catch( e ) { }
}
function setGuestVIP( txt )
{
try
{
if ( ! txt || txt == "null" ) txt = "";
var vip = document.getElementById( "vip" );
if ( vip ) vip.innerHTML = txt;
}

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=\"&#x2f;lightspeed&#x2
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\">&nbsp;</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" );

if (useModalDialogs && window.showModalDialog)


{
window.showModalDialog( encodeURI( url.join("")),this,"dialogWid
th: " + w + "px; dialogHeight: " + h + "px; edge: none; center: Yes; help: No; r
esizable: Yes; Status:No; unadorned: Yes;");
}
else
{
var windowName = "EditGuest";
var windowStyle = "scrollbars=0,location=0,status=0,menubar=0,re
sizable=1,width=" + w + ",height=" + h;
if (useModalDialogs)
{
windowStyle += ",modal=yes";
url.push( "&_OPENER_DISABLE=true" );
}
var myModalDialog = window.open(encodeURI( url.join("")), window
Name, windowStyle);
centerWindow( myModalDialog, w, h );
myModalDialog.focus();
}
}
function setRoomNum( txt )
{
try
{
if ( ! txt )

txt = "";
else
txt = "Room" + " <B>" + txt + "</B>";
var indent = "<span style=\"width:10px;\">&nbsp;</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 + "&nbsp;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;
}

var acctName = new Array();


if ( !isNullOrBlank( acctNum ) )
{
acctName.push( acctNum );
acctName.push( " - " );
}
acctName.push( acctNam );
var tempAcctName = acctName.join("");
tempAcctName = tempAcctName.replace(/\'/, "`");
tempAcctName = tempAcctName.replace(/\"/, "`");
var acctName = new Array();
acctName.push( tempAcctName );
if (taskIcon == "true" || taskIcon == true)
{
showTaskIndicator(true,acctNum,acctNam, "AR");
}
else
{
setTaskInd("");
}
setGuestName( acctName.join("") );
var arContName ;
if(!isNullOrBlank( contName ) || !contName == "undefined")
{
arContName = "Contact " + " <B>" + contName + "</B>";
}
setArContName(arContName);
var arAssignTo ;
if(!isNullOrBlank( assignTo ) || !assignTo == "undefined")
{
arAssignTo = "Assigned To "+ " <B>" + assignTo + "</B>";
}
setArAssignTo( arAssignTo);
var arAgingCode ;
if(!isNullOrBlank( agingCode ) ||! agingCode == "undefined")
{
arAgingCode = "Aging "+ " <B>" + agingCode + "</B>";
}
setArAgingCode( arAgingCode );
}
function setArContName( txt )
{
try
{
if ( ! txt )
{
txt = "";
}
var roomNum = document.getElementById( "roomNum" );
if ( roomNum ) roomNum.innerHTML = txt+ "&nbsp;&nbsp;";
}
catch( e ) { }

}
function setArAssignTo( txt )
{
try
{
if ( ! txt )
{
txt = "";
}
var roomNum = document.getElementById( "rateSched" );
if ( roomNum ) roomNum.innerHTML = txt+ "&nbsp;&nbsp;";
}
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=\"&#x2f;lightspeed&#x2
f;en_US/images/new.gif\"" );
s.push( " alt=\"New Guest Profile\" align=\"absbottom\" border=\
"0\" width=\"20\" height=\"10\"><span style=\"width:1px\">&nbsp;</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;">&nbsp;</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>

<td nowrap style="width:5px">&nbsp;</td>


<td nowrap align="right" nowrap valign="top" width="25%"><table ce
llpadding="0" cellspacing="0" border="0" class="headerBody"><tbody><tr>
<td nowrap><div align="left" id="interfaceDownDiv" class
="headerGuestMSG"></div></td>
<td nowrap style="width:5px;">&nbsp;</td>
<!-- Added for the StraGuest Connection Status -->
<td nowrap><div class="iconNameHeader" id="iconName">&nb
sp;</div></td>
<!-- CQ_213581 SPG_Transformation changes start -->
<!-- CQ_213581 SPG_Transformation changes start -->
<td nowrap><div class="propNameHeader" id="propName">&nb
sp;</div></td>
</tr></tbody></table></td>
</tr>
<tr>
<td nowrap colspan="4"><table border="0" width="100%" cellpaddin
g="0" cellspacing="4" class="headerBody"><tbody><tr style="height:18px">
<td nowrap align="left" valign="top" width="10%"><div al
ign="left" id="roomNum" class="headerGuestAdditionalInfo"></div></td>
<td nowrap align="left" valign="top" width="20%"><div al
ign="left" id="rateSched" class="headerGuestAdditionalInfo"></div></td>
<td nowrap align="left" valign="top" width="15%"><div al
ign="left" id="sharewith" class="headerGuestAdditionalInfo"></div></td>
<td nowrap align="left" valign="top" width="25%"><div al
ign="left" id="grpCftWhole" class="headerGuestAdditionalInfo"></div></td>
<td nowrap colspan="2" align="right" width="30%"><div id
="agentID" class="agentTextHeader">&nbsp;</div></td>
</tr></tbody></table></td>
</tr>
</tbody></table>
<table border="0" width="100%" cellspacing="0" cellpadding="0" style="height:34p
x"><tbody>
<tr style="height:34px">
<td class="stdToolbar" style="width:2px; height:34px">&nbsp;</td
>
<td class="stdToolbar" style="height:34px"><script type="text/ja
vascript">var keyHT = new hashTable();</script><table border="0" cellpadding="0"
cellspacing="0"><tbody><tr><td align="center"><button name="toolBarBtn" style="
background-color:transparent;border:0;cursor:default;width:31;height:31;" onclic
k='javascript:doCheckInSearch()' ><img ondrag="return false" border="0" src="/li
ghtspeed/en_US/images/toolbar/checkin.gif" width="32" height="32" onmouseover="s
howTip('Check-In')" onmouseout="hideTip()" ></button></td><td align="center" cla
ss="toolbarItem" width="3"></td><td align="center"><button name="toolBarBtn" sty
le="background-color:transparent;border:0;cursor:default;width:31;height:31;" on
click='javascript:doCheckOutSearch()' ><img ondrag="return false" border="0" src
="/lightspeed/en_US/images/toolbar/checkout.gif" width="32" height="32" onmouseo
ver="showTip('Check-Out')" onmouseout="hideTip()" ></button></td><td align="cent
er" class="toolbarItem" width="3"></td><td align="center"><button name="toolBarB
tn" style="background-color:transparent;border:0;cursor:default;width:31;height:
31;" onclick='javascript:createResWizard()' ><img ondrag="return false" border="
0" src="/lightspeed/en_US/images/toolbar/new.gif" width="32" height="32" onmouse
over="showTip('New Reservation')" onmouseout="hideTip()" ></button></td><td alig
n="center"><button name="toolBarBtn" style="background-color:transparent;border:
0;cursor:default;width:31;height:31;" onclick='javascript:createRateInqWizard()'
><img ondrag="return false" border="0" src="/lightspeed/en_US/images/toolbar/ra
teInq.gif" width="32" height="32" onmouseover="showTip('Rate Inquiry')" onmouseo

ut="hideTip()" ></button></td><td align="center"><button name="toolBarBtn" style


="background-color:transparent;border:0;cursor:default;width:31;height:31;" oncl
ick='javascript:createWalkInWizard()' ><img ondrag="return false" border="0" src
="/lightspeed/en_US/images/toolbar/walkIn.gif" width="32" height="32" onmouseove
r="showTip('Walk-In')" onmouseout="hideTip()" ></button></td><td align="center">
<button name="toolBarBtn" style="background-color:transparent;border:0;cursor:de
fault;width:31;height:31;" onclick='javascript:createInfoResWizard()' ><img ondr
ag="return false" border="0" src="/lightspeed/en_US/images/toolbar/info.gif" wid
th="32" height="32" onmouseover="showTip('Information Guest')" onmouseout="hideT
ip()" ></button></td><td align="center" class="toolbarItem" width="3"></td><td a
lign="center"><button name="toolBarBtn" style="background-color:transparent;bord
er:0;cursor:default;width:31;height:31;" onclick='javascript:openReservation()'
><img ondrag="return false" border="0" src="/lightspeed/en_US/images/toolbar/ope
n.gif" width="32" height="32" onmouseover="showTip('Open Reservation')" onmouseo
ut="hideTip()" ></button></td><td align="center" class="toolbarItem" width="3"><
/td><td align="center"><button name="toolBarBtn" style="background-color:transpa
rent;border:0;cursor:default;width:31;height:31;" onclick='javascript:openQuickM
odify("HOME:2")' ><img ondrag="return false" border="0" src="/lightspeed/en_US/i
mages/toolbar/quickModify.png" width="32" height="32" onmouseover="showTip('Quic
k Modify')" onmouseout="hideTip()" ></button></td><td align="center" class="tool
barItem" width="3"></td><td align="center"><button name="toolBarBtn" style="back
ground-color:transparent;border:0;cursor:default;width:31;height:31;" onclick='j
avascript:encodeKey(42813)' ><img ondrag="return false" border="0" src="/lightsp
eed/en_US/images/toolbar/roomkey.gif" width="32" height="32" onmouseover="showTi
p('Encode Key')" onmouseout="hideTip()" ></button></td><td align="center" class=
"toolbarItem" width="3"></td><td align="center"><button name="toolBarBtn" style=
"background-color:transparent;border:0;cursor:default;width:31;height:31;" oncli
ck='javascript:openWorkspace("CASHIER")' ><img ondrag="return false" border="0"
src="/lightspeed/en_US/images/toolbar/currency.gif" width="32" height="32" onmou
seover="showTip('Cashiering')" onmouseout="hideTip()" ></button></td><td align="
center"><button name="toolBarBtn" style="background-color:transparent;border:0;c
ursor:default;width:31;height:31;" onclick='javascript:showFastPost()' ><img ond
rag="return false" border="0" src="/lightspeed/en_US/images/toolbar/fastPosting.
gif" width="32" height="32" onmouseover="showTip('Fast Post')" onmouseout="hideT
ip()" ></button></td><td align="center" class="toolbarItem" width="3"></td><td a
lign="center"><button name="toolBarBtn" style="background-color:transparent;bord
er:0;cursor:default;width:31;height:31;" onclick='javascript:showGroupActionDlg(
"true","570")' ><img ondrag="return false" border="0" src="/lightspeed/en_US/ima
ges/toolbar/group.gif" width="32" height="32" onmouseover="showTip('Group')" onm
ouseout="hideTip()" ></button></td><td align="center"><button name="toolBarBtn"
style="background-color:transparent;border:0;cursor:default;width:31;height:31;"
onclick='javascript:showWholesalerActionDlg()' ><img ondrag="return false" bord
er="0" src="/lightspeed/en_US/images/toolbar/wholesale.gif" width="32" height="3
2" onmouseover="showTip('Wholesaler')" onmouseout="hideTip()" ></button></td><td
align="center"><button name="toolBarBtn" style="background-color:transparent;bo
rder:0;cursor:default;width:31;height:31;" onclick='javascript:launchCftMenu()'
><img ondrag="return false" border="0" src="/lightspeed/en_US/images/toolbar/cft
.gif" width="32" height="32" onmouseover="showTip('CFT Master (T)')" onmouseou
t="hideTip()" ></button><script type="text/javascript">keyHT.put('T','javascript
:launchCftMenu()');</script></td><td align="center" class="toolbarItem" width="3
"></td><td align="center"><button name="toolBarBtn" style="background-color:tran
sparent;border:0;cursor:default;width:31;height:31;" onclick='javascript:showTra
velAgencyActionDialog()' ><img ondrag="return false" border="0" src="/lightspeed
/en_US/images/toolbar/travelAgency.png" width="32" height="32" onmouseover="show
Tip('Travel Agency (TA)')" onmouseout="hideTip()" ></button><script type="text
/javascript">keyHT.put('TA','javascript:showTravelAgencyActionDialog()');</scrip
t></td><td align="center"><button name="toolBarBtn" style="background-color:tran
sparent;border:0;cursor:default;width:31;height:31;" onclick='javascript:openRep
ortWorkspace()' ><img ondrag="return false" border="0" src="/lightspeed/en_US/im
ages/toolbar/report.gif" width="32" height="32" onmouseover="showTip('Reports')"

onmouseout="hideTip()" ></button></td><td align="center" class="toolbarItem" wi


dth="3"></td><td align="center"><button name="toolBarBtn" style="background-colo
r:transparent;border:0;cursor:default;width:31;height:31;" onclick='javascript:s
howArActionDlg()' ><img ondrag="return false" border="0" src="/lightspeed/en_US/
images/toolbar/ar.png" width="32" height="32" onmouseover="showTip('Accounts Rec
eivable')" onmouseout="hideTip()" ></button></td><td align="center" class="toolb
arItem" width="3"></td><td align="center" class="toolbarItem" width="3"></td><td
align="center"><button name="toolBarBtn" style="background-color:transparent;bo
rder:0;cursor:default;width:31;height:31;" onclick='javascript:launchGuestHistor
y()' ><img ondrag="return false" border="0" src="/lightspeed/en_US/images/toolba
r/guestProfile.gif" width="32" height="32" onmouseover="showTip('Guest Profile')
" onmouseout="hideTip()" ></button></td><td align="center" class="toolbarItem" w
idth="3"></td><td align="center"><button name="toolBarBtn" style="background-col
or:transparent;border:0;cursor:default;width:31;height:31;" onclick='javascript:
doGuestBatchUpdate()' ><img ondrag="return false" border="0" src="/lightspeed/en
_US/images/toolbar/guestBatch.gif" width="32" height="32" onmouseover="showTip('
Guest Batch Update')" onmouseout="hideTip()" ></button></td><td align="center" c
lass="toolbarItem" width="3"></td><td align="center"><button name="toolBarBtn" s
tyle="background-color:transparent;border:0;cursor:default;width:31;height:31;"
onclick='javascript:spgSearch()' ><img ondrag="return false" border="0" src="/li
ghtspeed/en_US/images/toolbar/spgEnroll.gif" width="32" height="32" onmouseover=
"showTip('SPG Lookup/Enroll')" onmouseout="hideTip()" ></button></td><td align="
center" class="toolbarItem" width="3"></td><td align="center"><button name="tool
BarBtn" style="background-color:transparent;border:0;cursor:default;width:31;hei
ght:31;" onclick='javascript:doRoomManagement()' ><img ondrag="return false" bor
der="0" src="/lightspeed/en_US/images/toolbar/room.gif" width="32" height="32" o
nmouseover="showTip('Room Management')" onmouseout="hideTip()" ></button></td><t
d align="center"><button name="toolBarBtn" style="background-color:transparent;b
order:0;cursor:default;width:31;height:31;" onclick='javascript:doHkManagement()
' ><img ondrag="return false" border="0" src="/lightspeed/en_US/images/toolbar/h
ousekeeping.gif" width="32" height="32" onmouseover="showTip('Housekeeping')" on
mouseout="hideTip()" ></button></td><td align="center" class="toolbarItem" width
="3"></td><td align="center"><button name="toolBarBtn" style="background-color:t
ransparent;border:0;cursor:default;width:31;height:31;" onclick='javascript:hote
lInfo()' ><img ondrag="return false" border="0" src="/lightspeed/en_US/images/to
olbar/directory.gif" width="32" height="32" onmouseover="showTip('Hotel Informat
ion')" onmouseout="hideTip()" ></button></td><td align="center"><button name="to
olBarBtn" style="background-color:transparent;border:0;cursor:default;width:31;h
eight:31;" onclick='javascript:showUtilites()' ><img ondrag="return false" borde
r="0" src="/lightspeed/en_US/images/toolbar/tools.gif" width="32" height="32" on
mouseover="showTip('Utilities')" onmouseout="hideTip()" ></button></td><td align
="center" class="toolbarItem" width="3"></td><td align="center"><button name="to
olBarBtn" style="background-color:transparent;border:0;cursor:default;width:31;h
eight:31;" onclick='javascript:openAdminTab()' ><img ondrag="return false" borde
r="0" src="/lightspeed/en_US/images/toolbar/admin.gif" width="32" height="32" on
mouseover="showTip('Administration')" onmouseout="hideTip()" ></button></td><td
align="center" class="toolbarItem" width="3"></td><td align="center"><button nam
e="toolBarBtn" style="background-color:transparent;border:0;cursor:default;width
:31;height:31;" onclick='javascript:openNightAuditTab()' ><img ondrag="return fa
lse" border="0" src="/lightspeed/en_US/images/nightAudit.png" width="32" height=
"32" onmouseover="showTip('Night Audit')" onmouseout="hideTip()" ></button></td>
<td align="center"><button name="toolBarBtn" style="background-color:transparent
;border:0;cursor:default;width:31;height:31;" onclick='javascript:lockApplicatio
n()' ><img ondrag="return false" border="0" src="/lightspeed/en_US/images/toolba
r/lock.gif" width="32" height="32" onmouseover="showTip('Lock Application')" onm
ouseout="hideTip()" ></button></td><td align="center" class="toolbarItem" width=
"3"></td><td align="center"><button name="toolBarBtn" style="background-color:tr
ansparent;border:0;cursor:default;width:31;height:31;" onclick='javascript:doLog
Out()' ><img ondrag="return false" border="0" src="/lightspeed/en_US/images/tool
bar/logoff.gif" width="32" height="32" onmouseover="showTip('Log-Out')" onmouseo

ut="hideTip()" ></button></td><td align="right"><span style="width:8px"></span><


/td><td align="center"><button name="toolBarBtn" style="background-color:transpa
rent;border:0;cursor:default;width:31;height:31;" onclick='javascript:showHelp()
' ><img ondrag="return false" border="0" src="/lightspeed/en_US/images/toolbar/h
elp.gif" width="32" height="32" onmouseover="showTip('Help')" onmouseout="hideTi
p()" ></button></td><td align="right"><span style="width:5px"></span></td></tr><
/tbody></table>
</td>
<td align="right" nowrap class="stdToolbar" style="width:100px;height:34
px; vertical-align:middle;">

<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";

if(elem.contentEditable && elem.designMode && elem.contentEditable == 't


rue' && elem.designMode == 'on')
{
isTextField = true;
}
if ( keyCode == KEY_BACKSPACE && ( isQuickNav || ! isTextField )
)
{
event.cancelBubble = true;
event.returnValue = false;
event.keyCode = 0;
if (event.stopPropagation) event.stopPropagation();
return false;
}
else if ( keyCode == KEY_F9 )
{
setQuickNavFocus();
event.cancelBubble = true;
event.returnValue = false;
event.keyCode = 0;
if (event.stopPropagation) event.stopPropagation();
return false;
}

else if ( keyCode == KEY_ENTER && doesQuickNavHaveFocus() )


{
executeQuickNav();
event.cancelBubble = true;
event.returnValue = false;
event.keyCode = 0;
if (event.stopPropagation) event.stopPropagation();
return false;
}
}
catch( e )
{
}
}
function setQuickNavFocus()
{
var quickNav = document.getElementById("_quickNav");
if ( quickNav )
{
quickNav.focus();
//fireAnEvent( quickNav, "mousedown" );
}
}
function fireAnEvent(elementObj, eventType)
{
if (elementObj.fireEvent)
{
elementObj.fireEvent('on' + eventType);
}
else
{
var eventObj = document.createEvent('Events');
eventObj.initEvent(eventType, true, false);
elementObj.dispatchEvent(eventObj);
}
}
function executeQuickNav()
{
try
{
var quickNavObj = document.getElementById("_quickNav");
if ( quickNavObj )
{
var quickNavValue = getSelectedValue( quickNavObj );
if ( quickNavValue == "XXX" )
{
alert("Sorry the selected QuickNav item is under
construction, try another option.");
return;
}
if ( ! isNullOrBlank( quickNavValue ) )
{
eval( quickNavValue );

setSelectedValue( quickNavObj, "" );


}
}
}
catch( e )
{
errorHandler( e, "quickNavChangeDelayed" );
}
}
function doGoHome()
{
document.theForm._ACTIVATE_STATE.value = "HOME\x3A2";
submitWorkspace();
}
function doCreateGP()
{
var gpdata = new Array();
gpdata.push("");
gpdata.push("NEW");
var data = gpdata.join(";");
var response = sendSynchRequestToServer( "POST", "HOME\x3A2", 0, "GUESTP
ROFILE", "GET_GUEST_PROFILE", data );
status = getField( response, 0, ";" );
if(status != "ok")
{
alert("Sorry, could not launch the Guest Profile");
return;
}
var status = getField( response, 0, ";" );
ghid = getField( response, 1, ";" );
if(status == "ok")
{
launchCreateGuestProfile(ghid, "label.createguestprofile", "New
Guest Profile", "HOME\x3A2");
}
}
function quickNavInit()
{
var quickNavObj = document.getElementById("_quickNav");
if ( quickNavObj )
{
sortSelect( quickNavObj );
var option=document.createElement("option");
option.text="Select Quick Navigation Option";
try
{
quickNavObj.add(option,x.options[0]);
}
catch (e)
{
quickNavObj.add(option,0);
}
setSelectedValue( quickNavObj, "" );
}
}
registerFragment("quickNav", true, false, false);

//fix for CR143 start.


function doOpenArHome()
{
try
{
var response = sendSynchRequestToServer("POST", getStateKey(), 0
, "ARHOMEPAGE", "OPEN_AR_HOMEPAGE","");
var status = getField( response, 0, ";" );
if ( status == "ok" )
{
submitWorkspace();
}
else
{
var errMsg = getField(response, 1, ";");
alert("Unable to open AR HomePage:\n\n" + errMsg);
}
}
catch(e)
{
alert( "quickNav.jsp doOpenArHome() : " + e.message );
}
}
function doCreateArAccount()
{
try
{
var launchData = new Array();
launchData.push("QUICK_NAV");
launchData.push("#");
launchData.push("NEW");
launchData.push("#");
launchData.push("");
launchData.push("#");
launchData.push("HOME\x3A2");
var data = launchData.join("");
launchArAcctInformation(data);
}
catch(e)
{
alert( "quickNav.jsp doCreateArAccount() : " + e.message );
}
}
//fix for CR143 end.
function doCreateTA()
{
launchCreateTaMaster("TA_SRCH_LP_TA_MENU");
}
function openTAParameters()
{
openAdminTab(false, false, false, false, false,false,true);
}
function openTASearch()
{
launchTaSearch("TA_SRCH_LP_TA_MENU");
}
function openTACheckReconciliation()

{
launchTaCheckReconcile();
}
function openTACommCheckEdit()
{
launchTaCommCheckEdit();
}
function openTAVoidCheck()
{
launchTaVoidCheck();
}
//-->
</script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;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="doOpenArHome();">ARH - AR - HomePage</option>

<option value="doCreateArAccount();">ARC - AR - Create</option>

<option value="launchArAcctSearch('AR_MENU' , 'HOME\x3A2');">ARS - AR Search</option>

<option value="launchArMutiplePayment('AR_MENU', 'CREATE', 'HOME\x3A2');


">ARMP - AR - Mulitple Payments</option>

<option value="openAdminTab(false,false,false,false,true);">ARP - AR - P
arameters</option>

<option value="showRoomsAvailDetail()">AVS - Availability Summary</optio


n>

<option value="doBatchBackToBack('HOME\x3A2');">BBB - B2B Batch Reservat


ion Linking</option>

<option value="launchCreateCftMaster();">CFTC - CFT - Create</op


tion>

<option value="launchCftMergeSetup('HOME:2', 'CFT Merge setup is


currently in use by %agentName%.');">CFTM - CFT - Merge</option>

<option value="openAdminTab(false, false, false, false, false, t


rue);">CFTP - CFT - Parameters</option>

<option value="launchCftSearch('CFT_MENU');">CFTS - CFT - Search


</option>

<option value="showChangeLog()">CL - Change Logs</option>


<option value="doCheckInSearch()">CI - Check In Houselist</option>

<option value="doCheckOutSearch()">CO - Check Out Houselist</option>

<option value="openWorkspace('CASHIER')">CSH - Cashiering Houselist</opt


ion>
<option value="showKeyEncoding()">KEY - Encode Key</option>
<option value="showFastPost()">FP - Fast Post</option>
<option value="viewGrpDate()">FGWB - Future Grp/Whs/Banquet</option>
<option value="doViewHouseListDate()">FHL - Future House List</option>
<option value="doGroupCheckIn()">GRCI - Group - Check In Delegates</opti
on>
<option value="doGroupCheckOut()">GRCO - Group - Check Out Delegates</op
tion>
<option value="createGroupWorkspace('CREATE','',false,'')">GRC - Group -

Create</option>

<option value="displayGroupEvents()">GRE - Group - Events</option>

<option value="doLaunchGroupParametersAdmin()">GRP - Group - Parameters<


/option>

<option value="doGroupPreBlock()">GRPB - Group - Pre-Block Delegates</op


tion>

<option value="openGroupMaster()">GRS - Group - Search</option>

<option value="doGroupUnBlock()">GRUB - Group - Un-Block Delegates</opti


on>

<option value="doGuestBatchUpdate()">GBU - Guest Batch Update</option>

<option value="openAdminTab(true,false,false)">GPP - Guest Profi


le - Parameters</option>
<option value="doCreateGP()">GPC - Guest Profile - Create</optio
n>

<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>

<option value="showHelp()">HELP - Help</option>


<option value="hotelInfo()">HINFO - Hotel Info</option>
<option value="showHouseCounts()">HCNT - House Count</option>

<option value="openHKRoomAttendant()">HKA - Housekeeping Attendant Inquiry</opti


on>

<option value="doHKForecasting('',false,false)">HKF - Housekeeping Forec


ast</option>

<option value="doHKSched()">HKS - Housekeeping Scheduling </option>


<option value="doGoHome()">HOME - Home Page</option>
<option value="createInfoResWizard()">INFO - Information Only </option>

<option value="doRoomInteractiveBlock()">IRBC - Interactive Room Block</


option>
<option value="doLogOut()">LO - Log Out </option>
<option value="lockApplication()">LOCK - Lock </option>

<option value="showRoomsAvailMultiDayDetail()">MULI - Multiple Day Avail


ability</option>
<option value="showRoomsAvail1DayDetail()">ONE - One Day Availability </
option>
<option value="doRoomBlock()">QB - Quick Block</option>
<option value='openQuickModify("HOME:2")'>QM - Quick Modify</option>
<option value="doRoomUnblock()">QUB - Quick Unblock</option>

<option value="createRateInqWizard()">RI - Rate Inquiry</option>


<option value="doShowRatePlanSearchApplet()">RATE - Rate Plan - Search</
option>
<option value="openReportWorkspace()">RPT - Reports </option>

<option value="createResWizard()">RES - Reservation - Create</option>

<option value="openReservation()">RESS - Reservation - Search</option>

<option value="doRoomHistory()">RH - Room History</option>

<option value="doHkRoomBatchModification()">RBU - Rooms Batch Update</op


tion>

<option value="doLaunchRoomsDashboard()">RD - Rooms Dashboard</option>

<option value="doRoomReconciliation()">RREC - Rooms Reconciliation</opti


on>

<option value="openRoomStatusUpdate()">RMS - Rooms Status Update</option


>

<option value="spgSearch()">SPG - SPG Lookup/Enroll</option>

<option value="doCreateTA();">TAC - TA - Create</option>

<option value="openTAParameters();">TAP - TA - Parameters</option>

<option value="openTASearch();">TAS - TA - Search</option>

<option value="openTACheckReconciliation();">TAR - TA - Check Reconcilia


tion</option>

<option value="openTACommCheckEdit();">TAE - TA - Comm. Check Edit</opti

on>

<option value="openTAVoidCheck();">TAV - TA - Void Check </option>


<option value="showUtilites()">UTIL - Utilities</option>
<option value="createWalkInWizard()">WI - Walk In - Create</option>

<option value="doWholesalerCheckIn()">WCI - WHS - Check In Delegates</op


tion>
<option value="doWholesalerCheckOut()">WSCO - WHS - Check Out Delegates<
/option>

<option value="doWholesalerPreBlock()">WSPB - WHS - Pre-Block Delegates<


/option>
<option value="openWholesaleMaster()">WSS - WHS - Search</option>
<option value="doWholesalerUnBlock()">WSUB - WHS - Un-Block Delegates</o
ption>
</select>
</td>
<td nowrap class="headerDate" style="height:34px; width:120px" b
ackground="&#x2f;lightspeed&#x2f;en_US/images/toolbartransition.gif">
06-13-2014
<SPAN style="width:19px">&nbsp;</SPAN></td>
</tr>
</tbody></table>
<TABLE cellspacing="2" cellpadding="0" border="0" class="resToolbarBackground" w
idth="100%">
<TBODY><TR>
<TD align="center"><A accesskey="=" onmouseover="showTip('Help Alt-=')" onmouseo
ut="hideTip()" onkeypress="hrefHandleKeyDown(showPopupMenu('action',this,event))
" class="resLinkBtn" onclick="javascript:showPopupMenu('action',this,event); ret
urn false;" onfocus="javascript:showPopupMenu('action',this,event);" href="#">Ac
tion&nbsp;<IMG border='0' src='/lightspeed/en_US/images/smallIcons/popup.gif' w
idth='11' height='11'></A></TD>
<TD align="center"><IMG border='0' src='/lightspeed/en_US/images/smallIcons/vert
Bar.gif' width='1' height='21'></TD>
<TD align="center"><A accesskey="a" onmouseover="showTip('Help Alt-a')" onmouseo

ut="hideTip()" class="resLinkBtn" onkeypress="hrefHandleKeyDown(showPopupMenu('a


dd',this,event))" onclick="javascript:showPopupMenu('add',this,event); return fa
lse;" onfocus="javascript:showPopupMenu('add',this,event);" href="#">Add&nbsp;<I
MG border='0' src='/lightspeed/en_US/images/smallIcons/popup.gif' width='11' he
ight='11'></A></TD>
<TD align="center"><IMG border='0' src='/lightspeed/en_US/images/smallIcons/vert
Bar.gif' width='1' height='21'></TD>
<TD align="center"><A accesskey="v" onmouseover="showTip('Help Alt-v')" onmouseo
ut="hideTip()" class="resLinkBtn" onkeypress="hrefHandleKeyDown(showPopupMenu('v
iew',this,event))" onclick="javascript:showPopupMenu('view',this,event); return
false;" onfocus="javascript:showPopupMenu('view',this,event);" href="#">View&nbs
p;<IMG border='0' src='/lightspeed/en_US/images/smallIcons/popup.gif' width='11
' height='11'></A></TD>
<TD align="center"><IMG border='0' src='/lightspeed/en_US/images/smallIcons/vert
Bar.gif' width='1' height='21'></TD>
<TD align="center"><A accesskey="p" onmouseover="showTip('Help Alt-p')" onmouseo
ut="hideTip()" class="resLinkBtn" onkeypress="hrefHandleKeyDown(showPopupMenu('p
rint',this,event))" onclick="javascript:showPopupMenu('print',this,event); retur
n false;" onfocus="javascript:showPopupMenu('print',this,event);" href="#">Print
&nbsp;<IMG border='0' src='/lightspeed/en_US/images/smallIcons/popup.gif' width
='11' height='11'></A></TD>
<TD align="center"><IMG border='0' src='/lightspeed/en_US/images/smallIcons/vert
Bar.gif' width='1' height='21'></TD>
<TD align="center"><A accesskey="^" onmouseover="showTip('Help Alt-^ and ENTER')
" onmouseout="hideTip()" class="resLinkBtn" onkeypress="hrefHandleKeyDown(resCon
firmation())" onclick="javascript:resConfirmation(); return false;" href="#">Con
firmation</A></TD>
<TD align="center"><IMG border='0' src='/lightspeed/en_US/images/smallIcons/vert
Bar.gif' width='1' height='21'></TD>
<TD align="center"><A accesskey="x" onmouseover="showTip('Help Alt-x and ENTER')
" onmouseout="hideTip()" class="resLinkBtn" onclick="javascript:cancelRes(); ret
urn false;" href="#">Cancel Res</A></TD>
</TR></TBODY></TABLE>
<div style="background-color: #ebebf5;">

<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>

<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.
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>

<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/autoCompl


eteSelect.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/edit/javascript/
validation.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/javascript/lsgri
d/lib/jquery-1.7.min.js"></script>
<script type="text/javascript">

var HK_ENABLED = "true";


var maskedDatabaseCCNumber = "";
var isRdpEnabled = false;
function updateEmail(emailId)
{
try
{
if ( document.theForm.email && emailId != null && emailId != und
efined)
{
document.theForm.email.value = emailId;
}
}
catch(e)
{
alert(" exception in resWorkspace.jsp - updateEmail()");
}
}
function updateGTDStatus(newGTD)
{
try
{
var gtdObj = document.getElementById("guaranteeStatus");
if ( gtdObj )
{
initSelectById( "guaranteeStatus", newGTD );
}
}
catch( e )
{
}
}
function getEditableFieldWebParams()
{
try
{
var params = new Array();
if ( document.theForm.arriveTime )
{
params.push( "arriveTime^" );
params.push( document.theForm.arriveTime.value );
params.push( "^~" );
}

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( getSelectedValue( document.theForm.OptStatu


s ) );
params.push( "^~" );
}
// added for StarGuest project - End
if ( document.theForm.address1 )
{
params.push( "address1^" );
params.push( document.theForm.address1.value );
params.push( "^~" );
}
if ( document.theForm.address2 )
{
params.push( "address2^" );
params.push( document.theForm.address2.value );
params.push( "^~" );
}
if ( document.theForm.postalCode )
{
params.push( "postalCode^" );
params.push( document.theForm.postalCode.value );
params.push( "^~" );
}
if ( document.theForm.city )
{
params.push( "city^" );
params.push( document.theForm.city.value );
params.push( "^~" );
}
if ( document.theForm.stateCode )
{
params.push( "stateCode^" );
params.push( getSelectedValue( document.theForm.stateCod
e ) );
params.push( "^~" );
}
if ( document.theForm.country )
{
params.push( "country^" );
params.push( getSelectedValue( document.theForm.country
) );
params.push( "^~" );
}
if ( document.theForm.guestCountry )
{
params.push( "guestCountry^" );
params.push( document.theForm.guestCountry.value );
params.push( "^~" );
}
if ( document.theForm.sourceCode )
{

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

//Changes For Double Bytes


if(false)
{

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 hiddenFocusElement = document.getElementById("_" + sectionNa


me + "Focus" );
if ( hiddenFocusElement )
{
var nextFocusElem = setFocusToNextInputField( hiddenFocu
sElement, sectionName );
if ( event.returnValue ) event.returnValue = false;
event.cancelBubble = true;
if (event.stopPropagation) event.stopPropagation();
return false;
}
}
else if ( value == KEY_F5 || value == KEY_F12 )
{
event.cancelBubble = true;
event.returnValue = false;
if (event.stopPropagation) event.stopPropagation();
event.keyCode = 0;
return false;
}
// start SWDTS00251201 don't allow alt-r which is the same as F5
var bAltPressed = false;
if ( document.all )
{
bAltPressed = event.altKey;
}
else
{
bAltPressed = event.modifiers & Event.ALT_MASK;
}
if ( bAltPressed && value == KEY_R )
{
event.cancelBubble = true;
event.returnValue = false;
event.keyCode = 0;
if (event.stopPropagation) event.stopPropagation();
return false;
}
// end SWDTS00251201 don't allow alt-r which is the same as F5
}

function setFocusToNextInputField(searchForElemId, sectionName)


{
var nextField = null;
var bFoundHidden = false;
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 )
{
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();

setTimeout( "setResWorkspaceFocus()", 500 );

//open Manage Sharewith screen if _showManageSW value is set to the room


sequence of the particular reservation.
var roomSeqNum = document.theForm._showManageSW.value;
var swMsg = document.theForm._SWInitMsg.value;
if(roomSeqNum == null || roomSeqNum == "" || roomSeqNum == "null")
{ }
else
{
document.theForm._showManageSW.value = "";
setTimeout("manageSharewith('" + roomSeqNum + "', '" + swMsg + "
')", 800);
}

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 ) {}
*/
}

function expandResSection( sectionToExpand )


{
try
{
var focusElements = document.getElementsByName("focusSection");
if ( focusElements )
{
var focusLen = focusElements.length;
for ( var idx = 0; idx < focusLen; idx++ )
{
var sectionName = focusElements[idx].id;
if ( sectionName.indexOf( sectionToExpand ) >= 0 )
{
var sectionObj = document.getElementById( sectio
nName + "Section" );
if ( sectionObj )
{
var vis = sectionObj.style.display;
if (vis == "none")
{
expandContract( sectionName + "Section",
true);
}
}
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";

function validateMarketing(bCanContinueWithErrors, bValidateOnly)


{
try
{
if ( document.theForm.sourceCode )
{
if (typeof bValidateOnly == 'undefined')
{
bValidateOnly = false;
}
if (readonlyRes == true)
return valid;
if ( requiresSource == "true" && isNullOrBlank( getSelec
tedValueById("sourceCode") ) )
{
if ( ! bValidateOnly )
{
alertMessageKey( "msg.marketSourceMsg" )
;
}
expandResSection( "RES_MARKETING" );
document.theForm.sourceCode.focus();
return invalid;
}
if ( requiresMarketSegment == "true" && isNullOrBlank( g
etSelectedValueById("marketCode") ) )
{
if ( ! bValidateOnly )
{
alertMessageKey( "msg.marketSegmentMsg"
);
}
expandResSection( "RES_MARKETING" );
document.theForm.marketCode.focus();
return invalid;
}
if ( requiresRegion == "true" && isNullOrBlank( getSelec
tedValueById("regionCode") ) )
{
if ( ! bValidateOnly )
{
alertMessageKey("msg.marketRegionMsg" );
}
expandResSection( "RES_MARKETING" );
document.theForm.regionCode.focus();
return invalid;
}
if ( requiresStat1 == "true" && document.theForm.marketS
tat1 && document.theForm.marketStat1.disabled == false && isNullOrBlank( getSele
ctedValueById("marketStat1") ) )
{

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;
}

if ( validateMarketing( bCanContinueWithErrors ) == invalid )


{
return invalid;
}
document.theForm._IS_EVENT_DATASOURCE.value = true;
return valid;
}
catch (e)
{
alert( "resWorkspaceValidate Error: " + e.message );
return invalid;
}
}
registerFragment("resWorkspace", true, true, false);

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 oldCountryCode = "";


function initAddress()
{
try
{
var country = "";
var stateCode = "";

var city = "";


setSelectedValue( document.theForm.country, country);
if ( country.length > 0 && country == "US" )
{
var newCountry = getSelectedValue( document.theForm.coun
try );
if ( newCountry.length == 0 )
setSelectedValue( document.theForm.country, "USA
");
}
if ( country.length > 0 )
{
oldCountryCode = "-1";
setStateProv();
setSelectedValue( document.theForm.stateCode, stateCode
);
}
//KR : SWDTS00227844 : added a check for postalcode != null, cit
y != null, state != null, country != null dont do postal code lookup.
if(country.length == 0 && stateCode.length == 0 && city.length =
= 0)
{
postalCodeChanged();
}
}
catch( e )
{
alert( "Error in addressInit: " + e.message );
}
}
function setGuestCountry()
{
try
{
var countryCode = getSelectedValue( document.theForm.country );
var countryName = null;
if ( countryCode != null && countryCode.length > 1 )
{
countryName = getSelectedText( document.theForm.country)
;
var e = document.getElementById("guestCountry");
if ( e != null && countryName != null )
{
e.value = countryName;
}
}
}
catch( e )
{
alert( "Error in setGuestCountry: " + e.message );
}
}
function setStateProv()
{
try

{
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;
//

alert( "newData: " + newData );


if ( newData && newData.length > 0 && theLen > 0 )
{
for( var j = 1; j <= theLen; j++ )
{
var itemRec = getField( newData, j, "^"

);
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
+=
+=
+=
+=

"&_DIALOG_LEVEL=" + (getLSApplet().getDialogLevel() + 1);


"&_FRAGMENT_JSP=../edit/postalCodeList.jsp";
"&_FRAGMENT_HEIGHT=" + fh;
"&_WINDOW_TITLE=Postal Code " + document.theForm.postalCo

+= "&_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 ) {}
}

// CQ197934 DVM 06.14.10 - (10.1)changing rate doesnt update market segment


function updateMarketInfo( marketCode, marketStat2 )
{
//alert("marketCode = '" + marketCode + "'\nmarketStat2 = '" + marketSta
t2 + "'");
if(null!=marketCode && ''!=marketCode)
{
initSelectById( "marketCode", Trim(marketCode) );
}
if(null!=marketStat2 && ''!=marketStat2)
{
initSelectById( "marketStat2", Trim(marketStat2) );
}
}
// END CQ197934 DVM 06.14.10 - (10.1)changing rate doesnt update market segment
function initMarketing()
{
try
{
setSelectedValue( document.theForm.sourceCode, "1A");
}
catch( e ) {}
initSelectById( "marketCode", "BASE" );
initSelectById( "regionCode", "" );
var marketStat1Obj = document.getElementById("marketStat1");
var marketStat2Obj = document.getElementById("marketStat2");
if (marketStat1Obj)
initSelectById( "marketStat1", "" );
if (marketStat2Obj)
{
initSelectById( "marketStat2", "CAIR" );
disableById( "marketStat2", "true" );

}
}
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 getRoomNumberNotCI( newRoomNum, seqNum, origAccomCode )


{
var autoAdjustRate = true;
var parms = new Array();
parms.push( newRoomNum.value );
parms.push( seqNum );
try
{
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "BLOCK_
ROOM", "GET_ROOM_BY_NUMBER", parms.join("^") );
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
var
var
var
var
var
var

roomNum2 = getField( resultStr, 1, ";" );


seqNum2 = getField( resultStr, 2, ";" );
accomCode = getField( resultStr, 3, ";" );
fdStat = getField( resultStr, 4, ";" );
hkStat = getField( resultStr, 5, ";" );
inspStat = getField( resultStr, 6, ";" );

var prompt = "";


if (origAccomCode != "" && origAccomCode != accomCode)
{
var url = new Array();
url.push( "\x2Flightspeed\x2Fen_US/common/StdFragmentDlg.jsp?_ST
ATE_KEY=modRes:8" );
url.push( "&_DIALOG_LEVEL=0" );
url.push( "&_FRAGMENT_JSP=../edit/checkIn/confirmRoomTypeChange.
jsp" );
url.push( "&_FRAGMENT_HEIGHT=100%" );
if (isRdpEnabled)
{
url.push( "&_WINDOW_TITLE_RSRC_KEY_COMMO
N=msg.confirmRoomTypeOvrTitleRDP" );
}
else
{
url.push( "&_WINDOW_TITLE_RSRC_KEY_COMMO
N=msg.confirmRoomTypeOvrTitle" );
}
url.push( "&_MSG=The selected room type '" );
url.push( accomCode );
url.push( "' does not match the original room type '" );
url.push( origAccomCode );
url.push( "' for room number " );
url.push( "" );
var adjRateWin = window.showModalDialog( encodeURI( url.join("")
), this,"dialogWidth: 600px; dialogHeight: 250px; center: Yes; help: No; resiz
able: Yes; Status:No; unadorned: Yes;");
if ( ! adjRateWin || adjRateWin == "CANCEL" || adjRateWin == "un
defined" )
{
return;
}
autoAdjustRate = adjRateWin;
var s = new Array();
s.push(roomNum2);
s.push( "^" );
s.push( seqNum2 );
s.push( "^" );
s.push( accomCode );
s.push( "^" );
s.push( autoAdjustRate );
s.push( "^" );
s.push( false );
s.push( "^" );
var checkResultStr = sendSynchRequestToServer( "
POST", "modRes:8", 0, "BLOCK_ROOM", "CHECK_PREBLOCK_OVERRIDES", s.join(""), "" )
;
var checkStatus = getField( checkResultStr, 0, "
;" );
if ( checkStatus == "ok" )
{

var overrides = getField( checkResultStr


, 1, ";" );
if ( overrides == "overrides" )
{
var overrideText = unescape(getF
ield( checkResultStr, 2, ";" ));
var overrideCodes = getField( ch
eckResultStr, 3, ";" );
if (false == overrideRateNotCI(o
verrideText, overrideCodes))
{
return false;
}
}
}
else
{
var errMsg = getField( resultStr, 1, ";"
);
if ( errMsg && errMsg.length > 0 )
alertDialog( "\x2Flightspeed\x2F
en_US", "modRes:8", errMsg );
else
alertMessageKey( "updateRoomErr
" );
return false;
}
}
if ( fdStat != "VAC" || ( hkStat == "VD" || hkStat == "VP" ) )
{
prompt = "PROMPT";
}
if ( ! updateSelectedRoomNotCI( roomNum2, seqNum2, accomCode, autoAd
justRate, true, prompt, fdStat, hkStat, inspStat ) )
{
newRoomNum.value = "";
newRoomNum.select();
newRoomNum.focus();
}
}
else
{
var errMsg = Trim( getField( resultStr, 1, ";" ) )
if ( errMsg.length > 0 )
{
alertMessage( errMsg );
}
newRoomNum.value = "";
newRoomNum.select();
newRoomNum.focus();
}
}
catch( e )
{
errorHandler( e, "getRoomNumber" );
}

}
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;

var s = new Array();


s.push( roomNum );
s.push( "^" );
s.push( seq );
s.push( "^" );
s.push( accomCode );
s.push( "^" );
s.push( bAutoAdjRate );
s.push( "^" );
s.push( bMergeShare );
s.push( "^^^" );
s.push( bCheckIn );
s.push( "^" );
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "BLOCK_ROOM
", "SET", s.join("") );
try
{
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
var revalidateRate = getField( resultStr, 1, ";" );
if ( revalidateRate == "revalidateRate" )
{
var completed = showCalendar(tempSeq);
}
try
{
if ( parent.parent.setRoomNum )
parent.parent.setRoomNum( tempRoom );
}
catch( e ) {}
try
{
if ( parent.parent.parent.setRoomNum )
parent.parent.parent.setRoomNum( tempRoom );
}
catch( e ) {}
try
{
if ( parent.parent.parent.parent.setRoomNum )
parent.parent.parent.parent.setRoomNum( tempRoom );
}
catch( e ) {}
try
{
if ( parent.parent.parent.parent.parent.setRoomNum )
parent.parent.parent.parent.parent.setRoomNum( tempRoom );
}
catch( e ) {}
if ( ! bInValidate )
{
submitWorkspace();
}
}
else
{

var errMsg = getField( resultStr, 1, ";" );


if ( errMsg && errMsg.length > 0 )
alertDialog( "\x2Flightspeed\x2Fen_US", "modRes:8", errMsg );
else
alertMessageKey( "updateRoomErr" );
return false;
}
}
catch( e ) {}
}
function showCalendar(seqNum)
{
var cfg =
{
launchPointId: "modRes",
windowTitle: "label.selectRoomRate",
roomSeqNum: seqNum
};
showAdvRateSearchApplet(cfg);
return false;
}
function getStateKey()
{
return "modRes:8";
}
var guestTypeOrig = "T";
var guestTypeCurr = "T";
function hasGuestTypeChangedFrom(fromValue)
{
if((guestTypeOrig == fromValue)&&(guestTypeCurr != fromValue))
{
return true;
}
else
{
return false;
}
}
function displayInfoMsgsAfterSave(){
if(hasGuestTypeChangedFrom('G'))
{
/*
* display msg if Group Guest Type has been changed
*/
alertMessageKey("res.msg.removingGroupFolio.transferPostingsMsg"
);
}
}

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', "&nbsp;&nbs
p;Advance Deposit", "javascript:editAdvDeposit()", 'D',false);addMenu.addMenuIte
m('bank', "&nbsp;&nbsp;Bank Authorization List", "javascript:editBankAuth()", 'Q
',false);addMenu.addMenuItem('billing', "&nbsp;&nbsp;Billing Patterns", "javascr
ipt:viewBillingPattern()", 'B',false);addMenu.addMenuItem('cft', "&nbsp;&nbsp;CF
T", "javascript:addResItem('RES_CFT')", 'T',false);addMenu.addMenuItem('Checks',
"&nbsp;&nbsp;Checks", "javascript:showCheckWindow()", '1',false);addMenu.addMen
uItem('comment', "&nbsp;&nbsp;Comment (Internal)", "javascript:addEditComment('R
ES_COMMENT')", 'C',false);addMenu.addMenuItem('group', "&nbsp;&nbsp;Group", "jav
ascript:addResItem('RES_GROUP')", 'G',false);addMenu.addMenuItem('location', "&n
bsp;&nbsp;Guest Location", "javascript:doLocation('42813','PerftestData')", 'L',
false);addMenu.addMenuItem('message', "&nbsp;&nbsp;Guest Message", "javascript:d
oGuestMessage('42813','PerftestData','','false','true')", 'M',false);addMenu.add
MenuItem('wakeup', "&nbsp;&nbsp;Guest Wake-up", "javascript:doWakeUp('42813','Pe
rftestData')", 'W',true);addMenu.addMenuItem('gsurvey', "&nbsp;&nbsp;Guest Surve
y", "javascript:addResItem('RES_GSURVEY')", 'U',false);addMenu.addMenuItem('iden
tity', "&nbsp;&nbsp;Identity", "javascript:doEditGuestProfile('Identity')", 'I',
false);addMenu.addMenuItem('immigration', "&nbsp;&nbsp;Immigration", "javascript
:doEditGuestProfile('Immigration')", '2',false);addMenu.addMenuItem('luggage', "
&nbsp;&nbsp;Luggage Tags", "javascript:editLuggageTags()", '8',true);addMenu.add
MenuItem('bundle', "&nbsp;&nbsp;Non-Room Inventory Bundle", "javascript:doAddBun
dle()", 'Y',false);addMenu.addMenuItem('promotion', "&nbsp;&nbsp;Promotions", "j
avascript:showPromotions()", 'P',false);addMenu.addMenuItem('remark', "&nbsp;&nb
sp;Remark (External)", "javascript:addResItem('RES_REMARK')", 'K',false);addMenu
.addMenuItem('room', "&nbsp;&nbsp;Room", "javascript:addResItem('RES_ROOM')", 'R
',false);addMenu.addMenuItem('roommate', "&nbsp;&nbsp;RoomMate", "javascript:add
RoomMate('42813','PerftestData')", 'o',false);addMenu.addMenuItem('secAddr', "&n
bsp;&nbsp;Secondary Address", "javascript:doEditGuestProfile('SecondaryAddress')
", 'N',false);addMenu.addMenuItem('ssr', "&nbsp;&nbsp;Special Service", "javascr
ipt:addSpecialService('RES_SSR')", 'S',false);addMenu.addMenuItem('addTask', "&n
bsp;&nbsp;Task", "javascript:doAddTask()", '3',false);addMenu.addMenuItem('agent
', "&nbsp;&nbsp;Travel Agency", "javascript:addResItem('RES_TRAVELAGENT')", 'E',
false);addMenu.addMenuItem('travelWith', "&nbsp;&nbsp;Travelwith", "javascript:a
ddTravelwith()", 'H',false);addMenu.addMenuItem('bankAuth', "&nbsp;&nbsp;Voice A
uthorization", "javascript:doVoiceAuthCredit()", 'z',false);addMenu.addMenuItem(
'visa', "&nbsp;&nbsp;Visa", "javascript:doEditGuestProfile('Visa')", 'V',false);
addMenu.addMenuItem('wholesaler', "&nbsp;&nbsp;Wholesaler", "javascript:addResIt
em('RES_WHOLESALE')", '9',false);
var actionMenu = new PopupMenu('action');actionMenu.addMenuItem('Check In', "&nb
sp;&nbsp;Check-In <B>PerftestData (42813)</B>", "javascript:createCheckInWizard(
'42813',false,true)", 'I', false);actionMenu.addMenuSeperator();actionMenu.addMe
nuItem('newTwRes', "&nbsp;&nbsp;Create Travelwith Reservation", "javascript:newT
ravelwithWizard(false)", 'H', false);actionMenu.addMenuSeperator();actionMenu.ad
dMenuItem('transferStays', "&nbsp;&nbsp;Transfer Stay <B>PerftestData (42813)</B
>", "javascript:showTransferLookup('50517598;42813;MODIFY_RESERVATION;')", 'T');
actionMenu.addMenuSeperator();actionMenu.addMenuItem('copySameDates', "&nbsp;&nb
sp;Copy Same Dates Different Guest", "javascript:copySameDatesDiffGuest(false, f

alse)", 'D', false);actionMenu.addMenuItem('copySameGuest', "&nbsp;&nbsp;Copy Sa


me Guest Different Dates", "javascript:createResWizardCopyRes(false, 'G');", 'G'
, false);clearResWindowRef();actionMenu.addMenuItem('copyAll', "&nbsp;&nbsp;Copy
All (Same Guest and Same Dates)", "javascript:createResWizardCopyRes(false, 'A'
)", 'A', false);clearResWindowRef();actionMenu.addMenuItem('waitList', "&nbsp;&n
bsp;Wait List", "javascript:waitListRes()", 'L', false);
var actionMenu = new PopupMenu('action');actionMenu.addMenuItem('Check In', "&nb
sp;&nbsp;Check-In <B>PerftestData (42813)</B>", "javascript:createCheckInWizard(
'42813',false,true)", 'I', false);actionMenu.addMenuSeperator();actionMenu.addMe
nuItem('newTwRes', "&nbsp;&nbsp;Create Travelwith Reservation", "javascript:newT
ravelwithWizard(false)", 'H', false);actionMenu.addMenuSeperator();actionMenu.ad
dMenuItem('transferStays', "&nbsp;&nbsp;Transfer Stay <B>PerftestData (42813)</B
>", "javascript:showTransferLookup('50517598;42813;MODIFY_RESERVATION;')", 'T');
actionMenu.addMenuSeperator();actionMenu.addMenuItem('copySameDates', "&nbsp;&nb
sp;Copy Same Dates Different Guest", "javascript:copySameDatesDiffGuest(false, f
alse)", 'D', false);actionMenu.addMenuItem('copySameGuest', "&nbsp;&nbsp;Copy Sa
me Guest Different Dates", "javascript:createResWizardCopyRes(false, 'G');", 'G'
, false);clearResWindowRef();actionMenu.addMenuItem('copyAll', "&nbsp;&nbsp;Copy
All (Same Guest and Same Dates)", "javascript:createResWizardCopyRes(false, 'A'
)", 'A', false);clearResWindowRef();actionMenu.addMenuItem('waitList', "&nbsp;&n
bsp;Wait List", "javascript:waitListRes()", 'L', false);
var viewMenu = new PopupMenu('view');viewMenu.addMenuItem('bnkAuth', "&nbsp;&nbs
p;Bank Authorization List", "javascript:showBankServices()", 'B', false);viewMen
u.addMenuItem('chgLog', "&nbsp;&nbsp;Change Log", "javascript:showChangeLog()",
'L', false);viewMenu.addMenuItem('crs', "&nbsp;&nbsp;CRS", "javascript:editCres(
)", 'C', false);viewMenu.addMenuItem('Guest Profile', "&nbsp;&nbsp;Guest Profile
", "javascript:launchViewModifyGuestProfile('50517598','label.viewmodguestprofil
e','PerftestData,','HOME:2')", 'G', false);viewMenu.addMenuItem('rmRateHist', "&
nbsp;&nbsp;Room Rate History", "javascript:showRoomRateHistory()", 'R', false);
var printMenu = new PopupMenu('print');printMenu.addMenuItem("regcard", "&nbsp;&
nbsp;Print Registration Card", "javascript:printRegCard()", "R", false);printMen
u.addMenuItem("folio", "&nbsp;&nbsp;Print / Email", "doLaunchPrintEmailFolio('42
813^377^06-16-2014^^06-19-2014^MOD^T^false^false,50517598,Specify the options fo
r each stay and click Submit.,RES','label.printEmailFolios')", "F", true);
</script>
<!-- CQ182894 - Launch Guest Profile - End -->
<div id="spnScroll" class="workspace" style="HEIGHT: 638; OVERFLOW-Y: auto; WID
TH: 100%;">
<SCRIPT type="text/javascript">
var expandImage = "<IMG border='0' src='/lightspeed/en_US/images/minus.gif' widt
h='16' height='16'>";
var collapseImage = "<IMG border='0' src='/lightspeed/en_US/images/plus.gif' wid
th='16' height='16'>";
</SCRIPT>
<TABLE cellspacing="2" cellpadding="0" border="0" class="resSectionLine" width="
100%"><TBODY><TR><TD class="resSectionCol0"><A href="#" onkeypress="hrefHandleKe
yDown(expandContractViaKey('RES_STATUS-0-0Section',true))" onclick="expandContra
ct('RES_STATUS-0-0Section',true)"><DIV id="RES_STATUS-0-0SectionImage"><IMG bord
er='0' src='/lightspeed/en_US/images/minus.gif' width='16' height='16'></DIV></A
></TD><TD nowrap class="resSectionCol1"><A class="resSectionLabel" href="#" id="
RES_STATUS-0-0"name="focusSection"onkeypress="hrefHandleKeyDown(expandContractVi
aKey('RES_STATUS-0-0Section',true))" onclick="expandContract('RES_STATUS-0-0Sect
ion',true)"><input type="hidden" id="_RES_STATUS-0-0Focus" value=""/>Reservation
Information</A></TD><TD class="resSectionCol2">&nbsp;</TD></TR></TBODY></TABLE>
<!--RES_STATUS--><DIV id="RES_STATUS-0-0Section" style="display:block">

<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" onkeydown="worksp


aceKeyHandler(window.event)">
<TBODY>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Confirmation</TD>
<TD valign="top" class="resCol2" nowrap>42813</TD>
<TD valign="top" class="resCol3" nowrap>Htl Arr Time</TD>
<TD valign="top" class="resCol4" nowrap><INPUT class="InputStyle" type="text" ma
xlength="5" name="arriveTime" value="" size="6" onChange="checkTime(this,'Htl Ar
r Time');" onChange="fieldInfoChanged(this)" onFocus="javascript:this.select();"
></TD>
<TD valign="top" class="resCol5" nowrap>Htl Dep Time</TD>
<TD valign="top" class="resCol6" nowrap><INPUT class="InputStyle" type="text" ma
xlength="5" name="departTime" value="" size="6" onChange="checkTime(this,'Htl D
ep Time')" onChange="fieldInfoChanged(this)" onFocus="javascript:this.select();"
></TD>
<TD valign="top" class="resCol7" nowrap>Nights</TD>
<TD valign="top" class="resCol8" nowrap><SPAN class="resImportantInfo"><input cl
ass="InputStyle" type='text' id='_numNights' name='_numNights' value='3' onChan
ge="fieldInfoChanged(this)" onfocus="javascript:this.select()" onkeypress="java
script:numNightsKeyPressHandler(3,'No',event) " size='2' maxlength='2' style='wi
dth:25px'>&nbsp;<input class="InputStyle" type="button" onclick="javascript:chan
geNumberOfNights(3,'No',event) " value="Go" onFocus="javascript:this.select();">
</SPAN></TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Arrival Date</TD>
<TD valign="top" class="resCol2" nowrap><SPAN class="resImportantInfo">Mon 06-16
-2014</SPAN></TD>
<TD valign="top" class="resCol3" nowrap>Depart Date</TD>
<TD valign="top" class="resCol4" nowrap><SPAN class="resImportantInfo">Thu 06-19
-2014</SPAN></TD>
<TD valign="top" class="resCol5" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol6" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol7" nowrap>Balance</TD>
<TD valign="top" class="resCol8" nowrap><SPAN class="resImportantInfo">$0.00</SP
AN></TD>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Guest Type</TD>
<TD valign="top" class="resCol2" nowrap>T - Transient</TD>
<TD valign="top" class="resCol3" nowrap>Res Status</TD>
<TD valign="top" class="resCol4" nowrap><SPAN class="resImportantInfo">MOD </SPA
N></TD>
<TD valign="top" class="resCol5" nowrap>1st Night Rate</TD>
<TD valign="top" class="resCol6" nowrap>$20.00</TD>
<TD valign="top" class="resCol7" nowrap>Total Rm Chg</TD>
<TD valign="top" class="resCol8" nowrap>$60.00</TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Flt Arr #</TD>
<TD valign="top" class="resCol2" nowrap><INPUT class="InputStyle" type="text" ma
xlength="8" name="flightArrive" value="" size="10" onChange="fieldInfoChanged(th
is)" onFocus="javascript:this.select();"></TD>
<TD valign="top" class="resCol3" nowrap>Flt Arr Time</TD>
<TD valign="top" class="resCol4" nowrap><INPUT class="InputStyle" type="text" ma
xlength="5" name="flightArriveTime" value="" size="6" onChange="checkTime(this,'

Flt Arr Time');" onChange="fieldInfoChanged(this)" onFocus="javascript:this.sele


ct();"></TD>
<TD valign="top" class="resCol5" nowrap>Flt Dep #</TD>
<TD valign="top" class="resCol6" nowrap><INPUT class="InputStyle" type="text" ma
xlength="8" name="flightDepart" value="" size="10" onChange="fieldInfoChanged(th
is)" onFocus="javascript:this.select();"></TD>
<TD valign="top" class="resCol7" nowrap>Flt Dep Time</TD>
<TD valign="top" class="resCol8" nowrap><INPUT class="InputStyle" type="text" ma
xlength="5" name="flightDepartTime" value="" size="6" onChange="checkTime(this,'
Flt Dep Time');" onChange="fieldInfoChanged(this)" onFocus="javascript:this.sele
ct();"></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_GUEST-1-0Section',true))" onclick="expandContrac
t('RES_GUEST-1-0Section',true)"><DIV id="RES_GUEST-1-0SectionImage"><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('Guest Inf
ormation')" onmouseout="hideTip()" onkeypress="hrefHandleKeyDown(editGuestProfil
e('42813','GuestInfo', '','MOD'))" onclick="editGuestProfile('42813','GuestInfo
', '','MOD')" class="smResLinkSectionBtn"><IMG border='0' src='/lightspeed/en_
US/images/smallIcons/edit.gif' width='11' height='11'></A>&nbsp;&nbsp;<A class="
resSectionLabel" href="#" id="RES_GUEST-1-0"name="focusSection"onkeypress="hrefH
andleKeyDown(expandContractViaKey('RES_GUEST-1-0Section',true))" onclick="expand
Contract('RES_GUEST-1-0Section',true)"><input type="hidden" id="_RES_GUEST-1-0Fo
cus" value=""/>Guest Information</A></TD><TD class="resSectionCol2">&nbsp;</TD><
/TR></TBODY></TABLE>
<!--RES_GUEST--><DIV id="RES_GUEST-1-0Section" style="display:block">
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" onkeydown="worksp
aceKeyHandler(window.event)">
<TBODY>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>Club</TD>
<TD valign="top" class="resCol4NoWidth" colspan="2" rowspan="1" nowrap><select
onChange="clubTypeChanged(1)" style="width:160" id="clubAcctType1" name="clubAc
ctType1" size="1" onkeydown="autoCompleteSelect(event)"><option value="" selecte
d>-- None --</option><option value="SPG" title="SPG - Starwood Preferred Guest"
>SPG - Starwood Preferred Guest</option></select></TD>
<TD valign="top" class="resCol3" nowrap>Number</TD>
<TD valign="top" class="resCol4" colspan="1" rowspan="1" nowrap><input type="te
xt" value="" onBlur="doCapitalize( this );clubTypeChanged(1);" id="clubAcct1" n
ame="clubAcct1" size="15" onchange="validateSPGClubNbr()" onFocus="javascript:th
is.select();">&nbsp;&nbsp;<A href="#" onkeypress="hrefHandleKeyDown(spgSearch(fa
lse))" onclick="javascript:spgSearch(false)" class="smResLinkBtn"><IMG border='0
' src='/lightspeed/en_US/images/smallIcons/view.gif' width='11' height='11'></A
></TD>
<TD valign="top" class="resCol5" nowrap>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VIP<
/TD>
<TD valign="top" class="resCol6" nowrap><select style="width:130" id="vipCode" n
ame="vipCode" size="1" onkeydown="autoCompleteSelect(event)" onChange="fieldInfo
Changed(this)" ><option value="" selected>-- None --</option><option value="GOTD
" title="GOTD - Guest Of The Day">GOTD - Guest Of The Day</option><option value
="RG" title="RG - Return Guest">RG - Return Guest</option><option value="STAR"
title="STAR - Starwood VIP">STAR - Starwood VIP</option><option value="V1" tit
le="V1 - Very VERY Important Person">V1 - Very VERY Important Person</option><op
tion value="V2" title="V2 - Very Important Person">V2 - Very Important Person</

option><option value="V3" title="V3 - Important Person">V3 - Important Person</


option><option value="VA" title="VA - VIP To Agt">VA - VIP To Agt</option><opti
on value="VG" title="VG - VIP To General Manager">VG - VIP To General Manager</
option><option value="XX" title="XX - Rendevous">XX - Rendevous</option></selec
t></TD>
<TD valign="top" class="resCol7" colspan="1" rowspan="1" nowrap><input type="hid
den" name="incognito" value="false"><input type="checkbox" id="_incognito" onCha
nge="fieldInfoChanged(this)" onClick="javascript:incognitoCheckboxHandler(this);
" name="_incognito")><LABEL class="msgData" for="_incognito" style="padding-lef
t:2px">Incognito</LABEL></TD>
<TD valign="top" class="resCol11" nowrap>&nbsp;</TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol1" nowrap>Email</TD>
<TD valign="top" class="resCol2NoWidth" colspan="2" rowspan="1" nowrap><INPUT ty
pe="text" onChange="emailChanged(this)" class="InputStyle" id="email" name="emai
l" value="Has&#x20;Not&#x20;Been&#x20;Asked&#x20;For&#x20;Email" size="28" maxle
ngth="60" onFocus="javascript:this.select();"></TD>
<TD valign="top" class="resCol3" nowrap>Reason Code</TD>
<TD valign="top" class="resCol4" nowrap><select style="width:120" id="noEmailRea
son" name="noEmailReason" size="1" onChange="emailCodeChanged();" onkeydown="au
toCompleteSelect(event);if(document.all){emailCodeChanged();}" ><option value=""
selected>--- None ---</option><option value="A" title="A - Not Given">A - Not
Given</option><option value="NA" selected title="NA - Not Asked">NA - Not Aske
d</option><option value="X" title="X - No Email">X - No Email</option></select>
</TD>
<TD valign="top" class="resCol3" nowrap>Company</TD>
<TD valign="top" class="resCol4" nowrap><INPUT type="text" class="InputStyle" on
Change="fieldInfoChanged(this)" onBlur="doCapitalize( this );" id="company" name
="company" value="" size="20" maxlength="60" onFocus="javascript:this.select();"
></TD>
<TD valign="top" class="resCol3" colspan="1">StarGuest Opt-In Status</TD>
<TD valign="top" class="resCol4" colspan="1" nowrap><select style="width:148" id
="OptStatus" name="OptStatus" size="1" title = "Guest Opt-In status" onkeydown="
autoCompleteSelect(event);" ><option value="NA" selected title="Not Yet Asked"
>Not Yet Asked</option><option value="OPTI" title="Opted In">Opted In</option><
option value="OPTO" title="Opted Out">Opted Out</option></TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol2NoWidth" colspan="3" rowspan="1" nowrap><b>Addres
s</b><br><input class="InputStyle" type="text" value="" onBlur="fieldInfoChanged
( this );" name="address1" size="16" onChange="javascript:fieldInfoChanged(docum
ent.theForm.address1)" onFocus="javascript:this.select();"><input class="InputSt
yle" type="text" value="" onBlur="fieldInfoChanged( this );" name="address2" siz
e="10" onChange="javascript:fieldInfoChanged(document.theForm.address2)" onFocus
="javascript:this.select();"></TD>
<TD valign="top" class="resCol3" nowrap><b>Postal</b><br><input class="InputStyl
e" type="text" value="" onBlur="fieldInfoChanged( this );" name="postalCode" siz
e="11" maxlength="10" onChange="javascript:postalCodeChanged()" onFocus="javasc
ript:this.select();"></TD>
<TD valign="top" class="resCol4" nowrap><b>City</b><br><input class="InputStyle"
type="text" value="" onBlur="fieldInfoChanged( this );" name="city" size="16" o
nChange="javascript:fieldInfoChanged(document.theForm.city)" onFocus="javascript
:this.select();"></TD>
<TD valign="top" class="resCol4NoWidth" colspan="2" rowspan="1" nowrap><b>State/
Province</b><br><select style="width:240" id="stateCode" name="stateCode" size="
1" onkeydown="autoCompleteSelect(event);"><option value="" selected>--- State/Pr
ovince ---</option></select></TD>
<TD valign="top" class="resCol4NoWidth" colspan="6" rowspan="1" nowrap><b>Countr
y</b><br><select style="width:240" id="country" name="country" size="1" onChange

="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"

title="Germany">Germany</option><option value="GH" title="Ghana">Ghana</option


><option value="GI" title="Gibraltar">Gibraltar</option><option value="GR" tit
le="Greece">Greece</option><option value="GL" title="Greenland">Greenland</opti
on><option value="GD" title="Grenada">Grenada</option><option value="GP" title
="Guadeloupe">Guadeloupe</option><option value="GU" title="Guam">Guam</option><
option value="GT" title="Guatemala">Guatemala</option><option value="GN" title
="Guinea">Guinea</option><option value="GW" title="Guinea Bissau">Guinea Bissau
</option><option value="GY" title="Guyana">Guyana</option><option value="HT" t
itle="Haiti">Haiti</option><option value="XH" title="Held Territories">Held Ter
ritories</option><option value="HN" title="Honduras">Honduras</option><option v
alue="HK" title="Hong Kong">Hong Kong</option><option value="HU" title="Hungar
y">Hungary</option><option value="IS" title="Iceland">Iceland</option><option v
alue="IN" title="India">India</option><option value="XI" title="Indian Ocean I
slands">Indian Ocean Islands</option><option value="ID" title="Indonesia">Indon
esia</option><option value="IR" title="Iran">Iran</option><option value="IQ" t
itle="Iraq">Iraq</option><option value="IE" title="Ireland, Republic of">Irelan
d, Republic of</option><option value="IL" title="Israel">Israel</option><option
value="IT" title="Italy">Italy</option><option value="JPTC" title="JAPANESE T
RAVELERS CHECKS">JAPANESE TRAVELERS CHECKS</option><option value="JM" title="Ja
maica">Jamaica</option><option value="JP" title="Japan">Japan</option><option v
alue="JO" title="Jordan">Jordan</option><option value="KK" title="Kazakhstan">
Kazakhstan</option><option value="KE" title="Kenya">Kenya</option><option value
="KI" title="Kiribati">Kiribati</option><option value="KP" title="Korea (North
)">Korea (North)</option><option value="KR" title="Korea (South)">Korea (South)
</option><option value="KW" title="Kuwait">Kuwait</option><option value="KG" t
itle="Kyrgyzstan">Kyrgyzstan</option><option value="LA" title="Laos">Laos</opti
on><option value="LV" title="Latvia">Latvia</option><option value="LB" title="
Lebanon">Lebanon</option><option value="LS" title="Lesotho">Lesotho</option><op
tion value="LR" title="Liberia">Liberia</option><option value="LY" title="Liby
an Arab Jamahiriya">Libyan Arab Jamahiriya</option><option value="LI" title="Li
echtenstein">Liechtenstein</option><option value="LT" title="Lithuania">Lithuan
ia</option><option value="LU" title="Luxembourg">Luxembourg</option><option val
ue="MO" title="Macau">Macau</option><option value="MG" title="Madagascar">Mada
gascar</option><option value="MW" title="Malawi">Malawi</option><option value="
MY" title="Malaysia">Malaysia</option><option value="MV" title="Maldives, Repu
blic of">Maldives, Republic of</option><option value="ML" title="Mali">Mali</op
tion><option value="MT" title="Malta">Malta</option><option value="MP" title="
Mariana Islands">Mariana Islands</option><option value="MQ" title="Martinique">
Martinique</option><option value="MR" title="Mauritania">Mauritania</option><op
tion value="MU" title="Mauritius">Mauritius</option><option value="XM" title="
Mayotte">Mayotte</option><option value="MX" title="Mexico">Mexico</option><opti
on value="FM" title="Micronesia">Micronesia</option><option value="UM" title="
Midway, Wake, Johnson Atoll">Midway, Wake, Johnson Atoll</option><option value="
MD" title="Moldova">Moldova</option><option value="MC" title="Monaco">Monaco</
option><option value="MN" title="Mongolia">Mongolia</option><option value="MS"
title="Montserrat">Montserrat</option><option value="MA" title="Morocco">Moroc
co</option><option value="MZ" title="Mozambique">Mozambique</option><option val
ue="MM" title="Myanmar">Myanmar</option><option value="NA" title="Namibia">Nam
ibia</option><option value="NR" title="Nauru, Republic of">Nauru, Republic of</
option><option value="NP" title="Nepal">Nepal</option><option value="NL" title
="Netherlands">Netherlands</option><option value="AN" title="Netherlands antill
es">Netherlands antilles</option><option value="NC" title="New Caledonia">New C
aledonia</option><option value="NZ" title="New Zealand">New Zealand</option><op
tion value="NI" title="Nicaragua">Nicaragua</option><option value="NE" title="
Niger">Niger</option><option value="NG" title="Nigeria">Nigeria</option><option
value="NF" title="Norfolk Island">Norfolk Island</option><option value="XB" t
itle="Northern Ireland">Northern Ireland</option><option value="NO" title="Norw
ay">Norway</option><option value="OM" title="Oman">Oman</option><option value="
PK" title="Pakistan">Pakistan</option><option value="PA" title="Panama">Panama
</option><option value="PG" title="Papua New Guinea">Papua New Guinea</option><

option value="PY" title="Paraguay">Paraguay</option><option value="PE" title="


Peru">Peru</option><option value="PH" title="Philippines">Philippines</option><
option value="PL" title="Poland">Poland</option><option value="PT" title="Port
ugal">Portugal</option><option value="QA" title="Qatar">Qatar</option><option v
alue="RE" title="Reunion Island/Comord Island">Reunion Island/Comord Island</op
tion><option value="RO" title="Romania">Romania</option><option value="RU" tit
le="Russia">Russia</option><option value="RW" title="Rwanda">Rwanda</option><op
tion value="SPG" title="SPG Points">SPG Points</option><option value="AS" titl
e="Samoa, American">Samoa, American</option><option value="WS" title="Samoa, We
stern">Samoa, Western</option><option value="SM" title="San Marino">San Marino<
/option><option value="TP" title="Sao Tome & Principe">Sao Tome & Principe</opt
ion><option value="SA" title="Saudi Arabia">Saudi Arabia</option><option value=
"SN" title="Senegal">Senegal</option><option value="SC" title="Seychelles Isla
nd">Seychelles Island</option><option value="SL" title="Sierra Leone">Sierra Le
one</option><option value="SG" title="Singapore">Singapore</option><option valu
e="SI" title="Slovenia">Slovenia</option><option value="SB" title="Solomon Isl
ands">Solomon Islands</option><option value="SO" title="Somalia">Somalia</optio
n><option value="ZA" title="South Africa">South Africa</option><option value="E
S" title="Spain">Spain</option><option value="LK" title="Sri Lanka">Sri Lanka<
/option><option value="LC" title="St Lucia">St Lucia</option><option value="SH"
title="St. Helena">St. Helena</option><option value="KN" title="St. Kitts - N
evis">St. Kitts - Nevis</option><option value="PM" title="St. Pierre Et Miquelo
n">St. Pierre Et Miquelon</option><option value="VC" title="St. Vincent the Gre
nadines">St. Vincent the Grenadines</option><option value="SD" title="Sudan">Su
dan</option><option value="SR" title="Suriname">Suriname</option><option value=
"SZ" title="Swaziland">Swaziland</option><option value="SE" title="Sweden">Swe
den</option><option value="CH" title="Switzerland">Switzerland</option><option
value="CHF" title="Switzerland French">Switzerland French</option><option value
="CHD" title="Switzerland German">Switzerland German</option><option value="SY"
title="Syria">Syria</option><option value="TW" title="Taiwan">Taiwan</option>
<option value="TJ" title="Tajikistan">Tajikistan</option><option value="TZ" ti
tle="Tanzania">Tanzania</option><option value="TH" title="Thailand">Thailand</o
ption><option value="TG" title="Togo">Togo</option><option value="TO" title="T
onga">Tonga</option><option value="TT" title="Trinidad and Tobago">Trinidad and
Tobago</option><option value="TN" title="Tunisia">Tunisia</option><option valu
e="TR" title="Turkey">Turkey</option><option value="TM" title="Turkmenistan">T
urkmenistan</option><option value="TC" title="Turks and Caicos Islands">Turks a
nd Caicos Islands</option><option value="TV" title="Tuvalu">Tuvalu</option><opt
ion value="UG" title="Uganda">Uganda</option><option value="UA" title="Ukraine
">Ukraine</option><option value="AE" title="United Arab emirates">United Arab e
mirates</option><option value="GB" title="United Kingdom">United Kingdom</optio
n><option value="USA" title="United States">United States</option><option value
="UY" title="Uruguay">Uruguay</option><option value="SU" title="Ussr">Ussr</op
tion><option value="UZ" title="Uzbekistan">Uzbekistan</option><option value="VU
" title="Vanuatu">Vanuatu</option><option value="VE" title="Venezuela">Venezue
la</option><option value="VN" title="Vietnam">Vietnam</option><option value="VI
" title="Virgin Islands">Virgin Islands</option><option value="WF" title="Wall
is & Futuna Islands">Wallis & Futuna Islands</option><option value="YE" title="
Yemen">Yemen</option><option value="YU" title="Yugoslavia">Yugoslavia</option><
option value="ZR" title="Zaire">Zaire</option><option value="ZM" title="Zambia
">Zambia</option><option value="ZW" title="Zimbabwe">Zimbabwe</option></select>
<input type="hidden" class="InputStyle" name="guestCountry" value=""></TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol2NoWidth" colspan="1" rowspan="1" nowrap><b>Stay H
istory</b></TD>
<TD valign="top" class="resCol2NoWidth" colspan="1" rowspan="1" nowrap><b>Visits
</b>&nbsp;0</TD>
<TD valign="top" class="resCol2NoWidth" colspan="1" rowspan="1" nowrap><b>Nights
</b>&nbsp;0</TD>

<TD valign="top" class="resCol2NoWidth" colspan="1" rowspan="1" nowrap><b>CXL</b


>&nbsp;0</TD>
<TD valign="top" class="resCol2NoWidth" colspan="1" rowspan="1" nowrap><b>DNA</b
>&nbsp;0</TD>
<TD valign="top" class="resCol2NoWidth" colspan="1" rowspan="1" nowrap><b>Last R
oom</b>&nbsp;</TD>
<TD valign="top" class="resCol2NoWidth" colspan="1" rowspan="1" nowrap><b>Last R
ate Plan</b>&nbsp;</TD>
<TD valign="top" class="resCol2NoWidth" colspan="2" rowspan="1" nowrap><b>Total
Revenue</b>&nbsp;$0.00</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_ROOM-4-50218479Section',true))" onclick="expandC
ontract('RES_ROOM-4-50218479Section',true)"><DIV id="RES_ROOM-4-50218479SectionI
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('Add Room')" onmouseout="hideTip()" onclick="editRoom()" onkeypress="hr
efHandleKeyDown(editRoom())" class="smResLinkSectionBtn"><IMG border='0' src='/
lightspeed/en_US/images/smallIcons/add.gif' width='11' height='11'></A>&nbsp;&nb
sp;<A href="#" onmouseover="showTip('Edit Rate')" onmouseout="hideTip()" onkeypr
ess="hrefHandleKeyDown(showAdvRateSearchFromResWorkspace('modRes','50218479'))"
onclick="showAdvRateSearchFromResWorkspace('modRes','50218479')" class="smResL
inkSectionBtn"><IMG border='0' src='/lightspeed/en_US/images/smallIcons/edit.gi
f' width='11' height='11'></A>&nbsp;&nbsp;<A class="resSectionLabel" href="#" id
="RES_ROOM-4-50218479"name="focusSection"onkeypress="hrefHandleKeyDown(expandCon
tractViaKey('RES_ROOM-4-50218479Section',true))" onclick="expandContract('RES_RO
OM-4-50218479Section',true)"><input type="hidden" id="_RES_ROOM-4-50218479Focus"
value=""/>Room Information</A><SPAN style="width:20px">&nbsp;</SPAN><A href="#"
onclick="advRoomSelection('50218479','null') " onkeypress="hrefHandleKeyDown(a
dvRoomSelection('50218479','null') )" class="smResLinkSectionBtn">Room Selectio
n</A>&nbsp;&nbsp;&nbsp;<A href="#" onclick="javascript:showPopupMenu('ctxRoom50
218479',this,event); return false;" onkeypress="hrefHandleKeyDown(showPopupMenu(
'ctxRoom50218479',this,event));" class="smResLinkSectionBtn">Room Action<IMG bor
der='0' src='/lightspeed/en_US/images/smallIcons/popup.gif' width='11' height='
11'></A>&nbsp;&nbsp;&nbsp;</TD><TD class="resSectionCol2">&nbsp;</TD></TR></TBOD
Y></TABLE>
<!--RES_ROOM--><DIV id="RES_ROOM-4-50218479Section" style="display:block">
<SCRIPT type="text/javascript">
var ctxRoom50218479Menu = new PopupMenu('ctxRoom50218479');
ctxRoom50218479Menu.addMenuItem('manageShare', "&nbsp;&nbsp;Manage Sharewith", "
javascript:saveResAndStartManageSW('modRes:8', '50218479', '42813')", 'M', false
);
ctxRoom50218479Menu.addMenuSeperator();
ctxRoom50218479Menu.addMenuItem('suppress', "&nbsp;&nbsp;Suppress Rates", "javas
cript:suppressRates('Y')",'S', false);
</SCRIPT>
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" onkeydown="worksp
aceKeyHandler(window.event)">
<TBODY>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Room Number</TD>
<TD valign="top" class="resCol2" nowrap><A href="#" class="resItemLink" onclick
="javascript:advRoomSelection('50218479','');" onkeypress="hrefHandleKeyDown(adv
RoomSelection('50218479',''));">Pre-Block</A><input type='text' id='roomNum50218

479' name='roomNum50218479' size='6' maxlength='7' style='width:35px' >&nbsp;<A


href="#" onclick="javascript:getRoomNumberNotCI(document.theForm.roomNum502184
79,'50218479','1DD')" onkeypress="hrefHandleKeyDown(getRoomNumberNotCI(document.
theForm.roomNum50218479,'50218479','1DD'))" class="smResLinkBtn"><IMG border='0'
src='/lightspeed/en_US/images/smallIcons/view.gif' width='11' height='11'></A>
</TD>
<TD valign="top" class="resCol3roomtype" nowrap>Room Type<br><span onmouseover="
showTip('Room type booked when reservation was first made')" onmouseout="hideTip
();" style="width:110px;" >Booked Room Type</span></TD>
<TD valign="top" class="resCol4" nowrap><SPAN class="resImportantInfo"><span onm
ouseover="showTip('Dlx Ocn Frnt Double/Double')" onmouseout="hideTip();">1DD</sp
an><br><span onmouseover="showTip('Dlx Ocn Frnt Double/Double')" onmouseout="hid
eTip();">1DD</span></SPAN></TD>
<TD valign="top" class="resCol5" nowrap>Rate Plan ID</TD>
<TD valign="top" class="resCol6" nowrap><span onmouseover="showTip('PERF\x20\x2D
\x20Rate\x20For\x20Perf\x20Test')" onmouseout="hideTip();">PERF - Rate ...</span
></TD>
<TD valign="top" class="resCol3roomtype" nowrap>Status</TD>
<TD valign="top" class="resCol8" nowrap>RES</TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Ext Block</TD>
<TD valign="top" class="resCol2NoWidth" colspan="1">&nbsp;</TD>
<TD valign="top" class="resCol3" nowrap>Room Features</TD>
<TD valign="top" class="resCol2NoWidth" colspan="5">&nbsp</TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Rate</TD>
<TD valign="top" class="resCol2" nowrap>$20.00</TD>
<TD valign="top" class="resCol3" nowrap>Arrival Date</TD>
<TD valign="top" class="resCol4" nowrap>06-16-2014</TD>
<TD valign="top" class="resCol5" nowrap>Depart Date</TD>
<TD valign="top" class="resCol6" nowrap>06-19-2014</TD>
<TD valign="top" class="resCol7" nowrap>Nights</TD>
<TD valign="top" class="resCol8" nowrap>3</TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Overridden Rate</TD>
<TD valign="top" class="resCol2" nowrap>No</TD>
<TD valign="top" class="resCol3" nowrap>Total</TD>
<TD valign="top" class="resCol4" nowrap>$60.00</TD>
<TD valign="top" class="resCol5" nowrap>Occupancy</TD>
<TD valign="top" class="resCol6" nowrap>2 Adults</TD>
<TD valign="top" class="resCol7" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol8" nowrap>&nbsp;</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_MARKETING-11-0Section',true))" onclick="expandCo
ntract('RES_MARKETING-11-0Section',true)"><DIV id="RES_MARKETING-11-0SectionImag
e"><IMG border='0' src='/lightspeed/en_US/images/minus.gif' width='16' height='1
6'></DIV></A></TD><TD nowrap class="resSectionCol1"><A class="resSectionLabel" h
ref="#" id="RES_MARKETING-11-0"name="focusSection"onkeypress="hrefHandleKeyDown(
expandContractViaKey('RES_MARKETING-11-0Section',true))" onclick="expandContract
('RES_MARKETING-11-0Section',true)"><input type="hidden" id="_RES_MARKETING-11-0

Focus" value=""/>Marketing Information</A></TD><TD class="resSectionCol2">&nbsp;


</TD></TR></TBODY></TABLE>
<!--RES_MARKETING--><DIV id="RES_MARKETING-11-0Section" style="display:block">
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" onkeydown="worksp
aceKeyHandler(window.event)">
<TBODY>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap><FONT color='#cc0000'>*</FONT>Source</TD
>
<TD valign="top" class="resCol2" nowrap><select style="width:176" id="sourceCode
" name="sourceCode" size="1" onChange="fieldInfoChanged(this)" onkeydown="autoCo
mpleteSelect(event)"><OPTION value='' selected>-- Select Marketing Source --</OP
TION><OPTION value='1A'>1A - Amadeus</OPTION><OPTION value='1G'>1G - Apollo/Gali
leo</OPTION><OPTION value='1P'>1P - Worldspan</OPTION><OPTION value='1S'>1S - Sy
stem-1</OPTION><OPTION value='1V'>1V - Galileo Web</OPTION><OPTION value='AA'>AA
- Sabre</OPTION><OPTION value='CN'>CN - China</OPTION><OPTION value='CRS'>CRS Central Reservation Office</OPTION><OPTION value='DPI'>DPI - Delphi</OPTION><OP
TION value='EML'>EML - TRC E-mail</OPTION><OPTION value='FAX'>FAX - TRC Fax/form
</OPTION><OPTION value='GDS'>GDS - Global Distribution System</OPTION><OPTION va
lue='HD'>HD - HDS</OPTION><OPTION value='IPS'>IPS - PRS</OPTION><OPTION value='I
SAC'>ISAC - ISAC</OPTION><OPTION value='MFS'>MFS - Mars Full Service</OPTION><OP
TION value='MOF'>MOF - Mars Overflow</OPTION><OPTION value='NTF'>NTF - National
Toll Free (CRO)</OPTION><OPTION value='OTHR'>OTHR - Other</OPTION><OPTION value=
'PRO'>PRO - Property GUI</OPTION><OPTION value='RGR'>RGR - Return Gst Resv (FO U
se Only)</OPTION><OPTION value='RL'>RL - Rooming List</OPTION><OPTION value='SPW
'>SPW - SPG Web Site</OPTION><OPTION value='TRC'>TRC - TRC Phone Calls</OPTION><
OPTION value='UA'>UA - Galileo</OPTION><OPTION value='WB'>WB - Travel Web</OPTIO
N><OPTION value='WEB'>WEB - Internet</OPTION><OPTION value='WHD'>WHD - W Honolul
u</OPTION><OPTION value='WHL'>WHL - Wholesaler</OPTION><OPTION value='WI'>WI - W
alk In</OPTION><OPTION value='XS'>XS - Sita</OPTION></select></TD>
<TD valign="top" class="resCol3" nowrap>Region</TD>
<TD valign="top" class="resCol4" nowrap><select style="width:176" id="regionCode
" name="regionCode" size="1" onChange="fieldInfoChanged(this)" onkeydown="autoCo
mpleteSelect(event)"><OPTION value='' selected>-- Select Marketing Region --</OP
TION><OPTION value='1JP'>1JP - Japan</OPTION><OPTION value='1UAK'>1UAK - UA Alas
aka</OPTION><OPTION value='1UCA'>1UCA - California</OPTION><OPTION value='1UHI'>
1UHI - Hawaii</OPTION><OPTION value='1UIL'>1UIL - Illinois</OPTION><OPTION value
='1UMT'>1UMT - Mountain</OPTION><OPTION value='1UMW'>1UMW - Mid West</OPTION><OP
TION value='1UNE'>1UNE - North East</OPTION><OPTION value='1UNW'>1UNW - North We
st</OPTION><OPTION value='1UNY'>1UNY - New York</OPTION><OPTION value='1USE'>1US
E - South East</OPTION><OPTION value='1UTX'>1UTX - Texas</OPTION><OPTION value='
AF'>AF - Africa</OPTION><OPTION value='ASIA'>ASIA - Other Asia</OPTION><OPTION v
alue='AU'>AU - Australia</OPTION><OPTION value='AUS'>AUS - Australia</OPTION><OP
TION value='CAN'>CAN - Canada</OPTION><OPTION value='CHN'>CHN - China</OPTION><O
PTION value='CN'>CN - Canada</OPTION><OPTION value='DPI'>DPI - Delphi</OPTION><O
PTION value='EU'>EU - Other Europe</OPTION><OPTION value='GER'>GER - Germany</OP
TION><OPTION value='IT'>IT - Internet</OPTION><OPTION value='KOR'>KOR - South Ko
rea</OPTION><OPTION value='MEXI'>MEXI - Mexico</OPTION><OPTION value='MIDE'>MIDE
- Mid East</OPTION><OPTION value='NZ'>NZ - New Zealand</OPTION><OPTION value='O
T'>OT - Other</OPTION><OPTION value='RC'>RC - Receptive</OPTION><OPTION value='R
PT'>RPT - Report Purposes Only</OPTION><OPTION value='SOAM'>SOAM - South Americ<
/OPTION><OPTION value='TWN'>TWN - Taiwan</OPTION><OPTION value='UK'>UK - United
Kingdom</OPTION><OPTION value='US'>US - Domestic</OPTION><OPTION value='WW'>WW Internet-web</OPTION></select></TD>
<TD valign="top" class="resCol5" nowrap><FONT color='#cc0000'>*</FONT>Market Seg
ment</TD>
<TD valign="top" class="resCol6" nowrap><select style="width:176" id="marketCode

" name="marketCode" size="1" onChange="fieldInfoChanged(this)" onkeydown="autoCo


mpleteSelect(event)"><OPTION value='' selected>-- Select Marketing Segment --</O
PTION><OPTION value='BASE'>BASE - Airline Crew</OPTION><OPTION value='CAIR'>CAIR
- Contract Airline</OPTION><OPTION value='COMP'>COMP - Complimentary Rooms</OPT
ION><OPTION value='CORP'>CORP - Corporate Meetings</OPTION><OPTION value='CPER'>
CPER - Contract Permanent</OPTION><OPTION value='CTRA'>CTRA - Contract Tradeout<
/OPTION><OPTION value='DPI'>DPI - Delphi</OPTION><OPTION value='GOVT'>GOVT - One
Time Government</OPTION><OPTION value='HUSE'>HUSE - House Use</OPTION><OPTION v
alue='INCN'>INCN - Incentives</OPTION><OPTION value='INTL'>INTL - Intl Assn</OPT
ION><OPTION value='INTS'>INTS - Series International</OPTION><OPTION value='IOTT
'>IOTT - One Time International</OPTION><OPTION value='JCI'>JCI - Japan Corporat
e/Incentive</OPTION><OPTION value='JCIA'>JCIA - Do Not Use - Use JCI</OPTION><OP
TION value='JOTT'>JOTT - One Time Japan</OPTION><OPTION value='LEIS'>LEIS - Leis
/Smerf</OPTION><OPTION value='NATL'>NATL - National Association</OPTION><OPTION
value='OOTT'>OOTT - Do NOT USE</OPTION><OPTION value='SMRF'>SMRF - Do Not Use- U
se OOTT</OPTION><OPTION value='SP'>SP - Global Promotions Retail</OPTION><OPTION
value='STAR'>STAR - State/Regional Association</OPTION><OPTION value='TC'>TC Wholesale International (do No</OPTION><OPTION value='TCJ'>TCJ - Japan Campaign<
/OPTION><OPTION value='TCON'>TCON - TMC/Consortia</OPTION><OPTION value='TCOR'>T
COR - Transient Corp/govt</OPTION><OPTION value='TCOS'>TCOS - Kamaaina</OPTION><
OPTION value='TCR'>TCR - Commercial Retail</OPTION><OPTION value='TCVN'>TCVN - C
orporate-Transient</OPTION><OPTION value='TD'>TD - Trans Disc-Do Not Use</OPTION
><OPTION value='TFIT'>TFIT - Wholesale Domestic</OPTION><OPTION value='TGOV'>TGO
V - Government Rates</OPTION><OPTION value='TGP'>TGP - Global Promotions-Retail<
/OPTION><OPTION value='TGPS'>TGPS - Global Promotions-SPG</OPTION><OPTION value=
'TJC'>TJC - Japan 2nd Brand</OPTION><OPTION value='TJP'>TJP - Transient Japan Pe
rmanents</OPTION><OPTION value='TJR'>TJR - Transient Retail Japan</OPTION><OPTIO
N value='TJW'>TJW - Transient Japan Wholesale</OPTION><OPTION value='TLR'>TLR Kamaaina</OPTION><OPTION value='TOPA'>TOPA - Global Promotions-Opaque</OPTION><O
PTION value='TOUR'>TOUR - One Time Domestic</OPTION><OPTION value='TPKG'>TPKG Transient Packages</OPTION><OPTION value='TPO'>TPO - Rack/transient</OPTION><OPT
ION value='TPRE'>TPRE - Rack</OPTION><OPTION value='TQD'>TQD - QUALIFIED DISCOUN
T-OTHER</OPTION><OPTION value='TQDP'>TQDP - Qualified Discount-Partner</OPTION><
OPTION value='TSER'>TSER - Series Domestic</OPTION><OPTION value='TSP'>TSP - Tra
nsient Special Programs-Do</OPTION><OPTION value='TSPG'>TSPG - SPG Awards</OPTIO
N><OPTION value='TWI'>TWI - Intl Whlse</OPTION><OPTION value='TWJ'>TWJ - Whlse J
apan</OPTION><OPTION value='TWK'>TWK - Wholesale FIT-KAM</OPTION><OPTION value='
TWL'>TWL - Whls Dom</OPTION><OPTION value='WDCN'>WDCN - Wholesale Domestic Conne
cting</OPTION><OPTION value='WEBE'>WEBE - Internet-Expedia Wholesaler</OPTION><O
PTION value='WEBW'>WEBW - Internet WEB Wholesaler</OPTION><OPTION value='XTRA'>X
TRA - Extra Earnings</OPTION></select></TD>
<TD valign="top" class="resCol7" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol8" nowrap>&nbsp;</TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>Statistic 1</TD>
<TD valign="top" class="resCol2" nowrap><select style="width:176" id="marketStat
1" name="marketStat1" size="1" onChange="fieldInfoChanged(this)" onkeydown="auto
CompleteSelect(event)"><OPTION value='' selected>-- Select Marketing Stat1 --</O
PTION><OPTION value='AS'>AS - Asia</OPTION><OPTION value='AU'>AU - Australia</OP
TION><OPTION value='BIL'>BIL - Bill Board</OPTION><OPTION value='CN'>CN - Canada
</OPTION><OPTION value='EU'>EU - Europe</OPTION><OPTION value='JP'>JP - Japan</O
PTION><OPTION value='NEWS'>NEWS - Newspaper</OPTION><OPTION value='NZ'>NZ - New
Zealand</OPTION><OPTION value='ONE'>ONE - Stat 1</OPTION><OPTION value='OT'>OT Other</OPTION><OPTION value='RC'>RC - Receptive</OPTION><OPTION value='UK'>UK United Kingdom</OPTION><OPTION value='US'>US - Domestic</OPTION><OPTION value='
WW'>WW - Internet-web</OPTION><OPTION value='XX'>XX - Not Tracked By Regional</O
PTION></select></TD>
<TD valign="top" class="resCol3" nowrap><FONT color='#cc0000'>*</FONT>Statistic

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>&nbsp;</TD>
<TD valign="top" class="resCol6" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol7" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol8" nowrap>&nbsp;</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>&nbsp;&nbsp;<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">&nbsp;</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>&nbsp;</TD>

<TD valign="top" class="resCol1" nowrap>Room Number</TD>


<TD valign="top" class="resImportantInfo" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol3" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol4" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol5" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol6" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol7" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol8" nowrap>&nbsp;</TD>
</TR>
<TR class="resContentLine">
<TD valign="top" class="resCol0" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol1" nowrap>06-17-2014</TD>
<TD valign="top" class="resCol2" nowrap>DSOC - Stayover - Service</TD>
<TD valign="top" class="resCol3" nowrap>06-18-2014</TD>
<TD valign="top" class="resCol4" nowrap>DSOC - Stayover - Service</TD>
<TD valign="top" class="resCol5" nowrap>06-19-2014</TD>
<TD valign="top" class="resCol6" nowrap>CO - Check - Out </TD>
<TD valign="top" class="resCol7" nowrap>&nbsp;</TD>
<TD valign="top" class="resCol8" nowrap>&nbsp;</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_BACK_TO_BACK-32-0Section',true))" onclick="expan
dContract('RES_BACK_TO_BACK-32-0Section',true)"><DIV id="RES_BACK_TO_BACK-32-0Se
ctionImage"><IMG border='0' src='/lightspeed/en_US/images/minus.gif' width='16'
height='16'></DIV></A></TD><TD nowrap class="resSectionCol1"><A class="resSectio
nLabel" href="#" id="RES_BACK_TO_BACK-32-0"onkeypress="hrefHandleKeyDown(expandC
ontractViaKey('RES_BACK_TO_BACK-32-0Section',true))" onclick="expandContract('RE
S_BACK_TO_BACK-32-0Section',true)"><input type="hidden" id="_RES_BACK_TO_BACK-32
-0Focus" value=""/>Back To Back Links</A></TD><TD class="resSectionCol2">&nbsp;<
/TD></TR></TBODY></TABLE>
<!--RES_BACK_TO_BACK--><DIV id="RES_BACK_TO_BACK-32-0Section" style="display:blo
ck">
<TABLE border="0" width="100%" cellpadding="2" cellspacing="0" onkeydown="worksp
aceKeyHandler(window.event)">
<TBODY>
<TR class="resContentLine">
<td style="width: 95px;background-color: #ebebf5;">
</td><td width="100%" style= "background-color: #ebebf5;">
<div id="gridfloatingDiv" style= "height :230px; OVERFLOW-Y: auto; padding-bott
om: 20px;" >
<iframe id="inLineEditIframe" frameborder="0" scrolling="no" marginwidth="0" mar
ginheight="0" width="880px" height="100%"
src="/lightspeed/en_US/housekeeping/backToBackModRes.jsp?_STATE_KEY=
modRes:8
&_READONLY=
false
"/></iframe>
</div>
</td><td style="width: 95px;background-color: #ebebf5;"></td>
</TR>
</TBODY></TABLE>
</DIV>
</div>

<input id="_tempOverrideText" name="_tempOverrideText" type="HIDDEN" value="">


<input id="_showManageSW" name="_showManageSW" type="HIDDEN" value="null">
<input id="_SWInitMsg" name="_SWInitMsg" type="HIDDEN" value="null">
<input id="houseAlertsDisplayed" name="houseAlertsDisplayed" type="HIDDEN" value
="false">

<div style="position: absolute; bottom: 50px;">


<table border="0" cellspacing="0" cellpadding="0" width="100%" c
lass="defaultEditor">
<tbody>
<tr>
<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">&nbsp;</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&#x20;Not&#x20;Bee
n&#x20;Asked&#x20;For&#x20;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>

<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/edit/javascript/


creditcardvalidation.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/edit/javascript/
settlement.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/edit/javascript/
input.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/creditCar
dSwipe.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/dateAndTi
me.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/hashtable
.js"></script>
<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/workspace
.js"></script>
<script type="text/javascript">
var hasSwipeStream = false;
var d = new Date(2014, 5, 13 );
function getSysYear()
{
var yr = d.getFullYear();
return yr;
}
function getSysMonth()
{
return d.getMonth() + 1;
}
function getSysDay()
{
return d.getdate();
}
var settlementArray = new Array();
settlementArray[0] = new SettlementObj("AX;American\x20Express;Y;GTD;N;Y;Y;N;N;Y
;Y;0.0;N;CC;Y;N;false;15;");
settlementArray[1] = new SettlementObj("BCC;BCC\x20Credit\x20Cards;Y;NGTD;N;N;N;
Y;Y;Y;N;0.0;N;;;;false;0;");
settlementArray[2] = new SettlementObj("BQT;BQT\x2FCatering\x20Deposit;Y;GTD;N;N
;N;Y;N;Y;N;0.0;N;;;;false;0;");
settlementArray[3] = new SettlementObj("BW;Bank\x20Wire\x20Deposit;Y;GTD;N;N;N;N
;N;N;N;0.0;N;;;;false;0;");
settlementArray[4] = new SettlementObj("C80;C80;N;NGTD;N;N;N;N;N;N;N;0.0;N;;;;fa
lse;0;");
settlementArray[5] = new SettlementObj("C90;C90;N;NGTD;N;N;N;N;N;N;N;0.0;N;;;;fa
lse;0;");
settlementArray[6] = new SettlementObj("CA;Cash;Y;NGTD;Y;N;N;N;N;Y;N;0.0;Y;;;;fa
lse;0;");
settlementArray[7] = new SettlementObj("CB;Carte\x20Blanche;N;GTD;N;Y;N;N;N;N;N;
0.0;N;;;;false;0;");
settlementArray[8] = new SettlementObj("CK;Check;Y;GTD;Y;N;N;Y;Y;Y;N;0.0;Y;CHK;;
;false;0;");
settlementArray[9] = new SettlementObj("CUP;China\x20Union\x20Pay\x20\x2D\x20Cre
dit\x20Card;N;GTD;N;Y;Y;Y;N;Y;Y;0.0;N;CC;N;N;false;14;");

settlementArray[10] = new SettlementObj("DB;Direct\x20Bill;N;GTD;N;N;N;N;N;N;N;0


.0;N;;;;false;0;");
settlementArray[11] = new SettlementObj("DC;Diners\x20Club;Y;GTD;N;Y;Y;Y;N;Y;Y;0
.0;N;CC;Y;N;false;14;");
settlementArray[12] = new SettlementObj("DCUP;China\x20Union\x20Pay\x20\x2D\x20D
ebit\x20Card;N;NGTD;N;N;N;Y;N;Y;N;0.0;N;;;;false;0;");
settlementArray[13] = new SettlementObj("DEP;Deposits\x20Received;N;GTD;N;N;N;N;
N;N;N;0.0;N;;;;false;0;");
settlementArray[14] = new SettlementObj("DI;Discover\x20Network;Y;GTD;N;Y;Y;N;N;
Y;Y;0.0;N;CC;Y;N;false;14;");
settlementArray[15] = new SettlementObj("EC;Eurocard;N;GTD;N;Y;N;N;Y;N;N;0.0;N;C
C;;;false;0;");
settlementArray[16] = new SettlementObj("GC;Gift\x20Cert\x20Used;N;NGTD;N;N;N;Y;
N;Y;N;0.0;N;;;;false;0;");
settlementArray[17] = new SettlementObj("GCC;GCC\x20Credit\x20Cards;N;NGTD;N;N;N
;Y;Y;Y;N;0.0;N;;;;false;0;");
settlementArray[18] = new SettlementObj("GX;Givex\x20Gift\x20Card;N;NGTD;N;N;N;Y
;N;Y;N;0.0;N;;;;false;0;");
settlementArray[19] = new SettlementObj("INTA;Internet\x2DCC\x2DAX\x2FDiners;N;N
GTD;N;N;N;Y;N;N;N;0.0;N;CC;;;false;0;");
settlementArray[20] = new SettlementObj("INTV;Internet\x2DCC\x2DVM\x2FJCB\x2FDV;
N;NGTD;N;N;N;Y;N;N;N;0.0;N;CC;;;false;0;");
settlementArray[21] = new SettlementObj("IPO;individual\x20pays\x20on\x20own;N;G
TD;N;N;N;N;N;N;N;0.0;N;;;;false;0;");
settlementArray[22] = new SettlementObj("JC;JCB;Y;GTD;N;Y;Y;Y;N;N;Y;0.0;N;CC;Y;N
;false;24;");
settlementArray[23] = new SettlementObj("MCO;Misc.\x20Chg\x20Order;N;DEP;N;;N;N;
N;N;N;0.0;N;;;;false;0;");
settlementArray[24] = new SettlementObj("ML;Mail\x20In;N;NGTD;N;N;N;N;Y;N;N;0.0;
N;CHK;;;false;0;");
settlementArray[25] = new SettlementObj("OL;JTB\x20Oli\x20Oli\x20Card;Y;GTD;N;Y;
Y;Y;N;Y;N;0.0;N;CC;N;N;false;16;");
settlementArray[26] = new SettlementObj("OLTA;On\x2DLine\x20Tvl\x20Desk\x20CC;N;
NGTD;N;N;N;Y;N;N;N;0.0;N;;;;false;0;");
settlementArray[27] = new SettlementObj("PPD;Pre\x2Dpayment\x20PAID;N;DEP;N;;N;N
;N;N;N;0.0;N;;;;false;0;");
settlementArray[28] = new SettlementObj("PRE;pre\x2Dpayment\x20required;N;NGTD;N
;N;N;N;N;N;N;0.0;N;;;;false;0;");
settlementArray[29] = new SettlementObj("RP;Resort\x20Pass;N;NGTD;N;N;N;Y;N;Y;N;
0.0;N;;;;false;0;");
settlementArray[30] = new SettlementObj("SA;Signed\x20Agreement;N;GTD;N;N;N;N;N;
N;N;0.0;N;;;;false;0;");
settlementArray[31] = new SettlementObj("TA;Travel\x20Agent;N;GTD;N;;N;N;Y;N;N;0
.0;N;;;;false;0;");
settlementArray[32] = new SettlementObj("TVL;Travel\x20Desk\x20Credit\x20Cards;N
;NGTD;N;N;N;Y;N;N;N;0.0;N;;;;false;0;");
settlementArray[33] = new SettlementObj("VCH;collect\x20voucher;N;GTD;N;N;N;N;N;
N;N;0.0;N;;;;false;0;");
settlementArray[34] = new SettlementObj("VM;Visa\x2FMasterCard;Y;GTD;N;Y;Y;Y;N;Y
;Y;0.0;N;CC;Y;N;false;13;");
settlementArray[35] = new SettlementObj("XPS;ExpressPass\x20Guarantee;N;GTD;N;;N
;N;Y;N;N;0.0;N;;;;false;0;");
settlementArray[36] = new SettlementObj("XS;DO\x20NOT\x20USE;N;GTD;N;N;N;N;Y;N;N
;0.0;N;;;;false;0;");
settlementArray[37] = new SettlementObj("ZC;HSI\x20\x2D\x20Diners\x20Club;N;NGTD
;N;N;N;Y;Y;N;N;0.0;N;;;;false;0;");
settlementArray[38] = new SettlementObj("ZCA;HSI\x20\x2D\x20Cash\x20Sales;N;NGTD
;N;N;N;Y;Y;N;N;0.0;N;;;;false;0;");
settlementArray[39] = new SettlementObj("ZD;HSI\x20\x2D\x20Discover;N;NGTD;N;N;N
;Y;Y;Y;N;0.0;N;;;;false;0;");

settlementArray[40] = new SettlementObj("ZG;HSI\x20\x2D\x20Gift\x20Certificates;


N;NGTD;N;N;N;Y;Y;N;N;0.0;N;;;;false;0;");
settlementArray[41] = new SettlementObj("ZJ;HSI\x20\x2D\x20JCB;N;NGTD;N;N;N;Y;Y;
Y;N;0.0;N;;;;false;0;");
settlementArray[42] = new SettlementObj("ZO;HSI\x20\x2D\x20JTB\x20Oli\x20Oli\x20
Card;N;NGTD;N;N;N;Y;Y;N;N;0.0;N;;;;false;0;");
settlementArray[43] = new SettlementObj("ZV;HSI\x20\x2D\x20Visa\x2FMastercard;N;
NGTD;N;N;N;Y;Y;Y;N;0.0;N;;;;false;0;");
settlementArray[44] = new SettlementObj("ZX;HSI\x20\x2D\x20American\x20Express;N
;NGTD;N;N;N;Y;Y;Y;N;0.0;N;;;;false;0;");
var
var
var
var
var
var

guestLastName = "PerftestData";
guestFirstName = "";
readonlyRes = false;
resStatus = "MOD";
resStatusCO = "CO";
bIsResMode = true;

var bHasInited = false;


var origCCNumber = "";
var ccNumChanged = false;
var cnpNumber = "";
var keybNumericAmount;
var keybCCNumber;
var isBankLive = true;
var cnpAlreadyEntered = false;
//start CQ205185 Enhancment
var isMaxCardReach= false;
var isGpEnable=true;
var mask = "XXXX";
// end CQ205185 Enhancment
function payInit()
{
//
try
{
populateSettlementOptions(document.theForm.paymentMethod, settle
mentArray);
document.theForm.paymentMethod.options[0] = new Option("-- Selec
t Payment Type --", "");
var arAcct = "";
if (arAcct.length > 0 )
{
var arInfoStr = " - ";
document.theForm.aracct.value = arAcct;
document.theForm._aracct.value = arInfoStr;
}
var decimalSeparator = ".";
var numericPattern = "0123456789\r" + decimalSeparator;
keybNumericAmount = new keybEdit( numericPattern, 'Numeric Input
Only.' );
var numericCCPattern = "0123456789\b";
keybCCNumber = new keybEdit( numericCCPattern, 'Numeric Input On
ly.' );

initSelectById( "roomPosting", "A" );


var ccType = "CA";
if (ccType == null || ccType.length <= 0)
ccType = ccNumberToCardType("");
initSelectById( "paymentMethod", ccType);
if ( ! readonlyRes )
{
paymentTypeChanged();
}
//Added as a part of SWDTS00248409
if(isCreditCard(document.theForm.paymentMethod, settlementArray)
)
{
setCCValue( "");
setCcExpMonthYear("", "", true);
}

var creditLimit = 0.0;


document.theForm.creditlimit.value = creditLimit;
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"CURRENCY", "DO_FORMAT_NUMBER", creditLimit );
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
creditLimit = getField( resultStr, 1, ";" );
document.theForm._creditLimit.value = creditLimit;
}

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;

// Code added for Stay Details (PAST_STAY/FUTURE_STAY) - created for Cre


ate/View/Modify CQ 182906/182908

// stateObj.getStayInfoType() = PAST_STAY or FUTURE_STAY only if it is i


nvoked from Stay Details tab of GuestProfile.
// else it will be null.
// If stateObj.getStayInfoType() = PAST_STAY, then make all the fields r
eadonly.
if("null" == "PAST_STAY" )
{
document.theForm.creditCardHolderName.disabled = true;
disableCC(true);
document.theForm.ccExpDate.disabled = true;
}
// CR 46 Guest profile Phase 2 Start
// If CC # is purged, the Full CC # won't be available. So, don't enable
Full CC # button.
// The condition for the same is, if Card Expiry Date is not available a
nd RES Status is CO, then disable Full CC# button and set the Tooltip.
var isInValidCcExpDate = false;
var ccExpDateValue= document.theForm.ccExpDate.value;
if(ccExpDateValue == undefined || ccExpDateValue == null || ccExpDateVal
ue == "" || ccExpDateValue == "null")
{
isInValidCcExpDate = true;
}
var isCCNumAvailable = false;
var ccNumber= getCCValue();
if(ccNumber != undefined && ccNumber != null && ccNumber != "" && ccNumb
er != "null")
{
isCCNumAvailable = true;
}
// If the CC# is purged, the exp date is empty. In this case, display th
e tooltip.
var isExpDateBlank = "Full card number is no longer available.";
var bCanViewCC = "true";
if(bCanViewCC == "true") // if the user has permission update the title.
{
if(!readonlyRes && isCreditCard(document.theForm.paymentMethod,
settlementArray) && resStatus==resStatusCO && isInValidCcExpDate && isCCNumAvail
able)
{
document.getElementById( "_viewFullCC" ).title=isExpDate
Blank;
}
else
{
document.getElementById( "_viewFullCC" ).title="";
}
}
// CR 46 Guest profile Phase 2 End
//
//
//
//

}
catch( e )
{
errorHandler( e, "payInit()" );
}
try
{

__setFocusEvents(); // see creditCardSwipe.jsp


}
catch (e) {};
}
function setSettlementFocus()
{
try
{
document.theForm.paymentMethod.focus();
}
catch( e ) {}
}
function updateCreditLine( params )
{
var elem = document.getElementById("creditlimit");
if ( elem != null )
{
elem.value = params;
}
elem = document.getElementById("_creditLimit");
if ( elem != null )
{
elem.value = params;
}
}
function formatCreditLimit(rawCreditLimit)
{
var creditLimit = rawCreditLimit.value;
if(creditLimit.length > 0)
{
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0,
"CURRENCY", "DO_FORMAT_NUMBER", creditLimit );
var status = getField( resultStr, 0, ";" );
if ( status == "ok" )
{
creditLimit = getField( resultStr, 1, ";" );
document.theForm._creditLimit.value = creditLimit;
var elem = document.getElementById("creditlimit");
if ( elem != null )
{
elem.value = creditLimit;
}
elem = document.getElementById("_creditLimit");
if ( elem != null )
{
elem.value = creditLimit;
}
}
if ( isNaN( creditLimit ) )
{
document.theForm._creditLimit.value = "";
return dispErrorMsg2( "Enter a valid amount for the cred
it limit.", document.theForm._creditLimit, false );
}
if ( creditLimit < 0.0 )
{

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 )

var ccselectName = getSelectedText(document.theF


orm.paymentMethod);
if (ccName == null || ccName.length <= 0)
ccName = ccType;
return dispErrorMsg2( "The card number appears t
o be a '" + ccName + "' card, not a '" + ccselectName + "' card.\n\nSelect the c
orrect card payment type.", document.theForm.paymentMethod );
}
}
var sysMM = getSysMonth();
var sysYY = getSysYear();
var ccExpDateValue=getExpDateValue();
if ( !validateExpDateUsingSysDate( document.getElementById(ccExp
MonthId), document.getElementById(ccExpYearId), sysMM, sysYY )||isNullOrBlank(cc
ExpDateValue))
{
return dispErrorMsg2( "Selected card has an invalid expi
ration date.\nChoose another card or select a valid expiration date.", document.
getElementById(ccExpDateId), bCanContinueWithErrors );
}
var mm = document.getElementById(ccExpMonthId).value;
var yy = document.getElementById(ccExpYearId).value;
if ( yy < "2014" || ( yy < "2014" && mm < "06" ) ) // SWDTS0024
7093
{
alertMessageKey( "ccexpiresbeforeStay"); //SWDTS00243319
}
}
disableById( "paymentMethod", false );
setCcExpDateEnabled( true );
document.theForm.creditCardHolderName.disabled = false;
disableCC(false);
var normalizedValue = document.theForm.creditlimit.value;
if ( isNaN( normalizedValue ) )
{
document.theForm._creditLimit.value = "";
return dispErrorMsg2( "Enter a valid amount for the credit limit
.", document.theForm._creditLimit, bCanContinueWithErrors );
}
if ( normalizedValue < 0.0 )
{
document.theForm._creditLimit.value = "";
return dispErrorMsg2( "Credit limit cannot be negative.", docume
nt.theForm._creditLimit, bCanContinueWithErrors );
}
if ( document.theForm.postingStatusCheck.checked ){

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();
}

//Remove double check of Popup defect SWDTS00258147


//lookupARNum();
return valid;
}
function doCNP()
{
var ccnum = getCCValue();
if ( ccnum.length >= 4 )
{
ccnum = ccnum.substring((ccnum.length-4), ccnum.length);
ccnum = "XXXX" + ccnum;
}
var fragStr = fsGetFragmentSizeString( "CardNotPresent.jsp" );
var w = fsGetWidth( fragStr );
var h = fsGetHeight( fragStr );
var fh = fsGetFragementHeight( fragStr );
var windowName = "cnp";
var windowStyle = "scrollbars=0,location=0,status=1,menubar=0,resizable=
1,width=" + w + ",height=" + h;
var urlArray =
urlArray.push(
_KEY=modRes:8" );
urlArray.push(
urlArray.push(

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);
}

//start CQ205185 Enhancment


if(isMaxCardReach && isGpEnable)
{
document.theForm.keepInGp.disabled=true;
}
//end CQ205185 Enhancment
}
catch( e )
{
errorHandler( e, "initSettlementFields" );
}
}
function resetArNumber()
{
document.theForm.aracct.value = "";
document.theForm._aracct.value = "";
}
function ccDataChanged()
{
if ( bHasInited == true )
{
sendSwipeToServer("modRes:8", "");
hasSwipeStream = false;
cnpAlreadyEntered = false;
cnpNumber = "";
document.theForm.cardNotPresent.value = "";
}
}
function paymentTypeChanged()
{
try
{
var paymentMethod = getSelectedValueById( "paymentMethod" );
initSettlementFields();

var viewCCBtn = document.getElementById( "_viewFullCC" );


// if any title was present for view full cc btn, reset it.
viewCCBtn.title="";

var paymentCopy = document.getElementById( "copy" );/*Code chang


es for CQ SWDTS00256872 */
var SearchGP = document.getElementById( "search" );/*Code change
s for CQ SWDTS00256872 */

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");

function setGuaranteeStatus( key )


{
try
{
var gtdStatus = guarHT.get( key );
if ( gtdStatus )
{
initSelectById("guaranteeStatus", gtdStatus);
}
}
catch( e ) { alert("setGuaranteeStatus: " + e ); }
}
var useModalDialogs = "true";
function doSearchCustomerNumber( searchARNum )
{
//CR 54 Start
var launchData = "";
searchARNum = Trim(document.theForm._aracct.value);
if ( typeof(searchARNum) != "undefined" )
{
var arParams = new Array();
arParams.push("");
arParams.push(searchARNum);
arParams.push("");
launchData = arParams.join(";");

}
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 displayARAccountFDComment( fdComment )


{
try
{
if (false == isNullOrBlank(fdComment))
{
setTimeout("alertMessage('" + fdComment + "')", 250);
}
}
catch (e) {}
}

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()
{

var ccNum = getCCValue();


ccNum = Trim( ccNum );
if ( ccNum == "" )
return false;
if (null != ccNum && ccNum != "" && ccNum !='undefined' && ccNum.length
> 9)
{
var last5Digit = ccNum.substring(ccNum.length-5, ccNum.length);
document.theForm.ccnum5Digit.value = last5Digit;
origCCNumber = mask + last5Digit;
}
var checkCCValid = shouldCheckDigits( document.theForm.paymentMethod, se
ttlementArray );
var paymentType = getSelectedValueById( "paymentMethod" );
var isValid = false;
if (!false)
{
var isValid = validateCC(getCCValue(), origCCNumber, "XXXX", "37
7", checkCCValid, paymentType);
}
else
{
isValid = true;
}
if(isValid != null && isValid == -1)
{
setCCValue("");
if ( bHasInited == true )
{
nullifyWebParmCardNum();
}
setTimeout( "document.getElementById(\"creditCardNumber\").focus
()", 100 );
return false;
}
else if(isValid != null && isValid == -2)
{
alertMessageKey("msg.ccInvalid");
setCCValue("");
if ( bHasInited == true )
{
nullifyWebParmCardNum();
}
setTimeout( "document.getElementById(\"creditCardNumber\").focus
()", 100 );
return false;
}
if (ccNum != "" && ! (ccNum.indexOf( "XXX") >= 0 ) )
{
var params = new Array();
params.push(
params.push(
params.push(
params.push(
params.push(

"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 CQ SWDTS00256872 */

/**
*
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)
{

var fragStr = fsGetFragmentSizeString( "searchGuestProfile.jsp" );


var w = fsGetWidth( fragStr );
var h = fsGetHeight( fragStr );
var ccExpDateValue= document.theForm.ccExpDate.value;
var ccNum = document.getElementById("creditCardNumber").value;
var url = new Array();
url.push( getLocalContextPath() );
url.push( "/common/StdFragmentDlg.jsp?_STATE_KEY=" );
url.push( "modRes:8");
url.push( "&_DIALOG_LEVEL=" );
url.push( (getLSApplet().getDialogLevel() + 1) );
url.push( "&_FRAGMENT_JSP=../edit/guestProfileSearch/searchGuestProfile.jsp"
);
url.push( "&_FRAGMENT_HEIGHT=100%" );
url.push( "&_WINDOW_TITLE_RSRC_KEY=res.tooltip.findGuest" );
url.push( "&_IS_INFODLG=true" );
url.push( "&_ACTION=ACTION_INIT" );
url.push( "&_SHOW_CLOSE=false" );
url.push( "&_INIT=true" );
url.push( "&_LAUNCH_POINT=COPY_PASTE");
url.push( "&_SOURCE=RES_MOD");
if(typeof(ccNum) != "undefined" && ccNum != null)
{
url.push( "&_CC_NUM=");
url.push(ccNum);
}
if(typeof(ccExpDateValue) != "undefined" && ccExpDateValue != null)
{
url.push( "&_CC_EXP_DATE=");
url.push(ccExpDateValue);
}
url.push( "&LISTEN_DIALOG_DISPLAYED=true" );
var searchGuestProfileWinName = getWinName();
var searchWin1;
setIsCcSrc(true);
if(typeof(searchGuestProfileWinName) != "undefined" && searchGuestProfileWin
Name != null)
{
searchWin1 = createWindow(url.join(""), searchGuestProfileWinName, w, h
, 0, 'center');
}
else
{
searchWin1 = createWindow(url.join(""), "SearchGuestProfile", w, h , 0,
'center');
}
searchWin1.focus();
}
/**
*
Method returns preveously opened searchGuestProfile window name from ses
sion.
*/
function setIsCcSrc(isCcSrc)
{
var resultStr = sendSynchRequestToServer( "POST", "modRes:8", 0, "CREDIT
_CARD", "CMD_SET_IS_CC_SRC", isCcSrc );
return getField(resultStr, 1, ";");

}
/**
*
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()
{

var ccExpDateValue= document.theForm.ccExpDate.value;


var nameOnCard = document.theForm.creditCardHolderName.value;
var paymentCopy = document.getElementById( "copy" );
var paymentMethod = getSelectedValueById( "paymentMethod" );
var ccNum = getCCValue();
if(isNullOrBlank(ccNum) || isNullOrBlank(paymentMethod) || isNul
lOrBlank(nameOnCard) || isNullOrBlank(ccExpDateValue))
{
paymentCopy.disabled = true;
document.getElementById("copyImg").src='/lightspeed/en_U
S/images/copyDisabled.png';
}
else
{
paymentCopy.disabled = false;
document.getElementById("copyImg").src='/lightspeed/en_U
S/images/copy.png';
}
}
/**
* Function will be called after pasting CC info
*/
function cardNumChangedFromCopyPaste(last5Digit)
{
document.theForm.ccnum5Digit.value = last5Digit;
origCCNumber = mask + last5Digit;
var viewCCBtn = document.getElementById( "_viewFullCC" );
if ( viewCCBtn )
{
viewCCBtn.disabled = (getCCValue() == "");
if(viewCCBtn.disabled)
{
document.getElementById("viewCcImg").src
='/lightspeed/en_US/images/creditCards16x24disabled.png';
}
else
{
document.getElementById("viewCcImg").src
='/lightspeed/en_US/images/creditCards16x24.png';
}
}
var paymentCopy = document.getElementById( "copy" );
var SearchGP = document.getElementById( "search" );
if(paymentCopy)
{
paymentCopy.disabled = true;
document.getElementById("copyImg").src='/lightspeed/en_U
S/images/copyDisabled.png';
SearchGP.disabled = true;
SearchGP.style.opacity = 0.4;
}
return true;

}
/* Method added end for CQ SWDTS00256872 */
</script>
<input
<input
<input
<input
<input
<input

name="_origPaymentMethod" type="HIDDEN" value="CA">


name="_doAuthorizedCC" type="HIDDEN" value="false">
name="creditlimit" type="HIDDEN" value="0.00">
name="cardNotPresent" id="cardNotPresent" type="HIDDEN" value="">
name=aracct id="aracct" type="HIDDEN" value="">
name="postingStatus" id="postingStatus" type="HIDDEN" value="P">

<input type="hidden" name="focusSection" id="settlement"/>


<input type="hidden" id="_settlementFocus"/>

<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">&nbsp;
</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>

<script type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/javascript/jquer


y.js"></script>

<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);
}

else if ( typeof( keybNumeric )


!= "undefined" )
{
editKeyBoard(this,keybNu
meric,event);
}
}
if ( typeof( clearMsg ) != "undefined" )
{
clearMsg();
}
if ( typeof( editKeyBoardDisplayInMsgPan
el ) != "undefined" && typeof( keybNumeric ) != "undefined" )
{
editKeyBoardDisplayInMsgPanel(th
is, keybNumeric);
}
else if ( typeof( editKeyBoardDisplayInM
sgPanel ) != "undefined" && typeof( parent.keybNumeric ) != "undefined" )
{
editKeyBoardDisplayInMsgPanel(th
is, parent.keybNumeric);
}
}
}
}
else
{
event.cancelBubble = true;
event.returnValue = false;
event.keyCode = 0;
if (event.stopPropagation) event.stopPropagation();
return false;
}
});
});

$(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>

<input type="hidden" id="ccnum5Digit" na


me="ccnum5Digit" value=""/>
<span onmouseover="showTipCc('View Full
Credit Card Number','block');" onmouseout="hideTip()" style="vertical-align: mid
dle;"> <script
type="text/javascript">c
reateAquaBtn( "", "_viewFullCC", "javascript:viewFullCC();", "", false, "<IMG bo
rder=0 src=&#x2f;lightspeed&#x2f;en_US/images/creditCards16x24.png width='24' he
ight='16' id='viewCcImg' >", 28, 20 );</script>
</span>
<span onmouseover="showTipCc('Copy Credi
t Card ','block');" onmouseout="hideTip()" style="vertical-align: middle;padding
-left: 5px" >
<script type="text/javascript">c
reateAquaBtn( "", "copy", "javascript:paymentCopy()", "", false, "<IMG border=0
src=&#x2f;lightspeed&#x2f;en_US/images/copy.png width='19' height='19' id='copyI
mg'>", 20, 20 );</script>
</span>
<span onmouseover="showTipCc('Paste Cred
it Card',document.getElementById('paste').style.display);" onmouseout="hideTip()
" style="vertical-align: middle;padding-left: 5px;" >
<script type="text/javascript">c
reateAquaBtn( "", "paste", "javascript:doShowCopiedCC()", "", false, "<IMG borde
r=0 src=&#x2f;lightspeed&#x2f;en_US/images/paste.png width='19' height='19'>", 2
0, 20, "","display:'none'");</script>
</span>
<span onmouseover="showTipCc('Search Gue
st Profile','block');" onmouseout="hideTip()" style="vertical-align: middle;padd
ing-left: 5px">
<script type="text/javascript">c
reateAquaBtn("GP", "search", "javascript:doSearchGuestProfile();", "", false, "<
IMG src=&#x2f;lightspeed&#x2f;en_US/images/magnify.gif width=16 height=15 border
=0>","50")</script>
</span>
<!-- <span style="vertical-align: middle
;padding-left: 5px"> <script
type="text/javascript">c
reateAquaBtn( "", "search", "javascript:doSearchGuestProfile()", "", false,"","1
30" );</script>
</span> -->
</td>

<td align="right" class="msgData">


Expires
</td>
<td nowrap>

<input type="hidden" id="_ccExpDateSaved" name="_ccExpDateSaved" value="" />


<input type="hidden" id="creditCardExpMonth" name="creditCardExpMonth" value=""
/>
<input type="hidden" id="creditCardExpYear" name="creditCardExpYear" value="" />
<script type="text/javascript">
var
var
var
var

ccExpDateId = "ccExpDate";
ccExpDateSavedId = "_ccExpDateSaved";
ccExpMonthId = "creditCardExpMonth";
ccExpYearId = "creditCardExpYear";

function onKeyPress_ccExpDateSaved(selfObj, event)


{
var key = (event.keyCode) ? event.keyCode : event.charCode;
if ( key == 13 )
{
var result = selfObj.onchange();
if (result != true && result != "true")
{
event.cancelBubble = true;
event.returnValue = true;
return;
}
}
}

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.

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>
<div id="ccExpDateAppletDIV" style="float:left,position:relative">Date Validator
Applet Goes Here</div>
<script type="text/javascript">
createCcExpDateControl("ccExpDateAppletDIV", "0", "0", "ccExpDateApplet"
,
"1.5",
"0000.0000.0000.5CB9",
"modRes:8", "MM\x2Dyyyy",
"false" );
</script>
<div style="float:left;position:relative;padding-bottom:10px;margin-bottom:10px
"><div style="position&#x3a;relative&#x3b;&#x20;top&#x3a;&#x20;10px">
<input class="InputStyle" type="text" id="ccExpDate" name="ccExpDate" si
ze="10" maxlength="7" style="width: 110px" onblur="enableCopy&#x28;&#x29;" onke
ypress="onKeyPress_ccExpDateSaved(this, event)"
onfocus="javascript:this.sele
ct();" onchange="javascript:return ccExpDateChanged(this, _ccExpDateSaved, 'ccEx
pDateApplet', 'MM-yyyy', 1402642800000, 'ccExpiryDateChanged\x28\x29\x3B', 'ccDa
taChanged\x28\x29\x3B', true, 'credit\x20card');" />
</div>
</div>
</td>
<td align="right" class="msgData">
Deposit Reqst
</td>
<td align="left">

$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>
&nbsp;
&nbsp;
<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=&#x2f;lightspeed&#x2f;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" );

// make the id unigue


var dt = new Date();
var resDialog = window.open(url.join(""), (winId + dt.getMillise
conds()), "scrollbars=0,location=0,status=0,menubar=0,resizable=1,width=" + w +
",height=" + h);
centerWindow( resDialog, w, h );
resDialog.focus();
}
catch( e )
{
errorHandler( e, "openReservationDialog" );
}
}
</script>
<br><br><br><br>
</div>
<div style="position: absolute; bottom: 0px; left: 0px; background-color: #ebebf
5;" id="stdTabs">

<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>

<div class="footer" align="center">


Copyright&nbsp;&copy;2002-2014.&nbsp;&nbsp;Galaxy Hotel Systems LLC. All rights
reserved.
</div>
<div style="position: absolute; bottom: 0px; right: 0px">

<IMG ondrag="return false" border="0" alt="SSL Secured Key Size: 128 bit CipherS
uite: TLS_RSA_WITH_AES_128_CBC_SHA" src="&#x2f;lightspeed&#x2f;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>

<a href="#" style="font-size: 9pt; margin-right: 14px;" ondrag="return false"


onkeydown="processCCKeyDown('getCardSwipeStatus()')"
onclick="getCardSwipeStatus()">Get Card Swipe Status</a>
Release 9.8&nbsp;Build 23737
</div>
<div id="formElemDiv" style="position: relative; visibility: hidden;"></div>
</form>

<SCRIPT type="text/javascript">
var __myLSApplet = null;
function getLSApplet()
{
if ( __myLSApplet ) return __myLSApplet;
__myLSApplet = document.getElementById("LSApplet");
return __myLSApplet;
}
</SCRIPT>

<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.
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>

<SCRIPT type="text/javascript" src="&#x2f;lightspeed&#x2f;en_US/common/lightSpee


dApplet.js"></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>

Potrebbero piacerti anche