function flash(ur,w,h){
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj1" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="'+w+'" height="'+h+'">');
document.write('<param name="movie" value="'+ur+'">');
document.write('<param name="quality" value="high"> ');
document.write('<param name="wmode" value="transparent"> ');
document.write('<param name="menu" value="false"> ');
document.write('<embed src="'+ur+'" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="'+w+'" height="'+h+'" quality="High" wmode="transparent">');
document.write('</embed>');
document.write('</object>');
}

function tbb_xs(t,m,n){
for(var i=1;i<=m;i++){
if (i != n){
document.getElementById("tbb"+t+ "_bt" + i).className= "blog_ycbt";
document.getElementById("tbb"+t+ "_nr" + i).className= "blog_ycnr";}
else{
document.getElementById("tbb"+t+ "_bt" + i).className= "blog_xsbt";
document.getElementById("tbb"+t+ "_nr" + i).className= "blog_xsnr";}}}


function tb_xs(t,m,n){
for(var i=1;i<=m;i++){
if (i != n){
document.getElementById("tb"+t+ "_bt" + i).className= "ycbt";
document.getElementById("tb"+t+ "_nr" + i).className= "ycnr";}
else{
document.getElementById("tb"+t+ "_bt" + i).className= "xsbt";
document.getElementById("tb"+t+ "_nr" + i).className= "xsnr";}}}

function gosearch(){
if(search_key.value != "")
window.open(search_url.value+'key='+search_key.value);
else
alert("搜索关键字不能为空!");}

//首页评论上下滚动代码
function Scrolltop(){
var Thatlayer  = document.getElementById("Thatlayer");
var Datalayer  = document.getElementById("Datalayer");
var speed=25;    
if(Thatlayer.scrollHeight>=Thatlayer.offsetHeight)
Datalayer.innerHTML = Datalayer.innerHTML+ Datalayer.innerHTML
function Marquee(){  
   var remaininghigh=parseInt(Thatlayer.scrollHeight)-parseInt(Thatlayer.scrollTop); 
   if(remaininghigh<=Thatlayer.scrollTop){
     Thatlayer.scrollTop=0;
   }else{
     Thatlayer.scrollTop++;
   }
}
var Timer = setInterval(Marquee,speed);
Thatlayer.onmouseover = function(){clearInterval(Timer);}
Thatlayer.onmouseout  = function(){Timer = setInterval(Marquee,speed);}
}

var is_ie=(navigator.userAgent.toLowerCase().indexOf("msie")!=-1);
function $(d) {return document.getElementById(d);}
function isk(ids) {
    return typeof ids == 'undefined' ? true: false;
}  
function ietruebody() {
   return (document.compatMode && document.compatMode != "BackCompat") ? document.documentElement: document.body;
} 
string = {};
string.Format = function(){
    var param = [];
    for(var i=0,length = arguments.length;i<length;i++){
        param.push(arguments[i]);
    }
    var format = param[0];
    param.shift();
    return format.replace(/\{(\d+)}/g,function(m,i){
        return param[i];
    });
}

var huiyuan="",arr=document.cookie.match(new RegExp("=huiyuan=([^;&]*)(;|$|&)"));
if(arr){huiyuan=decodeURI(arr[1]);}
var pindaoid="";

function top_hy(){ 
if (huiyuan.length>0){ 
   document.write("欢迎您 <a href=\"/huiyuan\" style=\"color:#f30;font-weight:bold;\" target=\"_self\">"+huiyuan+"</a>，<span id=\"huiyuan_index\"><a href=\"/huiyuan\" target=\"_self\" onMouseOver=\"$('huiyuan_menu').style.display='block';\" onMouseOut=\"$('huiyuan_menu').style.display='none';\">会员中心</a><em>▼</em><div id=\"huiyuan_menu\" onMouseOver=\"this.style.display='block';\" onMouseOut=\"this.style.display='none';\"><a href=\"/huiyuan/classad.aspx\" target=\"_self\">我的广告</a><a href=\"/huiyuan/bbs.aspx\" target=\"_self\">我的贴子</a><a href=\"/huiyuan/zhidao.aspx\" target=\"_self\">我的提问</a><a href=\"/huiyuan/blog.aspx?abc=blog\" target=\"_self\">我的日志</a></div></span> | <a href=\"/huiyuan/login.aspx?login=out\" target=\"_self\">退出</a>");
   setTimeout("getjst(0,5*1000,1)",1500); //即时通Call，第二个参数是setTime*1000，单位毫秒
   }
else{
   if(document.cookie.indexOf("hy_online=")==-1){setTimeout("getjst(0,0,0)",800);}//计录访问统计一次，可去掉这一行不统计游客
   document.write("欢迎您：会员，请 <a href=\"/huiyuan/login.aspx\" target=\"_self\">登陆</a> 不是会员？<a href=\"/huiyuan/reg.aspx\" target=\"_self\">免费注册</a>");
  }
}

