function getoffset(me){
	var t=me.offsetTop;  
	var l=me.offsetLeft;  
try{
	while(me.offsetParent) 
	{
		me=me.offsetParent;
		t+=me.offsetTop;  
		l+=me.offsetLeft;  
	}
}
catch (e){
}
	return {x:l,y:t};
}

function focusMBox(fiId){
	var ofMBox=getoffset(document.getElementById(fiId));
	var messagebox=document.getElementById('messagebox');
	messagebox.style.position="absolute";
	messagebox.style.left="300px";
	messagebox.style.top="400px";
	setTimeout("hideMBox()",3000)
	messagebox.onclick="hideMBox";
}

function hideMBox(){
	var messagebox=document.getElementById('messagebox');
	try{
	messagebox.style.filter="BlendTrans(1)";
	messagebox.filters[0].Apply();
	}catch(e){	
	}
	messagebox.style.visibility="hidden";
	try{
		messagebox.filters[0].play();
	}catch(e){
	}

}

var _st = window.setTimeout;
window.setTimeout = function(fRef, mDelay) {
 if(typeof fRef == 'function'){
  var argu = Array.prototype.slice.call(arguments,2);
  var f = (function(){ fRef.apply(null, argu); });
  return _st(f, mDelay);
 }
 return _st(fRef,mDelay);
}

function resizeSmallPic(me){
	if(me.width!=0){
		if(me.width>96||me.height>96){
			var fts=fitsize(me.width,me.height);
			me.width=fts.w;
			me.height=fts.h;
		}
	}else{
			window.setTimeout(resizeSmallPic,50,me);
	}
}
function fitsize(ow,oh){
	var nw=96,nh=96;			    
	if(ow>nw||oh>nh){
		if(ow<oh){
			nw=Math.floor(ow/oh*nh);
		}else{
			nh=Math.floor(oh/ow*nw);
		}
	}else{
		nw=ow;
		nh=oh;
	}
	return {w:nw,h:nh};
}