function noSelect(){
    document.oncontextmenu=function(e){ return false;}   
}
function copyUrl(){
    window.clipboardData.setData("Text",location.href);   
    alert("已将地址复制到剪贴板，请粘贴到你的QQ/MSN上推荐给你的好友");  
}
function tj(){
    document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/js.tongji.linezing.com\/1138201\/tongji.js\"><\/script>")
}
function addF(){
  if(document.all){
    window.external.addFavorite('http://www.123xiaohua.com','123笑话网');
  }else{
    window.sidebar.addPanel('123笑话网', 'http://www.123xiaohua.com', ""); 
  }
}
function applyLink() {
    winOpen('LinkAdd.aspx',500,400);
}
function winOpen(url, width, height) {
    var left = (screen.width) ? (screen.width - width) / 2 : 0;
    var top = (screen.height) ? (screen.height - height) / 2 : 0;
    window.open(url, '', 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top);
}
function startmarquee(lh,speed,delay,index){ 
	var t; 
	var p=false; 
	var o=document.getElementById("r_mid_c"); 

	o.onmouseover=function(){p=true} 
	o.onmouseout=function(){p=false} 
    o.scrollTop=0;
    o.innerHTML+=o.innerHTML;
	function start(){ 
		t=setInterval(scrolling,speed); 
 			if(!p) o.scrollTop += 2;
	} 
	function scrolling(){ 
		if(o.scrollTop%lh==0){
		    clearInterval(t); 
		    setTimeout(start,delay); 		    
		}else{
            o.scrollTop += 2; 
            if(o.scrollTop>=o.scrollHeight/2)o.scrollTop=0;
        }
	} 
	setTimeout(start,delay); 
} 
function addJ(){
    $("#dialog").html("<iframe src='Add.aspx' width='480px' height='330px' frameborder='0' scrolling='no'></iframe>");
    $("#dialog").show();
}
function showTop(){
    var oHot=$("#hot");
    oHot.find("ol:first").show().end().find("ul li").each(function(){
        $(this).click(function(){          
            $(this).parent("ul").children().attr("class","se");
            $(this).attr("class","sel");
            oHot.find("ol").hide();
            oHot.find($(this).attr("uid")).show();
        });
    });
}
function changeTab(){
    $("#r_left").find(".r_left_d").each(function(){
        var oDiv=$(this);        
        oDiv.find("ul:first").show();
        oDiv.find("td:first").attr("class","s_sub");
        oDiv.find("td").each(function(){
            $(this).mouseover(function(){
                $(this).parent().children().attr("class","n_sub");
                $(this).attr("class","s_sub");
                oDiv.find("ul").hide();
                oDiv.find($(this).attr("did")).show();
            });
        });
    });
}
function qq(uin) {
    location.href = 'tencent://message/?uin=' + uin + '&Menu=yes';
}
function addAct()
{
    $("#fenxian div").each(function(){
        $(this).hover(function(){
            $(this).css("background-color","#D3EE9C");
        },function(){
            $(this).css("background-color","#FFFFFF");
        });
    });
    $("#left div[id='content']").each(function(){
        if($(this).html().length>20){
            $(this).show();
            return;
        }
    });
}
function doUp(obj)
{
    var btn = $(obj);
    var id=$("#hidJokeID").val();
    $.ajax({
        type:"GET",
        url:"/ajax/JokeService.aspx?act=up&id="+id,
        success:function(data){
            alert("谢谢您的参与！");
            btn.html('顶<span>'+ data +'</span>');
        }
    });
}
function doDown(obj)
{
    var btn = $(obj);
    var id=$("#hidJokeID").val();
    $.ajax({
        type:"GET",
        url:"/ajax/JokeService.aspx?act=down&id="+id,
        success:function(data){
            alert('谢谢您的参与！');
            btn.html('踩<span>'+ data +'</span>');
        }
    });
}
function doTypo(obj)
{
    alert("已经报错,谢谢");
}
function share(){
    document.writeln('<div id="ckepop">');
    document.writeln('    <a href="http://www.jiathis.com/share/?uid=893932" class="jiathis jiathis_txt jtico jtico_jiathis" target="_blank">转贴到：</a>');
    document.writeln('    <a class="jiathis_button_tsina"></a>');
    document.writeln('    <a class="jiathis_button_qzone"></a>');
    document.writeln('    <a class="jiathis_button_kaixin001"></a>');
    document.writeln('    <a class="jiathis_button_renren"></a>');
    document.writeln('    <a class="jiathis_button_feixin"></a>');
    document.writeln('    <a class="jiathis_button_tqq"></a>');
    document.writeln('    <a class="jiathis_button_xiaoyou"></a>');
    document.writeln('    <a class="jiathis_button_51"></a>');
    document.writeln('    <a class="jiathis_button_139"></a>');
    document.writeln('    <a class="jiathis_button_douban"></a>');
    document.writeln('    <a class="jiathis_button_delicious"></a>');
    document.writeln('    <a class="jiathis_button_tieba"></a>');
    document.writeln('    <a class="jiathis_button_zhuaxia"></a>');
    document.writeln('    <a class="jiathis_button_hi"></a>');
    document.writeln('    <a class="jiathis_button_t163"></a>');
    document.writeln('    <a class="jiathis_button_tshou"></a>');
    document.writeln('</div>');
    document.writeln('<script type="text/javascript" src="http://v2.jiathis.com/code/jia.js?uid=893932" charset="utf-8"></script>');
}
