﻿function copyToClipBoard(){
	var clipBoardContent=document.location; 
	clipBoardContent+='\n向你推荐一篇文章，希望你也会喜欢哦!';
	window.clipboardData.setData("Text",clipBoardContent);
	alert("复制成功！你可以粘贴在QQ消息里送给你的朋友！");
}

function CheckPl(obj)
{
	if(obj.saytext.value=="")
	{
		alert("错误，评论不能为空");
		obj.saytext.focus();
		return false;
	}
	return true;
}

function zoomimg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}

function autosimg(o){
	if(o.width>screen.width*0.5)
	{
		o.width=screen.width*0.5;
	}
}

function checksearchform()
{
	if(document.getElementById('tbname').value=='zy')
	{
		document.getElementById('searchform1').setAttribute('method', 'get');
		document.getElementById('searchform1').setAttribute('action', '/sou/search.php');
		document.getElementById('keyboard').setAttribute('name', 'key');
	}
	else
	{
		document.getElementById('searchform1').setAttribute('method', 'post');
		document.getElementById('searchform1').setAttribute('action', '/e/search/index.php');
		document.getElementById('keyboard').setAttribute('name', 'keyboard');
	}
	document.getElementById('searchform1').submit();
}

function Checkkey()
{
	if(document.search.key.value=="")
	{
		alert("山寨搜索也是需要输入关键字滴");
		document.search.key.focus();
		return false;
	}
return true;
}

function tabit2(tabName,btnId,tabNumber)
{
	for(i=0;i<tabNumber;i++)
	{
	document.getElementById(tabName+"_div"+i).style.display = "none";

	}
	document.getElementById(tabName+"_div"+btnId).style.display = "block";
}