////////////////////////////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)
}
function writeday()
{    
    document.write(clientyear+"年"+clientmonth+"月"+clientday+"日")
}
////////////////////////////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();
	}
	if(temp==3)
	{
		document.form_expert.username.value=document.form_select.username.value;
		document.form_expert.password.value=document.form_select.password.value;
		document.form_expert.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();
	}
}

function judge()
{
	var count=0;
	for (i=0;i<document.form_research.elements.length;i++)
	{
		var e=document.form_research.elements[i].checked;	
		if (e) count++;
	}
	if (count==0)
	{
		alert("您还没选择答案呢!");
		return false;
	}
	else 	
	{
		return true;		
	}
}

function judge2()
{
	var count=0;
	for (i=0;i<document.form_research.elements.length;i++)
	{
		var e=document.form_research.elements[i].checked;	
		if (e) count++;
	}
	if (count==0)
	{
		alert("您还没选择答案呢!");
	}
	else 	
	{
		document.form_research.submit();
	}
}
////////////////////////////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://pccms.pku.edu.cn:8000/cgi-bin/allsearch?word="+document.form_search.keywords.value;
		window.open(URL,'nw')
	}
	if(temp==3)
	{
		URL="http://openfind.yahoo.com/bin/query_gb?p="+document.form_search.keywords.value;
		window.open(URL,'nw')
	}

}
////////////////////////////FormSearch End//////////////////////////////////

////////////////////////////Fadeover Start//////////////////////////////////
var IE4 = (document.all) ? true : false;
var step=5;

function alpha_change(temp)
{
	if (IE4)
	{
		if (!temp)
		{
		 	fadein_timer=setInterval("alpha_opacity(0)",10);
		}
		else
		{
		 	fadeout_timer=setInterval("alpha_opacity(1)",10);
		}
	}
}

function alpha_opacity(temp)
{
	if (!temp)
	{
		alpha_img.filters.alpha.opacity+=step;
		if (alpha_img.filters.alpha.opacity==100) clearInterval(fadein_timer);	
	}
	else
	{
		alpha_img.filters.alpha.opacity-=step;
		if (alpha_img.filters.alpha.opacity==70) clearInterval(fadeout_timer);	
	}
}

function addbookmark()
{
window.external.AddFavorite("http://www.jsipt.edu.cn","教务信息网--为您提供全方位的信息服务!");
}

function Popwin(us)
{
	window.open('login.asp?us='+us,'demo','width=300,height=200,menubar=0,toolbar=0,locationbar=0,status=0,scrollbar=0,resizable=0,left=200,top=100')
}

////////////////////////////Fadeover End//////////////////////////////////