function XSFallerMenuClass(A,E,C,G){this.closeAllTimeoutTime=G;this.closeAllTimeout=null;
this.menubarname=E;this.menuitemname=C;this.documentHandlerState=false;this.varname=A;
var B=this.getMenuItemSubDivs(this.menubarname).length/5;this.stateArray=new Array(B);
for(i=0;i<B;i++){this.stateArray[C+i]=new Object();this.stateArray[C+i].id=C+i;this.stateArray[C+i].visible=false
}var F=this;this.eventHandlerFunc=function(H){F.documentmousemovehandler(H)};for(x in this.stateArray){var D=this.getMenuItemSubDivs(x)[0].getElementsByTagName("a")[0];
D.xsid=x;XSUtils.addEventListener(D,"mousemove",function(H){F.onmousemove(H)},true);
XSUtils.addEventListener(D,"mouseout",function(H){F.onmouseout(H)},true)}}XSFallerMenuClass.prototype.documentmousemovehandlercheck=function(){if(!this.documentHandlerState){XSUtils.addEventListener(document,"mousemove",this.eventHandlerFunc,true);
this.documentHandlerState=true}};XSFallerMenuClass.prototype.documentmousemovehandler=function(B){var A=document.getElementById(this.menubarname);
if(!XSUtils.isMouseInsideElement(A,B)){this.hideAll();XSUtils.removeEventListener(document,"mousemove",this.eventHandlerFunc,true);
this.documentHandlerState=false;var C=this;this.closeAllTimeout=setTimeout(function(){C.hideAll()
},this.closeAllTimeoutTime)}};XSFallerMenuClass.prototype.findTargetID=function(B){var B=B||window.event;
var C=B.target||B.srcElement;var A=C.xsid;return A};XSFallerMenuClass.prototype.onmouseover=function(A){var B=this.findTargetID(A);
if(B!=null&&!this.menuItemSelected(B)){if(!this.stateArray[B].visible&&!this.stateArray[B].hiderunning&&!this.anyShowRunning(B)){this.show(B)
}}};XSFallerMenuClass.prototype.onmousemove=function(A){return this.onmouseover(A)
};XSFallerMenuClass.prototype.onmouseout=function(A){var B=this.findTargetID(A);if(B!=null&&!this.menuItemSelected(B)){this.hide(B)
}};XSFallerMenuClass.prototype.menuItemSelected=function(C){var B=document.getElementById(C);
if(B==null){return false}var A=B.getAttribute("class");A=A?A:B.getAttribute("classname");
if(A==null){return false}return A.indexOf("selected")>=0};XSFallerMenuClass.prototype.show=function(A){clearTimeout(this.closeAllTimeout);
this.hideAll();this.documentmousemovehandlercheck();if(!this.stateArray[A].visible&&!this.stateArray[A].hiderunning&&!this.anyShowRunning(A)){this.stateArray[A].visible=true;
this.stateArray[A].showrunning=true;this.animate(A,true)}};XSFallerMenuClass.prototype.hide=function(A){clearTimeout(this.closeAllTimeout);
this.documentmousemovehandlercheck();if(this.stateArray[A].visible&&!this.stateArray[A].showrunning){this.stateArray[A].visible=false;
this.stateArray[A].hiderunning=true;this.animate(A,false)}};XSFallerMenuClass.prototype.animate=function(A,L){var B=0;
var D=20;var C=(L?0:9);var G=(L?10:-1);var N=(L?1:-1);for(x=C;x!=G;x=x+N){var K=this.offsetFunc(-71,11,0.87,x);
var J=this.offsetFunc(-70,2,0.94,x);var I=100*Math.pow(0.7,x);var F=91+((255-91)/9)*x;
var M=67+((255-67)/9)*x;var E=12+((255-12)/9)*x;var H=this;setTimeout(this.varname+".setImageBottomPos('"+A+"', "+K+")",B);
setTimeout(this.varname+".setButtonOnBottomPos('"+A+"', "+J+")",B);setTimeout(this.varname+".setButtonOffBottomPos('"+A+"', "+J+")",B);
setTimeout(this.varname+".buttonOffOpacity('"+A+"', "+I+")",B);setTimeout(this.varname+".buttonTextColor('"+A+"', "+F+", "+M+", "+E+")",B);
B+=D}if(L){setTimeout(this.varname+".showRunningEnd('"+A+"')",B+=D)}else{setTimeout(this.varname+".hideRunningEnd('"+A+"')",B+=D)
}};XSFallerMenuClass.prototype.offsetFunc=function(E,D,B,C){var A=E;for(x=0;x<C;x++){A+=D*Math.pow(B,x)
}return A};XSFallerMenuClass.prototype.showRunningEnd=function(A){this.stateArray[A].showrunning=false
};XSFallerMenuClass.prototype.hideRunningEnd=function(A){this.stateArray[A].hiderunning=false
};XSFallerMenuClass.prototype.anyShowRunning=function(A){for(x in this.stateArray){if(this.stateArray[x].id==A){continue
}if(this.stateArray[x].showrunning){return true}}return false};XSFallerMenuClass.prototype.anyHideRunning=function(A){for(x in this.stateArray){if(this.stateArray[x].id==A){continue
}if(this.stateArray[x].hiderunning){return true}}return false};XSFallerMenuClass.prototype.hideAll=function(){for(y in this.stateArray){this.hide(y)
}};XSFallerMenuClass.prototype.getMenuItemSubDivs=function(C){var B=document.getElementById(C);
var A=B.getElementsByTagName("div");return A};XSFallerMenuClass.prototype.setImageBottomPos=function(C,B){var A=Math.round(B);
this.getMenuItemSubDivs(C)[3].style.bottom=B+"px"};XSFallerMenuClass.prototype.setButtonOnBottomPos=function(C,B){var A=Math.round(B);
this.getMenuItemSubDivs(C)[2].style.bottom=B+"px"};XSFallerMenuClass.prototype.setButtonOffBottomPos=function(C,B){var A=Math.round(B);
this.getMenuItemSubDivs(C)[1].style.bottom=B+"px"};XSFallerMenuClass.prototype.buttonOffOpacity=function(B,A){XSUtils.changeOpacityForElement(this.getMenuItemSubDivs(B)[1],A)
};XSFallerMenuClass.prototype.buttonTextColor=function(D,C,B,A){this.getMenuItemSubDivs(D)[0].getElementsByTagName("a")[0].style.color="#"+XSUtils.rgb2HTMLColor(C,B,A)
};