String.prototype.trim = function(){
			return this.replace(/(^\s*)|(\s*$)/g, ""); 
		}
		function isMail(mail)  { 
   		 return(new RegExp(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/).test(mail)); 
		}
		function addEmail(){
		var emailContent = document.getElementById('emailContent').value;
		if(emailContent.trim().length==0||!isMail(emailContent)){
			alert('邮箱格式不正确');
			return false;
		}
		location.href="http://reg.ciotimes.com/servlet/Email?email="+emailContent;}
		function searchcontent(){
			if(document.getElementById('content').value.trim().length==0){
				alert('至少输入一个字符');
				return ;
			}
			location = "search.html?query="+encodeURIComponent(document.getElementById('content').value);
		}
		function sstr(str){
			location = "search.html?query="+encodeURIComponent(str);
		}