// Detect browser whether IE or Mozilla
var winNavUsrAgn = window.navigator.userAgent.toLowerCase();
var isMozilla = winNavUsrAgn.indexOf("gecko") != -1;
var isIE = (winNavUsrAgn.indexOf('msie') != -1);
var isIE7up = (isIE && (winNavUsrAgn.indexOf('msie 4.') == -1) && (winNavUsrAgn.indexOf('msie 5.') == -1) && (winNavUsrAgn.indexOf('msie 6.') == -1));
var isBookmarkAllowed = (document.all || window.sidebar);
// The ReservationId whose vcal content needs to be exported.
var reservationId;

/**
 *  This function enables the user to add the specified url to the list of favorites in the browser.
 *  This function can be called in the onClick function of the corresponding anchor tag.
 */
function addBookmark(url, bookmarkTitle) {
    var isBookmarkAdded = false;
    if (isBookmarkAllowed) {
	    if (document.all) {
	        window.external.AddFavorite(url, bookmarkTitle);
	    } else if (window.sidebar) {
	        window.sidebar.addPanel(bookmarkTitle, url, "");
	    }
	    isBookmarkAdded = true;
    } 
    return isBookmarkAdded;	
}
function setBrowserFocus()
{
    document.xtime.focus();
}

function getBrowserLocale() {
	if (navigator.appName == 'Netscape')
		var language = navigator.language;
	else
		var language = navigator.browserLanguage;

	return language;
}
