var ResizeImageWidthMax=450
function resizeImagesByWidth(){
	var imgs=document.images
	for(var i=0;i<imgs.length;i++){
		if(imgs[i].getAttribute("resize",false)!="1"){continue;}
		if(imgs[i].width<=ResizeImageWidthMax){continue;}
		imgs[i].width=ResizeImageWidthMax
		imgs[i].outerHTML = "<a href='"+imgs[i].src+"' target=_blank>" +imgs[i].outerHTML+"</a>"
	}
}
window.onload = resizeImagesByWidth

function check(form)
	{
    if (validate()==false) {
      return false;
    }
    else {
      if (form.isautocopy.checked) { 
        copyText1(form.remenu);
      }
      return true;
    }
  }	
function copyText(obj) {
	ie = (document.all)? true:false
	if (ie){
		var rng = document.remenu.createTextRange();
		rng.moveToElementText(obj);
		rng.scrollIntoView();
		rng.select();
		rng.execCommand("Copy");
		rng.collapse(false);
	}
}

function copyText1(obj) {
	clipboardData.setData('Text',obj.value);
}

function validate() {

	if (document.form1.remenu.value=="") {
		alert("没有填写内容");
		document.form1.remenu.focus();
		//document.all.ewe.focus();
		return false;
	}
	
 }
 
function yinyong(obj) {
	form1.remenu.value="[quote]"+obj+"[/quote]";
	form1.remenu.focus();
}	
function popwin(path)
{ window.open(path,'',"height=150,width=200,resizable=no,scrollbars=no,status=no,toolbar=no,menubar=no,location=no");
}

 function thisurl(str,str1)//本文地址
 {
  		  document.write("<a href=",str1," target=_blank>",str,"</a>");
		  document.write("  <a href='javascript:' onclick='clipboardData.setData(\"Text\",\""+str+"\")' >复制</a>"); 
 }
 function copyright(zhiye,clubuser_name,clubuser_nickname)//版权声明
 {
			if (zhiye=="2")
			{
			str="<font color=#808080 style='FONT-SIZE: 9pt;'>版权声明：本文由"+clubuser_nickname+"转载的他人文章，本网站《服务条款》享有相关权利。";
			}
			else
			{str="<font color=#808080 style='FONT-SIZE: 9pt;'>版权声明：本文为"+clubuser_nickname+"原创发表,本网站《服务条款》享有相关权利。";
			}	
			document.write(str+"&nbsp;"); 
 }