var context = {
	obj : false,
	Thistory : function (m){
			try{
				var matrix = TimeShow.movements[m.oid-1].steps;
				for (var i=0;i<matrix.length;i++){
					var txt="Future ["+(i+1)+"]:\r\n";
					if (matrix[i].dx && matrix[i].dy){
						txt+="Coords: "+matrix[i].dx+","+matrix[i].dy+"\r\n";
					}
					if (matrix[i].dh && matrix[i].dw){
						txt+="Size: "+matrix[i].dh+" x "+matrix[i].dh+"\r\n";
					}
					txt+="Frames: "+matrix[i].frames+"\r\n";
					if(!confirm(txt)){
						//matrix[i].frames=-2;
					}
				}
			}catch(e){alert("No History");}
	},
	exit : function(){
		document.getElementById("menu").getElementsByTagName("table")[0].style.visibility="hidden";
		document.getElementById("menu").style.cursor="";
		this.obj=false;
	},
	option : function(act){
		var m = this.obj;
		if (act==window.event && act.srcElement != m){
			context.exit();
			return;
		}
		document.getElementById("menu").getElementsByTagName("table")[0].style.visibility="hidden";
		document.getElementById("menu").style.cursor="";
		switch (act){
			case "move":
				// Move!!
				try{PEditor.startdrag(m);}catch(e){errors.record(e,"context.option->PEditor.startdrag");}
			break;
			case "tween":
				// Tween!!
				try{MoveEditor.smoves(m);}catch(e){errors.record(e,"context.option->MoveEditor.smoves");}
			break;
			case "resize":
				// Size!!
				try{SEditor.start(m);}catch(e){errors.record(e,"context.option->SEditor.start");}
			break;
			case "story":
				// Tween History
				try{this.Thistory(m)}catch(e){errors.record(e,"context.option->Thistory");}
			break;
			case "fact":
				try{parent.PreAnim.init(m);}catch(e){errors.record(e,"context.option->Preanimations");}
			break;
		}
		this.obj=false;
	},
	click : function (m){
		this.obj = m;
		document.getElementById("menu").getElementsByTagName("table")[0].style.visibility="visible";
		document.getElementById("menu").style.visibility="visible";
		document.getElementById("menu").style.cursor="hand";
		document.getElementById("menu").style.zIndex=1e+11;
		document.getElementById("menu").style.top=window.event.clientY;
		document.getElementById("menu").style.left=window.event.clientX;
		eventh.handle(document,"click",context.option);
		return false;
	}
}
//document.body.oncontextmenu= new Function("context.option;return false;");