<?PHP
   session_start();
$privilage = $_SESSION['privilage'];

$ID = $_SESSION['ID'];

$background_color =$_SESSION['background_color'];
$text_color =$_SESSION['text_color'];
						
	$bottom_backgroundcolor = $_SESSION['bottom_backgroundcolor'] ;
		$bottom_textcolor = $_SESSION['bottom_textcolor'] ;

$branch_key = $_SESSION['branch_key']; 


$address = $_SESSION['address'];




if($address === ""){

	
	header ("Location: location.php");
	
 }








if (!(isset($_SESSION['login']) && $_SESSION['login'] != '')) {
	header ("Location: ../login.php");
}
//else if($privilage == "Priviledge" or $privilage == "Sales Rep" or $privilage == "Sales Rep" or $privilage == "Receptionist" or $privilage == "Inventory Manager" or $privilage == "Secetary"/*or $privilage == "Manager"*/)
{
	
	//header ("Location: not_authorized.php");
	
}

//echo 'WELCOME'.'    '.$_SESSION['name'].'   '.'<A HREF = logout.php>Log out</A>';

?>



<?php
require 'config.php';

$db_handle = mysqli_connect(DB_SERVER, DB_USER, DB_PASS);
 $database = $_SESSION['database'];
$users_database = "lawpedc3_lbs_users";

$db_found = mysqli_select_db($db_handle, $database);

$notification="";
?>


<?php


 if(isset($_POST['B']))
{
	 $background_color = $_POST['background_color'];
	$text_color = $_POST['text_color'] ;

	 
	  $bottom_backgroundcolor = $_POST['bottom_backgroundcolor'];
	$bottom_textcolor = $_POST['bottom_textcolor'] ;

	 
	 
	$db_f = new mysqli(DB_SERVER, DB_USER, DB_PASS, $users_database );
	

	
	$SQl_update = "UPDATE login SET background_color = '$background_color', text_color ='$text_color', bottom_background = '  $bottom_backgroundcolor', bottom_textcolor = '$bottom_textcolor' WHERE ID = $ID ";
	
	mysqli_query($db_f,$SQl_update);
	
		$notification =  "operation successfull";

	header('Location:logout.php');
	
	
}




else{
	
}
?>


<!DOCTYPE html>
<html lang="en">
<head>
	<title>setup</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	
	  <!--manifest file for pwa ap-->
	 <link href="manifest.json"  rel = "manifest">
	   <!--manifest file for pwa ap-->
	  
	  <!--ios support-->
	   <link href="img/icons/icon-96.png"  rel = "apple-touch-icon">
	  <meta name="apple-mobile-web-app-status-bar" content="#00695c">
	  <meta name="theme-color" content="#00695c">
	  <!--ios suppoer-->
	
	  <script src="app.js"></script>
	
	
<!--===============================================================================================-->	
		 <link href="css/bootstrap-4.4.1.css" rel="stylesheet">
	
<!--===============================================================================================-->
	
</head>
	
	 <script src="js/main.js"></script>
	
	
	
	<style>

.loader {
  border: 16px solid #f3f3f3;
  border-radius: 50%;
  border-top: 16px solid blue;
  border-right: 16px solid green;
  border-bottom: 16px solid red;
  border-left: 16px solid pink;
  width: 120px;
  height: 120px;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 1s linear infinite;
}

@-webkit-keyframes spin {
  0% { -webkit-transform: rotate(0deg); }
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
		















	body, html {
background-color: <?php echo $bottom_backgroundcolor  ?>;
}

	
		
	
            div.scroll {
                //margin:4px, 4px;
               // padding:4px;
                background-color: #494747;
                width: 100%;
                height: 310px;
               // overflow-x: hidden;
               // overflow-y: auto;
				overflow: auto;
                text-align:justify;
            }
		
		div.scroll_history {
                //margin:4px, 4px;
               // padding:4px;
                background-color: #494747;
                width: 100%;
                height: 310px;
                //overflow-x: hidden;
                //overflow-y: auto;
				overflow: auto;
                text-align:justify;
            }
		
		
		div.scroll_body {
                margin:4px, 4px;
               // padding:4px;
                //background-color: green;
                width: 100%;
                height: 400px;
                overflow-x: hidden;
                overflow-y: auto;
				//overflow: auto;
                text-align:justify;
            }
		
		

	</style>
	

	<body onLoad= "unit_ac(),bulk_ac(),crude_ac(),view_ac(), spinner()">


	
		<div class="jumbotron-fluid" style="background-color: #757672; color: #F0ECEC">
	
				
<?php 
		
	echo $_SESSION['name'].'   '.' (IDN '. $_SESSION['user_id'].' ) ';
			
			

		?>
			<div class="" style="float: right; color: #ED0307;"><a HREF = "logout.php" onClick="spinner()"><span style="color: #F9F833">Log out</span></a></div>
			<!--<button onclick="myFunction()">Click Me</button>-->
			

			
		</div>
		
			

	
	
		<div class="jumbotron" style="background-color: <?php echo $background_color; ?>">
			
			<div style="color: <?php echo $text_color; ?>;  "><h5><b><marquee behavior="alternate"> Application Setup</marquee></b></h5></div>
	
	<div class="row">
		<DIV class="col-md-12" id="">
			<table style="margin: auto; width: auto" >
		
				
	<tr>
				<td>
					
					 <input type="submit" value='    +Daily Expenses    ' onClick="bulk_ac()" class="" style= "width: inherit; height: " name = "A"  >
					
					
				</td>
		
		
		
		<td>
					
				 <a href="cloud_pin_mgt.php">	 <input type="submit" value='Recharge' onClick="spinner(),windows.location.href=''" class="" style= "width: inherit; height: " name = "A"  > </a>
					
					
				</td>
		
		<td>
					
					
					
				</td>
		
	
				</tr>
				
				
				
				
	<tr>
				<td>
					
					 <input type="submit" value='+ Monthly Expenses ' onClick="unit_ac()" class="" style= "width: inherit; height: " name = "A"  >
					
					
				</td>
		
		
		
	<td>
		 <input type="submit" onClick="crude_ac()" value="Change Theme" class="" style= "width: inherit; height: " name = "A" >
				</td>
	
	
	
				</tr>
			</table>
		</DIV>
	
    </div>
			
			
				<div class="row">
			<table style="margin: auto" >
		
	<tr>
				<td>
					
					 <input type="button" onClick="view_ac()" value="View Account" class="" style= "width: inherit; height:" name = "A" >
					
					
				</td>
	<td>
		  <a href="setup_ac.php"><input type="button"   onClick = "spinner()"   value="Refresh" class="" style= "width: inherit; height: "  ></a>
				</td>
	<td>
		 <a href="dashboard.php"><input type="button"  onClick = "spinner()"  value="BACK" class="" style= "width: inherit; height: "  ></a>
				</td>
	
	
	</tr>
				
			
				<tr>
				
				
				
				</tr>
				
				
			</table>
		
		
			</div>
		<div style="align-content: center; text-align: center; color: #020202"><?php echo $notification?>  </div>
		</div>
	
	
	<!--script to show recent inserted record-->
	
	
		<?php
			  //==================================================================================
			 //script to show recent inserted record
			//==================================================================================
	
	
	  $SQL_recent = "SELECT * FROM fixed_cost ORDER BY product_id DESC LIMIT 1 ";
	  $recent_record = mysqli_query($db_handle, $SQL_recent);
	  $db_found_recent = mysqli_fetch_array($recent_record) ;
	// echo $db_found_recent['amount'];
	
	  //===================================================================================
	  		?>
	
	<div style="text-align:  center;background-color:#050101; width: inherit; color: #5A6CF8 ">
		
		<h6>  <?php//  echo $db_found_recent['name']." of ".$db_found_recent['amount'].'naira as @ '.$db_found_recent['time']." ". ' ('.$db_found_recent['date'].')'; ?> </h6>
	
	</div>
	<!--script to show recent inserted record-->
	
	
<div class="loader" id="spin" style="margin: auto"></div>		
	
	<div class="container-fluid" style="" >
		
		
		
		<div class="jumbotron-fluid" style="background-color: ">
		
		
				<div class="row" style="">
				
										<div class="col-md-3" style="padding-top: 8px;background-color:#B4B1B1" id="unit_ac" >
											
											<!--start-->
											
													<div id="">
											
											<form METHOD ="POST" ACTION = "fixedcost_delete.php" style="width: 100%">
											<table width="100%">
				<tr>
									<td>  
									
					
								
										
											
										
										<table>
											<tr>
														<td>
												<div class="input-group mb-3">
													
													
													<select class="custom-select"  style="width:"  id="inputGroupSelect03" name="name">
										
														<option selected>Select</option>
														<option>Rent</option>
														<option>salaries</option>
															
														<option>Light Bill</option>
														<option>Security Bills</option>
														<option>Waste Bills</option>
														<option>Utility Bills</option>
															
														<option> others</option>
													</select>

</div>
														</td>
														<td>
														  <div class="input-group mb-3">
  <div class="input-group-prepend">
    <span class="input-group-text" id="basic-addon1">Amount</span>
  </div>
  <input type="text" class="form-control" placeholder="0.00" aria-label="Username" aria-describedby="basic-addon1" name="unit_c">
															  
  <input type="hidden" class="form-control" placeholder="0.00" aria-label="Username" aria-describedby="basic-addon1" name="type" value="fixed">
</div>	
														</td>
											</tr>
										</table>
										
									    
								
										
					</td>
					
	
											 
							
											 
							</tr>
			</table>
			 <input type="submit" value="ENTER" class="btn-dark" style= "width: 100%" name = "A" onClick = "spinner()">
											
											</form>
											</div>	
											
											
											
										</div>
										
					
										<div class="col-md-3" style="padding-top: 8px" id="bulk_ac">
										
											<div id="">
											
											<form METHOD ="POST" ACTION = "fixedcost_delete.php" style="width: 100%">
											<table width="100%">
				<tr>
									<td>  
									
					
								
										
											
										
										<table>
											<tr>
													
														<td>
														  <div class="input-group mb-3">
  <div class="input-group-prepend">
    <span class="input-group-text" id="basic-addon1" >Title</span>
  </div>
  <input type="text" class="form-control" placeholder="eg.fuel" aria-label="Username" aria-describedby="basic-addon1" name="name"  width="100%" >
															  
															  <input type="hidden" class="form-control" placeholder="0.00" aria-label="Username" aria-describedby="basic-addon1" name="unit_c" value="0">
															  <input type="hidden" class="form-control" placeholder="0.00" aria-label="Username" aria-describedby="basic-addon1" name="type" value="variable">
															  
</div>	
															 <input type="submit" value="ENTER" class="btn-dark" style= "float: right" name = "A" onClick = "spinner()">
														</td>
											</tr>
										</table>
										
									    
								
										
					</td>
					
	
											 
							
											 
							</tr>
			</table>
			
											
											</form>
											</div>	
											
										</div>
					
										
								
			
					<div class="col-md-3" style="padding-top: 8px; background-color:" id="crude_ac"  >
					
 <form METHOD ="POST" ACTION = "setup_ac.php" style="width: 100%">
										
	 <table width="100%" style="color: ">
								
												<tr>
				
					
					
					<td>  
					<label for="colorpicker" style="color: <?php echo $bottom_textcolor  ?>">Background Color:</label>
					</td>
					<td>
						   <input type="color" id="colorpicker" value="<?php echo $bottom_backgroundcolor  ?>" style="width: 100px;" name = "background_color">
				
				
																			</td>
						 
												
						 												
						 
							</tr>
												
												<tr>
				
					
					
					<td>  
					<label for="colorpicker" style="color: <?php echo $bottom_textcolor  ?>">Text Color:</label>
					</td>
					<td>
						   <input type="color" id="colorpicker" value="<?php echo $text_color  ?>" style="width: 100px;"  name = "text_color">
				
					
																			</td>
						 
												
						 												
						 
							</tr>
												
													
												<tr>
				
					
					
					<td>  
					
					</td>
					<td  style="color: <?php echo $bottom_textcolor  ?>">
						 Bottom  Color
				
					
					</td>
						 
												
						 												
						 
							</tr>
												
												
	
			
	 <!--bottom background theme color-->
	 
	 									

								
												<tr>
				
					
					
					<td>  
					<label for="colorpicker" style="color: <?php echo $bottom_textcolor  ?>">Background Color:</label>
					</td>
					<td>
						   <input type="color" id="colorpicker" value="<?php echo $bottom_backgroundcolor ?>" style="width: 100px;" name = "bottom_backgroundcolor">
				
			
																			</td>
						 
												
						 												
						 
							</tr>
												
												<tr>
				
					
					
					<td>  
					<label for="colorpicker" style="color: <?php echo $bottom_textcolor  ?>">Text Color:</label>
					</td>
					<td>
						   <input type="color" id="colorpicker" value="<?php echo $bottom_textcolor  ?>" style="width: 100px;"  name = "bottom_textcolor">
				
					
																			</td>
						 
												
						 												
						 
							</tr>
												
													
												<tr>
				
					
					
					<td>  
					
					</td>
					<td>
						  <input type="submit" style ="width:100px"  class="" value="CHANGE" name="B"  onClick = "spinner()">
				
					
					</td>
						 
												
						 												
					
							</tr>
												
												
			</table>
			
			
											
											</form>
				</div>


				</div>
		
		
		</div>
		
		
		
		
		<?php
			  //==================================================================================
			 //this junk of code is to sum up daily transaction
			//==================================================================================
	  $SQL_sum = "SELECT SUM(amount) FROM txn_table where date= current_date   ";
	  $sum = mysqli_query($db_handle, $SQL_sum);
	  $db_found_sum = mysqli_fetch_assoc($sum) ;
	  //===================================================================================
	  		?>
		
	
		
	
		<div class="jumbotron-fluid" style="background-color: " id="view_ac">
		
					<div class="row " style="margin-top: 1px; background-color:">
		
			<div class = "col-md-6 " style="background-color:#4F4949">
				  		 <strong ><span style="color:#FAF7FF;padding: 4px"><br>Monthly Expenses (Fixed Cost)
					     </span> </strong>
				
						 <div class="jumbotron-fluid scroll_history" style="font-size:12; ">
				  
				  <!--<strong ><span style="color:#260B4D;background-color: #FBFBFC;padding: 4px">TRANSACTION HISTORY
					     </span></strong>-->
				  
	  <table class="table table-hover  " >
  <tbody>
    <tr  style="background-color: <?php echo $bottom_backgroundcolor?>; text-align: center; color: <?php echo $bottom_textcolor?>">
      <th scope="col"></th>
		
	<th scope="col"> </th>
    
		 <th scope="col">Name</th>
		 
		<!-- <th scope="col">DESCRIPTION</th>-->
	
		<!-- <th scope="col" style="background-color: #798B15">Available Quantity</th>-->
		 <th scope="col"style="background-color:">Amount</th>
		 <!--<th scope="col"style="background-color: #798B15">(Per_Quantity) Cost_Price</th>-->
		
		<!--<th scope="col" style="background-color: black"> (Bundle/Carton/Basket) Available_Quantity</th>
		 <th scope="col" style="background-color: black">(Bundle/Carton/Basket) Selling_Price </th>
		-->
		<th scope="col" style="background-color:">   Time  </th>
		 <th scope="col" style="background-color: "> Date </th>
		
     
    </tr>
 			
		


<?PHP

//if ($db_found) {

//$SQL = "SELECT * FROM product_table ORDER BY product_id ASC ";

	  
	  
$SQL = "SELECT * FROM fixed_cost where type = 'fixed' and branch_key ='$branch_key' ORDER BY name ASC   ";

	  //$SQL = "SELECT  product_name,product_id,user_id, amount, time FROM txn_table   where date= current_date  ORDER BY product_id DESC";

	  $result = mysqli_query($db_handle, $SQL);
$i =1;
	  
	  
	  

while ( $db_found = mysqli_fetch_assoc($result) ) {
	   
	echo'<tr style="text-align: center; color:black; background-color:white" >';
     // echo '<td>'.$db_found['user_id'].'</td>';
	
	
	echo '<td>'.$i++.'</td>';
	echo '<td>'.$db_found['product_id'].'</td>';
	 echo '<td>'.$db_found['name'].'</td>';
	//echo '<td style="background-color: #798B15">'.$db_found['unit_q'].'</td>';
	// echo '<td>'.$db_found['user_id'].'</td>';
	
	
	// echo '<td>'.'<a href="www.lawped.com.ng?id=$db_found['product_id']">details</a>'.'</td>';
	
	// $db_found_sum['SUM(amount)'];
	
	
	// echo '<td style="background-color: #798B15">'.$db_found['unit_p'].'</td>';
	echo '<td style="background-color:">'.$db_found['amount'].'</td>';
	/*
	echo '<td style="background-color: black">'.$db_found['bundle_q'].'</td>';
	echo '<td style="background-color: black">'.$db_found['bundle_p'].'</td>';
	*/
	//echo '<td style="background-color: black">'.$db_found['unit_c'].'</td>';
	echo '<td style="background-color:   ">'.$db_found['time'].'</td>';
	echo '<td style="background-color:  ">'.$db_found['date'].'</td>';
	//echo '<td>'.$db_found['SUM(amount)'].'</td>';
	
	//echo $db_found_sum['SUM(amount)']; 
	 
	 
	?>
<!--	  
  <td><a href="construction.php?txnId=Receipt">
    <input type="button" value="Issue Receipt"></a></td>
	  
	  <td><a href="construction.php?txnId=Modify Account">
    <input type="button" value="Modify"></a></td>-->
	  
	  
	  <td>
  <!--  <input type="button" value="Restock"onClick= "window.alert('The page  you requsted is still under Development. Contact us (Alaye David 09055158742, head of iCT LAWPED GROUP,www.lawped.com.ng')" >--></td>
	  
	 <td><a href="fixedcost_delete.php?txnId=<?php echo $db_found["product_id"]?>">
   <input type="button" value="Remove" onClick="spinner()"></a></td>
	  
	 
	  
	  
	  <?php
	echo '</tr>';

	
	
}

//}
//else {

//print "Database NOT Found ";

//}
//mysqli_close($db_handle);
	  
			?>
	
	
	
	
	
  </tbody>
</table>
						
	
	
	</div>
			</div>
						
						<div class = "col-md-6 " style="background-color: #494747">
				  		 <strong ><span style="color:#FAF7FF;padding: 4px"><br>Daily Expense (Varriable cost)
					     </span> </strong>
				
						 <div class="jumbotron-fluid scroll_history" style="font-size:12; ">
				  
				  <!--<strong ><span style="color:#260B4D;background-color: #FBFBFC;padding: 4px">TRANSACTION HISTORY
					     </span></strong>-->
				  
	  <table class="table table-hover  " >
  <tbody>
    <tr  style="background-color:  <?php echo $bottom_backgroundcolor?>; text-align: center; color: <?php echo $bottom_textcolor?>">
      <th scope="col"></th>
		
	<th scope="col"> </th>
    
		 <th scope="col">Name</th>
		 
		<!-- <th scope="col">DESCRIPTION</th>-->
	
		<!-- <th scope="col" style="background-color: #798B15">Available Quantity</th>-->
	<!--	 <th scope="col"style="background-color:">AMOUNT</th>-->
		 <!--<th scope="col"style="background-color: #798B15">(Per_Quantity) Cost_Price</th>-->
		
		<!--<th scope="col" style="background-color: black"> (Bundle/Carton/Basket) Available_Quantity</th>
		 <th scope="col" style="background-color: black">(Bundle/Carton/Basket) Selling_Price </th>
		-->
		<th scope="col" style="background-color:">   Time  </th>
		 <th scope="col" style="background-color: "> Date </th>
		
     
    </tr>
 			
		


<?PHP

//if ($db_found) {

//$SQL = "SELECT * FROM product_table ORDER BY product_id ASC ";

	  
	  
$SQL = "SELECT * FROM fixed_cost where type = 'variable' and branch_key ='$branch_key' ORDER BY name ASC   ";

	  //$SQL = "SELECT  product_name,product_id,user_id, amount, time FROM txn_table   where date= current_date  ORDER BY product_id DESC";

	  $result = mysqli_query($db_handle, $SQL);
$i =1;
	  
	  
	  

while ( $db_found = mysqli_fetch_assoc($result) ) {
	   
	echo'<tr style="text-align: center; color:black; background-color:white" >';
     // echo '<td>'.$db_found['user_id'].'</td>';
	
	
	echo '<td>'.$i++.'</td>';
	echo '<td>'.$db_found['product_id'].'</td>';
	 echo '<td>'.$db_found['name'].'</td>';
	//echo '<td style="background-color: #798B15">'.$db_found['unit_q'].'</td>';
	// echo '<td>'.$db_found['user_id'].'</td>';
	
	
	// echo '<td>'.'<a href="www.lawped.com.ng?id=$db_found['product_id']">details</a>'.'</td>';
	
	// $db_found_sum['SUM(amount)'];
	
	
	// echo '<td style="background-color: #798B15">'.$db_found['unit_p'].'</td>';
	//echo '<td style="background-color:">'.$db_found['amount'].'</td>';
	/*
	echo '<td style="background-color: black">'.$db_found['bundle_q'].'</td>';
	echo '<td style="background-color: black">'.$db_found['bundle_p'].'</td>';
	*/
	//echo '<td style="background-color: black">'.$db_found['unit_c'].'</td>';
	echo '<td style="background-color:   ">'.$db_found['time'].'</td>';
	echo '<td style="background-color:  ">'.$db_found['date'].'</td>';
	//echo '<td>'.$db_found['SUM(amount)'].'</td>';
	
	//echo $db_found_sum['SUM(amount)']; 
	 
	 
	?>
<!--	  
  <td><a href="construction.php?txnId=Receipt">
    <input type="button" value="Issue Receipt"></a></td>
	  
	  <td><a href="construction.php?txnId=Modify Account">
    <input type="button" value="Modify"></a></td>-->
	  
	  
	  <td>
  <!--  <input type="button" value="Restock"onClick= "window.alert('The page  you requsted is still under Development. Contact us (Alaye David 09055158742, head of iCT LAWPED GROUP,www.lawped.com.ng')" >--></td>
	  
	 <td><a href="fixedcost_delete.php?txnId=<?php echo $db_found["product_id"]?>">
   <input type="button" value="Remove" onClick="spinner()"></a></td>
	  
	 
	  
	  
	  <?php
	echo '</tr>';

	
	
}

//}
//else {

//print "Database NOT Found ";

//}
mysqli_close($db_handle);
	  
			?>
	
	
	
	
	
  </tbody>
</table>
						
	
	
	</div>
			</div>
			
		</div>
		
		</div>
		
		
	
		
	
</div>

		
	
</body>
</html>




	<script>
		
		
function view_ac() {
  var x = document.getElementById("view_ac");
	
	 var unit_ac = document.getElementById("unit_ac");
	 var bulk_ac = document.getElementById("bulk_ac");
	 var crude_ac = document.getElementById("crude_ac");
	
  if (x.style.display === "none") {
    x.style.display = "block";
	  
	   
	  unit_ac.style.display="none";
	  crude_ac.style.display="none";
	  bulk_ac.style.display="none";
	  
  }
	else {
    x.style.display = "none";
  }
	
	
}
		
		
	
function unit_ac() {
	var x = document.getElementById("unit_ac");
	 var unit_ac = document.getElementById("bulk_ac");
	 var crude_ac = document.getElementById("crude_ac");
	var view_ac = document.getElementById("view_ac");
	
  if (x.style.display === "none") {
   
	   x.style.display = "block";
	  
	  unit_ac.style.display="none";
	  crude_ac.style.display="none";
	  view_ac.style.display="none";
	  
	  
  } 
	else {
    x.style.display = "none";
		
		
		
  }
	
	
}		
		
		
function bulk_ac() {
  var x = document.getElementById("bulk_ac");
	
	 var unit_ac = document.getElementById("unit_ac");
	 var crude_ac = document.getElementById("crude_ac");
	var view_ac = document.getElementById("view_ac");
	
  if (x.style.display === "none") {
    x.style.display = "block";
	  
	   unit_ac.style.display="none";
	  crude_ac.style.display="none";
	   view_ac.style.display="none";
  } 
	else {
    x.style.display = "none";
  }
}		
		
			
function crude_ac() {
  var x = document.getElementById("crude_ac");
	
	var unit_ac = document.getElementById("unit_ac");
	 var bulk_ac = document.getElementById("bulk_ac");
	var view_ac = document.getElementById("view_ac");
	
  if (x.style.display === "none") {
    x.style.display = "block";
	  unit_ac.style.display="none";
	  bulk_ac.style.display="none";
	  view_ac.style.display="none";
  } 
	else {
    x.style.display = "none";
  }
}		
		
			
		

		


</script>			
			

<script>


		function spinner() {
  
			var x = document.getElementById("spin");
	
	
	
  if (x.style.display === "none") {
    x.style.display = "block ";
	  
	  
  }
	else {
    x.style.display = "none";
  }
	
	
}
	
		



</script>