﻿
//框架
function sH(h){       
    if(h)document.getElementById('FloorSort').style.height = (h + 5) + "px";        
}
function sH_ID(h,id){       
    if(h)document.getElementById(id).style.height = (h + 5) + "px";        
}
//top   
lastScrollY=0;
function heartBeat(){ 
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
    diffY = document.documentElement.scrollTop;
else if (document.body)
    diffY = document.body.scrollTop
else
    {/*Netscape stuff*/}
percent=.1*(diffY-lastScrollY); 
if(percent>0)percent=Math.ceil(percent); 
else percent=Math.floor(percent); 
document.getElementById("full").style.top=parseInt(document.getElementById("full").style.top)+percent+"px";
lastScrollY=lastScrollY+percent; 
}
suspendcode="<div id=\"full\" style='right:0px;POSITION:absolute;TOP:450px;z-index:100'><a href='#Top'><img src=http://res.homevcache.com/house/v1/images/top.gif border=0 alt='返回顶部'></a></div>"
document.write(suspendcode);
window.setInterval("heartBeat()",1); 


//视频播放器
  function ShowHouseVido(pid,vid,img,des,svcount,flv,play)
   { 

//document.getElementById('HouseVideo').innerHTML = '<img src="'+ img +'" width="406" height="340" />';
//return;
        var type='';
        var player = new myFlash("http://lib.homevcache.com/player/utflvp/flvp_yNet.swf","406", "340", "9"); 
        player.addAttrib("id","player_video_cont");
        player.addAttrib("name","player_video_cont");
        player.addParam("allowFullScreen","true"); 
        player.addParam("allowScriptAccess","always");
        if(fplay==0)
        {
          player.addVars("AdUrl","http://lib.homevcache.com/player/gg/jzsj.flv");
          player.addVars("AdHttpUrl","http://gg2.homev.cn/tongji/gg.aspx?id=H03A");
        }
        if(flv=='')
        {
          player.addVars("VUrl",String(pid+","+vid+","+host+","+type));
        } 
        else
        {
          player.addVars("VUrl",flv);
        }
        //player.addVars("VHttpUrl",host+pid+".vhtml");
        player.addVars("VHttpUrl", encodeURIComponent("http://video.ynet.com/player.php?pid="+pid+"&vid="+vid+"&host="+host+"&title="+des+"&thumb="+img+"&detail="+host+pid+".vhtml"));
        if(play==1)
        { 
          player.addVars("playMode","true");
        }
        else
        {
           player.addVars("playMode","false");
        }
        player.addVars("thumb",img);
        player.addVars("showBar","true");
        player.toObject("HouseVideo");
        if(hit.videos[vid])
              document.getElementById("SvdieoCount").innerHTML=hit.videos[vid];     
              document.getElementById("VideoName").innerHTML=des;
         fplay=1;      
              
   }
   

   
    //图片播放器
    function ShowPic(imglist)
    {
        var player = new myFlash('http://lib.homevcache.com/player/picplayer/picplayer.swf',"406","350","9")
        player.addParam("allowScriptAccess","sameDomain");
        player.addVars("imgUrl",imglist);
        player.addVars("maskTime",3);
        player.addVars("showBar","true");
        player.addVars("musicUrl","");
        player.addVars("autoStart","true");
        player.toObject("HouseImage");
        
    }