document.write('<div name="mar1" id="mar1" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375976.html" target="_blank" class=a01>苏宁门店调整规划：不再铺设大中城市社区、区域店</a>&nbsp;<span style="color:#000000;">07-26 10:09</span></span><span style="display:inline-block;width:49%;">·<a href="http://www.house365.com/d0t1l2p3/1000000/2013/07/25/160134/" target="_blank" class=a01>刚需军团占领楼市</a>&nbsp;<span style="color:#000000;">07-26 10:08</span></span></div>');
document.write('<div name="mar2" id="mar2" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://bbs.house365.com/showthread.php?threadid=4386391&forumid=1835" target="_blank" class=a01>芬兰·遥远又神秘的国度</a>&nbsp;<span style="color:#000000;">07-26 10:02</span></span><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375895.html" target="_blank" class=a01>麒麟山庄：唯有奢雅大户型 才有奢华大享受</a>&nbsp;<span style="color:#000000;">07-26 10:02</span></span></div>');
document.write('<div name="mar3" id="mar3" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://bbs.house365.com/showthread.php?threadid=4386505&forumid=1835" target="_blank" class=a01>守望</a>&nbsp;<span style="color:#000000;">07-26 10:02</span></span><span style="display:inline-block;width:49%;">·<a href="http://bbs.house365.com/showthread.php?threadid=4386393&forumid=1835" target="_blank" class=a01>爱沙尼亚</a>&nbsp;<span style="color:#000000;">07-26 10:02</span></span></div>');
document.write('<div name="mar4" id="mar4" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://bbs.house365.com/showthread.php?threadid=4385853&forumid=471" target="_blank" class=a01>夏日里盛开的葵花</a>&nbsp;<span style="color:#000000;">07-26 10:02</span></span><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375042.html" target="_blank" class=a01>“气功大师”与名流合照</a>&nbsp;<span style="color:#000000;">07-26 10:02</span></span></div>');
document.write('<div name="mar5" id="mar5" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375910.html" target="_blank" class=a01>花生唐:商业销冠收官在即 花样季共享乐高奇趣</a>&nbsp;<span style="color:#000000;">07-26 10:00</span></span><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375885.html" target="_blank" class=a01>石林公园墅：离新街口繁华不远 离公园更近</a>&nbsp;<span style="color:#000000;">07-26 09:57</span></span></div>');
document.write('<div name="mar6" id="mar6" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://bbs.house365.com/showthread.php?threadid=4386579&forumid=80" target="_blank" class=a01>【房产中介新手入门】转定时变更了协议的附件，协议还有效吗？</a>&nbsp;<span style="color:#000000;">07-26 09:52</span></span><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375810.html" target="_blank" class=a01>中商万豪:常回家看看 住山西路，还能收租！</a>&nbsp;<span style="color:#000000;">07-26 09:50</span></span></div>');
document.write('<div name="mar7" id="mar7" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375797.html" target="_blank" class=a01>星巴克为高昂租金所困 二三线城市综合体频频向其招手</a>&nbsp;<span style="color:#000000;">07-26 09:44</span></span><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375799.html" target="_blank" class=a01>省公安厅招聘网络信息辅助管理人员公告</a>&nbsp;<span style="color:#000000;">07-26 09:43</span></span></div>');
document.write('<div name="mar8" id="mar8" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375042.html" target="_blank" class=a01>“气功大师”王林与各界名流合照</a>&nbsp;<span style="color:#000000;">07-26 09:41</span></span><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375151.html" target="_blank" class=a01>日本的超薄超窄楼房 难以想象这能住人！</a>&nbsp;<span style="color:#000000;">07-26 09:41</span></span></div>');
document.write('<div name="mar9" id="mar9" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/25/022371504.html" target="_blank" class=a01>有一种搬迁叫离别 有一段故事叫西街</a>&nbsp;<span style="color:#000000;">07-26 09:41</span></span><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022374972.html" target="_blank" class=a01>数百网店兜售公积金套现业务 要价狠声称查得严</a>&nbsp;<span style="color:#000000;">07-26 09:36</span></span></div>');
document.write('<div name="mar10" id="mar10" style="display:none"><span style="display:inline-block;width:49%;">·<a href="http://news.house365.com/gbk/njestate/system/2013/07/26/022375277.html" target="_blank" class=a01>茅于轼：房地产泡沫必然破裂 过热关注地产是国情</a>&nbsp;<span style="color:#000000;">07-26 09:36</span></span><span style="display:inline-block;width:49%;">·<a href="http://rent.house365.com/news/2013/0726/022375743.html" target="_blank" class=a01>组图：日本的超簿超窄楼房 这样居然都能住人</a>&nbsp;<span style="color:#000000;">07-26 09:33</span></span></div>');
var i,j,marqueenumber=10;
var marqueeContent=new Array();

for(i=0; i<marqueenumber; i++){
    marqueeContent[i]=document.getElementById("mar"+(i+1)).innerHTML;
}

var marqueeInterval=new Array();
var marqueeId=0;
var marqueeDelay=6000;
var marqueeHeight=24;

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++;
	var marqueeBox=document.getElementById("marqueeBox");
    if(marqueeId>=marqueeContent.length) marqueeId=0;
    if(marqueeBox.childNodes.length==1){
        var nextLine=document.createElement('div');
        nextLine.innerHTML=str;
        marqueeBox.appendChild(nextLine);
    }
    else{
        marqueeBox.childNodes[0].innerHTML=str;
        marqueeBox.appendChild(marqueeBox.childNodes[0]);
        marqueeBox.scrollTop=0;
    }
    clearInterval(marqueeInterval[1]);
    marqueeInterval[1]=setInterval("scrollMarquee()",5);
}

function scrollMarquee(){
	var marqueeBox=document.getElementById("marqueeBox");
    marqueeBox.scrollTop++;
    if(marqueeBox.scrollTop%marqueeHeight==(marqueeHeight-0)){
        clearInterval(marqueeInterval[1]);
    }
}

if(marqueenumber!=0) initMarquee();