<?php 
include('CRM/functions.php');
$s=new db_query();
$deptid=  $s->GetFieldValue('www_users'," id='".$_SESSION['UserID']."' " ,'mst_dpt_heirarchy');
$LowerDeptList=GETLowerDeptUser($_SESSION['UserID'],$deptid,$_SESSION['ACGCompanyId']);
$lowerlist=  UserDeptList($LowerDeptList);
 if(count($lowerlist)>0)
$lowerlist=implode(",",$lowerlist).",".$_SESSION['UserID'];
else
$lowerlist="'".$_SESSION['UserID']."'";

?>
	
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.js"></script>
	<script>
	$(document).ready(function() {
		$('.sub-menu > li > a').click(function(event){
		event.preventDefault();//stop browser to take action for clicked anchor
 
		//get displaying tab content jQuery selector
		var active_tab_selector = $('.sub-menu > li.active > a').attr('href');					
 
		//find actived navigation and remove 'active' css
		var actived_nav = $('.sub-menu > li.active');
		actived_nav.removeClass('active');
 
		//add 'active' css into clicked navigation
		$(this).parents('li').addClass('active');
 
		//hide displaying tab content
		$(active_tab_selector).removeClass('active');
		$(active_tab_selector).addClass('hide');
 
		//show target tab content
		var target_tab_selector = $(this).attr('href');
		$(target_tab_selector).removeClass('hide');
		$(target_tab_selector).addClass('active');
	     });
	  });
	</script>
	
	<script>
	$(document).ready(function() {
		$('.nav-tabs > li > a').click(function(event){
		event.preventDefault();//stop browser to take action for clicked anchor
 
		//get displaying tab content jQuery selector
		var active_tab_selector = $('.nav-tabs > li.active > a').attr('href');					
 
		//find actived navigation and remove 'active' css
		var actived_nav = $('.nav-tabs > li.active');
		actived_nav.removeClass('active');
 
		//add 'active' css into clicked navigation
		$(this).parents('li').addClass('active');
 
		//hide displaying tab content
		$(active_tab_selector).removeClass('active');
		$(active_tab_selector).addClass('hide');
 
		//show target tab content
		var target_tab_selector = $(this).attr('href');
		$(target_tab_selector).removeClass('hide');
		$(target_tab_selector).addClass('active');
	     });
	  });
	</script>
	<script type="text/javascript">

		$(document).ready(function() {

			// Store variables
			
			var accordion_head = $('.accordion > li > a'),
				accordion_body = $('.accordion li > .sub-menu');

			// Open the first tab on load

			accordion_head.first().addClass('active').next().slideDown('normal');

			// Click function

			accordion_head.on('click', function(event) {

				// Disable header links
				
				event.preventDefault();

				// Show and hide the tabs on click

				if ($(this).attr('class') != 'active'){
					accordion_body.slideUp('normal');
					$(this).next().stop(true,true).slideToggle('normal');
					accordion_head.removeClass('active');
					$(this).addClass('active');
				}

			});

		});

	</script>
	
	 <script type="text/javascript" src="js/datepicker.js"></script>

        <link href="css/datepicker.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//<![CDATA[

/* The following function creates a new input field and then calls datePickerController.create();
   to dynamically create a new datePicker widgit for it */
function newline() {
        var total = document.getElementById("newline-wrapper").getElementsByTagName("table").length;
        total++;

        // Clone the first div in the series
        var tbl = document.getElementById("newline-wrapper").getElementsByTagName("table")[0].cloneNode(true);

        // DOM inject the wrapper div
        document.getElementById("newline-wrapper").appendChild(tbl);

        var buts = tbl.getElementsByTagName("a");
        if(buts.length) {
                buts[0].parentNode.removeChild(buts[0]);
                buts = null;
        }

        // Reset the cloned label's "for" attributes
        var labels = tbl.getElementsByTagName('label');

        for(var i = 0, lbl; lbl = labels[i]; i++) {
                // Set the new labels "for" attribute
                if(lbl["htmlFor"]) {
                        lbl["htmlFor"] = lbl["htmlFor"].replace(/[0-9]+/g, total);
                } else if(lbl.getAttribute("for")) {
                        lbl.setAttribute("for", lbl.getAttribute("for").replace(/[0-9]+/, total));
                }
        }

        // Reset the input's name and id attributes
        var inputs = tbl.getElementsByTagName('input');
        for(var i = 0, inp; inp = inputs[i]; i++) {
                // Set the new input's id and name attribute
                inp.id = inp.name = inp.id.replace(/[0-9]+/g, total);
                if(inp.type == "text") inp.value = "";
        }

        // Call the create method to create and associate a new date-picker widgit with the new input
        datePickerController.create(document.getElementById("date-" + total));

        var dp = datePickerController.datePickers["dp-normal-1"];

        // No more than 5 inputs
        if(total == 5) document.getElementById("newline").style.display = "none";

        // Stop the event
        return false;
}

function createNewLineButton() {
        var nlw = document.getElementById("newline-wrapper");

        var a = document.createElement("a");
        a.href="#";
        a.id = "newline";
        a.title = "Create New Input";
        a.onclick = newline;
        nlw.parentNode.appendChild(a);

        a.appendChild(document.createTextNode("+"));
        a = null;
}

datePickerController.addEvent(window, 'load', createNewLineButton);

//]]>
</script>

<link rel="stylesheet" href="css/accordionmenu.css" type="text/css" media="screen">
	</head>
	<body>
		<div>
		
			<ul class="nav nav-tabs" style="padding-left:0px;">
			<?php if(empty($_REQUEST['urltab1'])) { echo $_REQUEST['urltab1'];?>
			
			<li class="active"><a href="#toptab1">Dashboard</a></li> <?php } else { echo $_REQUEST['urltab1']; ?>
			<li ><a href="#toptab1">Dashboard</a></li>
			<?php } ?>
			<li><a href="#toptab2">Meetings</a></li>
			<li><a href="#toptab3">To Do</a></li>
			<li><a href="#toptab4">Follow Ups</a></li>
			<li><a href="#toptab6">Task Assignment</a></li>
			<li><a href="#toptab7">Task Execution</a></li>
			<li><a href="#toptab8">Leave Management</a></li>
			<li><a href="#toptab9">Email</a></li>
			<li><a href="#toptab10">My Calender</a></li>
			</ul>
			<div style="clear:both;"></div>	
		</div>
<div style="border:#ddd 1px solid; border-top:none;">
<div class="leftpannel">
				<table width="100%%" border="0" cellspacing="0" cellpadding="0">
				  <tr>
					<td height="5" align="left" valign="middle"></td>
				  </tr>
				  <tr>
					<td align="left" valign="top">
					<div id="wrapper-250" style="width:175px;">
						<ul class="accordion">
							<li id="one" class="files">
								<a class="active" href="#one">My Work</a>
								<ul style="display: block;" class="sub-menu">
									<li><a href="#"><img src="images1/dashboard.jpg" class="img">Dashboards</a></li>
									<li><a href="#tab2"><img src="images1/activities.jpg" class="img">Activities</a></li>
									<!--<li><a href="#tab1"><img src="images1/calender.jpg" class="img">Calender</a></li>-->
									<li><a href="#"><img src="images1/imports.jpg" class="img">Imports</a></li>
									<li><a href="#"><img src="images1/duplicate-detection.jpg" class="img">Duplicate Detaction</a></li>				
									<li><a href="#"><img src="images1/queses.jpg" class="img">Queues
				</a></li>				
									<li><a href="#"><img src="images1/articles.jpg" class="img">Articles</a></li>
									<li><a href="#"><img src="images1/reports.jpg" class="img">Reports</a></li>
									<li><a href="#"><img src="images1/announcements.jpg" class="img">Announcements</a></li>
								</ul>
							</li>
							<li id="two" class="mail">
								<a class="" href="#two">Contacts</a>
								<ul style="display: none;" class="sub-menu">
									<li><a href="#"><img src="images1/companies.jpg" class="img">Companies</a></li>
									<li><a href="#"><img src="images1/people.jpg" class="img">People</a></li>
								</ul>
							</li>
							<li id="three" class="cloud">
								<a class="" href="#three">Recrument Records</a>
								<ul style="display: none;" class="sub-menu">
									<li><a href="#"><img src="images1/vites.jpg" class="img">Curriculum Vitaes</a></li>
									<li><a href="#"><img src="images1/vacancies.jpg" class="img">Vacancies</a></li>
									<li><a href="#"><img src="images1/vacancy-applications.jpg" class="img">Vacancy Applications</a></li>
								</ul>
							</li>
							<li id="four" class="sign">
								<a class="" href="#four">Recruitment Tools</a>
								<ul style="display: none;" class="sub-menu">
									<li><a href="#"><img src="images1/cv-parser.jpg" class="img">CV Parser</a></li>
									<li><a href="#"><img src="images1/search.jpg" class="img">CV Search</a></li>
									<li><a href="#"><img src="images1/search.jpg" class="img">CV Search</a></li>
								</ul>
							</li>
							<li id="four" class="sign">
								<a class="" href="#four">Work Palace</a>
								<ul style="display: none;" class="sub-menu">
								<li><a href="#"><img src="images1/sales.jpg" class="img">Sales</a></li>
								<li><a href="#"><img src="images1/marketing.jpg" class="img">Marketing</a></li>
								<li><a href="#"><img src="images1/services.jpg" class="img">Services</a></li>
								<li><a href="#"><img src="images1/settings.jpg" class="img">Settings</a></li>
								<li><a href="#"><img src="images1/resourse-center.jpg" class="img">Resource Center</a></li>
								</ul>
							</li>
						</ul>
					</div>
					</td>
				  </tr>
				</table>
				</div>
<div id="toptab1" class="tab-content active">
	<div style="background:#f2f2f2;">
	<section id="toptab1" class="tab-content hide">
	<div class="rightpannel">
			sdgdfghfdgh
		</div>
	</section>
		<section id="tab2" class="tab-content hide">
		<div class="rightpannel">
			rahul
		</div>
		</section>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab2" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php include('TaskMgt/dashevent.php'); ?>
				</div>
	
	<div class="clr"></div>
		</div>
</div>
<div id="toptab3" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php include('TaskMgt/dashTodo.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab4" class="tab-content hide">
		<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php include('TaskMgt/dashfollowup.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab5" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php //include('TaskMgt/Activity_calander.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab6" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php include('TaskMgt/dash_task_assign.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab7" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php include('TaskMgt/dash_task_execution.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab8" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php include('TaskMgt/task_leave_management.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab9" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php //include('TaskMgt/Activity_calander.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
<div id="toptab10" class="tab-content hide">
	<div style="background:#f2f2f2;">
				<div class="rightpannel">
				<?php include('TaskMgt/Activity_calander.php'); ?>
				</div>
		<div class="clr"></div>
		</div>
</div>
	</div>
		</div>
