var s_n_cross_marquee, s_n_ns_marquee;
var s_n_marqueewidth = "300px";
var s_n_marqueeheight = "20px";
var s_n_actualwidth_ = '';
var s_n_actualwidth = '';
var s_n_marqueespeed = 5;
s_n_marqueespeed = (document.all)?s_n_marqueespeed:Math.max(1, s_n_marqueespeed-1); //slow speed down by 1 for NS 
var s_n_copyspeed = s_n_marqueespeed;
var s_n_c_news = 0;
var s_n_iedom = document.all||document.getElementById;
if(s_n_iedom){
	document.write('<span id="s_n_temp" style="visibility:hidden; position:absolute; top:-100px; left:-9000px;"><b>123</b></span>') 
}else{
	
}

function s_n_activate(){
	if(s_n_iedom){
		//
		s_n_marqueewidth = parseInt(document.getElementById("n_s_news_box").offsetWidth)+'px';
		document.getElementById("n_s_news_box").innerHTML = '<div style="position:relative; width:'+s_n_marqueewidth+'; height:'+s_n_marqueeheight+'; overflow:hidden;"><div style="position:absolute; width:'+s_n_marqueewidth+'; height:'+s_n_marqueeheight+';" onMouseover="s_n_copyspeed = 0;" onMouseout="s_n_copyspeed = s_n_marqueespeed;"><div id="s_n_iemarquee" style="position:absolute; left:0; top:0;"></div></div></div>';
		//
		s_n_cross_marquee = document.getElementById ? document.getElementById("s_n_iemarquee") : document.all.s_n_iemarquee;
		s_n_cross_marquee.style.left = parseInt(s_n_marqueewidth) + 8 + "px";
		s_n_cross_marquee.innerHTML = "<nobr>"+s_n_news_list[s_n_c_news]+"</nobr>";
		s_n_actualwidth_ = document.all ? s_n_temp.offsetWidth : document.getElementById("s_n_temp").offsetWidth;
		if(s_n_cross_marquee.offsetWidth > parseInt(document.getElementById("n_s_news_box").offsetWidth)){
			s_n_actualwidth = s_n_actualwidth_ + (s_n_cross_marquee.offsetWidth - parseInt(document.getElementById("n_s_news_box").offsetWidth)) + 25;
		}
	}else if(document.layers){
		//
		s_n_marqueewidth = parseInt(document.getElementById("n_s_news_box").offsetWidth)+'px';
		document.getElementById("n_s_news_box").innerHTML = '<ilayer width="'+parseInt(s_n_marqueewidth)+'" height="'+parseInt(s_n_marqueeheight)+'" name="s_n_ns_marquee" bgColor="white"><layer name="s_n_ns_marquee2" left="0" top="0" onMouseover="s_n_copyspeed = 0;" onMouseout="s_n_copyspeed = s_n_marqueespeed;"></layer></ilayer>';
		//
		s_n_ns_marquee = document.s_n_ns_marquee.document.s_n_ns_marquee2;
		s_n_ns_marquee.left = parseInt(marqueewidth)+8;
		s_n_ns_marquee.document.write("<nobr>"+s_n_news_list[s_n_c_news]+"</nobr>");
		s_n_ns_marquee.document.close();
		s_n_actualwidth_ = s_n_ns_marquee.document.width;
		if(s_n_ns_marquee.offsetWidth > parseInt(document.getElementById("n_s_news_box").offsetWidth)){
			s_n_actualwidth = s_n_actualwidth_ + (s_n_ns_marquee.offsetWidth - parseInt(document.getElementById("n_s_news_box").offsetWidth)) + 25;
		}
	}
	lefttime = setInterval("s_n_scrollmarquee();", 100);
}
function s_n_scrollmarquee(){
	if(s_n_iedom){
		if(parseInt(s_n_cross_marquee.style.left)>(s_n_actualwidth*(-1)+8)){
			s_n_cross_marquee.style.left = parseInt(s_n_cross_marquee.style.left) - s_n_copyspeed + "px";
		}else{
			//
			s_n_c_news = s_n_c_news + 1;
			if(s_n_c_news >= s_n_news_list.length){
				s_n_c_news = 0;
			}
			s_n_cross_marquee.innerHTML = "<nobr>"+s_n_news_list[s_n_c_news]+"</nobr>";
			if(s_n_cross_marquee.offsetWidth > parseInt(document.getElementById("n_s_news_box").offsetWidth)){
				s_n_actualwidth = s_n_actualwidth_ + (s_n_cross_marquee.offsetWidth - parseInt(document.getElementById("n_s_news_box").offsetWidth)) + 25;
			}else{
				s_n_actualwidth = s_n_actualwidth_;
			}
			//
			s_n_cross_marquee.style.left = parseInt(s_n_marqueewidth) + 8 + "px";
		}
	}else if(document.layers){
		if (s_n_ns_marquee.left>(s_n_actualwidth*(-1)+8)){
			s_n_ns_marquee.left -= s_n_copyspeed;
		}else{
			//
			s_n_c_news = s_n_c_news + 1;
			if(s_n_c_news >= s_n_news_list.length){
				s_n_c_news = 0;
			}
			s_n_ns_marquee.document.write("<nobr>"+s_n_news_list[s_n_c_news]+"</nobr>");
			if(s_n_ns_marquee.offsetWidth > parseInt(document.getElementById("n_s_news_box").offsetWidth)){
				s_n_actualwidth = s_n_actualwidth_ + (s_n_ns_marquee.offsetWidth - parseInt(document.getElementById("n_s_news_box").offsetWidth)) + 25;
			}else{
				s_n_actualwidth = s_n_actualwidth_;
			}
			//
			s_n_ns_marquee.left = parseInt(s_n_marqueewidth)+8;
		}
	}
}
