//基本函数
function $(tmp){
	return document.getElementById(tmp);
}
String.prototype.trim = function(){
    return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.ltrim = function(){
    return this.replace(/(^\s*)/g, "");
}
String.prototype.rtrim = function(){
    return this.replace(/(\s*$)/g, "");
}
function isregname(value){
	var reg =/^[a-zA-Z0-9_\u4e00-\u9fa5]+$/ ;
	return reg.test(value);
} 
function calender(){
setInterval("aa.innerHTML=new Date().toLocaleString()+' 星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);
}
function postDigg(dig,articleid){
	document.location.href='includes/service.php?action=postdigg&id='+articleid+'&dig='+dig;
}