	  <script language="JavaScript" type="text/javascript">
		var message="SELAMAT DATANG DI PORTAL INFORMASI PENGADAAN BARANG JASA DESA KABUPATEN MADIUN"
		var neonbasecolor="white"
		var neontextcolor="black"
		var flashspeed=100  //dalam milisekon
		
		var n=0
		if (document.all||document.getElementById){
		document.write('<font color="'+neonbasecolor+'">')
		for (m=0;m<message.length;m++)
		document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
		document.write('</font>')
		}
		else
		document.write(message)
		
		function crossref(number){
		var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
		return crossobj
		}
		
		function neon(){
		
		//Mengubah semua karakter ke warna dasar
		if (n==0){
		for (m=0;m<message.length;m++)
		//eval("document.all.neonlight"+m).style.color=neonbasecolor
		crossref(m).style.color=neonbasecolor
		}
		
		//bergantian dan merubah karakter ke warna yang lain
		crossref(n).style.color=neontextcolor
		
		if (n<message.length-1)
		n++
		else{
		n=0
		clearInterval(flashing)
		setTimeout("beginneon()",1500)
		return
		}
		}
		function beginneon(){
		if (document.all||document.getElementById)
		flashing=setInterval("neon()",flashspeed)
		}
		beginneon()
	</script>
	
<div class="fadein" align="center">
<?php
	$q=mysqli_query($mysqli,"SELECT * FROM berita WHERE CHAR_LENGTH(foto)>0 ORDER BY id DESC LIMIT 0,5");
	if(mysqli_num_rows($q)>0){
		while($dt=mysqli_fetch_array($q)){
			echo "<img src='foto_berita/$dt[foto]' width='80%' height='80%'/>";
		}
	}else{

	}
?>
</div>


<div id="content-wrap">
		<div id="sidebar2">
			<h1>Berita</h1>
			<?php
				//menampilkan judul berita dan link
				$qryx=mysqli_query($mysqli,"SELECT * FROM berita ORDER BY id DESC");
				if(mysqli_num_rows($qryx)>0){
					echo "<ul>";
					while($datax=mysqli_fetch_array($qryx)){
						echo "<li style=\"margin-left:-10px\"><a href='?page=ls_berita&id=$datax[id]'>$datax[judul] <i>($datax[tanggal])</i></a></li>";
					}
					echo "</ul>";
				}else{
					echo "<p>0 Berita</p>";
				}
			?>
			<br/>
			<h1>Gallery</h1>
		<?php
			//menampilkan gallery
			
			$qra=mysqli_query($mysqli, "SELECT * FROM m_gallery ORDER BY id_gallery DESC ");
			if(mysqli_num_rows($qra)>0){
				
				echo "<table border='0' width='100%'>";
				$urutan=1;
				echo "<tr>";
				while($dta=mysqli_fetch_array($qra)){
					
					if($urutan<4){
						echo "<td align='center'><a href='?page=ls_gallery&id_album=$dta[id_gallery]'><img src='foto_berita/$dta[foto_album]' width='80px' height='60px' border='0' title='$dta[ringkasan]'/><br/>$dta[judul]</a></td>";
						
					}else{
						echo "</tr><tr><td align='center'><a href='?page=ls_gallery&id_album=$dta[id_gallery]'><img src='foto_berita/$dta[foto_album]' width='80px' height='60px' border='0'  title='$dta[ringkasan]'/><br/>$dta[judul]</a></td>";
						$urutan=1;
					}
					
					$urutan++;
				}
				echo "</table><br/><br/>&nbsp;";
			}else{
				echo "Gallery masih kosong...";
			}
		
		?>
			
		</div>			
		<div id="rightbar">
			
			<h1>Pengumuman</h1>
			<?php
				//menampilkan judul pengumuman dan link
				$qryx=mysqli_query($mysqli,"SELECT * FROM pengumuman ORDER BY id DESC LIMIT 0, 10");
				if(mysqli_num_rows($qryx)>0){
					echo "<ul  class=\"sidemenu\">";
					while($datax=mysqli_fetch_array($qryx)){
						echo "<li style=\"margin-left:-10px\"><a href='?page=ls_pengumuman&id=$datax[id]'>$datax[judul] <i>($datax[tanggal])</i></a></li>";
					}
					echo "</ul>";
				}else{
					echo "<p>0 Pengumuman</p>";
				}
			?>
		</div>	
</div>
