window.onerror=function(){return true;}
var isIE=(navigator.appName).indexOf("Microsoft")!=-1;if(window.Event&&!isIE){function SearchEvent(){var func=SearchEvent.caller;while(func!=null){var arg=func.arguments[0];if(arg){if(String(arg.constructor).indexOf('Event')>-1){return arg}}func=func.caller}return null};window.constructor.prototype.__defineGetter__("event",function(){return SearchEvent()});Event.prototype.__defineSetter__("returnValue",function(bool){if(!bool){this.preventDefault()}return bool});Event.prototype.__defineSetter__("cancelBubble",function(bool){if(bool){this.stopPropagation()}return bool});Event.prototype.__defineGetter__("clientX",function(){return this.pageX});Event.prototype.__defineGetter__("clientY",function(){return this.pageY});Event.prototype.__defineGetter__("keyCode",function(){return this.which});Event.prototype.__defineGetter__("button",function(){return this.which});Event.prototype.__defineGetter__("srcElement",function(){var n=this.target;while(n.nodeType!=1){n=n.parentNode}return n});Event.prototype.__defineGetter__("offsetX",function(){return this.layerX});Event.prototype.__defineGetter__("offsetY",function(){return this.layerY});Event.prototype.attachEvent=function(type,handler){this.addEventListener(type.substring(2),handler,true)};Event.prototype.detachEvent=function(type,handler){this.removeEventListener(type.substring(2),handler,true)};window.constructor.prototype.attachEvent=function(type,handler){this.addEventListener(type.substring(2),handler,true)};window.constructor.prototype.detachEvent=function(type,handler){this.removeEventListener(type.substring(2),handler,true)};document.constructor.prototype.attachEvent=function(type,handler){this.addEventListener(type.substring(2),handler,true)};document.constructor.prototype.detachEvent=function(type,handler){this.removeEventListener(type.substring(2),handler,true)};Element.prototype.attachEvent=function(type,handler){this.addEventListener(type.substring(2),handler,true)};Element.prototype.detachEvent=function(type,handler){this.removeEventListener(type.substring(2),handler,true)};HTMLElement.prototype.attachEvent=function(type,handler){this.addEventListener(type.substring(2),handler,true)};HTMLElement.prototype.detachEvent=function(type,handler){this.removeEventListener(type.substring(2),handler,true)}}

function $(s){
	return document.getElementById(s);
}

var D=Detail={};
Detail.show=function(focus){
	var html='<span>'+focus+'</span>';
	$('div_tip_detail').innerHTML=html;
	var p=KK.position(event.srcElement);
	var tip=$('movie_info');
	tip.style.display='';
	tip.style.top=p.Top+'px';
	tip.style.left=p.Left+230+'px';
}
Detail.hide=function (){
	$('movie_info').style.display='none';
}
Detail.len=function (str){
	var l=0;
	var sl=str.length
	for(var i=0;i<sl;i++){
		l++;
   		if (str.charCodeAt(i)>256) l++;
	}
	return l;
}
var KK={};
KK.position=function(o){
	var p={Top:0,Left:0};
	while(!!o){
		p.Top+=o.offsetTop;
		p.Left+=o.offsetLeft;
		o=o.offsetParent;
	}
	return p;
}

//KK.scrollCross={interval:0,count:0,duration:0,step:0,srcObj:null,callback:null};
//KK.scrollCross.doit=function(obj,b,c,d){
//	var s=KK.scrollCross;
//	obj.style.marginLeft=cpu(s.count,b,c,d)+'px';
//	s.count++;
//	if(s.count==d){
//		clearInterval(s.interval);
//		s.count=0;
//		obj.style.marginLeft=b+c+'px';
//		s.callback();
//	}
//	function cpu(t,b,c,d) {return c*((t=t/d-1)*t*t+1)+b;};
//}
//KK.scrollCross.scroll=function(obj,step,span,beign,callback,duration){
//	var s=KK.scrollCross;
//	s.duration=duration;
//	s.callback=callback;
//	s.interval=setInterval(function(){s.doit(obj,beign,step*span,duration)},10);
//}