function showweek() 
　　{now = new Date() ; 
　　if (now.getDay() == 0) return ("星期日"); 
　　if (now.getDay() == 1) return ("星期一") ;
　　if (now.getDay() == 2) return ("星期二") ;
　　if (now.getDay() == 3) return ("星期三") ;
　　if (now.getDay() == 4) return ("星期四") ;
　　if (now.getDay() == 5) return ("星期五") ;
　　if (now.getDay() == 6) return ("星期六") ;
　　} 
　　function showdate() 
　　{ 
　　var now = new Date() ;
　　var year = now.getYear() ;
　　var month = now.getMonth()+1 ;
　　var day = now.getDate() ;
　　return year+"年"+month+"月"+day+"日" ;
　　} 

function killErrors() {  
	return true;  
	}  
	window.onerror = killErrors;  


function checksearch(theForm){
		if(theForm.query.value==""){
	  		alert("请填写搜索关键字");
	  		document.getElementById("query").focus()
	  		return false;
	  	}
		fromName.submit();
	}
function h(obj,url){obj.style.behavior='url(#default#homepage)';obj.setHomePage(url)}
function bookmarkit(url,obj){window.external.addFavorite(url,obj)}

function alertSize() {
	var myHeight = 0;
	if( typeof( window.innerHeight ) == 'number' ) {
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientHeight ) ) {
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientHeight ) ) {
		myHeight = document.body.clientHeight;
	}
	
	document.getElementById("mainframe").style.height=parseInt(myHeight-28)+"px";
	document.getElementById("tabcontentcontainer").style.height=parseInt(myHeight-50)+"px";
}

function pick(link) {
var searchterm = document.forms.searchFrm.query.value; 
if (searchterm==""){searchterm='最新'}
	mainframe.location.href = link + searchterm ;
}	
function pickgo() {
var searchterm = document.forms.searchFrm.query.value;
var golink = 'search.do?label=ok&query=';
mainframe.location.href = golink + searchterm;
}
function jump(link) {
	mainframe.location.href = link ;
	}
	
function ow(ev,obj) 
{
	var ev=window.event||ev;
	ev.returnValue=false;
	return wo(obj.href,520,470,1,1);
}

function wo(url,w,h,m,s){
	var winname = "51za";
	var x = window.open(url, winname, 'width=' + w + ', height=' + h + ',top=0,left=0,scrollbars=0,resizable=1,status=' + s);
	x && x.focus();
	return false;
}
function imeWin(file,w,h,r,s){
    window.open(file,'playwin','resizable='+r+',width='+w+",height="+h+',scrollbars='+s+',left='+(screen.availWidth-w)/2+',top='+(screen.availHeight-h)/2);
}
function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
   if (win.contentDocument && win.contentDocument.body.offsetHeight) 
     win.height = win.contentDocument.body.offsetHeight; 
   else if(win.Document && win.Document.body.scrollHeight)
     win.height = win.Document.body.scrollHeight;
}
}
}

function $(element){
return element = document.getElementById(element);
}
function $D(){
var d=$('class1content');
var w=d.offsetHeight;
var maxw=250;
function dmove(){
w+=5; //设置层展开的速度
if(w>=maxw){
d.style.height='250px';
clearInterval(iIntervalId);
}else{
d.style.display='block';
d.style.height=w+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function $D2(){
var d=$('class1content');
var w=d.offsetHeight;
var maxw=250;
function dmove(){
w-=5;//设置层收缩的速度
if(w<=0){
d.style.display='none';
clearInterval(iIntervalId);
}else{
//d.style.width=w+'px';
d.style.height=w+'px';
}
}
iIntervalId=setInterval(dmove,2);
}
function $use(){
var d=$('class1content');
var sb=$('stateBut');
if(d.style.display=='none'){
$D();
sb.innerHTML='影片详细信息↑';
}else{
$D2();
sb.innerHTML='影片详细信息↓';
}
}