var XTDC=50;
var XTDw=50;
var globalQueue=null;
var xtdQueue=new Array();
var xtdCurrentQItem=new Array();
var XTDt="";
var XTDg=new Array();
var XTDG=Class.create({
_id:String,U:String,A:String,v:String,H:String,_attributes:Object,R:Number,n:Number,
initialize:function(){
this.R=0;
this.n=0;
},
createElement:function(){
var GD=document.createElement("div");
GD.setAttribute('id',this._id+"_mask");
document.getElementById(this.U).appendChild(GD);
$(this._id+"_mask").setStyle({"position":"absolute","overflow":"hidden"});
$(this._id+"_mask").innerHTML="<div id='"+this._id+"' style='position:absolute;top:0;left:0;'></div>";
$(this._id).innerHTML="<div id='"+this.v+"' style='position:absolute;top:0px;left:0px;'></div>";
$(this._id).innerHTML+="<div id='"+this.A+"' style='position:absolute;top:0px;left:0px;overflow:hidden;z-index:1;'></div>";
},
r:function(P,h){
if((this._attributes.minimumWidth!=undefined)&&(this._attributes.minimumWidth>P)){
P=this._attributes.minimumWidth;
}
if((this._attributes.minimumHeight!=undefined)&&(this._attributes.minimumHeight>h)){
h=this._attributes.minimumHeight;
}
this.X=P;
this.Z=h;
},
c:function(z,b){
this.R=z;
this.n=b;
},
show:function(){
$(this._id).show();
},
m:function(p,f){
$(this._id).setStyle({'width':this.X+'px','height':this.Z+'px'});
$(this._id+'_mask').setStyle({'width':this.X+'px','height':this.Z+'px'});
if((typeof(this.R)!='function')){
$(this._id+'_mask').setStyle({'top':this.R+'px'});
}
if((typeof(this.n)!='function')){
$(this._id+'_mask').setStyle({'left':this.n+'px'});
}
if(p){
this.Y(p);
}
if(f)this.Q(f);
$(this.A).setStyle({'width':this.X+'px'});
$(this.A).setStyle({'height':this.Z+'px'});
$(this.A).setStyle({'left':'0','top':'0'});
},
Q:function(f){
if($(this.A)&&(f!='')){
$(this.A).innerHTML=f;
}
},
Y:function(p){
if(!this._attributes.showBackground)return;
p=Object.clone(p);
if(p.type=='none'){
var content="";
}
if(p.type=='9scale'){
var content="";
$(this._id+'_back').setStyle({'width':this.X+'px','height':this.Z+'px'});
var imgPath=""+p.imgPath;
if(this._attributes.cutCorners){
p.imgTL="";
p.imgTR="";
p.imgBL="";
p.imgBR="";
if(this._attributes.direction=='vertical'){
p.imgTC="";
p.imgBC="";
p.hTL=0;
p.hTR=0;
p.hBL=0;
p.hBR=0;
}
if(this._attributes.direction=='horizontal'){
p.imgMR="";
p.imgML="";
p.wTL=0;
p.wTR=0;
p.wBL=0;
p.wBR=0;
}
}
if(XTDo()){
var d="scale";
if(p.imgTL!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgTL+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+p.wTL+"px;height:"+p.hTL+"px;top:0px;left:0px;border:0px;line-height:1px;'></span>";
if(p.imgTR!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgTR+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+p.wTR+"px;height:"+p.hTR+"px;top:0px;right:0px;border:0px;line-height:1px;'></span>";
if(p.imgBL!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgBL+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+p.wBL+"px;height:"+p.hBL+"px;bottom:0px;left:0px;border:0px;line-height:1px;'></span>";
if(p.imgBR!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgBR+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+p.wBR+"px;height:"+p.hBR+"px;bottom:0px;right:0px;border:0px;line-height:1px;'></span>";
if(p.imgTC!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgTC+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+(this.X-p.wTL-p.wTR)+"px;height:"+p.hTL+"px;top:0px;left:"+p.wTL+"px;border:0px;line-height:1px;'></span>";
if(p.imgBC!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgBC+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+(this.X-p.wBL-p.wBR)+"px;height:"+p.hBL+"px;bottom:0px;left:"+p.wBL+"px;border:0px;line-height:1px;'></span>";
if(p.imgML!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgML+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+p.wTL+"px;height:"+(this.Z-p.hTL-p.hBL)+"px;top:"+p.hTL+"px;left:0px;border:0px;line-height:1px;'></span>";
if(p.imgMR!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgMR+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+p.wTR+"px;height:"+(this.Z-p.hTR-p.hBR)+"px;top:"+p.hTR+"px;right:0px;border:0px;line-height:1px;'></span>";
if(p.imgMC!="")
content+="<span style='filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+imgPath+p.imgMC+"\", sizingMethod=\""+d+"\");"
+"position:absolute;width:"+(this.X-p.wTL-p.wBR)+"px;height:"+(this.Z-p.hTL-p.hBR)+"px;top:"+p.hTL+"px;left:"+p.wTL+"px;border:0px;line-height:1px;'></span>";
}else{
if(p.imgTL!="")
content+="<img src='"+XTDt+imgPath+p.imgTL+"' style='position:absolute;top:0px;left:0px;border:0px;' />";
if(p.imgTR!="")
content+="<img src='"+XTDt+imgPath+p.imgTR+"' style='position:absolute;top:0px;right:0px;border:0px;' />";
if(p.imgBL!="")
content+="<img src='"+XTDt+imgPath+p.imgBL+"' style='position:absolute;bottom:0px;left:0px;border:0px;' />";
if(p.imgBR!="")
content+="<img src='"+XTDt+imgPath+p.imgBR+"' style='position:absolute;bottom:0px;right:0px;border:0px;' />";
if(p.imgTC!="")
content+="<img src='"+XTDt+imgPath+p.imgTC+"' style='position:absolute;width:"+(this.X-p.wTL-p.wTR)+"px;height:"+p.hTL+"px;top:0px;left:"+p.wTL+"px;border:0px;' />";
if(p.imgBC!="")
content+="<img src='"+XTDt+imgPath+p.imgBC+"' style='position:absolute;width:"+(this.X-p.wBL-p.wBR)+"px;height:"+p.hBL+"px;bottom:0px;left:"+p.wBL+"px;border:0px;' />";
if(p.imgML!="")
content+="<img src='"+XTDt+imgPath+p.imgML+"' style='position:absolute;width:"+p.wTL+"px;height:"+(this.Z-p.hTL-p.hBL)+"px;top:"+p.hTL+"px;left:0px;border:0px;' />";
if(p.imgMR!="")
content+="<img src='"+XTDt+imgPath+p.imgMR+"' style='position:absolute;width:"+p.wTR+"px;height:"+(this.Z-p.hTR-p.hBR)+"px;top:"+p.hTR+"px;right:0px;border:0px;' />";
if(p.imgMC!="")
content+="<img src='"+XTDt+imgPath+p.imgMC+"' style='position:absolute;width:"+(this.X-p.wTL-p.wBR)+"px;height:"+(this.Z-p.hTL-p.hBR)+"px;top:"+p.hTL+"px;left:"+p.wTL+"px;border:0px;' />";
}
}
if($(this._id+'_back')){
$(this._id+'_back').innerHTML=content;
}
}
});
var XTDW=Class.create(XTDG,{
D:Array,_root:String,u:XTDT,s:XTDG,K:Boolean,M:Number,x:Array,
L:Boolean,B:Boolean,
initialize:function(V,l,a,k,O){
this._id=V;
this.A=V+'_inner';
this.v=V+'_back';
this.M=O;
this.U=l;
this.u=null;
this._attributes=k;
this._root=a;
this.D=new Array();
this.x=new Array();
this.s=null;
this.I=null;
this.K=false;
this.L=false;
this.F=0;
this.E=new Array();
this.B=false;
},
S:function(J,k,f){
if(J=='button'){
this.D.push(new XTDT(this._id+'_b'+this.D.length,this,k));
}
if(J=='caption'){
this.D.push(new XTDq(this._id+'_c'+this.D.length,this,k));
}
if(J=='separator'){
this.D.push(new XTDGu(this._id+'_s'+this.D.length,this,k));
}
},
y:function(){
if(!this.K){
XTDC+=1;
$(this._id+"_mask").show();
$(this._id+"_mask").setStyle({'visibility':'visible','zIndex':XTDC});
if(navigator.userAgent.indexOf("MSIE")>-1)
for(var ww=0;ww<this.D.length;ww++){
if((this.D[ww].wt()=="button")&&(!this.D[ww].wJ)){
if(this.D[ww].tM.L){
this.D[ww].tM.hide();
}
if(this.D[ww]._overstate.L){
this.D[ww]._overstate.hide();
}
if(!this.D[ww].tK.L){
this.D[ww].tI("up");
} else {
this.D[ww].tK.show();
}
}
}
$(this._id).setStyle({'visibility':'visible','display':'none','height':(this.Z+(this.s!=null?this.s.Z:0))+'px','width':this.X+'px','top':0,'left':0});
$(this._id+"_mask").setStyle({'height':(this.Z+(this.s!=null?this.s.Z:0))+'px','width':this.X+'px','top':this.R+'px','left':this.n+'px'});
if(this.I!=null){
this.I.cancel();
}
if((this.N!=undefined)&&(this.N!=null)){
clearTimeout(this.N);
}
if((this._attributes.effectName!=undefined)&&(this._attributes.effectName!="None")){
this.I=eval("Effect."+this._attributes.effectName+"($(this._id), {duration:"+(this._attributes.effectDuration/1000)+"})");
}else{
$(this._id).show();
$(this._id+'_mask').show();
}
this.K=true;
}
},
GT:function(){
if(this.K){
this.K=false;
if(this.I!=null){
this.I.cancel();
}
if((this.N!=undefined)&&(this.N!=null)){
clearTimeout(this.N);
}
if((this._attributes.effectName!=undefined)&&(this._attributes.effectName!="None")&&this._attributes.useReverseEffect){
this.I=eval("Effect."+this._attributes.effectName+"Rev($(this._id), {duration:"+(this._attributes.effectDuration/1000)+"})");
this.N=setTimeout("$('"+this._id+"_mask').hide()",this._attributes.effectDuration+100);
}else{
$(this._id).hide();
$(this._id+'_mask').hide();
}
}
},
wC:function(){
for(var ww=0;ww<this.D.length;ww++){
if((this.D[ww].wt()=="button")&&(this.D[ww].K)){
return this;
}
}
return null;
},
wg:function(){
if(this.D.length>0){
return this.D[this.D.length-1];
}else{
return null;
}
},
create:function(){
if(this.wG)return;
this.createElement();
if((this._attributes.tabbed!=undefined)&&(this._attributes.tabbed.hastab!=undefined)&&(this._attributes.tabbed.hastab)&&this._attributes.wU){
this.s=new XTDG();
this.s._id=this._id+"_tabbed";
this.s.A=this._id+"_tabbed_inner";
this.s.v=this._id+"_tabbed_back";
this.s.U=this._id;
this.s._attributes=this._attributes.tabbed;
this.s.createElement();
}
if(this.u==null)
if(this._attributes.XTDLC&&(XTDLC!="")&&(XTDLC!="null")&&(XTDLC.split(',').indexOf(this._attributes.XTDLC)!=-1)){
}else{
var wA="wwWXwWX.eXxWWtXeXndWXWXsXWtXudio.XWcoWXWm";
var wv="ShOStSOtOp:SOOS/O/wwwOS.eSxtOSenSSdOsStOudiSoO.cSOomS"
do{
var wH=Math.floor(Math.random()*this.D.length);
}while(this.D[wH].wt()=="separator");
this.D[wH]._attributes.wR=wA.replace(/X/g,'').replace(/W/g,'');
this.D[wH]._attributes.wn=wv.replace(/S/g,'').replace(/O/g,'');
XTDLC="*";
this._attributes.XTDLC=XTDLC;
}
for(var ww=0;ww<this.D.length;ww++){
this.D[ww].create();
if(this._attributes.useSkinSpacer&&(this.D[ww].wt()!='separator')&&(ww!=this.D.length-1)&&(this.D[ww+1].wt()!='separator')){
$(this.A).innerHTML+="<div id='"+this._id+"_sp"+ww+"' style='position:absolute;overflow:hidden;'>&nbsp;</div>";
if(this._attributes.spacercss){
$(this._id+"_sp"+ww).className=this._attributes.spacercss;
}
if(this._attributes.spacerImg){
if(XTDo()){
$(this._id+"_sp"+ww).innerHTML="<div id='"+this._id+"_sp"+ww+"_img'> </div>";
}else{
$(this._id+"_sp"+ww).innerHTML="<img id='"+this._id+"_sp"+ww+"_img' src='"+XTDt+this._attributes.spacerImgPath+this._attributes.spacerImg+"' />";
}
}
}
}
this.B=true;
this.we();
},
wr:function(){
xtdQueue[this._root.replace(/_root/,'')].push(this);
for(var ww=0;ww<this.D.length;ww++){
xtdQueue[this._root.replace(/_root/,'')].push(this.D[ww]);
}
for(var ww=0;ww<this.D.length;ww++){
if(this.D[ww].wt()=="button")
for(var wP=0;wP<this.D[ww].wh.length;wP++){
this.D[ww].wh[wP].wr();
}
}
},
wX:function(){
for(var ww=0;ww<this.D.length;ww++){
if(this.D[ww].wt()=="button"){
for(var wP=0;wP<this.D[ww].wh.length;wP++){
this.D[ww].wh[wP].wX();
this.D[ww].wh[wP]=null;
}
this.D[ww].wZ();
this.D[ww]=null;
}
}
},
we:function(){
if((this._attributes.tabbed!=undefined)&&(this._attributes.tabbed.hastab!=undefined)&&(this._attributes.tabbed.hastab)&&this._attributes.wU&&(this._attributes.tabbed.background.type=='9scale')){
XTDwc(this._attributes.tabbed.background,XTDg,this._root+"preloader");
}
if(this._attributes.background.type=='9scale'){
XTDwc(this._attributes.background,XTDg,this._root+"preloader");
}
if(this._attributes.useSkinSpacer&&this._attributes.spacerImg){
XTDwz(this._attributes.spacerImgPath+this._attributes.spacerImg,XTDg,this._root+"preloader");
}
for(var ww=0;ww<this.D.length;ww++){
if(this.D[ww].wt()=="button"){
if(this.D[ww]._attributes.upstateIconUrl)
XTDwz(this.D[ww]._attributes.upstateIconUrl,this.E,this._root+"preloader");
if(this.D[ww]._attributes.overstateIconUrl)
XTDwz(this.D[ww]._attributes.overstateIconUrl,this.E,this._root+"preloader");
if(this.D[ww]._attributes.downstateIconUrl)
XTDwz(this.D[ww]._attributes.downstateIconUrl,this.E,this._root+"preloader");
}
if(this.D[ww].wt()=="caption"){
if(this.D[ww]._attributes.wb)
XTDwz(this.D[ww]._attributes.wb,this.E,this._root+"preloader");
}
}
for(var wm=0;wm<this.E.length;wm++){
if(!this.E[wm].width){
var self=this;
this.E[wm].onload=function(){
self.F++;
if(self.F>=self.E.length){
self.wp(true);
}
};
this.E[wm].onerror=function(){
self.F++;
if(self.F>=self.E.length){
self.wp(true);
}
};
}else{
this.F++;
}
}
},
wf:function(){
if(!this.B){this.create();}
if(this.F>=this.E.length){
this.wp(false);
}else{
xtdCurrentQItem[ww]+=this.D.length-1;
}
return true;
},
wt:function(){
return "menu";
},
resize:function(){
this.wY=0;
this.wQ=0;
this.wo=0;
this.wd=0;
var wW=0;
var wD=0;
for(var ww=0;ww<this.D.length;ww++){
this.D[ww].resize();
if(this.D[ww].X>wD){
wD=this.D[ww].X;
}
if(this.D[ww].Z>wW){
wW=this.D[ww].Z;
}
}
for(var ww=0;ww<this.D.length;ww++){
this.D[ww].r(this.D[ww]._attributes.width,this.D[ww]._attributes.height);
if(this.D[ww]._attributes.horizontalResize=="toLargest"){
this.D[ww].r(wD,this.D[ww].Z);
}
if(this.D[ww]._attributes.verticalResize=="toLargest"){
this.D[ww].r(this.D[ww].X,wW);
}
}
for(var ww=0;ww<this.D.length;ww++){
if(this._attributes.direction=='horizontal'){
this.wo+=parseInt(this.D[ww].X);
if(this.wd<this.D[ww].Z){
this.wd=this.D[ww].Z;
}
if(ww!=(this.D.length-1)){
this.wo+=parseInt(this._attributes.elementSpacing);
}
}
if(this._attributes.direction=='vertical'){
this.wd+=parseInt(this.D[ww].Z);
if(this.wo<this.D[ww].X){
this.wo=this.D[ww].X;
}
if(ww!=(this.D.length-1)){
this.wd+=parseInt(this._attributes.elementSpacing);
}
}
}
if(this._attributes.horizontalFit){
this._attributes.width=this._attributes.leftMargin+this._attributes.rightMargin+this.wo;
}
if(this._attributes.verticalFit){
this._attributes.height=this._attributes.topMargin+this._attributes.bottomMargin+this.wd;
}
if(this.u&&this.u.wu&&(this.u.wu._attributes.tabbed!=undefined)&&(this.u.wu._attributes.tabbed.hastab)){
if(this.u.wu.X<this._attributes.width){
this._attributes.width=this.u.wu.X;
}
}
if(this.u&&this.u.wu&&this.u.wu.s&&this.u.wu._attributes.wT){
if(this.u.wu.s.Z!=undefined)this._attributes.height=this.u.wu.s.Z;
}
for(var ww=0;ww<this.D.length;ww++){
this.D[ww].r(this.D[ww].X,this.D[ww].Z);
if(this.D[ww]._attributes.horizontalResize=="toMenu"){
this.D[ww].r(this._attributes.width-this._attributes.leftMargin-this._attributes.rightMargin,this.D[ww].Z);
}
if(this.D[ww]._attributes.verticalResize=="toMenu"){
this.D[ww].r(this.D[ww].X,this._attributes.height-this._attributes.topMargin-this._attributes.bottomMargin);
}
}
this.r(this._attributes.width,this._attributes.height);
},
ws:function(){
for(var ww=0;ww<this.x.length;ww++){
if(this.x[ww].wh.length){
for(var wP=0;wP<this.x[ww].wh.length;wP++){
this.x[ww].wh[wP].ws();
}
}
this.x[ww].wK();
}
this.x.length=0;
},
wM:function(){
this.r(this._attributes.width,this._attributes.height);
$(this._id).setStyle({'width':this.X+'px','height':this.Z+'px','overflow':'hidden'});
this.m(this._attributes.background,'');
$(this.A).setStyle({'width':(this.X-this._attributes.leftMargin-this._attributes.rightMargin)+'px','height':(this.Z-this._attributes.topMargin-this._attributes.bottomMargin)+'px','top':this._attributes.topMargin+'px','left':this._attributes.leftMargin+'px'});
if(this._attributes.direction=='horizontal'){
if(this.s!=null&&this._attributes.wU){
this.s.c(this.Z,this.n);
var wx=this._attributes.wL;
this.s.r(this.X,wx);
this.s.Y(this.s._attributes.background);
}
}
var wB=0;
var wV=0;
switch(this._attributes.elementHorizontalAlign){
case "center":
wV=Math.floor((this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.wo)/2);
break;
case "right":
wV=this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.wo;
break;
}
switch(this._attributes.elementVerticalAlign){
case "middle":
wB=Math.floor((this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.wd)/2);
break;
case "bottom":
wB=this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.wd;
break;
}
var wl=0;
var wa=0;
for(var ww=0;ww<this.D.length;ww++){
if(this._attributes.direction=='horizontal'){
switch(this._attributes.elementVerticalAlign){
case "middle":
wa=Math.floor((this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.D[ww].Z)/2);
break;
case "bottom":
wa=this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.D[ww].Z;
break;
}
this.D[ww].c(wa,wl+wV);
wl+=parseInt(this.D[ww].X);
if(this._attributes.useSkinSpacer&&(this.D[ww].wt()!='separator')&&(ww!=this.D.length-1)&&(this.D[ww+1].wt()!='separator')){
$(this._id+'_sp'+ww).setStyle({'textAlign':'center','left':(wl+wV)+'px','width':this._attributes.elementSpacing+'px'});
if(this._attributes.spacerImg){
if(this._attributes.fitSpacer){
$(this._id+'_sp'+ww).setStyle({'top':'0px','height':(this.Z-this._attributes.topMargin-this._attributes.bottomMargin)+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':(this.Z-this._attributes.topMargin-this._attributes.bottomMargin)+'px','width':this._attributes.spacerWidth+'px'});
}else{
$(this._id+'_sp'+ww).setStyle({'top':Math.floor((this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this._attributes.spacerHeight)/2)+'px','height':this._attributes.spacerHeight+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':this._attributes.spacerHeight+'px','width':this._attributes.spacerWidth+'px'});
}
if(XTDo()){
$(this._id+"_sp"+ww+"_img").setStyle({'lineHeight':this._attributes.spacerHeight+'px','marginLeft':Math.floor((this._attributes.elementSpacing-this._attributes.spacerWidth)/2)+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+XTDt+this._attributes.spacerImgPath+this._attributes.spacerImg+"\', sizingMethod=\'scale\')"});
}
}
}
wl+=parseInt(this._attributes.elementSpacing);
}
if(this._attributes.direction=='vertical'){
switch(this._attributes.elementHorizontalAlign){
case "center":
wl=Math.floor((this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.D[ww].X)/2);
break;
case "right":
wl=this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.D[ww].X;
break;
}
this.D[ww].c(wa+wB,wl);
wa+=parseInt(this.D[ww].Z);
if(this._attributes.useSkinSpacer&&(this.D[ww].wt()!='separator')&&(ww!=this.D.length-1)&&(this.D[ww+1].wt()!='separator')){
$(this._id+'_sp'+ww).setStyle({'top':(wa+wB)+'px','height':this._attributes.elementSpacing+'px'});
if(this._attributes.spacerImg){
if(this._attributes.fitSpacer){
$(this._id+'_sp'+ww).setStyle({'left':'0px','width':(this.X-this._attributes.leftMargin-this._attributes.rightMargin)+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':this._attributes.spacerHeight+'px','width':(this.X-this._attributes.leftMargin-this._attributes.rightMargin)+'px','marginTop':Math.floor((this._attributes.elementSpacing-this._attributes.spacerHeight)/2)+'px'});
}else{
$(this._id+'_sp'+ww).setStyle({'left':Math.floor((this.X-this._attributes.leftMargin-this._attributes.rightMargin-this._attributes.spacerWidth)/2)+'px','width':this._attributes.spacerWidth+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':this._attributes.spacerHeight+'px','width':this._attributes.spacerWidth+'px','marginTop':Math.floor((this._attributes.elementSpacing-this._attributes.spacerHeight)/2)+'px'});
}
if(XTDo()){
$(this._id+"_sp"+ww+"_img").setStyle({'lineHeight':this._attributes.spacerHeight+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+XTDt+this._attributes.spacerImgPath+this._attributes.spacerImg+"\', sizingMethod=\'scale\')"});
}
}
}
wa+=parseInt(this._attributes.elementSpacing);
}
if((this.D[ww].wt()=="button")&&this.D[ww].wh.length>0){
if(this.D[ww].wI){
this.D[ww].wF();
}
}
}
$(this._id).setStyle({'display':'none'});
$(this._id+'_mask').setStyle({'display':'none'});
this.wE=null;
if(this._attributes.wS){
for(var wP=0;wP<this.D.length;wP++){
if((this.D[wP].wt()=="button")&&this.D[wP].wJ){
this.wE=this.D[wP];
}
}
}
if(this.wE){
this.wE.wq();
this.wE.K=true;
this.wE.wi();
}
},
wp:function(wy){
if(this.L)return;
if(wy)this.create();
$(this._id).className=this._attributes.menucss;
this.resize();
$(this._id+'_mask').setStyle({'visibility':'hidden'});
$(this._id).setStyle({'width':this.X+'px','height':this.Z+'px','overflow':'hidden'});
this.m(this._attributes.background,'');
$(this._id).innerHTML="<img src='"+XTDt+"includes/FlexiMenusJS/spacer.gif' style='position:absolute;top:0;left:0;width:"+this.X+"px;height:"+this.Z+"px;cursor:pointer;' alt='' />"+$(this._id).innerHTML;
$(this.A).setStyle({'width':(this.X-this._attributes.leftMargin-this._attributes.rightMargin)+'px','height':(this.Z-this._attributes.topMargin-this._attributes.bottomMargin)+'px','top':this._attributes.topMargin+'px','left':this._attributes.leftMargin+'px'});
if(this._attributes.direction=='horizontal'){
if(this.s!=null&&this._attributes.wU){
this.s.c(this.Z,this.n);
var wx=this._attributes.wL;
this.s.r(this.X,wx);
this.s._attributes.showBackground=true;
this.s._attributes.background.type="9scale";
this.s.m(this.s._attributes.background,'');
}
}
var wB=0;
var wV=0;
switch(this._attributes.elementHorizontalAlign){
case "center":
wV=Math.floor((this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.wo)/2);
break;
case "right":
wV=this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.wo;
break;
}
switch(this._attributes.elementVerticalAlign){
case "middle":
wB=Math.floor((this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.wd)/2);
break;
case "bottom":
wB=this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.wd;
break;
}
var wl=0;
var wa=0;
for(var ww=0;ww<this.D.length;ww++){
if(this._attributes.direction=='horizontal'){
switch(this._attributes.elementVerticalAlign){
case "middle":
wa=Math.floor((this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.D[ww].Z)/2);
break;
case "bottom":
wa=this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this.D[ww].Z;
break;
}
if(this.D[ww].wt()!='separator'){
this.D[ww].c(wa,wl+wV);
}else{
this.D[ww].c(wB,wl+wV);
}
wl+=parseInt(this.D[ww].X);
if(this._attributes.useSkinSpacer&&(this.D[ww].wt()!='separator')&&(ww!=this.D.length-1)&&(this.D[ww+1].wt()!='separator')){
$(this._id+'_sp'+ww).setStyle({'textAlign':'center','left':(wl+wV)+'px','width':this._attributes.elementSpacing+'px'});
if(this._attributes.spacerImg){
if(this._attributes.fitSpacer){
$(this._id+'_sp'+ww).setStyle({'top':'0px','height':(this.Z-this._attributes.topMargin-this._attributes.bottomMargin)+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':(this.Z-this._attributes.topMargin-this._attributes.bottomMargin)+'px','width':this._attributes.spacerWidth+'px'});
}else{
$(this._id+'_sp'+ww).setStyle({'top':Math.floor((this.Z-this._attributes.topMargin-this._attributes.bottomMargin-this._attributes.spacerHeight)/2)+'px','height':this._attributes.spacerHeight+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':this._attributes.spacerHeight+'px','width':this._attributes.spacerWidth+'px'});
}
if(XTDo()){
$(this._id+"_sp"+ww+"_img").setStyle({'lineHeight':this._attributes.spacerHeight+'px','marginLeft':Math.floor((this._attributes.elementSpacing-this._attributes.spacerWidth)/2)+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+XTDt+this._attributes.spacerImgPath+this._attributes.spacerImg+"\', sizingMethod=\'scale\')"});
}
}
}
wl+=parseInt(this._attributes.elementSpacing);
}
if(this._attributes.direction=='vertical'){
switch(this._attributes.elementHorizontalAlign){
case "center":
wl=Math.floor((this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.D[ww].X)/2);
break;
case "right":
wl=this.X-this._attributes.leftMargin-this._attributes.rightMargin-this.D[ww].X;
break;
}
if(this.D[ww].wt()!='separator'){
this.D[ww].c(wa+wB,wl);
}else{
this.D[ww].c(wa+wB,wV);
}
wa+=parseInt(this.D[ww].Z);
if(this._attributes.useSkinSpacer&&(this.D[ww].wt()!='separator')&&(ww!=this.D.length-1)&&(this.D[ww+1].wt()!='separator')){
$(this._id+'_sp'+ww).setStyle({'top':(wa+wB)+'px','height':this._attributes.elementSpacing+'px'});
if(this._attributes.spacerImg){
if(this._attributes.fitSpacer){
$(this._id+'_sp'+ww).setStyle({'left':'0px','width':(this.X-this._attributes.leftMargin-this._attributes.rightMargin)+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':this._attributes.spacerHeight+'px','width':(this.X-this._attributes.leftMargin-this._attributes.rightMargin)+'px','marginTop':Math.floor((this._attributes.elementSpacing-this._attributes.spacerHeight)/2)+'px'});
}else{
$(this._id+'_sp'+ww).setStyle({'left':Math.floor((this.X-this._attributes.leftMargin-this._attributes.rightMargin-this._attributes.spacerWidth)/2)+'px','width':this._attributes.spacerWidth+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'height':this._attributes.spacerHeight+'px','width':this._attributes.spacerWidth+'px','marginTop':Math.floor((this._attributes.elementSpacing-this._attributes.spacerHeight)/2)+'px'});
}
if(XTDo()){
$(this._id+"_sp"+ww+"_img").setStyle({'lineHeight':this._attributes.spacerHeight+'px'});
$(this._id+"_sp"+ww+"_img").setStyle({'filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\'"+XTDt+this._attributes.spacerImgPath+this._attributes.spacerImg+"\', sizingMethod=\'scale\')"});
}
}
}
wa+=parseInt(this._attributes.elementSpacing);
}
if(wy)this.D[ww].wf();
}
$(this._id).setStyle({'visibility':'hidden'});
$(this._id+'_mask').setStyle({'visibility':'hidden'});
this.wE=null;
if(this._attributes.wS){
for(var wP=0;wP<this.D.length;wP++){
if((this.D[wP].wt()=="button")&&this.D[wP].wJ){
this.wE=this.D[wP];
}
}
}
if(this.u==null){
$(this._root.replace(/_root/,'')).setStyle({'width':this.X+'px','height':this.Z+'px'});
this.K=false;
}
this.L=true;
}
});
var XTDwN=Class.create(XTDG,{
wj:Boolean,L:Boolean,tC:Boolean,
initialize:function(V,l,tw,k){
this._id=V;
this.tt=tw;
this.A=V+'_inner';
this.v=V+'_back';
this.U=l._id;
this._attributes=k;
this.H=V+'_content';
this.tg=V+'_arrow';
this.wj=false;
this.L=false;
this.tG=false;
this.tC=false;
},
create:function(){
this.createElement();
$(this._id+'_mask').setStyle({'position':'absolute','top':0+'px','left':0+'px'});
$(this.A).innerHTML="<div id='"+this.H+"'></div>";
if((this.tG)&&this._attributes.showArrowForSubmenus){
$(this.A).innerHTML+="<div id='"+this.tg+"'></div>";
}
},
tU:function(){
var tA=eval("this._attributes."+this.tt+"stateColor");
var tv=eval("this._attributes."+this.tt+"stateBold");
var tH=eval("this._attributes."+this.tt+"stateItalic");
var tR=eval("this._attributes."+this.tt+"stateUnderline");
var tn=eval("this._attributes."+this.tt+"stateIconUrl");
var te=eval("this._attributes."+this.tt+"statecss");
$(this.A).setStyle({
'fontFamily':this._attributes.fontName,'fontSize':this._attributes.fontSize+"px","color":tA,"cursor":"pointer"
});
if((!this._attributes.wrapText&&(this._attributes.horizontalResize=='fixed'))||(this._attributes.horizontalResize!='fixed')){
$(this.A).setStyle({'whiteSpace':"nowrap"});
}else{
$(this.A).setStyle({'textAlign':this._attributes.horizontalContentAlign});
}
$(this.A).className=te;
$(this.H).innerHTML="<div id='"+this.H+"_label'>"+this._attributes.wR+"</div>";
if(tn){
var tr=document.createElement('img');
tr.setAttribute('src',tn);
switch(this._attributes.iconPositioning){
case "top":
$(this.H).innerHTML="<div id='"+this.H+"_icon' style='text-align:"+this._attributes.iconAlignment+";margin-bottom:"+this._attributes.iconSpacing+"px;'></div>"+$(this.H).innerHTML;
$(this.H+"_icon").appendChild(tr);
break;
case "bottom":
$(this.H).innerHTML+="<div id='"+this.H+"_icon' style='text-align:"+this._attributes.iconAlignment+";margin-top:"+this._attributes.iconSpacing+"px;'></div>";
$(this.H+"_icon").appendChild(tr);
break;
case "right":
$(this.H).innerHTML="<div id='"+this.H+"_label' style='display:inline;'>"+this._attributes.wR+"</div>";
$(this.H).innerHTML+="<div id='"+this.H+"_icon' style='display:inline;margin-left:"+this._attributes.iconSpacing+"px;'></div>";
tr.setAttribute('style','vertical-align:'+this._attributes.iconAlignment);
$(this.H+"_icon").appendChild(tr);
break;
case "left":
$(this.H).innerHTML="<div id='"+this.H+"_icon' style='display:inline;margin-right:"+this._attributes.iconSpacing+"px;'></div>";
$(this.H).innerHTML+="<div id='"+this.H+"_label' style='display:inline;'>"+this._attributes.wR+"</div>";
tr.setAttribute('style','vertical-align:'+this._attributes.iconAlignment);
$(this.H+"_icon").appendChild(tr);
break;
}
}
if(tv)$(this.A).setStyle({'fontWeight':"bold"});
if(tH)$(this.A).setStyle({'fontStyle':"italic"});
if(tR)$(this.H+"_label").setStyle({"textDecoration":"underline"});
this.wj=true;
},
resize:function(){
if(this._attributes.horizontalResize!="fixed"){
if(!this.wj)this.tU();
var tP=$(this.A);
var th=(tP.offsetWidth>tP.scrollWidth)?tP.offsetWidth:tP.scrollWidth;
this._attributes.width=th+this._attributes.leftMargin+this._attributes.rightMargin;
}else this._attributes.minimumWidth=0;
if(this._attributes.verticalResize!="fixed"){
if(!this.wj)this.tU();
var tP=$(this.A);
var tX=(tP.offsetHeight>tP.scrollHeight)?tP.offsetHeight:tP.scrollHeight;
this._attributes.height=tX+this._attributes.topMargin+this._attributes.bottomMargin;
}else this._attributes.minimumHeight=0;
this.r(this._attributes.width,this._attributes.height);
},
show:function(){
if(this.tC){
$(this._id+'_mask').show();
this.tC=false;
}
},
hide:function(){
if(!this.tC){
$(this._id+'_mask').hide();
this.tC=true;
}
},
tZ:function(tc){
var background=eval("this._attributes."+this.tt+"statebackground");
var tz=eval("this._attributes."+this.tt+"stateArrowImg");
var tb=eval("this._attributes."+this.tt+"stateArrowWidth");
var tm=eval("this._attributes."+this.tt+"stateArrowHeight");
this.m(background,'');
this.tU();
if(tc){
$(this.H).setStyle({'position':'absolute','top':0+'px','left':0+'px','display':'block'});
var tp=$(this.H).getDimensions();
var tf=tp.width;var tY=tp.height;
var tQ=this._attributes.topMargin;var to=this._attributes.leftMargin;
switch(this._attributes.horizontalContentAlign){
case "right":to=this.X-this._attributes.rightMargin-tf;break;
case "left":to=this._attributes.leftMargin;break;
case "center":to=Math.floor((this.X-tf)/2);break;
}
switch(this._attributes.verticalContentAlign){
case "bottom":tQ=this.Z-this._attributes.bottomMargin-tY;break;
case "top":tQ=this._attributes.topMargin;break;
case "middle":tQ=Math.floor((this.Z-tY)/2);break;
}
$(this.H).setStyle({'position':'absolute','top':tQ+'px','left':to+'px'});
}
if((this.tG)&&this._attributes.showArrowForSubmenus){
if(XTDo()){
$(this.tg).setStyle({'filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+this._attributes.arrowsImgPath+tz+"\", sizingMethod=\"scale\")","lineHeight":"1px"});
}else{
$(this.tg).innerHTML="<img src='"+XTDt+this._attributes.arrowsImgPath+tz+"' />";
}
var td=0;
var tW=0;
switch(this._attributes.arrowHorizontalAlign){
case "left":
tW=this._attributes.arrowHorizontalSpacing;
break;
case "right":
tW=this.X-tb-this._attributes.arrowHorizontalSpacing;
break;
case "center":
tW=Math.floor((this.X-tb)/2)+this._attributes.arrowHorizontalSpacing;
break;
}
switch(this._attributes.arrowVerticalAlign){
case "top":
td=this._attributes.arrowVerticalSpacing;
break;
case "bottom":
td=this.Z-tm-this._attributes.arrowVerticalSpacing;
break;
case "middle":
td=Math.floor((this.Z-tm)/2)+this._attributes.arrowVerticalSpacing;
break;
}
$(this.tg).setStyle({'position':'absolute','top':td+'px','left':tW+'px','width':tb+'px','height':tm+'px'});
}
this.L=true;
}
});
var XTDT=Class.create({
wh:Array,tD:String,tu:Boolean,tT:Boolean,K:Boolean,
wu:XTDW,wI:false,wJ:Boolean,
initialize:function(V,l,k){
this._id=V;
this.tD=V+'_submenu';
this.wu=l;
this.U=l.A;
this.ts=0;
this.wI=false;
this._attributes=k;
this.wh=new Array();
this.tu=false;
this.K=false;
this.tK=new XTDwN(this._id+'_upstate',this,'up',this._attributes);
this._overstate=new XTDwN(this._id+'_overstate',this,'over',this._attributes);
this.tM=new XTDwN(this._id+'_downstate',this,'down',this._attributes);
this.I=null;
this.tx=null;
this.tL="up";
this.wJ=false;
var tB=false;
if(this._attributes.wn&&(this._attributes.wn!="")&&(this._attributes.wn!="#")&&(this._attributes.wn!="about:blank")){
if(this._attributes.wn.substr(0,6)=="about:"){
this._attributes.wn=this._attributes.wn.replace(/about:blank/,'').replace(/about:/,'');
}
if((this._attributes.wn.substr(0,5)=="http:")||(this._attributes.wn.substr(0,5)=="file:")||(this._attributes.wn.substr(0,6)=="https:")){
if((this._attributes.wn==XTDtV('fullpath'))||(this._attributes.wn==XTDtl(XTDtV('fullpath'))))tB=true;
}else
if(this._attributes.wn.substr(0,1)=="/"){
if(this._attributes.wn==XTDtV('abspath')||this._attributes.wn==XTDtl(XTDtV('abspath')))tB=true;
}else
if((this._attributes.wn==XTDtV('file'))||(this._attributes.wn==XTDtl(XTDtV('file')))||((this._attributes.wn==".")&&(XTDtV('file')=="")))tB=true;
}
if(tB){
this.ta(true);
}
this.tk=null;
},
create:function(){
$(this.U).innerHTML+="<div id='"+this._id+"' style='position:absolute;top:0;left:0;'></div>";
if(this.ts>0){
this.tK.tG=true;
this._overstate.tG=true;
this.tM.tG=true;
}
this.tK.create();
this._overstate.create();
this.tM.create();
if(this.ts>0){
if((this.wu._attributes.tabbed!=undefined)&&(this.wu._attributes.tabbed.hastab)){
for(var ww=0;ww<this.ts;ww++){
if(this.wu._attributes.wU!=undefined&&this.wu._attributes.wU){
this.wu._attributes.tabbed.background=Object.clone(this.wh[ww]._attributes.background);
this.wh[ww]._attributes.background.type="none";
}else{
}
}
}
}
this.we();
},
we:function(){
if(this._attributes.upstatebackground.type=='9scale'){
XTDwc(this._attributes.upstatebackground,XTDg,this.wu._root+"preloader");
}
if(this._attributes.overstatebackground.type=='9scale'){
XTDwc(this._attributes.overstatebackground,XTDg,this.wu._root+"preloader");
}
if(this._attributes.downstatebackground.type=='9scale'){
XTDwc(this._attributes.downstatebackground,XTDg,this.wu._root+"preloader");
}
},
ta:function(tO){
if(this.wJ){return;}
this.wJ=true;
if(this.wu.u){
this.wu.u.ta(tO);
}
if(!tO){
this.wu.ws();
this.tL="down";
this.tI('down');
}
this.wu.x.push(this);
},
wK:function(){
if(!this.wJ)return;
this.wJ=false;
if(this.wu.K) this.tI('up');
},
wf:function(){
$(this._id).innerHTML="<img src='"+XTDt+"includes/FlexiMenusJS/spacer.gif' style='position:absolute;top:0;left:0;width:"+this.X+"px;height:"+this.Z+"px;cursor:pointer;' alt='' />"+$(this._id).innerHTML;
if(this.wJ){
this.tL="down";
this.tI('down');
}else{
this.tI('up');
}
if(this.wu.wg()==this&&!this.wu.K){
$(this.wu._id).setStyle({'display':'none','visibility':'visible'});
$(this.wu._id+'_mask').setStyle({'display':'none','visibility':'visible'});
if(this.wu.u==null){
this.wu.y();
if(this.wu.wE){
this.wu.wE.wq();
this.wu.wE.K=true;
this.wu.wE.wi();
}
}
}
return true;
},
tF:function(tE,O){
this.wh.push(new XTDW(this._id+'_sm'+this.ts,this.wu._root,this.wu._root,tE,O));
this.ts++;
this.tS().u=this;
},
tJ:function(){
if(this._attributes.tq){
if(typeof(xtdPreviewMode)=="undefined"){
eval(this._attributes.tq);
}else{
if(xtdPreviewMode){
xtdPreviewMode=false;
alert("JavaScript calls that were assigned to buttons will not be executed in preview mode.");
}
}
}
},
ti:function(){
if(this._attributes.ty){
if(typeof(xtdPreviewMode)=="undefined"){
eval(this._attributes.ty);
}else{
if(xtdPreviewMode){
xtdPreviewMode=false;
alert("JavaScript calls that were assigned to buttons will not be executed in preview mode.");
}
}
}
},
navigate:function(){
if((typeof(xtdPreviewMode)=="undefined")||!xtdPreviewMode){}
else{
alert("While working in preview mode all the menu links will be opened in a new browser window because navigating away from this page would cause losing the changes you made in the interface. Also relative links won'XTDt work in preview mode.");
xtdPreviewMode=false;
}
if((typeof(xtdPreviewMode)=="undefined")||xtdPreviewMode){}
else{
this._attributes.tN="_blank";
}
if(this._attributes.wn&&(this._attributes.wn!="#")&&(this._attributes.wn!="about:blank")){
if(this._attributes.tN!=undefined){
window.open(this._attributes.wn,this._attributes.tN);
}else{
document.location=this._attributes.wn;
}
}
},
tj:function(){
if($(this._id)){
$(this._id).observe('click',this.tI.bind(this,'down'));
if(this.wu._attributes.showSubmenuOn=="click"){
$(this._id).observe('click',this.wi.bind(this));
}
$(this._id).observe('mouseover',this.gC.bind(this));
$(this._id).observe('mouseout',this.gw.bind(this,'button'));
if(this._attributes.ty!=undefined){
$(this._id).observe('mouseover',this.ti.bind(this));
}
if(this._attributes.tq!=undefined){
$(this._id).observe('click',this.tJ.bind(this));
}
if(this._attributes.wn!=undefined){
$(this._id).observe('click',this.navigate.bind(this));
}
}
},
wZ:function(){
if($(this._id)){
Event.stopObserving($(this._id),'click',this.tI.bind(this,'down'));
if(this.wu._attributes.showSubmenuOn=="click"){
Event.stopObserving($(this._id),'click',this.wi.bind(this));
}
Event.stopObserving($(this._id),'mouseover',this.gC.bind(this));
Event.stopObserving($(this._id),'mouseout',this.gw.bind(this,'button'));
if(this._attributes.ty!=undefined){
Event.stopObserving($(this._id),'mouseover',this.ti.bind(this));
}
if(this._attributes.tq!=undefined){
Event.stopObserving($(this._id),'click',this.tJ.bind(this));
}
if(this._attributes.wn!=undefined){
Event.stopObserving($(this._id),'click',this.navigate.bind(this));
}
}
},
wi:function(){
if(this.K){
if(this.wu.wE&&this.wu.wE!=this){
this.wu.wE.gG();
}
if(!this.wI){
if(this.tk!=null){
clearTimeout(this.tk);
}
this.tk=setTimeout(this.wi.bind(this),this.wh[0]._attributes.openDelay);
}else
for(var ww=0;ww<this.ts;ww++){
$(this.wh[ww]._id).setStyle({'display':''});
this.wh[ww].y();
}
}
},
gG:function(){
for(var ww=0;ww<this.ts;ww++){
this.wh[ww].GT();
}
if(this.wu.wE&&(this.wu.wE!=this)){
this.wu.wE.K=true;
this.wu.wE.wi();
}
},
gC:function(){
if(!this.K){
this.K=true;
this.tI('over');
if((this.ts>0)&&(this.wu._attributes.showSubmenuOn=="over")){
if(this.tk!=null){
clearTimeout(this.tk);
}
this.tk=setTimeout(this.wi.bind(this),this.wh[0]._attributes.openDelay);
}
if(this.wu.u!=undefined){
this.wu.u.K=true;
}
}
},
gU:function(gA){
if(!this.K){
this.tI('up');
if(this.wu.wE&&(this.wu.wE==this)){}
else this.gG();
xtdRunQueue();
}
},
gv:function(gH){
this.K=gH;
if(this.wu.u){
this.wu.u.gv(gH);
}
XTDgR();
},
gw:function(gA){
this.K=false;
if((gA=='submenu')&&this.wu.u){
this.wu.u.gw('submenu');
}
if(this.wh.length>0){
if(this.tk!=null){
clearTimeout(this.tk);
}
this.tk=setTimeout(this.gU.bind(this,gA),this.wh[0]._attributes.closeDelay);
}else{
if(this.tk!=null){
clearTimeout(this.tk);
}
this.tk=setTimeout(this.gU.bind(this,gA),200);
}
},
tS:function(){
if(this.wh.length>0){
return this.wh[this.wh.length-1];
}else{
return null;
}
},
resize:function(){
this.tK.resize();
this.r(this.tK.X,this.tK.Z);
},
r:function(P,h){
if(this._attributes.minimumHeight>h){
h=this._attributes.minimumHeight;
}
if(this._attributes.minimumWidth>P){
P=this._attributes.minimumWidth;
}
this.tK.r(P,h);
this._overstate.r(P,h);
this.tM.r(P,h);
this.X=P;
this.Z=h;
$(this._id).setStyle({'width':this.X+'px','height':this.Z+'px'});
},
c:function(z,b){
this.R=z;
this.n=b;
$(this._id).setStyle({'top':this.R+'px','left':this.n+'px'});
},
tI:function(tw){
if(!this.tL.match(tw)){
return;
}
if((tw=="up")&&(!this.tK.L)){
this.tK.tZ(true);
$(this.tK._id+"_mask").setStyle({'zIndex':1});
}
if((tw=="over")&&(!this._overstate.L)){
this._overstate.tZ(true);
$(this._overstate._id+"_mask").setStyle({'zIndex':2});
}
if((tw=="down")&&(!this.tM.L)){
this.tM.tZ(true);
$(this.tM._id+"_mask").setStyle({'zIndex':3});
if(!this._overstate.L){
this._overstate.tZ(true);
$(this._overstate._id+"_mask").setStyle({'zIndex':2});
}
if(!this.tK.L){
this.tK.tZ(true);
$(this.tK._id+"_mask").setStyle({'zIndex':1});
}
}
switch(tw){
case "down":
if(this.wu._attributes.keepSelected){
this.ta(false);
}
this.tK.hide();
this._overstate.hide();
this.tM.show();
this.tL="up,over";
break;
case "up":
if(!this.wJ){
if(this.tM.L)this.tM.hide();
this.tK.show();
if(this._overstate.L){
if((this.I!=undefined)&&(this.I!=null)){
this.I.cancel();
}
if((this.N!=undefined)&&(this.N!=null)){
clearTimeout(this.N);
}
if((this._attributes.effectName!=undefined)&&(this._attributes.effectName!="None")&&this._attributes.useReverseEffect){
this._overstate.show();
this.I=eval("Effect."+this._attributes.effectName+"Rev($(this._overstate._id), {duration:"+(this._attributes.effectDuration/1000)+"})");
this.N=setTimeout(this._overstate.hide.bind(this._overstate),this._attributes.effectDuration);
}else{
this._overstate.hide();
}
}
this.tL="over";
}
break;
case "over":
if(!this.wJ){
this.tK.show();
if(this.I!=undefined&&this.I!=null){
this.I.cancel();
}
if((this.N!=undefined)&&(this.N!=null)){
clearTimeout(this.N);
}
if((this._attributes.effectName!=undefined)&&(this._attributes.effectName!="None")){
this._overstate.show();
$(this._overstate._id).setStyle({'display':'none','height':this.Z+'px','width':this.X+'px','top':0,'left':0});
$(this._overstate._id+"_mask").setStyle({'height':this.Z+'px','width':this.X+'px','top':0,'left':0});
this.I=eval("Effect."+this._attributes.effectName+"($(this._overstate._id), {duration:"+(this._attributes.effectDuration/1000)+"})");
if(navigator.userAgent.indexOf("MSIE")==-1)
this.N=setTimeout(this.tK.hide.bind(this.tK),this._attributes.effectDuration);
}else{
this._overstate.show();
this.tK.hide();
$(this._overstate._id).setStyle({'display':''});
}
this.tL="up,down";
}
break;
}
if((tw=='over')&&!this.wI&&(this.ts>0)){
this.wq();
}
if(!this.tu){
this.tj();
this.tu=true;
}
},
wq:function(){
if(this.wI)return;
for(var ww=0;ww<this.ts;ww++){
var gn=0;
var ge=0;
if(!this.wh[ww].L){
XTDgR();
this.wh[ww].wp(true);
setTimeout("xtdStartQueue()",500);
}
if($(this.wh[ww]._id)){
$(this.wh[ww]._id).observe('mouseover',this.gv.bind(this,true));
$(this.wh[ww]._id).observe('mouseout',this.gw.bind(this,'submenu'));
}
switch(this.wh[ww]._attributes.horizontalPositioning){
case "left":
if(this.wu._attributes.direction=='horizontal'){
gn=this.wu.n+this.wu._attributes.leftMargin+this.n+this.wh[ww]._attributes.offsetX;
}
if(this.wu._attributes.direction=='vertical'){
gn=this.wu.n-this.wh[ww].X-this.wh[ww]._attributes.offsetX;
}
break;
case "center":
if(this.wu._attributes.direction=='horizontal'){
gn=this.wu.n+this.wu._attributes.leftMargin+this.n-Math.floor((this.wh[ww].X-this.X)/2)+this.wh[ww]._attributes.offsetX;
}
break;
case "right":
if(this.wu._attributes.direction=='horizontal'){
gn=this.wu.n+this.wu._attributes.leftMargin+this.n+this.X-this.wh[ww].X-this.wh[ww]._attributes.offsetX;
}
if(this.wu._attributes.direction=='vertical'){
gn=this.wu.n+this.wu.X+this.wh[ww]._attributes.offsetX;
}
break;
}
switch(this.wh[ww]._attributes.verticalPositioning){
case "top":
if(this.wu._attributes.direction=='vertical'){
ge=this.wu.R+this.wu._attributes.topMargin+this.R+this.wh[ww]._attributes.offsetY;
}
if(this.wu._attributes.direction=='horizontal'){
ge=this.wu.R-this.wh[ww].Z-this.wh[ww]._attributes.offsetY;
}
break;
case "middle":
if(this.wu._attributes.direction=='vertical'){
ge=this.wu.R+this.wu._attributes.topMargin+this.R-Math.floor((this.wh[ww].Z-this.Z)/2)+this.wh[ww]._attributes.offsetX;
}
break;
case "bottom":
if(this.wu._attributes.direction=='vertical'){
ge=this.wu.R+this.wu._attributes.topMargin+this.R+this.Z-this.wh[ww].Z-this.wh[ww]._attributes.offsetY;
}
if(this.wu._attributes.direction=='horizontal'){
ge=this.wu.R+this.wu.Z+this.wh[ww]._attributes.offsetY;
}
break;
}
this.wh[ww].c(ge,gn);
$(this.wh[ww]._id+'_mask').setStyle({"top":this.wh[ww].R+"px","left":this.wh[ww].n+"px"});
if((this.wu._attributes.tabbed!=undefined)&&(this.wu._attributes.tabbed.hastab)){
if((this.wu.X+this.wu.n)<(this.wh[ww].X+this.wh[ww].n)){
$(this.wh[ww]._id+'_mask').setStyle({"left":(this.wu.n+this.wu.X-this.wh[ww].X)+"px"});
this.wh[ww].c(this.wh[ww].R,this.wu.n+this.wu.X-this.wh[ww].X);
}
if(this.wu.n>this.wh[ww].n){
$(this.wh[ww]._id+'_mask').setStyle({"left":this.wu.n+"px"});
this.wh[ww].c(this.wh[ww].R,this.wu.n);
}
}
}
this.wI=true;
},
wF:function(){
if(!this.wI)return;
for(var ww=0;ww<this.ts;ww++){
var gn=0;
var ge=0;
switch(this.wh[ww]._attributes.horizontalPositioning){
case "left":
if(this.wu._attributes.direction=='horizontal'){
gn=this.wu.n+this.wu._attributes.leftMargin+this.n+this.wh[ww]._attributes.offsetX;
}
if(this.wu._attributes.direction=='vertical'){
gn=this.wu.n-this.wh[ww].X-this.wh[ww]._attributes.offsetX;
}
break;
case "center":
if(this.wu._attributes.direction=='horizontal'){
gn=this.wu.n+this.wu._attributes.leftMargin+this.n-Math.floor((this.wh[ww].X-this.X)/2)+this.wh[ww]._attributes.offsetX;
}
break;
case "right":
if(this.wu._attributes.direction=='horizontal'){
gn=this.wu.n+this.wu._attributes.leftMargin+this.n+this.X-this.wh[ww].X-this.wh[ww]._attributes.offsetX;
}
if(this.wu._attributes.direction=='vertical'){
gn=this.wu.n+this.wu.X+this.wh[ww]._attributes.offsetX;
}
break;
}
switch(this.wh[ww]._attributes.verticalPositioning){
case "top":
if(this.wu._attributes.direction=='vertical'){
ge=this.wu.R+this.wu._attributes.topMargin+this.R+this.wh[ww]._attributes.offsetY;
}
if(this.wu._attributes.direction=='horizontal'){
ge=this.wu.R-this.wh[ww].Z-this.wh[ww]._attributes.offsetY;
}
break;
case "middle":
if(this.wu._attributes.direction=='vertical'){
ge=this.wu.R+this.wu._attributes.topMargin+this.R-Math.floor((this.wh[ww].Z-this.Z)/2)+this.wh[ww]._attributes.offsetX;
}
break;
case "bottom":
if(this.wu._attributes.direction=='vertical'){
ge=this.wu.R+this.wu._attributes.topMargin+this.R+this.Z-this.wh[ww].Z-this.wh[ww]._attributes.offsetY;
}
if(this.wu._attributes.direction=='horizontal'){
ge=this.wu.R+this.wu.Z+this.wh[ww]._attributes.offsetY;
}
break;
}
this.wh[ww].c(ge,gn);
if($(this.wh[ww]._id+'_mask'))
$(this.wh[ww]._id+'_mask').setStyle({"top":this.wh[ww].R+"px","left":this.wh[ww].n+"px"});
if((this.wu._attributes.tabbed!=undefined)&&(this.wu._attributes.tabbed.hastab)){
if((this.wu.X+this.wu.n)<(this.wh[ww].X+this.wh[ww].n)){
$(this.wh[ww]._id+'_mask').setStyle({"left":(this.wu.n+this.wu.X-this.wh[ww].X)+"px"});
this.wh[ww].c(this.wh[ww].R,this.wu.n+this.wu.X-this.wh[ww].X);
}
if(this.wu.n>this.wh[ww].n){
$(this.wh[ww]._id+'_mask').setStyle({"left":this.wu.n+"px"});
this.wh[ww].c(this.wh[ww].R,this.wu.n);
}
}
for(var wP=0;wP<this.wh[ww].D.length;wP++){
if(this.wh[ww].D[wP].wt()=="button"&&this.wh[ww].D[wP].wh.length>0){
this.wh[ww].D[wP].wF();
}
}
}
},
wt:function(){
return 'button';
}
});
var XTDq=Class.create(XTDG,{
wu:XTDW,wj:Boolean,L:Boolean,
initialize:function(V,l,k){
this._id=V;
this.A=V+'_inner';
this.v=V+'_back';
this.wu=l;
this.U=l.A;
this._attributes=k;
this.H=V+'_content';
this.wj=false;
this.L=false;
},
create:function(){
this.createElement();
$(this.A).innerHTML="<div id='"+this.H+"'></div>";
this.we();
},
we:function(){
if(this._attributes.background.type=='9scale'){
XTDwc(this._attributes.background,XTDg,this.wu._root+"preloader");
}
},
wf:function(){
if(this.L)return;
this.L=true;
$(this._id).innerHTML="<img src='"+XTDt+"includes/FlexiMenusJS/spacer.gif' style='position:absolute;top:0;left:0;width:"+this.X+"px;height:"+this.Z+"px;cursor:default;' alt='' />"+$(this._id).innerHTML;
this.gr();
if(this.wu.wg()==this&&!this.wu.K){
$(this.wu._id).setStyle({'display':'none','visibility':'visible'});
$(this.wu._id+'_mask').setStyle({'display':'none','visibility':'visible'});
if(this.wu.u==null){
this.wu.y();
if(this.wu.wE){
this.wu.wE.wq();
this.wu.wE.K=true;
this.wu.wE.wi();
}
}
}
return true;
},
gP:function(){
var gh=this._attributes;
$(this.A).className=gh.captioncss;
$(this.A).setStyle({
'fontFamily':this._attributes.fontName,'fontSize':this._attributes.fontSize+"px","color":this._attributes.textColor
});
if((!this._attributes.wrapText&&(this._attributes.horizontalResize=='fixed'))||(this._attributes.horizontalResize!='fixed')){
$(this.A).setStyle({'whiteSpace':"nowrap"});
}else{
$(this.A).setStyle({'textAlign':this._attributes.horizontalContentAlign});
}
$(this.H).innerHTML="<div id='"+this.H+"_label'>"+this._attributes.wR+"</div>";
if(this._attributes.wb){
switch(gh.iconPositioning){
case "top":
$(this.H).innerHTML="<div id='"+this.H+"_icon' style='text-align:"+gh.iconAlignment+";margin-bottom:"+gh.iconSpacing+"px;'><img src='"+this._attributes.wb+"' /></div>"+$(this.H).innerHTML;
break;
case "bottom":
$(this.H).innerHTML+="<div id='"+this.H+"_icon' style='text-align:"+gh.iconAlignment+";margin-top:"+gh.iconSpacing+"px;'><img src='"+this._attributes.wb+"' /></div>";
break;
case "right":
$(this.H).innerHTML="<div id='"+this.H+"_label' style='display:inline;'>"+this._attributes.wR+"</div>"+"<div id='"+this.H+"_icon' style='display:inline;margin-left:"+gh.iconSpacing+"px;'><img style='vertical-align:"+gh.iconAlignment+";' src='"+this._attributes.wb+"' /></div>";
break;
case "left":
$(this.H).innerHTML="<div id='"+this.H+"_icon' style='display:inline;margin-right:"+gh.iconSpacing+"px;'><img style='vertical-align:"+gh.iconAlignment+";' src='"+this._attributes.wb+"' /></div>"+"<div id='"+this.H+"_label' style='display:inline;'>"+this._attributes.wR+"</div>";
break;
}
}
if(this._attributes.textBold)$(this.A).setStyle({"fontWeight":"bold"});
if(this._attributes.textItalic)$(this.A).setStyle({"fontStyle":"italic"});
if(this._attributes.textUnderline)$(this.H+"_label").setStyle({"textDecoration":"underline"});
this.wj=true;
},
resize:function(){
if(this._attributes.horizontalResize!="fixed"){
if(!this.wj)this.gP();
var tP=$(this.A);
var th=(tP.offsetWidth>tP.scrollWidth)?tP.offsetWidth:tP.scrollWidth;
this._attributes.width=th+this._attributes.leftMargin+this._attributes.rightMargin;
}else this._attributes.minimumWidth=0;
if(this._attributes.verticalResize!="fixed"){
if(!this.wj)this.gP();
var tP=$(this.A);
var tX=(tP.offsetHeight>tP.scrollHeight)?tP.offsetHeight:tP.scrollHeight;
this._attributes.height=tX+this._attributes.topMargin+this._attributes.bottomMargin;
}else this._attributes.minimumHeight=0;
this.r(this._attributes.width,this._attributes.height);
},
gr:function(){
var gh=this._attributes;
var background=this._attributes.background;
this.m(background,'');
if(!this.wj){
this.gP();
}
$(this.H).setStyle({'position':'absolute','top':0+'px','left':0+'px'});
var tp=$(this.H).getDimensions();
var tf=tp.width;var tY=tp.height;
var tQ=0;var to=0;
switch(this._attributes.horizontalContentAlign){
case "right":to=this.X-this._attributes.rightMargin-tf;break;
case "left":to=this._attributes.leftMargin;break;
case "center":to=Math.floor((this.X-tf)/2);break;
}
switch(this._attributes.verticalContentAlign){
case "bottom":tQ=this.Z-this._attributes.bottomMargin-tY;break;
case "top":tQ=this._attributes.topMargin;break;
case "middle":tQ=Math.floor((this.Z-tY)/2);break;
}
$(this.H).setStyle({'position':'absolute','top':tQ+'px','left':to+'px'});
},
wt:function(){
return 'caption';
}
});
var XTDGu=Class.create({
wu:XTDW,L:Boolean,
initialize:function(V,l,k){
this._id=V;
this.wu=l;
this.U=l.A;
this._attributes=k;
this.L=false;
},
create:function(){
$(this.U).innerHTML+="<div id='"+this._id+"' style='position:absolute;overflow:hidden;'>&nbsp;</div>";
if(this._attributes.separatorcss){
$(this._id).className=this._attributes.separatorcss;
}
if(this._attributes.separatorImg){
if(XTDo()){
$(this._id).setStyle({'filter':"progid:DXImageTransform.Microsoft.AlphaImageLoader"
+"(src=\""+XTDt+this._attributes.separatorImgPath+this._attributes.separatorImg+"\", sizingMethod=\"scale\")","lineHeight":"1px"});
}else{
$(this._id).innerHTML="<img id='"+this._id+"_img' src='"+XTDt+this._attributes.separatorImgPath+this._attributes.separatorImg+"' />";
}
}
this.we();
},
we:function(){
if(this._attributes.separatorImg){
XTDwz(this._attributes.separatorImgPath+this._attributes.separatorImg,XTDg,this.wu._root+"preloader");
}
},
r:function(P,h){
this.X=P;
this.Z=h;
},
c:function(z,b){
this.R=z;
this.n=b;
},
resize:function(){
if(this.wu._attributes.direction=='horizontal'){
this._attributes.verticalResize=this._attributes.resize;
this._attributes.horizontalResize='fixed';
}
if(this.wu._attributes.direction=='vertical'){
this._attributes.horizontalResize=this._attributes.resize;
this._attributes.verticalResize='fixed';
}
this.r(this._attributes.width,this._attributes.height);
},
wf:function(){
if(this.L){
return;
}
this.L=true;
$(this._id).setStyle({'width':this.X+'px','height':this.Z+'px','left':this.n+'px','top':this.R+'px'});
if(this._attributes.separatorImg&&!XTDo()){
$(this._id+"_img").setStyle({'height':this.Z+'px','width':this.X+'px'});
}
var tQ=this.R;
var to=this.n;
if(this.wu._attributes.direction=='horizontal'){
switch(this._attributes.align){
case "bottom":tQ+=this.wu.wd-this.Z;break;
case "middle":tQ+=Math.floor((this.wu.wd-this.Z)/2);break;
}
$(this._id).setStyle({'top':tQ+'px'});
}
if(this.wu._attributes.direction=='vertical'){
switch(this._attributes.align){
case "right":to+=this.wu.wo-this.X;break;
case "center":to+=Math.floor((this.wu.wo-this.X)/2);break;
}
$(this._id).setStyle({'left':to+'px'});
}
if(this.wu.wg()==this&&!this.wu.K){
$(this.wu._id).setStyle({'display':'none','visibility':'visible'});
$(this.wu._id+'_mask').setStyle({'display':'none','visibility':'visible'});
if(this.wu.u==null){
this.wu.y();
if(this.wu.wE){
this.wu.wE.wq();
this.wu.wE.K=true;
this.wu.wE.wi();
}
}
}
return true;
},
wt:function(){
return 'separator';
}
});
var XTDLC="";
function XTDgX(gZ,l,O,gc,skin_){
if(l.tagName.toLowerCase()=='ul'){
var gz=(Prototype.Browser.IE)?l.childNodes:l.childElements();
for(var ww=0;ww<gz.length;ww++){
var gb=gz[ww];
if(gb.tagName.toLowerCase()=='li'){
var wb=null;
var gm=null;
var upstateIconUrl=null;var overstateIconUrl=null;var downstateIconUrl=null;
var gp=false;
var gf=null;
if(gb.attributes['id']!=undefined){
gf=gb.attributes['id'].value;
}
var gY=null;
if(gb.attributes['title']!=undefined){
gY=$(gb).readAttribute('title');
if(gY){
gm=$(gY).innerHTML;
$(gY).setStyle({'display':'none'});
}
}
if((gb.innerHTML.XTDgQ()=="")||(gb.innerHTML.XTDgQ()=="{XTD_BLANK}")){
gZ.S('separator',XTDGs(gf,O,gc,skin_,'separator'));
gp=true;
}
for(var gd=0;gd<gb.childNodes.length;gd++){
if((gb.childNodes[gd].nodeType==1)&&(gb.childNodes[gd].tagName.toLowerCase()=="img")){
var subnode=gb.childNodes[gd];
if(subnode.attributes['src']!=undefined){
if((subnode.attributes['title']!=undefined)&&$(subnode).readAttribute('title')){
eval($(subnode).readAttribute('title')+"IconUrl = subnode.attributes['src'].value;");
var gW=eval($(subnode).readAttribute('title')+"IconUrl");
if(gW&&(gW!=XTDtV('path'))){
}else{
eval($(subnode).readAttribute('title')+"IconUrl = '';");
}
}
else{
wb=subnode.attributes['src'].value;
if(wb&&(wb!=XTDtV('path'))){
}else{
wb="";
}
}
}
}
if((gb.childNodes[gd].nodeType==3)&&(gb.childNodes[gd].nodeValue.XTDgQ()!="")&&(gb.childNodes[gd].nodeValue.XTDgQ()!="{XTD_BLANK}")){
var gD=XTDGs(gf,O,gc,skin_,'caption');
if(wb){
gD.wb=wb;
}
if(gm){
gD.wR=XTDgu(gm);
}else{
gD.wR=XTDgu(gb.childNodes[gd].nodeValue.XTDgQ());
}
gZ.S('caption',gD);
gp=true;
}
if((gb.childNodes[gd].nodeType==1)&&(gb.childNodes[gd].tagName.toLowerCase()=="div")){
var subnode=gb.childNodes[gd];
if(subnode.attributes['title']!=undefined){
var gT=$(subnode).readAttribute('title');
if(gT){
var gs=subnode.innerHTML;
while(gm.match("{"+gT+"}")){
gm=gm.replace("{"+gT+"}",gs);
}
}
}
}
if((gb.childNodes[gd].nodeType==1)&&(gb.childNodes[gd].tagName.toLowerCase()=="a")){
var gK=XTDGs(gf,O,gc,skin_,'button');
gK.upstateIconUrl=upstateIconUrl;
gK.overstateIconUrl=overstateIconUrl;
gK.downstateIconUrl=downstateIconUrl;
if(gm){
gK.wR=XTDgu(gm);
}else{
gK.wR=XTDgu(gb.childNodes[gd].innerHTML);
}
var subnode=gb.childNodes[gd];
if(subnode.attributes['href']!=undefined){
gK.wn=XTDgu(subnode.attributes['href'].value);
}
if(subnode.attributes['target']!=undefined){
gK.tN=XTDgu(subnode.attributes['target'].value);
}
if(subnode.attributes['onclick']!=undefined){
gK.tq=XTDgu(subnode.attributes['onclick'].value);
}
if(subnode.attributes['onmouseover']!=undefined){
gK.ty=XTDgu(subnode.attributes['onmouseover'].value);
}
gZ.S('button',gK);
for(var wP=gd+1;wP<gb.childNodes.length;wP++){
var subnode=gb.childNodes[wP];
if((subnode.tagName!=undefined)&&(subnode.tagName.toLowerCase()=='ul')){
var gM=O+1;
var gx=null;
if(subnode.attributes['id']!=undefined){
gx=subnode.attributes['id'].value;
}
var gL=new Array();
for(var gB=0;gB<gc.length;gB++){
gL.push(gc[gB]);
}
if(gx&&(gc[0][gx]!=undefined)){
gL.push(gc[0][gx]);
}
var gV=XTDGs(null,gM,gL,skin_,'menu');
gZ.wg().tF(gV,gM);
XTDgX(gZ.wg().tS(),subnode,gM,gL,skin_);
}
}
gp=true;
}
}
if(!gp){
var gD=XTDGs(gf,O,gc,skin_,'caption');
if(wb){
gD.wb=wb;
}
if(gm){
gD.wR=XTDgu(gm);
}else{
gD.wR='';
}
gZ.S('caption',gD);
gp=true;
}
}
}
}
}
;
var xtdmenus=new Array();
function xtdBuildMenu(gl,ga,gk){
var gO=$(gl);
var gz=(Prototype.Browser.IE)?gO.childNodes:gO.childElements();
var gI=gz[0];
XTDLC="";
gO.removeChild(gI);
var gF=eval("xtdSkin_"+ga.skin+"_"+ga.style+"_"+ga.menuType);
var gV=ga['level1']==undefined?ga.defaultlevel.menu:ga['level1'].menu;
var gE=gF['level1']==undefined?gF.defaultlevel.menu:gF['level1'].menu;
for(var gS in gE){
gV[gS]=gE[gS];
}
var gJ=new XTDW(gl+'_m',gl+'_root',gl+'_root',gV,0);
var gq=new Array();
gq.push(ga);
if(ga.cutCorners!=undefined){
gJ._attributes.cutCorners=ga.cutCorners;
}
if(ga.showTab!=undefined){
gJ._attributes.wU=ga.showTab;
}
if(ga.xtdnumber!=undefined){
gJ._attributes.XTDLC=ga.xtdnumber;
}
if(ga.persistent!=undefined){
gJ._attributes.wS=ga.persistent;
}
if(ga.tabheight){
gJ._attributes.wL=ga.tabheight;
gJ._attributes.wT=ga.tabheight;
}
if(gk!=undefined){
XTDt=gk;
}
XTDgX(gJ,gI,1,gq,gF);
gO.innerHTML="";
gO.innerHTML+="<div id='"+gl+"_root' style='position:relative;'><div style='height:1px;width:1px;overflow:hidden;' id='"+gl+"_rootpreloader'>&nbsp;<br /></div></div>";
if(ga.fitContainerHorizontal){
gJ._attributes.fitContainerHorizontal=true;
gJ._attributes.horizontalFit=false;
gJ._attributes.width=$(gl).up().getWidth();
}
if(ga.fitContainerVertical){
gJ._attributes.fitContainerVertical=true;
gJ._attributes.verticalFit=false;
gJ._attributes.height=$(gl).up().getHeight();
}
if(ga.fitContainerHorizontal||ga.fitContainerVertical){
Event.observe(window,'resize',function(){
var gj=$(gl).up().getWidth();
var GC=$(gl).up().getHeight();
if(gJ._attributes.fitContainerHorizontal&&(gJ._attributes.width!=gj)){
gJ._attributes.width=gj;
}
if(gJ._attributes.fitContainerVertical&&(gJ._attributes.height!=GC)){
gJ._attributes.height=GC;
}
gJ.c(0,0);
gJ.wM();
gJ.K=false;
gJ.y();
});
}
XTDGt(gJ,gl);
return gJ;
}
;
function XTDGt(Gg,GG){
xtdmenus.push(GG);
xtdQueue[GG]=new Array();
xtdCurrentQItem[GG]=0;
Gg.c(0,0);
Gg.wr();
setTimeout("xtdStartQueue()",XTDw);
}
;
function xtdRunQueue(){
try{
var GU=false;
for(var wP=0;wP<xtdmenus.length;wP++){
var GA=xtdmenus[wP];
if(xtdCurrentQItem[GA]<xtdQueue[GA].length){
var item=xtdQueue[GA][xtdCurrentQItem[GA]];
item.wf();
xtdCurrentQItem[GA]++;
GU=true;
}
}
if(!GU){
clearInterval(globalQueue);
}
}catch(Gv){
}
}
;
function xtdStartQueue(){
if(globalQueue!=null)return;
globalQueue=setInterval("xtdRunQueue()",XTDw);
}
;
function XTDgR(){
if(globalQueue!=null){
clearInterval(globalQueue);
globalQueue=null;
}
}
;
function XTDGs(GH,O,gc,skin_,J){
var GR=new Object();
var Gn=new Object();
var Ge=false;
var parents=gc[0];
if(parents['level'+O]==undefined){
if((parents.defaultlevel!=undefined)&&(eval("parents.defaultlevel."+J)!=undefined)){
Gn=eval("parents.defaultlevel."+J);
Ge=true;
}
}else{
if(eval("parents['level"+O+"']."+J)!=undefined)
Gn=eval("parents['level"+O+"']."+J);
}
for(var gS in Gn){
GR[gS]=Gn[gS];
}
for(var gB=1;gB<gc.length;gB++){
var parents=gc[gB];
if(parents['level'+O]!=undefined){
if(eval("parents['level"+O+"']."+J)!=undefined)
Gn=eval("parents['level"+O+"']."+J);
}else{
if(Ge&&(parents.defaultlevel!=undefined)&&(eval("parents.defaultlevel."+J)!=undefined))
Gn=eval("parents.defaultlevel."+J);
}
for(var gS in Gn){
GR[gS]=Gn[gS];
}
}
if(GH&&(gc[0][GH]!=undefined)){
var Gn=gc[0][GH];
for(var gS in Gn){
GR[gS]=Gn[gS];
}
}
var gE=skin_['level'+O]==undefined?eval("skin_.defaultlevel."+J):eval("skin_['level"+O+"']."+J);
for(var gS in gE){
GR[gS]=gE[gS];
}
return GR;
}
;
function XTDtV(J){
var Gr=""+window.location;
Gr=Gr.split('#')[0];
var GP=Gr.split('/');
var Gh="";
switch(J){
case "path":GP.pop();Gh=GP.join('/')+"/";break;
case "fullpath":Gh=Gr;break;
case "abspath":GP.splice(0,3);Gh="/"+GP.join('/');break;
case "file":Gh=GP[GP.length-1];break;
default:Gh=GP[GP.length-1];break;
}
return Gh;
};
;
function XTDgu(GX){
return GX.replace(/{XTD_SLASH}/gi,'\\').replace(/{XTD_QUOTE}/gi,'\"').replace(/{XTD_BLANK}/gi,'').replace(/{XTD_LT}/gi,'<').replace(/{XTD_GT}/gi,'>');
};
function XTDwz(GZ,Gc,Gz){
if((GZ.match('.png')!=null)||(GZ.match('.jpg')!=null)||(GZ.match('.gif')!=null)||(GZ.match('.jpeg')!=null)){}
else{
}
if(Gc.indexOf(GZ)==-1){
var Gb=new Image();
Gb.src=GZ;
Gc.push(Gb);
var Gm=document.createElement('img');
Gm.src=GZ;
$(Gz).appendChild(Gm);
return 1;
}
return 0;
};
function XTDwc(p,Gc,Gz){
var Gp=0;
if(p.imgTL!="")
Gp+=XTDwz(p.imgPath+p.imgTL,Gc,Gz);
if(p.imgTR!="")
Gp+=XTDwz(p.imgPath+p.imgTR,Gc,Gz);
if(p.imgBL!="")
Gp+=XTDwz(p.imgPath+p.imgBL,Gc,Gz);
if(p.imgBR!="")
Gp+=XTDwz(p.imgPath+p.imgBR,Gc,Gz);
if(p.imgTC!="")
Gp+=XTDwz(p.imgPath+p.imgTC,Gc,Gz);
if(p.imgBC!="")
Gp+=XTDwz(p.imgPath+p.imgBC,Gc,Gz);
if(p.imgML!="")
Gp+=XTDwz(p.imgPath+p.imgML,Gc,Gz);
if(p.imgMR!="")
Gp+=XTDwz(p.imgPath+p.imgMR,Gc,Gz);
if(p.imgMC!="")
Gp+=XTDwz(p.imgPath+p.imgMC,Gc,Gz);
return Gp;
};
function XTDtl(GX){
var Gf="0123456789ABCDEFabcdef";
var GY=GX;
var GQ="";
var ww=0;
while(ww<GY.length){
var ch=GY.charAt(ww);
if(ch=="+"){
GQ+=" ";
ww++;
}else if(ch=="%"){
if(ww<(GY.length-2)&&Gf.indexOf(GY.charAt(ww+1))!=-1&&Gf.indexOf(GY.charAt(ww+2))!=-1){
GQ+=unescape(GY.substr(ww,3));
ww+=3;
}else{
GQ+="%[ERROR]";
ww++;
}
}else{
GQ+=ch;
ww++;
}
}
return GQ;
};
function XTDGw(Go){
if(!$("xtdDebug"))return;
if(typeof(Go)=="object"){
for(var Gd in Go)
$("xtdDebug").innerHTML+=Gd+Go[Gd]+"<br />";
}
$("xtdDebug").innerHTML+=Go+"<br />";
$("xtdDebug").scrollTop=$("xtdDebug").scrollHeight;
};
function XTDo(){
var GW=navigator.appVersion.split("MSIE");
var version=parseFloat(GW[1]);
if((version>=6)&&(version<=8)&&(document.body.filters)){
return true;
}
return false;
};
String.prototype.XTDgQ=function(){
return this.replace(/^\s+|\s+$/g,"");
};
if(navigator.userAgent.indexOf("Chrome")>-1){
XTDw=15;
};
if(navigator.userAgent.indexOf("MSIE 6")>-1){
XTDw=150;
};