function getClassification(type,selectedType,id) {	if(selectedType == "undefined") selectedType = "";	if(id == "undefined") id = type; 	LoadAjaxCallFunction('/jsp/common/retrieveClasification.jsp', 'type=' + type +"&selectedType=" + selectedType, getClassificationCallback,id);}function getClassificationCallback(responseString,elementName) {	responseString = trim(responseString);			var selectObject = document.getElementById(elementName);	if(selectObject != null) {		selectObject.options.length = 0;		var optionList=responseString.split("!");		selectObject.options[0] = new Option( "Select","", false, false);		for(var i=1;i <=optionList.length;i++) {					var optionObj = optionList[i-1].split("~");			if("Selected" == optionObj[2]) {				selectObject.options[i] = new Option(optionObj[1], optionObj[0], true, true);			} else				selectObject.options[i] = new Option(optionObj[1], optionObj[0], false, false);		}	}	}// Load Classification values to Comboboxfunction getClassificationOLD(classification, optTargetSelect) {	var targetClassificationDiv = "";	if (optTargetSelect != undefined && optTargetSelect != "") { targetClassificationDiv = optTargetSelect; }	else { optTargetSelect = ""; }	DWREngine._execute(dwrURL, 'commonServicesJsDwr', 'getClassificationDwr', classification, optTargetSelect, getClassificationReq);}function getCountriesList(selectedType){	DWREngine._execute(dwrURL, 'commonServicesJsDwr', 'getValidPaymentCountries', "CreditCardType", "payCardType", getCountryListReq);}function getCountryListReq(result) {	DWRUtil.addOptions("country",result,"countryCode","countryName");		//	DWRUtil.setValue("country","");}function getClassificationReqOLD(getClassificationRes) {	var targetClassificationDiv = getClassificationRes[0].targetSelect;    switch (getClassificationRes[0].classificationName) {      case "Salutation":	  		if (targetClassificationDiv == "") targetClassificationDiv = "salutation";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;      case "CreditCardType":	  		if (targetClassificationDiv == "") targetClassificationDiv = "creditCardType";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;      case "FFProgram":	  		if (targetClassificationDiv == "") targetClassificationDiv = "frequentFlyerProgramLoad";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;      case "MealType":	  		if (targetClassificationDiv == "") targetClassificationDiv = "mealPreferenceLoad";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;      case "SeatingType":	  		if (targetClassificationDiv == "") targetClassificationDiv = "seatingRequestLoad";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;      case "SpecialAssistance":	  		if (targetClassificationDiv == "") targetClassificationDiv = "specialAssistanceRequestLoad";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;		      case "HotelLoyalty":	  		if (targetClassificationDiv == "") targetClassificationDiv = "hotelLoad";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;		      case "CarLoyalty":	  		if (targetClassificationDiv == "") targetClassificationDiv = "carLoad";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;		      case "PasswordQuestion":	  		if (targetClassificationDiv == "") targetClassificationDiv = "passwordQuestion";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;      case "EmailFormat":	  		if (targetClassificationDiv == "") targetClassificationDiv = "emailformat";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue");        break;      case "TravelerType":	  		if (targetClassificationDiv == "") targetClassificationDiv = "travelerType";        DWRUtil.addOptions(targetClassificationDiv, getClassificationRes, "classificationValueCode", "classificationValue"); 		if (loadTravlerType) {			var x = "";			for (var i = 0; i < 6; i++) {				if (document.getElementById("TTADT" + i)) {					DWRUtil.addOptions("TTADT" + i, getClassificationRes, "classificationValueCode", "classificationValue");				}				if (document.getElementById("TTSRC" + i)) {					DWRUtil.addOptions("TTSRC" + i, getClassificationRes, "classificationValueCode", "classificationValue");				}				if (document.getElementById("TTCHD" + i)) {					DWRUtil.addOptions("TTCHD" + i, getClassificationRes, "classificationValueCode", "classificationValue");				}				if (document.getElementById("TTINF" + i)) {					DWRUtil.addOptions("TTINF" + i, getClassificationRes, "classificationValueCode", "classificationValue");				}			}		} 		break;	}}//Get Countryvar nonUsa = "";var actionType = "";function getCountry(actionType1, optTargetSelect) {	var targetClassificationDiv = "";	if (optTargetSelect != undefined && optTargetSelect != "") { targetClassificationDiv = optTargetSelect; }		actionType = actionType1;	DWREngine._execute(dwrURL , 'commonServicesJsDwr', 'getCountryListDwr', targetClassificationDiv, getCountryListReq);}function getCountryListReq(getCountryListRes) {	var targetClassificationDiv = getCountryListRes[0].targetSelectList;	if (targetClassificationDiv == "") targetClassificationDiv = "country";	    DWRUtil.removeAllOptions(targetClassificationDiv);    DWRUtil.addOptions(targetClassificationDiv, getCountryListRes, "countryCode", "countryName");	DWRUtil.setValue(targetClassificationDiv, "US");    if (actionType == "Add") {        getState("US");    }}//Get Statevar Selstval = "";function getState(countryCode, selval) {    Selstval = selval;	DWREngine._execute(dwrURL , 'commonServicesJsDwr', 'getStateListDwr', countryCode.replace(/^\s+|\s+$/, ""), getStateListReq);}function getStateListReq(getStateListRes) {    DWRUtil.removeAllOptions("state");    DWRUtil.addOptions("state", getStateListRes, "stateCode", "stateName");    DWRUtil.setValue("state", Selstval);    if (Selstval != null) {        var selSobj = document.getElementById("state");        for (var j = 0; j < selSobj.length; j++) {            if (selSobj[j].value.replace(/^\s+|\s+$/, "") == Selstval) {                selSobj[j].selected = true;            }        }    }}		// Load Years to Combobox function getYear() {    var currDate = new Date();    var currYear = currDate.getFullYear();    var yearOut = "<select id='expirationYear' name='expirationYear' class='f1 w4-60' onClick='hideddrivetip();'><option>Year</option>";    for (var i = 0; i < 10; i++) {        yearOut = yearOut + "<option value=" + currYear + ">" + currYear + "</option>";        currYear++;    }    yearOut = yearOut + "</select>";    document.getElementById("yearList").innerHTML = yearOut;}// Load Years to Comboboxfunction getMonths() {    document.getElementById("monthList").innerHTML = "<select id='expirationMonth' name='expirationMonth' class='f1 w4-60' onclick='hideddrivetip();'>\t<option>Month</option>\t\t<option value=1>Jan</option>\t\t<option value=2>Feb</option>      \t\t<option value=3>Mar</option>\t\t<option value=4>Apr</option>       \t\t<option value=5>May</option>\t\t<option value=6>Jun</option>       \t\t<option value=7>Jul</option>\t\t<option value=8>Aug</option>        \t\t<option value=9>Sep</option>\t\t<option value=10>Oct</option>      \t\t<option value=11>Nov</option>\t\t<option value=12>Dec</option>\t\t</select>";}		// Display Userfunction displayUser() {	//Bala changed to fix the bug due the un availability of displayUser object if the user is not loged in...    if (document.getElementById("displayUser")) {        document.getElementById("displayUser").innerHTML = getCookie("firstname");    }}function getUserName() {    document.getElementById("displayUserName").innerHTML = getCookie("firstname") + " " + getCookie("lastname");    document.getElementById("displayUserNameAdd").innerHTML = getCookie("firstname") + " " + getCookie("lastname");}function disabledCopy() {  // current pressed key    var pressedKey = String.fromCharCode(event.keyCode).toLowerCase();    if (event.ctrlKey && (pressedKey == "c" || pressedKey == "v")) {    // disable key press porcessing        event.returnValue = false;    }} // onKeyDown   // function for convertion string month to numerical monthfunction getMonth(monthStr) {    var result;    switch (monthStr) {      case "Jan":        result = 0;        break;      case "Feb":        result = 1;        break;      case "Mar":        result = 2;        break;      case "Apr":        result = 3;        break;      case "May":        result = 4;        break;      case "Jun":        result = 5;        break;      case "Jul":        result = 6;        break;      case "Aug":        result = 7;        break;      case "Sep":        result = 8;        break;      case "Oct":        result = 9;        break;      case "Nov":        result = 10;        break;      case "Dec":        result = 11;        break;      default:        result = "";    }    return result;}