<!--
function LTrim(string) 
{
  for (i=0; i<string.length; i++) {
    if (string.charAt(i) != " ") {
       string = string.substring(i,string.length)
       return(string);
    }
  }
  return("");
}

function RTrim(string) 
{
  for (i=string.length; i>0; i--) {
    if (string.charAt(i-1) != " ") {
       string = string.substring(0,i)
       return(string);
    }
  }
  return("");
}

function Trim(string) {
	S1 = LTrim(string);
	S2 = RTrim(S1);
    return(S2);
}
function CheckSearch(thefrm)
{
	t=true;
	if(thefrm.SearchColumn.value=="")
	{
		alert("请您选择栏目！");
		thefrm.SearchColumn.focus();
		t=false;
	}
	if(t)
	{
		thefrm.submit();
	}
}
function IsVote()
{
	var l=document.forms.frmVote.elements.length;
	var selflag=0;
	for(i=0;i<l;i++)
	{
		if(document.forms.frmVote.elements[i].checked)
		{
			selflag=selflag+1;
			break;	
		}	
	} 
	if(selflag==0)
	{
		alert("您的选择是.....");
		return false;
	}else
	{
		//document.forms.frmVote.submit();
		}
	
}
function OpenVote(voteid)
{
	//window.open('VoteResult.asp?voteid='+voteid,'vote','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=630,height=380,top=50,left=50');
	href="VoteResult.asp?voteid="+voteid;
	var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=470,height=500,top=10,left=6");
	newwin.focus();
	return;
}

function IsVoteHome()
{
	var l=document.forms.frmVote.elements.length;
	var selflag=0;
	for(i=0;i<l;i++)
	{
		if(document.forms.frmVote.elements[i].checked)
		{
			selflag=selflag+1;
			break;	
		}	
	} 
	if(selflag==0)
	{
		alert("您的选择是.....");
		return false;
	}
	else
		{
			//strHref=thefrm.action;
			strHref="";
			//h=350;
			//w=442;
			//window.open(strHref,"Vote","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=442,height=350,top=0,left=0");
			window.open(strHref,"Vote","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=470,height=400,top=10,left=6");
			document.forms.frmVote.target="Vote";
			//document.forms.frmVote.submit();
			}
}

function OpenNewWin(href)
{
	//window.open('VoteResult.asp?voteid='+voteid,'vote','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=630,height=380,top=50,left=50');
	//href="VoteResult.asp?voteid="+voteid;
	var newwin1=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=650,height=400,top=50");
	newwin1.focus();
	return;
}

function TestCharCount()
{
	var l;
	l=document.all.GuestWord.value.length;
	document.all.countcharacters.value=l;
}
function IsSendTo(thefrm)
{
	t=true;
	if(Trim(thefrm.UserName.value)=="")
	{
		alert("请输入您的姓名！");
		thefrm.UserName.focus();
		return false;
	}
	if(Trim(thefrm.UserEmail.value)=="")
	{
		alert("对不起，您的Email不能为空！");
		thefrm.UserEmail.focus();
		return false;
	}
	else
	{
		p=thefrm.UserEmail.value.indexOf('@');
		p1=thefrm.UserEmail.value.indexOf('.');
        	if (p<1 || p==(thefrm.UserEmail.value.length-1)||p1<1 || p1==(thefrm.UserEmail.value.length-1))
        	{
        		alert("您的Email输入不正确，请您正确输入！");
        		thefrm.UserEmail.focus();
			return false;
        		}
	}
	if(Trim(thefrm.InfoBackCont.value)=="")
	{
		alert("请输入您的反馈意见！");
		thefrm.InfoBackCont.focus();
		return false;
	}
	
}

function TelCheck(str){ 
	nr1=str; 
	errors="";	
	for (var i=0;i<nr1.length;i++){ 
			cmp="0123456789"; 
			tst=nr1.substring(i,i+1) 
			if (cmp.indexOf(tst)<0){ 
				errors="不正确，必须是数字！\n";
			} 
			 
			
		} 
	
	return errors;
} 


function IsAddReg(NewsId)
{
	href="AddTab.asp?NewsId="+NewsId;
	var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=670,height=500,top=4,left=6");
	newwin.focus();
	return;
}

function IsAddMember()
{
	href="AddMember.asp";
	var newwin=window.open(href,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=670,height=500,top=4,left=6");
	newwin.focus();
	return;
}


function CheckModZXZX(thefrm)
{
	if(Trim(thefrm.title.value)=="")
	{
		alert("请输入“主题”...！");
		thefrm.title.focus();
		return false;
	}
	if(Trim(thefrm.content.value)=="")
	{
		alert("请输入“内容”...！");
		thefrm.content.focus();
		return false;
	}
	if(Trim(thefrm.tel.value)=="")
	{
		alert("请输入“电话”...！");
		thefrm.tel.focus();
		return false;
	}
	if(Trim(thefrm.email.value)=="")
	{
		alert("请输入“邮箱”...！");
		thefrm.email.focus();
		return false;
	}
	if(Trim(thefrm.name.value)=="")
	{
		alert("请输入“姓名”...！");
		thefrm.name.focus();
		return false;
	}
}
function CheckKeyword(thefrm)
{
	if(Trim(thefrm.keyword.value)=="")
	{
		alert("请输入“关键字”...！");
		thefrm.keyword.focus();
		return false;
	}
	if(thefrm.keyword.value.indexOf("<")!=-1||thefrm.keyword.value.indexOf("&")!=-1)
	{
		alert("输入含有非法字符");
		thefrm.keyword.focus();
		return false;
	}
}



function IsLog(thefrm)
{
	if(Trim(thefrm.UserId.value)=="")
	{
		alert("请输入帐号！");
		thefrm.UserId.focus();
		return false;
	}
	if(Trim(thefrm.UserPwd.value)=="")
	{
		alert("请输入密码！");
		thefrm.UserPwd.focus();
		return false;
	}
	
}
function CheckMember(thefrm)
{
	if(Trim(thefrm.name.value)=="")
	{
		alert("请您输入姓名！");
		thefrm.name.focus();
		return false;
	}
	if(Trim(thefrm.content.value)=="")
	{
		alert("请您输入内容！");
		thefrm.content.focus();
		return false;
	}
	if(Trim(thefrm.phone.value)=="")
	{
		alert("请您输入电话！");
		thefrm.phone.focus();
		return false;
	}
	if(Trim(thefrm.email.value)=="")
	{
		alert("请您输入电子邮件！");
		thefrm.email.focus();
		return false;
	}
	else
	{
		  val=thefrm.email.value;
		  p=val.indexOf('@');
       		  if (p<1 || p==(val.length-1)) 
       		  { 
       		  	alert("输入的电子邮件格式不正确！");
			thefrm.email.focus();
			return false;
       		  }
		}

	
	
}
-->