//////////////////////////////
/*  javascript news nextback */
//////////////////////////////

 var all=5;  // 3 news
 var now;
 var m; 

now=1;

  function nowNews(){
	  obj=document.getElementById("news"+now);
	  if(obj) obj.style.display=''; 
  }

  function checkBrowser(){
		
	   if(navigator.appName == "Microsoft Internet Explorer") return true;
	   else  return false;

 }

 function rand(index){ 

	today=new Date();
	jran=today.getTime();
	var MaxNumber = index;
	ia=9301;
	ic=49297;
	im=233280;
	jran = (jran*ia+ic) % im;
	rand = Math.ceil( (jran/(im*1.0)) *MaxNumber);  
	return rand;

} 

 function next(){
		  now=now+parseInt(1);
		   if(now>all)now=1; 
			changeN(now);
 }

 function back(){
		   now=now-parseInt(1);
		   if(now<1)now=all; 
		   changeN(now);
 }

 function changeN(now){
			
		   obj=document.getElementById("news"+now);
           if(obj){
				   obj.style.height="auto";
				   if(checkBrowser()){
					   obj.filters[0].Apply();    
					   obj.filters[0].Play(); 
				   }
				   obj.style.display="";
				   for(i=1;i<=5;i++){
					 if(i!=now){
						 ooo=document.getElementById("news"+i);
						 if(ooo) ooo.style.display='none'; 
					 }
				   }
		   }

 }
 function stopNews(){
		   clearInterval(m);
 }
 function startNews(){
			m=setInterval("next()",3000);
 }


function openMymsg(){
		window.open('/msgbox_new/index.php','_blank','left=200,top=100,width=450,height=510,status=yes,toolbar=no');
}

