
<script type="text/javascript">
    $(function() {
        var flagChange = false;

        $("#searchby").change(function() {
            flagChange = true;
            var changeVal = $("#searchby option:selected").val();
            
            $("#searchtxt1").autocomplete({
                source:document.getElementById('autosearchurl').value+"&searchbyVal="+changeVal,
                term:'searchtxt',
                minLength: 1,
                select: function(event, ui) {
                    document.getElementById("autosearchurl").value = "<?php echo $configObj->AutoSearchUrl ?>&filterby="+$("#filterbytop").val();
                    $('#searchtxt1').val(ui.item.id);
                }
            });
        });

        if(flagChange == false)
        {
            $('#searchtxt1').live('keypress', function() {
            
                $(this).autocomplete({
                    source:document.getElementById('autosearchurl').value+"&searchbyVal="+$("#searchby option:selected").val(),
                    term:'searchtxt',
                    minLength: 1,
                    select: function(event, ui) {
                        document.getElementById("autosearchurl").value = "<?php echo $configObj->AutoSearchUrl ?>&filterby="+$("#filterbytop").val();
                        $('#searchtxt1').val(ui.item.id);
                    }
                });
            });
        }
    });
</script>
<script type="text/javascript">
    var javscriptImagePath = '<?php echo GLOBAL_ADMIN_IMAGES_PATH; ?>';

    var menu_to_change;
    var menu_replaced;

    function MM_swapImgRestore() { //v3.0
        var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_findObj(n, d) { //v4.01
        var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
            d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
        if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
        for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
        if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0

        var i,j=0,x,a=MM_swapImage.arguments;
        document.MM_sr=new Array;
        for(i=0;i<(a.length-2);i+=3)
        {
            if((x=MM_findObj(a[i]))!=null)
            {
                document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
            }
            menu_to_change=a[i]; ///////// Tanmay //////////////
            menu_replaced = x.src;///////// Tanmay //////////////
        }
    }
    function MM_preloadImages()
    { //v3.0
        var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
            var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
                if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
        }
</script>
<script>
        function showhelppopup()
        {
            $(function() {
                // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
                $("#helppopup").dialog({
                    modal: true,
                    width:500,
                    show: 'slide',
                    hide: 'slide',
                    resizable: true
                });
            });
        }
        
        function checkemail(str)
        {
            var testresults;

            var filter=/^([0-9a-zA-Z]+([_.-]?[0-9a-zA-Z]+)*@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$/i

            if (filter.test(str))
                testresults=true
            else
                testresults=false

            return (testresults)
        }

        function helpmail()
        {
            if(trim(document.getElementById('var_helpname').value)== "")
            {
                alert("Please enter your name.");
                document.getElementById('var_helpname').focus();
                return false;
            }
            else if(trim(document.getElementById('var_helpemail').value)== "")
            {
                alert("Please enter Email ID.");
                document.getElementById('var_helpemail').focus();
                return false;
            }
            else if(!checkemail(document.getElementById("var_helpemail").value))
            {
                alert("Please enter valid Email ID");
                document.getElementById("var_helpemail").focus();
                return false;
            }
            else if(trim(document.getElementById('var_helpsubject').value)== "")
            {
                alert("Please enter help Subject.");
                document.getElementById('var_helpsubject').focus();
                return false;
            }
            else
            {
                $( "#helppopup" ).dialog({ disabled: true });
                var myData = $('#helpform').serialize();
                $.ajax({
                    type: "get",
                    url: "index.php?module=headerpanel&action=mail",
                    data: myData,
                    async: true,
                    start: SetBackground(),
                    success: function(data)
                    {
                        alert ("Mail sent Successfully");
                        UnsetBackground();
                        $('#helppopup').dialog('close');
                        window.location="index.php";
                        
                    }
                });
                return false;
            }
        }
        
//        function abcd(lilid)
//        {
//            $('#'+lilid).addClass("selected");
//        }
//        function efg(lilid)
//        {
//            $('#'+lilid).removeClass("selected");
//        }
       
</script>
<div id="dialog-modal1" title="Request More Feature"></div>
<div id="popupContact" class="dragme"  style="z-index:9999"></div>
<div id="backgroundPopup" style="z-index: 101;"></div>
<div id="backgroundloader" style="z-index:999999;display:none;left:100px;top:100px;"></div>
<div id="logo" style="width: 96%;">
    <div class="logo"><a href="index.php"><img src="<?php echo GLOBAL_ADMIN_IMAGES_PATH ?>logo.jpg" alt="PowerPanel" /></a></div>
    <div class="links"  style="width: 390px;/*width: 123px;*/">
        <?php
        if ($configObj->glSessionObj->value('admin_id') == '1' || $configObj->glSessionObj->value('chr_user') == 'A' || $configObj->glSessionObj->value('admin_id') == '44' || $configObj->glSessionObj->value('admin_id') == '45' || $configObj->glSessionObj->value('admin_id') == '46' || $configObj->glSessionObj->value('admin_id') == '47') {
            $p = 'style="width: 300px;"';
            ?>
            <div class="nav-link-space" style="margin-left: 145px; width: 300px;" <?php echo $p ?>>
              <?php   if ( $configObj->glSessionObj->value('chr_user') == 'A') { ?>
                <div class="fr"><a class="header-link" onclick="showhelppopup();"  href="#" style="float:left; padding:0px 150px 0 0; font-weight:bold; font-size:13px; ">Help</a></div>
                <?php } ?>
            <?php } else { ?>
                <div class="nav-link-space" style="width: 240px;">
                <?php } ?>
                <?php if ($configObj->glSessionObj->value('admin_id') == '1' || $configObj->glSessionObj->value('chr_user') == 'A') { ?>
                <?php } ?>
            </div>

            <div class="welcome-main" style="width:400px; float: right; ">
                <div class="welcome-text">Welcome <?php echo $configObj->glSessionObj->value('admin_fname'); ?></div>
                <div class="welcome-text" align="center"> <?php echo date("d-F-Y"); ?> </div>
                <div class="fl"> <a href="index.php?module=login&action=logout" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','<?php echo GLOBAL_ADMIN_IMAGES_PATH ?>/logout-hvr.png',0)"> <img src="<?php echo GLOBAL_ADMIN_IMAGES_PATH ?>/logout.png"  name="Image2" width="63" height="22" border="0" id="Image2" /> </a> </div>
            </div>
        </div>
    </div>

    <!------- Below is the list of menu details------------------->
    <div id="ddtopmenubar" class="navigation mattblackmenu">
        <ul>
            <?php
            if ($configObj->AllmoduleAccess['dashboard']['View'] == 'Y') {
                if ($dashboardTab) {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
            <li class="<?php echo $selected; ?>"><a href="index.php"><span class="icon-home"></span>Dashboard</a></li>
            <?php } ?>
            
            <?php
            if ($configObj->AllmoduleAccess['pages']['View'] == 'Y' || $configObj->AllmoduleAccess['pages']['Add'] == 'Y' || $configObj->AllmoduleAccess['photogallery']['View'] == 'Y' || $configObj->AllmoduleAccess['banner']['View'] == 'Y' || $configObj->AllmoduleAccess['photogallery']['Add'] == 'Y' || $configObj->AllmoduleAccess['contactuspage']['View'] == 'Y' || $configObj->AllmoduleAccess['commonpdf']['View'] == 'Y' || $configObj->AllmoduleAccess['commonpdf']['Add'] == 'Y' || $configObj->AllmoduleAccess['banner']['View'] == 'Y' || $configObj->AllmoduleAccess['banner']['Add'] == 'Y') {
                if ($pageTab || $pageAddTab || $contactpageTab || $pdfTab || $pdfAddTab||$bannerTab || $addbannerTab) {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="page"> <a  rel="ddsubmenu4" href="index.php?module=pages" ><span class="icon-file"></span>Pages</a> </li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden; opacity: 1;" id="ddsubmenu4" class="ddsubmenustyle" >
                    <?php if ($configObj->AllmoduleAccess['pages']['View'] == 'Y' || $configObj->AllmoduleAccess['photogallery']['View'] == 'Y' || $configObj->AllmoduleAccess['photogallery']['Add'] == 'Y' || $configObj->AllmoduleAccess['pagephoto']['View'] == 'Y' ||$configObj->AllmoduleAccess['banner']['View'] == 'Y' || $configObj->AllmoduleAccess['banner']['Add'] == 'Y') { ?>  
                        <li <?php echo ($_REQUEST['module'] == 'pages' && $_REQUEST['action'] == '' || $_REQUEST['module'] == 'banner' && $_REQUEST['action'] == '' || $_REQUEST['module'] == 'pagephoto' && $_REQUEST['fk_modid'] != '' ) ? "class='active'" : ""; ?>><a href="index.php?module=pages">Manage Pages</a></li> <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['pages']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($_REQUEST['module'] == 'pages' && ($_REQUEST['action'] == 'add' || $_REQUEST['action'] == 'edit')) ? "class='active'" : ""; ?> ><a href="index.php?module=pages&action=add">Add Page</a></li>
                    <?php } ?> 
                    <?php if ($configObj->AllmoduleAccess['commonpdf']['View'] == 'Y') { ?>  
                        <li <?php echo ($pdfTab) ? "class='active'" : ""; ?>><a href="index.php?module=commonpdf">Manage Common Files</a></li> <?php } ?> 
                    <?php if ($configObj->AllmoduleAccess['commonpdf']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($pdfAddTab) ? "class='active'" : ""; ?> ><a href="index.php?module=commonpdf&action=add">Add Common File</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['contactuspage']['Edit'] == 'Y') { ?>
                        <li  <?php echo ($contactpageTab) ? "class='active'" : ""; ?> ><a href="index.php?module=contactuspage&action=edit&eid=1">Manage Contact Us Page Details</a></li>
                    <?php } ?>
                </ul>
            <?php } ?>

            <?php
//            if ($configObj->AllmoduleAccess['banner']['View'] == 'Y' || $configObj->AllmoduleAccess['banner']['Add'] == 'Y') {
//                if ($bannerTab || $addbannerTab) {
//                    $selected = 'selected';
//                } else {
//                    $selected = '';
//                }
                ?>
                <!--<li class="<?php echo $selected; ?>" id="banner"> <a  rel="ddsubmenu4" href="index.php?module=banner" ><span class="icon-banners"></span>Home Banners</a> </li>-->
                <!--<ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden; opacity: 1;" id="ddsubmenu4" class="ddsubmenustyle" onmousemove="javascript : abcd('banner');" onmouseout="javascript : efg('banner');">-->
                    <?php if ($configObj->AllmoduleAccess['banner']['View'] == 'Y') { ?>  
                       <!-- <li <?php echo ($_REQUEST['module'] == 'banner' && $_REQUEST['action'] == '') ? "class='active'" : ""; ?>><a href="index.php?module=banner">Manage Home Banners</a></li> <?php } ?>-->
                    <?php if ($configObj->AllmoduleAccess['banner']['Add'] == 'Y') { ?>
                        <!--<li style="margin-left:12px;" <?php echo ($_REQUEST['module'] == 'banner' && ($_REQUEST['action'] == 'add' || $_REQUEST['action'] == 'edit')) ? "class='active'" : ""; ?> ><a href="index.php?module=banner&action=add">Add Home Banner</a></li>-->
                    <?php } ?> 

                <!--</ul>-->
            <?php // } ?>
            <?php
            if ($configObj->glSessionObj->value('admin_id') == '1') {
                if ($accesscontrolTab || $accAddTab || $modcontrolTab || $accGroupTab) {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="user"><a href="index.php?module=accesscontrol" rel="ddsubmenu5"><span class="icon-user"></span>User Management</a></li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden; opacity: 1;" id="ddsubmenu5" class="ddsubmenustyle" >
                    <?php if ($configObj->AllmoduleAccess['accesscontrol']['View'] == 'Y') { ?>
                        <li <?php echo ($accesscontrolTab) ? "class='active'" : ""; ?>><a href="index.php?module=accesscontrol">Manage Staff</a></li>
                    <?php } if ($configObj->AllmoduleAccess['accesscontrol']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($accAddTab) ? "class='active'" : ""; ?>><a href="index.php?module=accesscontrol&action=add">Add Staff</a></li>
                        <?php
                    }
                    if ($configObj->AllmoduleAccess['accesscontrol']['View'] == 'Y') {
                        ?>
                        <li <?php echo ($accGroupTab) ? "class='active'" : ""; ?>><a href="index.php?module=accesscontrol&view=group">Manage Group Access</a></li>
                    <?php } ?>
                    <?php if ($configObj->glSessionObj->value('admin_id') == '1') { ?>
                        <li <?php echo ($modcontrolTab) ? "class='active'" : ""; ?>><a href="index.php?module=modcontrol">Assign Module Action</a></li>
                    <?php } ?>
                </ul>
                <?php
            }


            if ($configObj->AllmoduleAccess['photogallery']['View'] == 'Y' || $configObj->AllmoduleAccess['photogallery']['Add'] == 'Y') {
                if ($_REQUEST['module'] == 'photogallery' || $_REQUEST['module'] == 'photoalbum' || ($_REQUEST['module'] == 'photogallery' && $_REQUEST['action'] == 'add') || $_REQUEST['module'] == 'videogallery' || $_REQUEST["module"]=='news' || ($_REQUEST["module"]=='news' && $_REQUEST["action"]=='add')) {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="media"><a href="index.php?module=photoalbum" rel="ddsubmenu83555"><span class="icon-film"></span>Media</a></li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden;opacity: 1;" id="ddsubmenu83555" class="ddsubmenustyle" >
                    <?php if ($configObj->AllmoduleAccess['photoalbum']['View'] == 'Y' || $configObj->AllmoduleAccess['photogallery']['View'] == 'Y') { ?>
                        <li <?php echo (($_REQUEST['module'] == 'photoalbum' && $_REQUEST['action'] == '') || $_REQUEST['module'] == 'photogallery') ? "class='active'" : ""; ?>><a href="index.php?module=photoalbum">Manage Photo Albums</a></li>
                    <?php } ?>
                   
                    <?php if ($configObj->AllmoduleAccess['videogallery']['View'] == 'Y') { ?>
                        <li <?php echo ($_REQUEST['module'] == 'videogallery') ? "class='active'" : ""; ?>><a href="index.php?module=videogallery">Manage Video Gallery </a></li>
                    <?php } ?>
                        
                        <?php if ($configObj->AllmoduleAccess['news']['View'] == 'Y' || $configObj->AllmoduleAccess['news']['View'] == 'Y') { ?>
                        <li <?php echo ($newsTab) ? "class='active'" : ""; ?>><a href="index.php?module=news">Manage News</a></li>
                    <?php } ?>
                        
                        <?php if ($configObj->AllmoduleAccess['news']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($newsaddTab) ? "class='active'" : ""; ?>><a href="index.php?module=news&action=add">Add News</a></li>
                    <?php } ?>
                </ul>
                <?php
            }


            if ($configObj->AllmoduleAccess['ourteam']['View'] == 'Y' || $configObj->AllmoduleAccess['ourteam']['Add'] == 'Y') {
                if ($_REQUEST['module'] == 'ourteam' || $_REQUEST['module'] == 'ourteam' && $_REQUEST['action'] == 'add') {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="team"><a href="index.php?module=ourteam" rel="ddsubmenu850"><span class="icon-ourteam"></span>Our Team</a></li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden;opacity: 1;" id="ddsubmenu850" class="ddsubmenustyle" >
                    <?php if ($configObj->AllmoduleAccess['ourteam']['View'] == 'Y') { ?>
                        <li <?php echo ($ourteamTab) ? "class='active'" : ""; ?>><a href="index.php?module=ourteam">Manage Our Team</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['ourteam']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($ourteamAddTab) ? "class='active'" : ""; ?>><a href="index.php?module=ourteam&action=add">Add Team Member</a></li>
                    <?php } ?>

                </ul>
                <?php
            }


            if ($configObj->AllmoduleAccess['package']['View'] == 'Y' || $configObj->AllmoduleAccess['package']['Add'] == 'Y' || $configObj->AllmoduleAccess['packagetype']['View'] == 'Y' || $configObj->AllmoduleAccess['packagetype']['Add'] == 'Y') {
                if ($_REQUEST['module'] == 'package' || ($_REQUEST['module'] == 'package' && $_REQUEST['action'] == 'add') || $_REQUEST["module"] == 'packagetype' || ($_REQUEST["module"] == 'packagetype' && $_REQUEST["action"] == 'add') ) {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="package"><a href="index.php?module=packagetype" rel="ddsubmenu860"><span class="icon-package"></span>Package</a></li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden;opacity: 1;" id="ddsubmenu860" class="ddsubmenustyle" >
                    <?php if ($configObj->AllmoduleAccess['packagetype']['View'] == 'Y') { ?>
                        <li <?php echo ($packagetypeTab) ? "class='active'" : ""; ?>><a href="index.php?module=packagetype">Manage Package Types</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['packagetype']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($packagetypeaddTab) ? "class='active'" : ""; ?>><a href="index.php?module=packagetype&action=add">Add Package Type</a></li>
                    <?php } ?>

                    <?php if ($configObj->AllmoduleAccess['package']['View'] == 'Y') { ?>
                        <li <?php echo ($packageTab) ? "class='active'" : ""; ?>><a href="index.php?module=package">Manage Packages</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['package']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($packageaddTab) ? "class='active'" : ""; ?>><a href="index.php?module=package&action=add">Add Package</a></li>
                    <?php } ?>                    

                </ul>
                <?php
            }
            
//            -------------------------------service--------------------
            if ($configObj->AllmoduleAccess['service_category']['View'] == 'Y' || $configObj->AllmoduleAccess['service_category']['Add'] == 'Y' || $configObj->AllmoduleAccess['services']['View'] == 'Y' || $configObj->AllmoduleAccess['services']['Add'] == 'Y' ) {
                if ($_REQUEST['module'] == 'service_category' || ($_REQUEST['module'] == 'service_category' && $_REQUEST['action'] == 'add') || $_REQUEST["module"] == 'services' || ($_REQUEST["module"] == 'services' && $_REQUEST["action"] == 'add')) {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="service_category"><a href="index.php?module=service_category" rel="ddsubmenu870"><span class="icon-package"></span>Service</a></li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden;opacity: 1;" id="ddsubmenu870" class="ddsubmenustyle" >
                    <?php if ($configObj->AllmoduleAccess['service_category']['View'] == 'Y') { ?>
                        <li <?php echo ($service_categoryTab) ? "class='active'" : ""; ?>><a href="index.php?module=service_category">Manage Service Categories</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['service_category']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($service_categoryaddTab) ? "class='active'" : ""; ?>><a href="index.php?module=service_category&action=add">Add Service Category</a></li>
                    <?php } ?>
                        
                    <?php if ($configObj->AllmoduleAccess['services']['View'] == 'Y') { ?>
                        <li <?php echo ($_REQUEST["module"] == 'services' && $_REQUEST["action"] == '') ? "class='active'" : ""; ?>><a href="index.php?module=services">Manage Services</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['services']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($_REQUEST['module'] == 'services' && ($_REQUEST['action'] == 'add' || $_REQUEST['action'] == 'edit')) ? "class='active'" : ""; ?>><a href="index.php?module=services&action=add">Add Service</a></li>
                    <?php } ?>    

                </ul>
                <?php
            }


            if ($configObj->AllmoduleAccess['product']['View'] == 'Y' || $configObj->AllmoduleAccess['product']['Add'] == 'Y' || $configObj->AllmoduleAccess['special']['View'] == 'Y' || $configObj->AllmoduleAccess['special']['Add'] == 'Y'  || $configObj->AllmoduleAccess['productphotogallery']['View'] == 'Y' || $configObj->AllmoduleAccess['productphotogallery']['Add'] == 'Y') {
                if ($_REQUEST['module'] == 'product'  || ($_REQUEST['module'] == 'product' && $_REQUEST['action'] == 'add') || $_REQUEST["module"] == 'special' || ($_REQUEST["module"] == 'special' && $_REQUEST["action"] == 'add' || $_REQUEST["fk_product"]!='')) {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                $productTabSelected = '';
                if($_REQUEST['module'] == 'productphotogallery') {
                    $productTabSelected = "class='active'";
                }
                ?>
                <li class="<?php echo $selected; ?>" id="special"><a href="index.php?module=product" rel="ddsubmenu880"><span class="icon-gift"></span>Product</a></li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden;opacity: 1;" id="ddsubmenu880" class="ddsubmenustyle" >
                    <?php if ($configObj->AllmoduleAccess['product']['View'] == 'Y') { ?>
                        <li <?php echo ($productTab) ? "class='active'" : ""; echo $productTabSelected; ?>><a href="index.php?module=product">Manage Products</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['product']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($productaddTab) ? "class='active'" : ""; ?>><a href="index.php?module=product&action=add">Add Product</a></li>
                    <?php } ?>

                    <?php if ($configObj->AllmoduleAccess['special']['View'] == 'Y') { ?>
                        <li <?php echo ($specialTab) ? "class='active'" : ""; ?>><a href="index.php?module=special">Manage Promotions</a></li>
                    <?php } ?>
                    <?php if ($configObj->AllmoduleAccess['special']['Add'] == 'Y') { ?>
                        <li style="margin-left:12px;" <?php echo ($specialaddTab) ? "class='active'" : ""; ?>><a href="index.php?module=special&action=add">Add Promotion</a></li>
                    <?php } ?>
                </ul>
                <?php
            }

            if ($configObj->AllmoduleAccess['contactusmsg']['View'] == 'Y' || $configObj->AllmoduleAccess['newsletter']['View'] == 'Y' || $configObj->AllmoduleAccess['appointment']['View'] == 'Y') {
    
                if ($updates[11]['count'] > 0) {
        
                    $star12 = 'class="redstar-list" "';
                } else {
                    $star12 = '';
                }

                if ($updates[11]['count'] > 0) {
//         echo "in";exit;
                    $star12 = 'class="redstar-list" "';
                } else {
                    $star12 = '';
                }

                if ($updates[10]['count'] > 0 || $updates[11]['count'] > 0 || $updates[12]['count'] > 0) {
                    $class9 = 'class="redstar"';
                } else {
                    $class9 = '';
                }

                if ($updates[101]['count'] > 0) {
                    $star101 = 'class="redstar-list" style="*margin-top:3px; right:124px;"';
                } else {
                    $star101 = '';
                }
                $btnname9 = "leads.jpg";
                $btnhovername9 = "leads-hover.jpg";

                if ($contactusTab || $_REQUEST['module'] == 'contactusmsg' || $_REQUEST['module'] == 'newsletter' || $_REQUEST['module'] == 'appointment') {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="leads"><a href="index.php?module=newsletter" rel="ddsubmenu16"><span class="icon-user-md" ></span>Leads</a></li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden;  opacity: 1;" id="ddsubmenu16" class="ddsubmenustyle" >

                     <!--<li <?php // echo ($_REQUEST['module'] == "contactusmsg") ? "class='active'" : ""; ?>><a href="index.php?module=contactusmsg">Manage Contact us Leads<span <?php // echo $star12 ?>></span><span style="color:red;font-size:18px;vertical-align:baseline;"></span></a></li>-->
                        <li <?php echo ($_REQUEST['module'] == "newsletter") ? "class='active'" : ""; ?>><a href="index.php?module=newsletter">Manage Newsletter Leads<span <?php // echo $star11 ?>></span><span style="color:red;font-size:18px;vertical-align:baseline;"></span></a></li>
                        <li <?php echo ($_REQUEST['module'] == "appointment") ? "class='active'" : ""; ?>><a href="index.php?module=appointment">Manage Appointment Leads<span <?php // echo $star11 ?>></span><span style="color:red;font-size:18px;vertical-align:baseline;"></span></a></li>
                 
                </ul>
            <?php }
            $param = array(
                array("settings" => "View")
            );
            if ($configObj->AllmoduleAccess['settings']['View'] == 'Y') {
                if ($systemTab || $emailsTab || $logmanagerTab || $trashmanagerTab || $trashmanagerTab || $dbackupTab || $profileTab || $fblogmanagerTab || $_REQUEST["view"]=='edit_emails') {
                    $selected = 'selected';
                } else {
                    $selected = '';
                }
                ?>
                <li class="<?php echo $selected; ?>" id="setting"> 
                    <?php if ($configObj->glSessionObj->value('admin_id') == '1') { ?>
                        <a rel="ddsubmenu150" href="index.php?module=settings&view=system"/><span class="icon-cogs"></span>Settings
                    <?php } else { ?>
                        <a rel="ddsubmenu150" href="index.php?module=settings&view=logmanager"><span class="icon-cogs"></span>Settings
                        <?php } ?>
                    </a> 
                </li>
                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden; opacity: 1;" id="ddsubmenu150" class="ddsubmenustyle" >
                    <?php if ($configObj->glSessionObj->value('admin_id') == '1') { ?>
                        <li <?php echo ($systemTab) ? "class='active'" : ""; ?>><a href="index.php?module=settings&view=system">Manage System Settings</a></li>
                    <?php } ?>
                    <?php if ($configObj->glSessionObj->value('admin_id') == '1') { ?>
                        <li <?php echo ($emailsTab) ? "class='active'" : ""; ?>><a href="index.php?module=settings&view=emails">Manage Emails</a></li>
                    <?php } ?>
                         <?php if ($configObj->glSessionObj->value('admin_id') == '1') { ?>
                        <li <?php echo ($_REQUEST["view"] == "edit_emails") ? "class='active'" : ""; ?>><a href="index.php?module=settings&view=edit_emails">Manage System  Emails</a></li>
                    <?php } ?>
                    <li <?php echo ($logmanagerTab) ? "class='active'" : ""; ?>><a href="index.php?module=settings&view=logmanager">Manage Log Manager</a></li>
                     <li <?php echo ($fblogmanagerTab) ? "class='active'" : ""; ?>><a href="index.php?module=fblogmanager">Manage Facebook Log Manager</a></li>
                    <?php if ($configObj->AllmoduleAccess['trashmanager']['View'] == 'Y') { ?>
                        <li <?php echo ($trashmanagerTab) ? "class='active'" : ""; ?>><a href="index.php?module=trashmanager">Manage Trash Manager</a></li>
                    <?php } ?>
                    <li <?php echo ($profileTab) ? "class='active'" : ""; ?>><a href="index.php?module=settings&view=profile">Change Profile</a></li>
                    <?php if ($configObj->glSessionObj->value('admin_id') == '1') { ?>
                        <li <?php echo ($dbackupTab) ? "class='active'" : ""; ?>><a href="index.php?module=dbackup">Manage Database Backup</a></li>
                    <?php } ?>
                <?php } ?>
                        
                        
                        
            </ul>
                
                <?php
            if ($_REQUEST['module'] == 'comments') {
                $selected13 = 'selected';
            } else {
                $selected13 = '';
            }
            ?>
        <?php// if ($configObj->glSessionObj->value('admin_id') == '1' && $configObj->glSessionObj->value('admin_id') == '2') { ?>

                <li class="<?php echo $selected13; ?>" id="comment"><a rel="ddsubmenu778" href="index.php?module=comments"><span class="icon-comment-alt"></span>Comments</a></li>

                <ul style="overflow:auto; z-index: 2000; left: 0pt; top: -1000px; visibility: hidden;  opacity: 1;" id="ddsubmenu778" class="ddsubmenustyle" >
                <?php
                if ($_REQUEST['module'] == 'comments' && $_REQUEST['action'] == '') {
                    $commentsstyle = "class='lm-active'";
                }
                ?>

                    <li><a href="index.php?module=comments"<?= $commentsstyle ?>>Manage Comments</a></li> 
    
            </ul>

            <?php //} ?>
    </div>

    <div id="helppopup" style="display:none" title="Contact Administrator">
        <table width="100%" >
            <form method="get" name="helpform" id="helpform">
                <tr>
                    <td width='30%' align="left" valign="top" class="add-new-user-text">Name : <span style="color:#1979AC;">(required)</span></td>
                    <td width='70%' align="left" valign="top"><input type="text" id="var_helpname" name="var_helpname" class="add-new-user-textarea" maxlength="100" style="width: 80%;" /></td>
                </tr>
                <tr>
                    <td align="left" valign="top" class="add-new-user-text">E-mail : <span style="color:#1979AC;">(required)</span></td>
                    <td align="left" valign="top"><input type="text" id="var_helpemail" name="var_helpemail" class="add-new-user-textarea" maxlength="100" style="width: 80%;" /></td>
                </tr>
                <tr>
                    <td align="left" valign="top" class="add-new-user-text">Subject : <span style="color:#1979AC;">(required)</span></td>
                    <td align="left" valign="top"><input type="text" id="var_helpsubject" name="var_helpsubject" class="add-new-user-textarea" maxlength="100" style="width: 80%;" /></td>
                </tr>
                <tr>
                    <td align="left" valign="top" class="add-new-user-text">Description :</td>
                    <td align="left" valign="top"><textarea cols="35" rows="5" id="var_helpdescription" name="var_helpdescription" class="textarea2" maxlength="100" style="width: 80%;" ></textarea></td>
                </tr>
                <tr>
                    <td align="left" valign="top" class="add-new-user-text">&nbsp;</td>
                    <td align="left" valign="top"><div class="add-new-user-button" style="padding-bottom: 30px;">
                            <input width="61" hspace="5" height="25" border="0" type="image" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('btnsent','','html/images/send-button-hvr.jpg',1)" src="html/images/send-button.jpg" alt="Send" id="btnsent" name="btnsent" value="Send" onclick="return helpmail();">
                            <a onclick="javascript:$('#helppopup').dialog('close');" href="#"><img width="81" hspace="5" height="25" border="0" src="html/images/cancel-button.jpg" alt="cancel" name="btnclosepopup" id="btnclosepopup" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('btnclosepopup','','html/images/cancel-button-hover.jpg',1)"></a> </div>
                </tr>
            </form>
        </table>
    </div>
    <script type="text/javascript">
            ddlevelsmenu.setup("ddtopmenubar", "topbar") //ddlevelsmenu.setup("mainmenuid", "topbar|sidebar")
    </script>
    <div class="clear"></div>
