<div id="rightBox">
	<table border="0" cellpadding="0" cellspacing="0" class="rightBox_table">
		<tr>
			<td><img src="/files/contentBoxTop.jpg" alt="" width="690" height="16"/></td>
		</tr>
		<tr>
			<td valign="top" style="background-image: url(/files/contentBoxMiddle.jpg); width: 690px; height: 547px; background-position: center top; background-repeat: no-repeat;">
				<div id="rightBox_content">
					<?php
						if($this->uri->segment('1')=='superadmin') 
							$link = 'superadmin';
						else		
							$link = 'admin';
							
						$kategoriaId = $this->uri->segment('4');
						if($kategoriaId == 0)
							$kategoriaId = 1;
					?>
					
						<div class="mediumButton"><a class="gray_link" <?php if($kategoriaId==1) echo 'style="color:#ec2323"'; ?> href="/<?=$link;?>/show_domain_chart/<?php echo $domain_id; ?>/1">dzienne</a></div>
						<div class="mediumButton"><a class="gray_link" <?php if($kategoriaId==2) echo 'style="color:#ec2323"'; ?> href="/<?=$link;?>/show_domain_chart/<?php echo $domain_id; ?>/2">tygodniowe</a></div> 
						<div class="mediumButton"><a class="gray_link" <?php if($kategoriaId==3) echo 'style="color:#ec2323"'; ?> href="/<?=$link;?>/show_domain_chart/<?php echo $domain_id; ?>/3">miesieczne</a></div>  
						<div class="mediumButton"><a class="gray_link" <?php if($kategoriaId==4) echo 'style="color:#ec2323"'; ?> href="/<?=$link;?>/show_domain_chart/<?php echo $domain_id; ?>/4">kwartalne</a></div>  
						<div class="mediumButton"><a class="gray_link" <?php if($kategoriaId==5) echo 'style="color:#ec2323"'; ?> href="/<?=$link;?>/show_domain_chart/<?php echo $domain_id; ?>/5">roczne</a></div>
					<br /><br /><br />
					
					<?php
					
						$type = $this->uri->segment(4);
						
						
						if ($type==null)
						{
							$type=1;
						}
						
					switch($type)
										{
										case 1: {
										    			// "Dzienne"; 
													//echo '<img src="/charts/chart_line/'.$domain_id.'" />';
														echo '<div id="my_chart">charts/flash_chart_line/'.$domain_id.'</div>';
														break;
													}
										case 2: {
										    			// "tygodniowe"; 
														//echo '<img src="/charts/chart_line_weekly/'.$domain_id.'" />';
														echo '<div id="my_chart">charts/flash_chart_line_weekly/'.$domain_id.'</div>';
														break;
													}
										case 3: {
										    			// "miesieczne"; 
														//echo '<img src="/charts/chart_line_monthly/'.$domain_id.'" />';	
														echo '<div id="my_chart">charts/flash_chart_line_monthly/'.$domain_id.'</div>';							
														break;
													}
										case 4: {
										   			// "kwartalne"; 
													//echo '<img src="/charts/chart_line_quartely/'.$domain_id.'" />';
													echo '<div id="my_chart">charts/flash_chart_line_quartely/'.$domain_id.'</div>';								
													break;
												}
										
										case 5: {
							    			// "roczne"; 
											//echo '<img src="/charts/chart_line_yearly/'.$domain_id.'" />';
											echo '<div id="my_chart">charts/flash_chart_line_yearly/'.$domain_id.'</div>';		
											break;
										}						
					}
					?>
					
					<br /><br />
					<?php 	
						
							$colors[0] = 'rgb(100, 149, 237)';
							$colors[1] = 'rgb(240, 128, 128)';
							$colors[2] = 'rgb(50, 205, 50)';
							$colors[3] = 'rgb(255, 215, 0)';
							$colors[4] = 'rgb(131, 111, 255)';
							$colors[5] = 'rgb(144, 238, 144)';
							$colors[6] = 'rgb(70, 130, 180)';
							$colors[7] = 'rgb(244, 164, 96)';
							$colors[8] = 'rgb(139, 121, 94)';
							$colors[9] = 'rgb(190, 190, 190)';
							
						
						$i=0;
						foreach($keywords as $keyword)
						{
							//echo '<div style="text-align:left;background-color:'.$colors[$i].'">'.$keyword['keyword'].'</div>';
							//$i++;
							echo '<div style="float:left;text-align:left;width:32px; height:14px; background-color:'.$colors[$i].'">&nbsp;</div><div style="float:left;"> &nbsp;&nbsp;&nbsp; '.$keyword['keyword'].'</div><br style="clear:both"/><br />';
							$i++;
						}
					?>
						<div style="float:left;text-align:left;width:32px; height:14px; background-color:#ffffff">PZ</div>
						<div style="float:left;"> &nbsp;&nbsp;&nbsp; poza zakresem</div>
						<br style="clear:both"/><br />
					<div class="smallButton2"><a class="gray_link" href="/<?=$link;?>/domain">WSTECZ</a></div>
				</div>
			</td>	
		</tr>
		<tr>
			<td><img src="/files/contentBoxBottom.jpg" alt="" width="690" height="17"/></td>
		</tr>
	</table>
</div>	

