// JavaScript Document

			 function showHomeBanner(val,total)
			  {			 
				 for(var i=0;i<=total;i++) 
				 {
					 if(i==val)
					    { 
						 document.getElementById("banners"+i).style.display='block';			  				 
						}
					else
						{
						  document.getElementById("banners"+i).style.display='none';			
						}	
				 }	
				 
			  }	
			  

			  function show_headerbar(index,total)
			  {	
				 for(var i=0;i<total;i++) 
				 {
					 if(i==index)
					    { 
							document.getElementById("headerbar"+i).style.display='block';		 
						}
					 else
					    {   document.getElementById("headerbar"+i).style.display='none';		 					  
							
						}
						
				/*	if(i==index && i==0 )	
						{	 if(navigator.appName == "Microsoft Internet Explorer") 	    	
								document.getElementById("menuheader"+i).setAttribute("className", "home active");
					         else	   
							    document.getElementById("menuheader"+i).setAttribute("class", "home active");					  
						}
					else if(i==index)	
						{	 if(navigator.appName == "Microsoft Internet Explorer") 	    	
								document.getElementById("menuheader"+i).setAttribute("className", "landlord active");
					         else	   
							    document.getElementById("menuheader"+i).setAttribute("class", "landlord active");					  
						}
					else if(i==0)	
						{	 if(navigator.appName == "Microsoft Internet Explorer") 	    	
								document.getElementById("menuheader"+i).setAttribute("className", "home");
					         else	   
							    document.getElementById("menuheader"+i).setAttribute("class", "home");					  
						}						
					else
						{	 if(navigator.appName == "Microsoft Internet Explorer") 	    	
								document.getElementById("menuheader"+i).setAttribute("className", "landlord");
					         else	   
							    document.getElementById("menuheader"+i).setAttribute("class", "landlord");					  
						}*/  
					 
					
					if(i==index)	
						{	 if(navigator.appName == "Microsoft Internet Explorer") 	    	
								document.getElementById("menuheader"+i).setAttribute("className", "landlord active");
					         else	   
							    document.getElementById("menuheader"+i).setAttribute("class", "landlord active");					  
						}									
					else
						{	 if(navigator.appName == "Microsoft Internet Explorer") 	    	
								document.getElementById("menuheader"+i).setAttribute("className", "landlord");
					         else	   
							    document.getElementById("menuheader"+i).setAttribute("class", "landlord");					  
						}
						 
				 }				  
			  }
		      
			  
			  function change_ad(total, val)
			  {
				  var ele = val-1;
				  if(val==total)
				    val=0;

				
				  document.getElementById("floatingads"+ele).style.display='none';				  
				  document.getElementById("floatingads"+val).style.display='block';
				  val++;			  
				  
				  setTimeout("change_ad("+total+","+val+")",5000);			  
			  }
			  
		    function change_banner(total, val)
			  {
				  var ele = val-1;
				  if(val==total)
				    val=0;
				if(document.getElementById("urgentmessages"+ele)){
				  document.getElementById("urgentmessages"+ele).style.display='none';				  
				}
				if(document.getElementById("urgentmessages"+val)){
				  document.getElementById("urgentmessages"+val).style.display='block';
				}
				  val++;			  
				  
				  setTimeout("change_banner("+total+","+val+")",8000);			  
			  }


	    	jQuery(document).ready(function() {  
									   
			// For Side Bars
			jQuery("#basic_sidebar_link").click(function(){
				jQuery("#basic_sidebar").show();			
				jQuery("#landlord_sidebar").hide();	 
				jQuery("#renter_sidebar").hide();	
			//	document.getElementById("menu_name").innerHTML ="<b>Current Menu:</b>  Basic";

				document.getElementById("basic_sidebar_link").className = 'selected';
				document.getElementById("landlord_sidebar_link").className = '';
				document.getElementById("renter_sidebar_link").className = '';

				});
			
			jQuery("#landlord_sidebar_link").click(function(){
				jQuery("#basic_sidebar").hide();			
				jQuery("#landlord_sidebar").show();	 
				jQuery("#renter_sidebar").hide();
			//	document.getElementById("menu_name").innerHTML ="<b>Current Menu:</b>  Landlord";

				document.getElementById("basic_sidebar_link").className='';
				document.getElementById("landlord_sidebar_link").className='selected';
				document.getElementById("renter_sidebar_link").className='';

				});
			
			jQuery("#renter_sidebar_link").click(function(){
				jQuery("#basic_sidebar").hide();			
				jQuery("#landlord_sidebar").hide();	 
				jQuery("#renter_sidebar").show();
			
				document.getElementById("basic_sidebar_link").className='';
				document.getElementById("landlord_sidebar_link").className='';
				document.getElementById("renter_sidebar_link").className='selected';

				});
			
									   
									   
			jQuery("#post_recent_title").click(function(){
				jQuery("#post_popular").show();	 
				jQuery("#post_recent").hide();
			
				document.getElementById("post_popular_title").setAttribute("class", "tabs deselected");
				document.getElementById("post_recent_title").setAttribute("class", "tabs selected");										  
			});	
			
			jQuery("#post_popular_title").click(function(){
				jQuery("#post_popular").hide();	 
				jQuery("#post_recent").show();			
		
				document.getElementById("post_popular_title").setAttribute("class", "tabs selected");
				document.getElementById("post_recent_title").setAttribute("class", "tabs deselected");															  
			});


			jQuery("#showfive").click(function(){
				jQuery("#secondfive").hide();	 
				jQuery("#thirdfive").hide();				
				jQuery("#showfive").addClass("selected");			
				jQuery("#showten").removeClass();			
				jQuery("#showfifteen").removeClass();
			});
			
			jQuery("#showten").click(function(){
				jQuery("#secondfive").show();	 
				jQuery("#thirdfive").hide();	 			
				jQuery("#showfive").removeClass();			
				jQuery("#showten").addClass("selected");			
				jQuery("#showfifteen").removeClass();
			});
			
			jQuery("#showfifteen").click(function(){
				jQuery("#secondfive").show();	 
				jQuery("#thirdfive").show();	 			
				jQuery("#showfive").removeClass();			
				jQuery("#showten").removeClass();						
				jQuery("#showfifteen").addClass("selected");						
			});


            jQuery("#showfivepopular").click(function(){
				jQuery("#secondfivepopular").hide();	 
				jQuery("#thirdfivepopular").hide();				
				jQuery("#showfivepopular").addClass("selected");			
				jQuery("#showtenpopular").removeClass();			
				jQuery("#showfifteenpopular").removeClass();
			
			});
			
			jQuery("#showtenpopular").click(function(){
				jQuery("#secondfivepopular").show();	 
				jQuery("#thirdfivepopular").hide();	 			
				jQuery("#showfivepopular").removeClass();			
				jQuery("#showtenpopular").addClass("selected");			
				jQuery("#showfifteenpopular").removeClass();
			});
			
			jQuery("#showfifteenpopular").click(function(){
				jQuery("#secondfivepopular").show();	 
				jQuery("#thirdfivepopular").show();				
				jQuery("#showfivepopular").removeClass();			
				jQuery("#showtenpopular").removeClass();						
				jQuery("#showfifteenpopular").addClass("selected");						
			});


            jQuery("#showfivearticles").click(function(){
				jQuery("#secondfivearticles").hide();	 
				jQuery("#thirdfivearticles").hide();				
				jQuery("#showfivearticles").addClass("selected");			
				jQuery("#showtenarticles").removeClass();			
				jQuery("#showfifteenarticles").removeClass();
			
			});
			
			jQuery("#showtenarticles").click(function(){
				jQuery("#secondfivearticles").show();	 
				jQuery("#thirdfivearticles").hide();	 			
				jQuery("#showfivearticles").removeClass();			
				jQuery("#showtenarticles").addClass("selected");			
				jQuery("#showfifteenarticles").removeClass();
			});
			
			jQuery("#showfifteenarticles").click(function(){
				jQuery("#secondfivearticles").show();	 
				jQuery("#thirdfivearticles").show();				
				jQuery("#showfivearticles").removeClass();			
				jQuery("#showtenarticles").removeClass();						
				jQuery("#showfifteenarticles").addClass("selected");						
			});		
			
			jQuery("#actionbox0").hover(function(){
				ContentSlider.turnpage('slider1', 0);				
			});
			jQuery("#actionbox1").hover(function(){
				ContentSlider.turnpage('slider1', 1);				
			});
			jQuery("#actionbox2").hover(function(){
				ContentSlider.turnpage('slider1', 2);				
			});


			});  

