function FormCheck(){
	if(document.form.key.value == ''){
		alert('请输入关键字');
		document.form.key.focus();
		return false;
	}
	return true;
}

function doZoom(size){
document.getElementById('zoom').style.fontSize=size+'px'
//setTailPosition()
}

function 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);
}
return x;
}

function copycode(obj) {
var rng = document.body.createTextRange();
rng.moveToElementText(obj);
rng.scrollIntoView();
rng.select();
rng.execCommand("Copy");
rng.collapse(false);
}

function Form1Check(){
	if(document.form1.email.value == ''){
		alert('请输入邮箱');
		document.form1.email.focus();
		return false;
	}
	var re=/^[0-9a-z]+@([0-9a-z]+\.)+[a-z]+$/i;
 	if(!re.test(document.form1.email.value)){
		alert(document.form1.email.value+" 无效email地址");
  		document.form1.email.value="";
		document.form1.email.focus();
		return false;
 	}
	if(document.form1.comment.value == ''){
		alert('请输入评论');
		document.form1.comment.focus();
		return false;
	}
	return true;
}

function addfav(){}
function addfav_bak(){
	document.write("<h3 class='addfav'>收 藏 到  ")	
	document.write("<a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(vivi=window.open('http://vivi.sina.com.cn/collect/icollect.php?pid=28&title='+escape(d.title)+'&url='+escape(d.location.href)+'&desc='+escape(t),'vivi','scrollbars=no,width=480,height=480,left=75,top=20,status=no,resizable=yes'));vivi.focus();\">新浪VIVI</a>　")
 	document.write("<a href=\"javascript:t=document.title;u=location.href;e=document.selection?(document.selection.type!='None'?document.selection.createRange().text:''):(document.getSelection?document.getSelection():'');void(open('http://bookmark.hexun.com/post.aspx?title='+escape(t)+'&url='+escape(u)+'&excerpt='+escape(e),'HexunBookmark','scrollbars=no,width=600,height=450,left=80,top=80,status=no,resizable=yes'));\" class=\"red\">和讯</a>　")
 	document.write("<a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(yesky=window.open('http://hot.yesky.com/dp.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&st=2','yesky','scrollbars=no,width=600,height=480,left=75,top=20,status=no,resizable=yes'));yesky.focus();\" title=\"sky http://hot.yesky.com\"  class=\"red\">天极网摘</a>　")
	document.write("<a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://my.poco.cn/fav/storeIt.php?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t)+'&img=http://www.yulexp.com/images/logo.gif','keyit','scrollbars=no,width=475,height=575,status=no,resizable=yes'));keyit.focus();\">Poco</a>　")
 	document.write("<a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.365key.com/storeit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();\"><font //color=darkorchid>365K<font color=#57c200>e</font>y</font></a>　")																																																																																								
	document.write("<a href=\"javascript:d=document;t=d.selection?(d.selection.type!='None'?d.selection.createRange().text:''):(d.getSelection?d.getSelection():'');void(keyit=window.open('http://www.younote.com/Noteit.aspx?t='+escape(d.title)+'&u='+escape(d.location.href)+'&c='+escape(t),'keyit','scrollbars=no,width=475,height=575,left=75,top=20,status=no,resizable=yes'));keyit.focus();\">YouNote</a></h3>　")
}
