var marqueeContent=new Array();
var friendStr1 = '<a href="http://www.yoee.com" target="_blank"><img src="linkfriendly/yoee-logo.gif" width="90" height="30"border="0" title="游易网"></a>&nbsp;'
		+'<a href="http://buy.caimincun.com/index.jsp" target="_blank"><img src="linkfriendly/caimincun-logo.jpg" width="90" height="30"border="0" title="彩民村"></a>&nbsp;'
		
		+'<a href="http://www.maxpda.com" target="_blank"><img src="linkfriendly/maxpda-logo.gif" width="90" height="30" border="0" title="MAXPDA"></a>&nbsp;'
		+'<a href="http://berrytimes.cn" target="_blank"><img src="linkfriendly/berrytimes-logo.gif" width="90" height="30" border="0" title="黑莓时光"></a>&nbsp;'
		+'<a href="http://berrycn.com" target="_blank"><img src="linkfriendly/bcn-logo.gif" width="90" height="30" border="0" title="BerryCN"></a>&nbsp;'
		+'<a href="http://www.berryunion.com" target="_blank"><img src="linkfriendly/berryunion-logo.gif" width="90" height="30" border="0" title="黑莓联盟"></a>&nbsp;'
		+'<a href="http://ota.bbercn.com/ota/" target="_blank"><img src="linkfriendly/meiyuan-logo.gif" width="90" height="30" border="0" title="莓园无线"></a>&nbsp;	'

		+'<a href="http://bbs.pdafans.com" target="_blank"><img src="linkfriendly/koudai-logo.gif" width="90" height="30" border="0" title="口袋数码"></a>&nbsp;	'
		+'<a href="http://www.52dopod.net" target="_blank"><img src="linkfriendly/dopod-logo.gif" width="90" height="30" border="0" title="多普达手机论坛"></a>&nbsp;	'
		+'<a href="http://www.velo.com.cn" target="_blank"><img src="linkfriendly/velo-logo.gif" width="90" height="30" border="0" title="VELO|维络城"></a>&nbsp;';
var friendStr2 = '<a href="http://www.feelberry.com" target="_blank"><img src="linkfriendly/feelberry-logo.gif" width="90" height="30" border="0" title="感触黑莓"></a>&nbsp;'
		+'<a href="http://www.bbercn.com/" target="_blank"><img src="linkfriendly/bbercn-logo.jpg" width="90" height="30" border="0" title="中国莓|黑莓"></a>&nbsp;'
		+'<a href="http://www.babeeta.com/" target="_blank"><img src="linkfriendly/babeeta-logo.gif" width="90" height="30" border="0" title="巴别塔"></a>&nbsp;';
		
marqueeContent[0]=friendStr1;

marqueeContent[1]=friendStr2;

//marqueeContent[2]='<img src="http://ossweb-img2.qq.com/images/web/title/dot_news.gif" width="11" height="11">&nbsp;<a href="http://gamesafe.qq.com/CommNews/static/news_detail.htm?fid=37&iPdName=18" target="_blank">[自由幻想]QQ游戏木马专杀工具(9.27更新)</a><br>'

var marqueeInterval=new Array();
var marqueeId=0;
var marqueeDelay=5000;
var marqueeHeight=31;
function initMarquee() {
var str=marqueeContent[0];
document.write('<div id="marqueeBox" style="overflow:hidden;height:'+marqueeHeight+'px" onmouseover="clearInterval(marqueeInterval[0])" onmouseout="marqueeInterval[0]=setInterval(\'startMarquee()\',marqueeDelay)"><div>'+str+'</div></div>');
marqueeId++;
marqueeInterval[0]=setInterval("startMarquee()",marqueeDelay);

}
function startMarquee() {
var str=marqueeContent[marqueeId];
marqueeId++;
if(marqueeId>=marqueeContent.length) marqueeId=0;
if(document.getElementById("marqueeBox").childNodes.length==1) {
var nextLine=document.createElement('DIV');
nextLine.innerHTML=str;
document.getElementById("marqueeBox").appendChild(nextLine);
}
else {
   document.getElementById("marqueeBox").childNodes[0].innerHTML=str;
   document.getElementById("marqueeBox").appendChild(document.getElementById("marqueeBox").childNodes[0]);
   document.getElementById("marqueeBox").scrollTop=0;
}
clearInterval(marqueeInterval[1]);
marqueeInterval[1]=setInterval("scrollMarquee()",20);
}
function scrollMarquee() {
document.getElementById("marqueeBox").scrollTop++;
if(document.getElementById("marqueeBox").scrollTop%marqueeHeight==(marqueeHeight-1)){
clearInterval(marqueeInterval[1]);
}
}
