
function changecolor(e,c){
e.style.color=c;
document.getElementById(e.id+"1").style.color="white";
}





/* latest news slider activating */
var cur_lnews =1;
$(document).ready(function(){	
	$("#lnews_main").html($("#lnews_"+1).html());
	$("#nextBtn").show();
});




function nav_forward(){
    cur_lnews++; chk_current();
    $("#lnews_main").fadeOut('fast', function() {
       if($.browser.msie) { 
          this.style.removeAttribute('filter'); 
       }
    })
    .html($("#lnews_"+cur_lnews).html()).fadeIn('fast',function() {
       if($.browser.msie) { 
           this.style.removeAttribute('filter'); 
       }
    });
}


function nav_backward(){
    cur_lnews--; chk_current();
    $("#lnews_main").fadeOut('fast',function() {
        if($.browser.msie) { 
           this.style.removeAttribute('filter'); 
        }
    }).html($("#lnews_"+cur_lnews).html()).fadeIn('fast',function() {
        if($.browser.msie) { 
               this.style.removeAttribute('filter'); 
        }
    });
}

function chk_current(){
	
	if(cur_lnews>total_lnews || cur_lnews<1 ){
	    cur_lnews = 1;
	}

	if(cur_lnews==1){
	   $('#prevBtn').hide();
	}
	if(cur_lnews==total_lnews){
	   $('#nextBtn').hide();
	}
	if(cur_lnews>1){
	   $('#prevBtn').show();
	}
	if(cur_lnews>=1){
	   $('#nextBtn').show();
	}
}


function frmCheck(){
   if($('#query').val() == ''){
     alert('Please type something to search for');
     return false;
   }else{
	 return true;
   }
}


