// JavaScript Document
var Element={
	getTop:function (obj){
		this.top=0;
		while(!obj.tagName.equals("body")){
			this.top+=obj.offsetTop;
			obj=obj.offsetParent;
		}
		return this.top; 
	},
	
	getLeft:function (obj){
		this.left=0;
		while(!obj.tagName.equals("body")){
			this.left+=obj.offsetLeft;
			obj=obj.offsetParent;
		}
		return this.left; 
	},
	
	getRight:function (obj){
		this.right=0;
		this.right=this.getLeft(obj)+this.getWidth(obj);
		return this.right;
	},
	
	getBottom:function (obj){
		this.bottom=0;
		this.bottom=this.getTop(obj)+this.getWidth(obj);
		return this.bottom;
	},
	
	getWidth:function (obj){
		if(obj.style.pixelWidth>0){
			return obj.style.pixelWidth;
		}
		if(obj.width!=null && parseInt(obj.width)>0){
			return parseInt(obj.width);
		}
		if(obj.offsetWidth!=null && obj.offsetWidth>0){
			return obj.offsetWidth;
		}
		return 0;
	},
	
	getHeight:function(obj){
		this.height=0;
		if(obj.style.pixelHeight > 0){
			return obj.style.pixelHeight;
		}
		if(obj.height!=null && parseInt(obj.height)>0){
			return parseInt(obj.height);
		}
		if(obj.offsetHeight!=null && obj.offsetHeight>0){
			return obj.offsetHeight;
		}
		return 0;
	},
	oldobj:null,
	top:0,
	left:0,
	bottom:0,
	right:0
};

String.prototype.equals=function(str){
	return (this.toLowerCase()==str.toLowerCase());
}

Array.prototype.indexOf=function(o){
	for(var i=0,len=this.length;i<len;i++){
		a=this[i];
		if(a == o){
			return i;
		}
	}
	return -1;
}

var oldobj=null;
var oldList=[];
var timer=null;
function none(){
	oldobj.style.display='none';
	oldobj=null;
}
function over(obj){
	if(oldobj!=null){
		clearTimeout(timer);
		oldobj.style.display='none';
	}
	var el=window.event.srcElement;
	if(oldList.indexOf(el)==-1){
		oldList.push(el);
		el.onmouseout=function(){
			timer=setTimeout(none,300);
		};
		obj.onmouseover=function(){
			clearTimeout(timer);
		};
		obj.onmouseout=function(){
			timer=setTimeout(none,150);
		};
	}
	
	oldobj=obj;
	obj.style.display="block";
	obj.style.pixelTop=Element.getBottom(event.srcElement)-5;
	obj.style.pixelLeft=Element.getLeft(event.srcElement);
}



function objnone(){
	if(oldobj!=null){
		if(getTable(event.srcElement).id!=oldobj.id){
			oldobj.style.display='none';
		}
	}
}

function getTable(obj){
	if(!obj.nodeName.equals("table"))
	{
		obj=obj.offsetParent;
	}
	return obj;
}
var oldmenu=null;
function luan(obj){
	if(oldmenu!=null){
		oldmenu.style.display="none";
	}
oldmenu=obj;
	obj.style.display="block";
}
