/**
 * This javascript include is to replace the common.js.  It is used to house any new javascript functions and anything
 * verified "used" by the application.
 */

/* This function is the centralized call to be used in the onerror function of
** an image tag to provide a non-"X" image.  The type argument is numeric:
* 0 = blank.gif
* 1 = noCabinPhoto.gif
* etc.
 */
function setErrorPhoto(type) {
    var path;
    switch(type) {
        case 0:
            path = "/travel/includes/blank.gif";
            break;
        case 1:
            path = "/travel/includes/noCabinPhoto.gif";
            break;
        case 2:
            path = "/travel/includes/forwarddefault.gif";
            break;
        case 3:
            path = "/travel/includes/aftdefault.gif";
            break;
        case 4:
            path = "/travel/includes/deckdefault.gif";
            break;
        case 5:
            path = "/travel/includes/Generic_Region.gif";
            break;
        default:
            path = "/travel/includes/blank.gif";
    }
    return path;
}

/* This function shows the privacy policy modal window. */
function showPrivacyPolicy(){
    if (navigator.userAgent.indexOf('MSIE') > 0) {
        document.getElementById("lnkEditorialPrivacyPolicy").click();
    }
    else {
        document.getElementById("lnkEditorialPrivacyPolicy").onclick();
    }
}
