function checkRangeMSO(){
 return (((this.x<this.x1)||(this.x>this.x2))||((this.y<this.y1)||(this.y>this.y2)));
}
function checkMSO(){
 if(this.x1==0&&this.x2==0&&this.y1==0&&this.y2==0)return;
 this.x=event.clientX;
 this.y=event.clientY+document.body.scrollTop;
 if(this.checkRange()){
  this.setTimer();
 }else{
  this.clearTimer();
 }
}
function setTimerMSO(){
 if(this.timer==null)this.timer=setTimeout(this.action,this.delay);
}
function clearTimerMSO(){
 clearTimeout(this.timer);
 this.timer=null;
}
function setCheckRangeMSO(x1,y1,x2,y2){
 this.x1=x1;
 this.x2=x2;
 this.y1=y1;
 this.y2=y2;
 this.clearTimer();
}
function setActionMSO(v){
 this.action=v;
}
function resetMSO(){
 this.action='';
 this.clearTimer();
 this.x1=0;
 this.x2=0;
 this.y1=0;
 this.y2=0;
}
function mouseCheckerObj(name){
 this.name=name;
 this.x=0;
 this.y=0;
 this.x1=0;
 this.x2=0;
 this.y1=0;
 this.y2=0;
 this.action='';
 this.timer=null;
 this.delay=50;

 this.checkRange=checkRangeMSO;
 this.check=checkMSO;
 this.setTimer=setTimerMSO;
 this.clearTimer=clearTimerMSO;
 this.setCheckRange=setCheckRangeMSO;
 this.setAction=setActionMSO;
 this.reset=resetMSO;
 return this;
}

//------------------------These just go well here
var mouseMove=new mouseCheckerObj("mouseMove");
var modMenuWidth=68;
var modMenuHeight=23;
var currName='';

function showMob(name){
 if(currName!='')if(currName!=name)hideMob(currName);
 currName=name;
 var args=new String();
 for(var i=1;i<showMob.arguments.length;i++)args+=(i>1?",":"")+"'"+showMob.arguments[i]+"'";
 mouseMove.action='hideMob("'+name+'")';
 mouseMove.setCheckRange(event.clientX,event.clientY+document.body.scrollTop,event.clientX+modMenuWidth,event.clientY+document.body.scrollTop+modMenuHeight*eval(name+".list.length"));
 eval(name+".show("+args+")");
}
function hideMob(name){
 if(name=='')return;
 hL(name+"MobMenu");
 currName='';
 mouseMove.reset();
}
//------------------------These just go well here

function mobMenuItemObj(text,link,mclass,aclass){
 this.text=text;
 this.link=link;
 this.mclass=mclass;
 this.aclass=aclass?aclass:"mob";
 return this;
}
function addItemMMO(text,link,mclass){
 this.list[this.list.length]=new mobMenuItemObj(text,link,mclass);
// return this.list[this.list.length-1];
}
function showMMO(){
 mL(this.name+"MobMenu",window.event.clientX,window.event.clientY+window.document.body.scrollTop);
 this.tArgs=new Array();
 for(var i=0;i<showMMO.arguments.length;i++)this.tArgs[i]=showMMO.arguments[i];
 sL(this.name+"MobMenu");
}
function outputMMO(){
 var retVal=''+
 '<style type="text/css">\n'+
 '#'+this.name+'MobMenu {position:absolute;top:0;left:0;visibility:hidden;z-index:11;}\n'+
 '</style>\n'+
 '<div id='+this.name+'MobMenu>\n'+// onMouseOut="hL(\''+this.name+'MobMenu\')">\n'+
 '<table border=0 cellspacing=1 cellpadding=0>\n';
 for(var i=0;i<this.list.length;i++)retVal+='<tr><td class='+this.mclass+'><a '+(this.list[i].aclass?('class='+this.list[i].aclass+' '):'')+'href="'+this.list[i].link+'">'+this.list[i].text+'</a></td></tr>\n';
 retVal+='</table>\n'+
 '</div>\n';
 return retVal;
}
function mobMenuObj(name,mclass){
 this.list=new Array();
 this.tArgs=new Array();
 
 this.name=name;
 this.mclass=mclass;
 
 this.addItem=addItemMMO;
 this.output=outputMMO;
 this.show=showMMO;
 return this;
}
