////////////////////////////MouseEvent Start//////////////////////////////////

function click_cc(temp)
{
	object=eval("document.all.a"+temp);
	location.href=object.href
}

function mout_cc(temp)
{
		object=eval("document.all.td"+temp);
		object.style.backgroundColor=mout_bgcolor;
		object=eval("document.all.a"+temp);
		object.style.color=mout_fgcolor;

}

function mover_cc(temp)
{
		object=eval("document.all.td"+temp);
		object.style.backgroundColor=mover_bgcolor;
		object=eval("document.all.a"+temp);
		object.style.color=mover_fgcolor;
}

////////////////////////////MouseEvent End//////////////////////////////////

////////////////////////////Date Start//////////////////////////////////

    clientdate = new Date();
    clientyear = clientdate.getYear();
    if(clientyear < 300)clientyear = 1900 + clientyear ;
    clientmonth = clientdate.getMonth()+1;
    clientday = clientdate.getDate();
    weekday = clientdate.getDay();
    if (weekday==0) 
    {
    	weekday="天"
    }
    if (weekday==1) 
    {
    	weekday="一"
    }
    if (weekday==2) 
    {
    	weekday="二"
    }
    if (weekday==3) 
    {
    	weekday="三"
    }
    if (weekday==4) 
    {
    	weekday="四"
    }
    if (weekday==5) 
    {
    	weekday="五"
    }
    if (weekday==6) 
    {
    	weekday="六"
    }
function writedate()
{    
    document.write(clientyear+"年"+clientmonth+"月"+clientday+"日"+"　星期"+weekday)
}
////////////////////////////Date End//////////////////////////////////

////////////////////////////FormLogin Start//////////////////////////////////
function select_jump()
{
	var temp=document.form_select.sel_tar.options[document.form_select.sel_tar.selectedIndex].value;
	if(temp==1)
	{
		document.form_bbs.username.value=document.form_select.username.value;
		document.form_bbs.password.value=document.form_select.password.value;
		document.form_bbs.submit();
	}
	if(temp==2)
	{
		document.form_irc.nick.value=document.form_select.username.value;
		document.form_irc.password.value=document.form_select.password.value;
		document.form_irc.submit();
	}

}

function CheckLogin()
{
	var str1=document.form_select.username.value
	var str2=document.form_select.password.value
	if(str1=="")
	{
		alert("对不起,请输入用户名!");
		document.form_select.username.focus();
      	}
      	if(str2=="" && str1!="")
	{
		alert("还有口令没有输呢!");
		document.form_select.password.focus();
      	}
	if (str1!=""&&str2!="")
	{
		select_jump();
	}
}
////////////////////////////FormLogin End//////////////////////////////////

////////////////////////////FormSearch Start///////////////////////////////
function CheckSearch()
{
	var str1=document.form_search.keywords.value
	if(str1=="")
	{
		alert("对不起,请输入您要查询的关键字!");
		document.form_search.keywords.focus();
      	}
	else
	{
		select_search();
	}
}

function select_search()
{
	var temp=document.form_search.sel_search.options[document.form_search.sel_search.selectedIndex].value;
	if(temp==2)
	{
		URL="http://e.pku.edu.cn/cgi-bin/allsearch?word="+document.form_search.keywords.value;
		window.open(URL,'nw')
	}
	if(temp==3)
	{
		URL="http://cn.search.yahoo.com/search/cn?p="+document.form_search.keywords.value;
		window.open(URL,'nw')
	}

}
////////////////////////////FormSearch End//////////////////////////////////