function delThisPost(){
        if (confirm("您确定要删除该贴吗?")) return true;
        return false;
}
function refuseThisFriend(){
        if (confirm("您确定要拒绝该用户的请求吗?")) return true;
        return false;
}
function delThisFriend(){
        if (confirm("您确定要从好友列表中删除该用户吗?")) return true;
        return false;
}
function delThisMember(){
        if (confirm("您确定要取消该用户的权限吗?")) return true;
        return false;
}
function delTopics(){
        if (confirm("您确定要删除这些主题吗?该操作无法撤销！")) return true;
        return false;
}
function MM_reloadPage(init) {
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() {
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=="show")?"visible":(v=="hide")?"hidden":v; }
    obj.visibility=v;
        if(obj.visibility=="visible"){
                if ((obj2=MM_findObj("ad1"))!=null){
                if(obj2.style) obj2.style.visibility="hidden";
                }
                if ((obj3=MM_findObj("modSelectList"))!=null){
                if(obj3.style) obj3.style.visibility="hidden";
                }
                if ((obj4=MM_findObj("jumpSelectList"))!=null){
                if(obj4.style) obj4.style.visibility="hidden";
                }
        }
        else{
                if ((obj2=MM_findObj("ad1"))!=null){
                if(obj2.style) obj2.style.visibility="visible";
                }
                if ((obj3=MM_findObj("modSelectList"))!=null){
                if(obj3.style) obj3.style.visibility="visible";
                }
                if ((obj4=MM_findObj("jumpSelectList"))!=null){
                if(obj4.style) obj4.style.visibility="visible";
                }
        }
        }
}
function ctlent() {
if(document.form1.Submit.disabled!=true){
if((event.ctrlKey && window.event.keyCode == 13) || (event.altKey && window.event.keyCode == 83)) {
checkForm(document.form1);
}
}
}
function onWheel(e, o)
{
        var zoom = parseInt(o.style.zoom, 10) || 100;
        zoom += event.wheelDelta / 10;
        if (zoom > 0) o.style.zoom = zoom + '%';
        return false;
}
function checkall(form) {
        for(var i=0;i<form.elements.length; i++){
        var e = form.elements[i];
                if (e.name != 'chkall' && e.disabled != true){
                e.checked = form.chkall.checked;
                }
        }
}

function changeLineHeight(aa,bb){
var oDiv=document.all(aa);
with (document.all(bb)) var sValue=options[selectedIndex].value;
oDiv.style.lineHeight=sValue;
}

function changeFontSize(aa,bb){
var oDiv=document.all(aa);
with (document.all(bb)) var sValue=options[selectedIndex].value;
oDiv.style.fontSize=sValue;
}

function opens(url){
w = screen.width-80;
h = screen.height-50;
window.open(url,"newwindow","height="+h+",width="+w+",top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=yes,location=no, status=no");
}
function hideOb(ob){
  var obj=MM_findObj(ob);
  obj.style.display='none';
}
function showOb(ob){
  var obj=MM_findObj(ob);
  obj.style.display='';
}
function checklength(obj) {
alert("\n当前长度："+obj.value.length+" 字节\n\n");
}
function hideBox(f){
        if ((obj=MM_findObj(f))!=null){
        if(obj.style) obj.style.visibility="hidden";
        }
}
function showBox(f){
        if ((obj=MM_findObj(f))!=null){
        if(obj.style) obj.style.visibility="visible";
        }
}
function checkBoxCheck(t){
        if(t.checked==true) {
        t.checked=false;
        }
        else {
        t.checked=true;
        }
}
function checkForm(theform) {
        if(theform.Submit.disabled!=true){
                if (theform.topic!=null)
                {
                var len=theform.topic.value.length;

                if (len<2){
                alert("请填写标题，长度为2个字节以上");
                theform.topic.focus();
                return false;
                }
                if (len>60){
                alert("标题长度为60个字节以下");
                theform.topic.focus();
                return false;
                }

                }
                if (theform.sortId!=null)
                {
                if (theform.sortId.value=="no"){
                alert("请选择分类");
                theform.sortId.focus();
                return false;
                }
                }
                if (theform.content.value==""){
                alert("您没有写帖子内容！");
                theform.content.focus();
                return false;
                }

                                obj = theform.__verify_code;
                                if (typeof(obj)!="undefined"){
                                        if (theform.__verify_code.value==""){
                                                alert ("您没有填写验证码！");
                                                theform.__verify_code.focus();
                                                return false;
                                        }
                                }

        theform.submit();
        theform.Submit.disabled=true;
        return false;
        }
        return false;
}
function smilie(thesmilie) {
        document.form1.content.value += thesmilie+" ";
        document.form1.content.focus();
}


function gototopic(a,p){
window.location=a+"&page="+p;
}

function mutipage(a,page,totalPage){
pages="<table width=10 border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\"><tr><td nowrap>共 "+totalPage+" 页";

m=page-1;if(m<1) m=1;if(m>totalPage) m=totalPage;
n=page+1;if(n<1) n=1;if(n>totalPage) n=totalPage;
if(page>4){
        pages=pages+" <a href="+a+"&page=1 class=black>&laquo;首页</a>&nbsp;";
}

if(page>1){
pages=pages+"&nbsp;<a href="+a+"&page="+m+" alt=\"上页\"><</a>";
}

for(i=page-3;i<=page+5;i++)
        {
        if(i>0 && i<=totalPage){
        if(i==page){
        c1="<b>";
        c2="</b>";
        }
        else {
        c1="";
        c2="";
        }
        pages=pages+"&nbsp;<a href="+a+"&page="+i+">"+c1+i+c2+"</a>";
        }
        }

if(page<totalPage){
pages=pages+"&nbsp;<a href="+a+"&page="+n+" alt=\"下页\">></a>";
}


if(page<totalPage-5){
        pages=pages+"&nbsp;<a href="+a+"&page="+totalPage+" class=black>尾页&raquo;</a> ";
}
pages=pages+" &nbsp;第<INPUT TYPE=\"text\" VALUE=\""+page+"\" SIZE=3 onfocus=\"this.select()\" class='pageForm' onKeyUp=\"pppp.value=this.value;\">页 <INPUT TYPE=\"button\" value=\"GO\" title=\"跳转到指定页\"  class='pageForm' onClick=\"gototopic('"+a+"',pppp.value);\"></td></tr></table>";
return pages;
}

function getCookie(Name) {
   var arr, reg = new RegExp("(^| )"+Name+"=([^;]*)(;|$)");
   if(arr=document.cookie.match(reg)) return unescape(arr[2]);
   else return null;
  }

  function setCookie(name,value) {
   var exp = new Date();
   exp.setTime(exp.getTime() + 86400000);
   document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
  }
  function delCookie(name) {
   var exp = new Date();
   exp.setTime(exp.getTime() - 1);
   var cval=getCookie(name);
   if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
  }

  var omv=0;
  var locked=0;
  var swf='';

   function showimages(keyword,evt) {
        if(!document.all){
                var x=evt.pageX;
                var y=evt.pageY;
        }else{
                var x = evt.x;
            var y = evt.clientY+document.body.scrollTop;
        }
        var max_x = document.body.clientWidth-340;
        if(x>max_x){x=x-340;}
        var player = document.getElementById("videoDiv");
        eval("player.style.posTop = y");
        eval("player.style.posLeft = x");
    player.style.left = x;
    player.style.top = y;
        player.style.display="block";
        var block = document.getElementById("Preview");
        block.style.display="block";
        block.src="http://video.liba.com/list.php?v="+keyword;
        omv=1;
        return;
        }

        function closeflashs() {
           omv=0;
           setTimeout("kill()",1000)
        }

        function onitem(){
       omv=1;
        }

        function kill(){
                if(locked==0){
                        if(omv==0){
                                var block = document.getElementById("Preview");
                                var player = document.getElementById("videoDiv");
                                player.style.display="none";
                                block.style.display="none";
                        }
                }
        }

        function close(){
                        var block = document.getElementById("Preview");
                        var player = document.getElementById("videoDiv");
                        player.style.display="none";
                        block.style.display="none";
                        locked=0;
        }
document.write("<DIV id=videoDiv onmouseover=onitem() onmouseout=closeflashs()><DIV class=pageContent><DIV class=box_header><div id='video_header'><A title=篱笆学堂 href='http://video.liba.com/'>篱笆学堂</A> - 两分钟解决一个问题</div><DIV class=closeBox><A title=关闭 href='javascript:close()'><SPAN>关闭播放窗口</SPAN></A></DIV></DIV><DIV id=playWindows><IFRAME id=Preview name=Preview marginWidth=0 marginHeight=0 src='about:blank' frameBorder=0 width=230 scrolling=no height=212></IFRAME></DIV></DIV></DIV>");


function $(d){return document.getElementById(d);}
function show(a){
if($(a)!=null) {
	$(a).style.display='block';
}
}
function hide(a){
if($(a)!=null) {
	$(a).style.display='none';
}
}
function showhide(a){
if($(a)!=null) {
	if ($(a).style.display=='none')
	{
		$(a).style.display='block';
	}else{
		$(a).style.display='none';
	}
}
}

