// Author     : Jenson
var rm = new Object();
rm.nowSearching = "now searching";


// 	Properties for Traveler Profile
rm.salutation = "<font color= 'red' >Please select salutation</font>";
rm.homeCountryCode = "<font color= 'red' >Please enter country code</font>";
rm.homeStateCode = "<font color= 'red' >Please enter state code</font>";
rm.homePhoneNo = "<font color= 'red' >Please enter phone number</font>";
rm.workCountryCode = "<font color= 'red' >Please enter country code</font>";
rm.workStateCode = "<font color= 'red' >Please enter state code</font>";
rm.workPhoneNo = "<font color= 'red' >Please enter phone number</font>";
rm.emailAdd = "<font color= 'red' >Please enter a valid email address</font>";
rm.frequentFlyerProgramLoad = "<font color= 'red' >Please select frequent flyer program</font>";
rm.frequentFlyerNumber = "<font color= 'red' >Please enter frequent flyer number</font>";
rm.hotelLoad = "<font color= 'red' >Please select hotel loyalty program</font>";
rm.hotelNumber = "<font color= 'red' >Please enter hotel loyalty number</font>";
rm.noTravelerProfile = "No Traveler Profile Exists for ";
rm.notSaveTravelerProfile = "Traveler Profile is not saved";
rm.notUpdateTravelerProfile = "Traveler Profile is not updated";
rm.travelerType = "<font color= 'red' >Please select traveler type</font>";


// 	Properties for Payment Information
rm.creditCardType = "<font color= 'red' >Please select credit card type</font>";
rm.creditCardNo = "<font color= 'red' >Please enter credit card number</font>";
rm.creditCardNoZero = "<font color= 'red' >Please enter a valid credit card No.</font>";
rm.creditCardNoChk = "<font color= 'red' >Please enter 16 digit credit card No.</font>";
rm.creditCardNoAmex = "<font color= 'red' >Please enter 15 digit Amex Card No </font> ";
rm.expirationMonth = "<font color= 'red' >Please select expiration month</font>";
rm.expirationMonthChk = "<font color= 'red' >Expiration date should be greater than current date </font>";
rm.expirationYear = "<font color= 'red' >Please select expiration year</font>";
rm.address1 = "<font color= 'red' >Please enter street address</font>";
rm.country = "<font color= 'red' >Please select country</font>";
rm.state = "<font color= 'red' >Please select state</font>";
rm.city = "<font color= 'red' >Please enter city</font>";
rm.noPaymentInformation = "No Payment information exists for ";
rm.notSavePaymentInformation = "Payment Information is not saved";

// propertis for Auto List
rm.defaultlocation = "Enter city or airport name";
rm.nowSearching = "Enter 3 Character To Search...";
rm.noResults = "No Matching City Found";
rm.noPreviousdate = "<font color= 'red' >Date should not be lesser than the current date</font>";
rm.invalidcity = "<font color= 'red' >Enter valid city name</font>";
rm.invalidDay = "<font color= 'red' >Enter valid Day</font>";
rm.invalidMonth = "<font color= 'red' >Enter valid Month</font>";
rm.invalidYear = "<font color= 'red' >Enter valid Year</font>";
rm.invalidRegion = "<font color= 'red' >Enter valid Region</font>";


// Adding the values for Login.jsp
rm.userName = "<font color= 'red' >Please enter username</font>";
rm.fareLogixErr = "<font color= '#CC0000' >Due to server error, unable to process <br /> your request, please try again</font>";

//properties for User Profile Module signup.jsp
rm.firstName = "<font color= 'red' >Please enter first name</font>";
rm.lastName = "<font color= 'red' >Please enter last name</font>";
rm.lastNameLess = "<font color= 'red' >Please enter lastname of at least 2 characters</font>";
rm.address = "<font color= 'red' >Please enter address</font>";
rm.city = "<font color= 'red' >Please enter city</font>";
rm.stateCode = "<font color= 'red' >Please enter valid state code</font>";
rm.postalCode = "<font color= 'red' >Zip code should not be less than 5 digit</font>";
rm.postalCodeProper = "<font color= 'red' >Please enter a valid US or Canadian postal code </font>";
rm.phone = "<font color= 'red' >Please enter phone number</font>";
rm.phoneValid = "<font color= 'red' >Please enter valid phone number</font>";
rm.email = "<font color= 'red' >Please enter e-mail </font>";
rm.userName = "<font color= 'red' >Please enter username</font>";
rm.userNameAlpha = "<font color= 'red' >The username should begin with an alphabetic character.</font>";
rm.userNameCheck = "<font color= 'red' >The username field accepts letters, numbers & underscore; Please re-enter your username</font>";
rm.userNameLess = "<font color= 'red' >Please enter username of at least 4 characters</font>";
rm.passwordLess = "<font color= 'red' >Please enter password of at least 4 characters</font>";
rm.password = "<font color= 'red' >Please enter password</font>";
rm.confirmPwd = "<font color= 'red' >Please enter password</font>";
rm.invalidEmail = "<font color= 'red' >Please enter valid e-mail</font>";
rm.passwordBlank = "<font color= 'red' >Please remove blank spaces</font>";
rm.userNotExist = "<font color= 'red' >Invalid username or password</font>";
rm.passwordLess = "<font color= 'red' >Password should contain at least 6 characters</font>";
rm.passwordIncorrect = "<font color= 'red' >Password and confirm password should be same </font>";
rm.passwordRetype = "<font color= 'red' >Please re confirm your password </font>";
rm.salutations = "<font color= 'red' >Please select salutation</font>";
rm.countryCode = "<font color= 'red' >Please enter valid country code </font>";
rm.userCreationFail = " Unable to create user. Please try again. ";
rm.userAlreadyExists = " already exists. Please enter some other username ";
rm.passwordAns = "<font color= 'red' >Please enter password answer</font>";
rm.pwdReminder = "<font color= 'red' >Please enter password reminder</font>";
rm.acceptTerms = "<font color= 'red' >Please accept the vayama terms of use</font>";

//properties for User Profile Module changepassword.
rm.newPasswordLen = "<font color= 'red' >New password should contain at least 6 characters</font>";
rm.confirmPassword = "<font color= 'red' >Please confirm password</font>";
rm.oldPassword = "<font color= 'red' >Old password should contain at least 6characters</font>";
rm.oldPasswordaresame = "<font color= 'red' >Old password and new password should not be same </font>";
rm.newAndConformareDeffrent = "<font color= 'red' >New password and confirm password should be same </font>";
rm.confirmUpdate = "<font color= 'green' >Your new password has been successfully updated</font>";
rm.confirmAfterReset="<font color= 'green' >Your new password has been successfully updated, Please Login</font>"
rm.alreadyReset="<font color= 'green' >You have already reset your password, Please Login</font>"
rm.accountnotAciveErr ="<font color= 'red' >Account not active. Please contact vayama support at 1.650.265.1856</font>";
rm.confirmUpdateFail="<font color= 'red' >Please enter valid old password</font>";
rm.confirmUpdateProfile="<font color= 'green' >Your profile has been successfully updated.</font>";
rm.confirmUpdateProfileFail ="<font color= 'red' >Your profile has not been saved. Please try again </font>";
rm.emailForamt="<font color= 'red' >Please select default e-mail format.</font>"

//  Forgot Password
rm.forgotPass = "<font color= 'red' >Please enter user name</font>";
rm.displayForgotPassStatus = "<font color= 'green' >Your password has been sent to the e-mail address on file for this account</font>";
rm.displayForgotPassStatusFail = "<font color= '#CC0000' >Unable to retrieve password. Please try again.</font>";
rm.displayForgotPassStatusInvalid = "A valid username is required. Please check your vayama username and try again";
rm.firstNameBlank = "<font color= 'red' >Please remove blank spaces</font>";
rm.userNameBlank = "<font color= 'red' >Please remove blank spaces</font>";
rm.lastNameBlank = "<font color= 'red' >Please remove blank spaces</font>";
rm.newPassword = "<font color= 'red' >Please enter new password</font>";
rm.newPasswordBlank = "<font color= 'red' > Please remove blank spaces</font>";


// 	Properties for Checkout Traveler (Booking Engine)
rm.traveler = "<font color= 'red' >Please select traveler</font>";


// get cookie name
function getCookie(name) {
    var start = document.cookie.indexOf(name + "=");
    var len = start + name.length + 1;
    if ((!start) && (name != document.cookie.substring(0, name.length))) {
        return null;
    }
    if (start == -1) {
        return null;
    }
    var end = document.cookie.indexOf(";", len);
    if (end == -1) {
        end = document.cookie.length;
    }
    return unescape(document.cookie.substring(len, end));
}

// to check the cookie enable or disabled
function isCookiesEnabled() {
    var cookieEnabled = (navigator.cookieEnabled) ? true : false;
    if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) {
        document.cookie = "testcookie";
        cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;
    }
    return (cookieEnabled);
}				
		
// function to set Cookie
function setCookie(name, value, expires, path, domain, secure) {
	//expires is the number of days to expiry, ex: if expires set to 30, cookie expires in 30 days.
    var today = new Date();
    today.setTime(today.getTime());			
    if (expires) {
        expires = expires * 1000 * 60 * 60 * 24;
    }
    var expires_date = new Date(today.getTime() + (expires));
    document.cookie = name + "=" + escape(value) + ((expires) ? ";expires=" + expires_date.toGMTString() : "") + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ((secure) ? ";secure" : "");
}



