function login_check() {
if ( document.login_form.username.value == '' ) {
window.alert('请输入用户名^_^');
document.login_form.username.focus();
return false;}

if ( document.login_form.password.value == '' ) {
window.alert('请输入密码^_^');
document.login_form.password.focus();
return false;}

if ( document.login_form.input_code.value == '' ) {
window.alert('请输入验证码^_^');
document.login_form.input_code.focus();
return false;}

return true;}


function login_check2() {
if ( document.login_form2.username.value == '' ) {
window.alert('请输入用户名^_^');
document.login_form2.username.focus();
return false;}

if ( document.login_form2.password.value == '' ) {
window.alert('请输入密码^_^');
document.login_form2.password.focus();
return false;}

if ( document.login_form2.input_code.value == '' ) {
window.alert('请输入验证码^_^');
document.login_form2.input_code.focus();
return false;}

return true;}


function signup_check() {
if ( document.form_s.username.value == '' ) {
window.alert('请输入用户名^_^');
document.form_s.username.focus();
return false;}

if( document.form_s.username.value.length<4) {
window.alert('请输入有效的账号,只能是大于等于4位数值^_^');
document.form_s.username.focus();
return false;}
if( document.form_s.username.value.length>16) {
window.alert('请输入有效的账号,只能是小于等于16位数值^_^');
document.form_s.username.focus();
return false;}

if ( document.form_s.password.value == '' ) {
window.alert('请输入密码^_^');
document.form_s.password.focus();
return false;}

if( document.form_s.password.value.length<6) {
window.alert('请设置有效的密码,只能是大于等于6位数值^_^');
document.form_s.password.focus();
return false;}
if( document.form_s.password.value.length>16) {
window.alert('请设置有效的密码,只能是小于等于16位数值^_^');
document.form_s.password.focus();
return false;}

if ( document.form_s.password_a.value == '' ) {
window.alert('请再次输入密码^_^');
document.form_s.password_a.focus();
return false;}

if( document.form_s.password_a.value.length<6) {
window.alert('请设置有效的密码,只能是大于等于6位数值^_^');
document.form_s.password_a.focus();
return false;}
if( document.form_s.password_a.value.length>16) {
window.alert('请设置有效的密码,只能是小于等于16位数值^_^');
document.form_s.password_a.focus();
return false;}

if ( document.form_s.email.value == '' ) {
window.alert('请输入电子邮件^_^');
document.form_s.email.focus();
return false;}

if ( document.form_s.email.value.length> 0 &&!document.form_s.email.value.indexOf('@')==-1|document.form_s.email.value.indexOf('.')==-1 ) {
window.alert('请设置正确的Email地址，如:webmaster@xxx.com');
document.form_s.email.focus();
return false;}

if ( document.form_s.input_code.value == '' ) {
window.alert('请输入验证码^_^');
document.form_s.input_code.focus();
return false;}

if( document.form_s.question.value.length> 0 & document.form_s.question.value.length<3 ) {
window.alert('请设置有效的问题,只能是大于等于3位字符^_^');
document.form_s.question.focus();
return false;}


if( document.form_s.answer.value.length> 0 & document.form_s.answer.value.length<3) {
window.alert('请设置有效的答案,只能是大于等于3位字符^_^');
document.form_s.answer.focus();
return false;}



return true;}

function comment_check() {
if ( document.form1.name.value == '' ) {
window.alert('请输入姓名^_^');
document.form1.name.focus();
return false;}


if ( document.form1.email.value.length> 0 &&!document.form1.email.value.indexOf('@')==-1|document.form1.email.value.indexOf('.')==-1 ) {
window.alert('请设置正确的Email地址，如:webmaster@hitux.com');
document.form1.email.focus();
return false;}

if(document.form1.qq.value.search(/^([0-9]*)([.]?)([0-9]*)$/)   ==   -1)   
      {   
  window.alert("QQ只能是数字^_^");   
document.form1.qq.focus();
return false;}

if ( document.form1.content.value == '' ) {
window.alert('请输入内容^_^');
document.form1.content.focus();
return false;}

if ( document.form1.verycode.value == '' ) {
window.alert('请输入验证码^_^');
document.form1.verycode.focus();
return false;}

return true;}

function getpass_check() {

if( document.get_form1.password.value.length<6) {
window.alert('请设置有效的密码,只能是大于等于6位数值^_^');
document.get_form1.password.focus();
return false;}
if( document.get_form1.password.value.length>16) {
window.alert('请设置有效的密码,只能是小于等于16位数值^_^');
document.get_form1.password.focus();
return false;}

if( document.get_form1.passwordagain.value.length<6) {
window.alert('请设置有效的密码,只能是大于等于6位数值^_^');
document.get_form1.passwordagain.focus();
return false;}
if( document.get_form1.passwordagain.value.length>16) {
window.alert('请设置有效的密码,只能是小于等于16位数值^_^');
document.get_form1.passwordagain.focus();
return false;}

return true;}

function profile_check() {
if ( document.form1.email.value == '' ) {
window.alert('请输入电子邮件^_^');
document.form1.email.focus();
return false;}

if ( document.form1.email.value.length> 0 &&!document.form1.email.value.indexOf('@')==-1|document.form1.email.value.indexOf('.')==-1 ) {
window.alert('请设置正确的Email地址，如:webmaster@taihu123.com');
document.form1.email.focus();
return false;}


if( document.form1.question.value.length> 0 & document.form1.question.value.length<3 ) {
window.alert('请设置有效的问题,只能是大于等于3位字符^_^');
document.form1.question.focus();
return false;}


if( document.form1.answer.value.length> 0 & document.form1.answer.value.length<3) {
window.alert('请设置有效的答案,只能是大于等于3位字符^_^');
document.form1.answer.focus();
return false;}

if(document.form1.tel.value.search(/^([0-9]*)([.]?)([0-9]*)$/)   ==   -1)   
      {   
  window.alert("电话只能是数字^_^");   
document.form1.tel.focus();
return false;}

if(document.form1.qq.value.search(/^([0-9]*)([.]?)([0-9]*)$/)   ==   -1)   
      {   
  window.alert("QQ只能是数字^_^");   
document.form1.qq.focus();
return false;}

if ( document.form1.website.value.length> 0 &&!document.form1.website.value.indexOf('http://')==-1|document.form1.website.value.indexOf('.')==-1 ) {
window.alert('请设置正确的网站地址，如:http://www.taihu123.com/');
document.form1.website.focus();
return false;}


return true;}

function password_check() {
if ( document.form1.password.value == '' ) {
window.alert('请输入原有密码^_^');
document.form1.password.focus();
return false;}

if( document.form1.password.value.length<6) {
window.alert('请设置有效的密码,只能是大于等于6位数值^_^');
document.form1.password.focus();
return false;}
if( document.form1.password.value.length>16) {
window.alert('请设置有效的密码,只能是小于等于16位数值^_^');
document.form1.password.focus();
return false;}

if ( document.form1.new_password.value == '' ) {
window.alert('请输入新密码^_^');
document.form1.new_password.focus();
return false;}

if( document.form1.new_password.value.length<6) {
window.alert('请设置有效的密码,只能是大于等于6位数值^_^');
document.form1.new_password.focus();
return false;}
if( document.form1.new_password.value.length>16) {
window.alert('请设置有效的密码,只能是小于等于16位数值^_^');
document.form1.new_password.focus();
return false;}

if ( document.form1.renew_password.value == '' ) {
window.alert('请重复输入新密码^_^');
document.form1.renew_password.focus();
return false;}

if( document.form1.renew_password.value.length<6) {
window.alert('请设置有效的密码,只能是大于等于6位数值^_^');
document.form1.renew_password.focus();
return false;}
if( document.form1.renew_password.value.length>16) {
window.alert('请设置有效的密码,只能是小于等于16位数值^_^');
document.form1.renew_password.focus();
return false;}


return true;}



function comment_check() {
if ( document.form1.name.value == '' ) {
window.alert('请输入姓名^_^');
document.form1.name.focus();
return false;}

if ( document.form1.email.value.length> 0 &&!document.form1.email.value.indexOf('@')==-1|document.form1.email.value.indexOf('.')==-1 ) {
window.alert('请设置正确的Email地址，如:webmaster@liwational.com');
document.form1.email.focus();
return false;}

if(document.form1.qq.value.search(/^([0-9]*)([.]?)([0-9]*)$/)   ==   -1)   
      {   
  window.alert("QQ只能是数字^_^");   
document.form1.qq.focus();
return false;}

if ( document.form1.verycode.value == '' ) {
window.alert('请输入验证码^_^');
document.form1.verycode.focus();
return false;}

return true;}

function doZoom(size){
document.getElementById('AllContent').style.fontSize=size+'px'}


function copyUrl(title){
	var cStr=title;
	cStr= cStr.replace('"','\"');
	cStr+="\n"+window.location.href;  
	window.clipboardData.setData("Text",cStr); 
	alert('复制成功！您可以将本页推荐给你QQ/MSN或者论坛上的朋友阅读！');
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

<!--login div
function showDetail() { 
//背景
  var bgObj=document.getElementById("bgDiv");
  bgObj.style.width = document.body.offsetWidth + "px";
  bgObj.style.height = screen.height + "px"; 

//定义窗口
  var msgObj=document.getElementById("msgDiv");
  msgObj.style.marginTop = -75 +  document.documentElement.scrollTop + "px"; 

//关闭
  document.getElementById("msgShut").onclick = function(){
  bgObj.style.display = msgObj.style.display = "none";
  }
  msgObj.style.display = bgObj.style.display = "block";
}
//-->

function login_no()
{
	document.write("游客,欢迎 [<a href='#' onClick='showDetail()'>登录</a>] 或 [<a href='/SignUp/' target='_blank'>注册</a>]")
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date()
exdate.setDate(exdate.getDate()+expiredays)
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}

function checkCookie()
{
username=getCookie('username')
if (username!=null && username!="")
  {
    login_yes()
  }
else 
  {
     login_no()
  }
}

function login_yes()
{
	document.write(getCookie('username')+"&nbsp;&nbsp;<a href='/MyCenter/' target='_blank'>个人中心</a>&nbsp;<span class='gray'>-</span>&nbsp;&nbsp;<a href='/LogIn/?type=exit' >退出</a>")
}


	
