//翻页的跳转
function GoToTheUrl(TheSelect)
{
	window.open(TheSelect.value,"_self");
}
//显示动画
function ShowFlash(flashWIDTH,flashHEIGHT,flashURL)
{
document.writeln ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+'>'); 
document.writeln ('<PARAM NAME=movie VALUE="'+flashURL+'">'); 
document.writeln ('<PARAM NAME=wmode VALUE=transparent>'); 
document.writeln ('<PARAM NAME=loop VALUE=true>'); 
document.writeln ('<PARAM NAME=quality VALUE=high>'); 
document.writeln ('<EMBED src="'+flashURL+'" loop=true wmode=transparent quality=high swLiveConnect=FALSE WIDTH='+flashWIDTH+' HEIGHT='+flashHEIGHT+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>'); 
document.writeln ('</OBJECT>'); 
}
//向左滚动
function ScrollImgLeft()
{
	var speed=20
	var scroll_begin = document.getElementById("scroll_begin");
	var scroll_end = document.getElementById("scroll_end");
	var scroll_div = document.getElementById("scroll_div");
	scroll_end.innerHTML=scroll_begin.innerHTML
	function Marquee(){
	if(scroll_end.offsetWidth-scroll_div.scrollLeft<=0)
	scroll_div.scrollLeft-=scroll_begin.offsetWidth
	else
	scroll_div.scrollLeft++
	}
	var MyMar=setInterval(Marquee,speed)
	scroll_div.onmouseover=function() {clearInterval(MyMar)}
	scroll_div.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
}

//限制内容图片大小
function resize(o) {
	if (o.width>700) {
	o.style.width='700px';
	o.style.height='auto';
	}
}

//搜索
function SearchBtn()
{
	var SearchTxt=document.getElementById("SearchTxt").value;
	if(SearchTxt=="" || SearchTxt=="输入关键字" || SearchTxt==null)
	{
		alert("请输入搜索内容");
	}
	else
	{
		window.location.href="News_List.asp?tag=NewsSearch&thetxt="+SearchTxt;
	}
}
function CkGuestBookAdd(TheForm)
{
	if(TheForm.subject.value=="")
	{
		alert("主题不能为空");
		TheForm.subject.focus();
		return false;
	}
	if(TheForm.nickname.value=="")
	{
		alert("姓名不能为空");
		TheForm.nickname.focus();
		return false;
	}
	if(TheForm.Content.value=="")
	{
		alert("内容不能为空");
		TheForm.Content.focus();
		return false;
	}
}
