<script>
var lblAlertOk='{$language.lblAlertOk}';
var lblAlertCancel='{$language.lblAlertCancel}';
var lblAlertYes='{$language.lblAlertYes}';
var lblAlertNo='{$language.lblAlertNo}';
var lblAlert='{$language.lblAlert}';
var lblSelectCity='{$language.lblSelectCities}';
var lblCheckAll='{$language.lblCheckall}';
var lblUnCheckAll='{$language.lblUncheckall}';
var lblHashselected='{$language.lblHashselected}';
var datePickerDateFormat="{$datePickerDateFormat}";
var lblSelectBusiness = "{$language.lblSelectBusiness}";
var lblselected 	= "{$language.lblselected}";
var lblSelectCitys = "{$language.lblSelectCitys}";
var lblSelectCategory='{$language.lblSelectCategory}';
var lblCurrentMonth="{$language.lblCurrentMonth}";
var lblCurrentMonth="{$language.lblCurrentMonth}";
var lblNow="{$language.lblNow}";
var lblCheckall='{$language.lblCheckall}';
var lblUncheckall='{$language.lblUncheckall}';
var lblSelect='{$language.lblSelect}';
</script>
<script type="text/javascript" src="{$common_js}/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="{$common_js}/jquery-migrate-3.4.0.min.js"></script>
<script type="text/javascript" src="{$view_javascript}/chosen.jquery.js"></script>
<script type="text/javascript" src="{$common_js}/common.plugin.js"></script>
<script type="text/javascript" src="{$view_javascript}/common.js"></script>
<script type="text/javascript" src="{$view_javascript}/cookie.plugin.js"></script>
{if $view_common_languages|@count>1}
  <script type="text/javascript" src="{$view_javascript}/toplanguage.plugin.js"></script>
{/if}
<script type="text/javascript" src="{$view_javascript}/toggle.editor.js"></script>
<script type="text/javascript" src="{$view_javascript}/message.plugin.js"></script>

<script type="text/javascript">
var editImageTitle = "{$language.lbleditImageTitle}";
String.prototype.trim = function () {
    return this.replace(/^\s+|\s+$/g, '');
}

function convertDate(date, inputFormat) { 
    var dateElement = new Array();
    var subElement = new Array();
    var m, y, d, h = 00,
        i = 00,
        s = 00;
    if (!date)
        return "";
    else { 
        if (inputFormat.indexOf('mm/dd/yy') != -1)
            var newdate = new Date(date);
        else { 
            if (inputFormat.indexOf('yy-mm-dd') != -1) {  
                dateElement = date.split('-');
                y = dateElement[0];
                m = dateElement[1];
                d = dateElement[2].substr(0, 2); 	
                if (dateElement[2].indexOf(':') != -1) {
                    dateElement[2] = dateElement[2].substring(3);
                    subElement = dateElement[2].split(':');
                    if (subElement[0]) h = subElement[0].trim();
                    if (subElement[1]) i = subElement[1].trim();
                }
            } else if (inputFormat.indexOf('dd-mm-yy') != -1) {
                dateElement = date.split('-');
                d = dateElement[0];
                m = dateElement[1];
                y = dateElement[2].substr(0, 4);
                if (dateElement[2].indexOf(':') != -1) {
                    dateElement[2] = dateElement[2].substring(5);
                    subElement = dateElement[2].split(':');
                    if (subElement[0]) h = subElement[0].trim();
                    if (subElement[1]) i = subElement[1].trim();
                }
            }
            var newdate = m + "/" + d + "/" + y + " " + h + ":" + i + ":" + s;
            var newdate = new Date(newdate);
        }
        return newdate;
    }
}

function setSideMenu() {
    $(".side_menu_a.selected").parent("li").prev("li").children("a").addClass("removeborder");

}
//Issue with  loading login page on  ajax request page while clearing cookies or session logout
$(document).ajaxSuccess(function (evt, request, settings) {
    if (request.responseText.indexOf('AJAX_OORJIT_MANAGE_TIMEOUT') !=-1)
        location.href = GLOBAL_BASE_PATH + "/login/";
});

</script>
<script type="text/javascript" src="{$common_js}/jquery-ui-1.10.2.custom.min.js"></script>
<script type="text/javascript">
{literal}
    jQuery.browser = {};
    (function () {
        jQuery.browser.msie = false;
        jQuery.browser.version = 0;
        if (navigator.userAgent.match(/MSIE ([0-9]+)\./)) {
            jQuery.browser.msie = true;
            jQuery.browser.version = RegExp.$1;
        }
    })();
 {/literal}
</script>
