// Copyright (c) 2008 Campolindo Cabana Club Marlins.  All Rights Reserved.
// ccc-head.js includes dhtmlXCommon.js:
/*
Copyright Scand LLC http://www.scbr.com
This version of Software is free for using in non-commercial applications. For commercial use please contact info@scbr.com to obtain license
*/ 



function dtmlXMLLoaderObject(funcObject,dhtmlObject,async,rSeed){
 this.xmlDoc="";
 if(arguments.length==2)
 this.async=true;
 else
 this.async=async;
 this.onloadAction=funcObject||null;
 this.mainObject=dhtmlObject||null;
 this.waitCall=null;
 this.rSeed=rSeed||false;
 return this;
};
 
 dtmlXMLLoaderObject.prototype.waitLoadFunction=function(dhtmlObject){
 this.check=function(){
 if(dhtmlObject.onloadAction!=null){
 if((!dhtmlObject.xmlDoc.readyState)||(dhtmlObject.xmlDoc.readyState == 4)){
 dhtmlObject.onloadAction(dhtmlObject.mainObject,null,null,null,dhtmlObject);
 if(dhtmlObject.waitCall){dhtmlObject.waitCall();dhtmlObject.waitCall=null;}
 dhtmlObject=null;
}
}
};
 return this.check;
};

 
 dtmlXMLLoaderObject.prototype.getXMLTopNode=function(tagName){
 if(this.xmlDoc.responseXML){
 var temp=this.xmlDoc.responseXML.getElementsByTagName(tagName);
 var z=temp[0];
}else
 var z=this.xmlDoc.documentElement;
 if(z){
 this._retry=false;
 return z;
}

 if((_isIE)&&(!this._retry)){
 
 var xmlString=this.xmlDoc.responseText;
 this._retry=true;
 this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
 this.xmlDoc.async=false;
 this.xmlDoc.loadXML(xmlString);

 return this.getXMLTopNode(tagName);
}
 dhtmlxError.throwError("LoadXML","Incorrect XML",[this.xmlDoc,this.mainObject]);
 return document.createElement("DIV");
};
 
 
 dtmlXMLLoaderObject.prototype.loadXMLString=function(xmlString){
 try
{
 var parser = new DOMParser();
 this.xmlDoc = parser.parseFromString(xmlString,"text/xml");
}
 catch(e){
 this.xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
 this.xmlDoc.async=this.async;
 this.xmlDoc.loadXML(xmlString);
}
 this.onloadAction(this.mainObject);
 if(this.waitCall){this.waitCall();this.waitCall=null;}
}
 
 dtmlXMLLoaderObject.prototype.loadXML=function(filePath,postMode,postVars){
 if(this.rSeed)filePath+=((filePath.indexOf("?")!=-1)?"&":"?")+"a_dhx_rSeed="+(new Date()).valueOf();
 this.filePath=filePath;

 if(window.XMLHttpRequest){
 this.xmlDoc = new XMLHttpRequest();
 this.xmlDoc.open(postMode?"POST":"GET",filePath,this.async);
 if(postMode)
 this.xmlDoc.setRequestHeader('Content-type','application/x-www-form-urlencoded');
 this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
 this.xmlDoc.send(null||postVars);
}
 else{

 if(document.implementation && document.implementation.createDocument)
{
 this.xmlDoc = document.implementation.createDocument("","",null);
 this.xmlDoc.onload = new this.waitLoadFunction(this);
 this.xmlDoc.load(filePath);
}
 else
{
 this.xmlDoc = new ActiveXObject("Microsoft.XMLHTTP");
 this.xmlDoc.open(postMode?"POST":"GET",filePath,this.async);
 if(postMode)this.xmlDoc.setRequestHeader('Content-type','application/x-www-form-urlencoded');
 this.xmlDoc.onreadystatechange=new this.waitLoadFunction(this);
 this.xmlDoc.send(null||postVars);
}
}
};
 
 dtmlXMLLoaderObject.prototype.destructor=function(){
 this.onloadAction=null;
 this.mainObject=null;
 this.xmlDoc=null;
 return null;
}
 
 
function callerFunction(funcObject,dhtmlObject){
 this.handler=function(e){
 if(!e)e=event;
 funcObject(e,dhtmlObject);
 return true;
};
 return this.handler;
};

 
function getAbsoluteLeft(htmlObject){
 var xPos = htmlObject.offsetLeft;
 var temp = htmlObject.offsetParent;
 while(temp != null){
 xPos+= temp.offsetLeft;
 temp = temp.offsetParent;
}
 return xPos;
}
 
function getAbsoluteTop(htmlObject){
 var yPos = htmlObject.offsetTop;
 var temp = htmlObject.offsetParent;
 while(temp != null){
  if(_isIE)
   {
     yPos+= 11 + temp.offsetTop;
   }
  else
   {
     yPos+= 31 + temp.offsetTop;
   }
 temp = temp.offsetParent;
}
 return yPos;
}
 
 
 
function convertStringToBoolean(inputString){if(typeof(inputString)=="string")inputString=inputString.toLowerCase();
 switch(inputString){
 case "1":
 case "true":
 case "yes":
 case "y":
 case 1: 
 case true: 
 return true;
 break;
 default: return false;
}
}

 
function getUrlSymbol(str){
 if(str.indexOf("?")!=-1)
 return "&"
 else
 return "?"
}
 
 
function dhtmlDragAndDropObject(){
 this.lastLanding=0;
 this.dragNode=0;
 this.dragStartNode=0;
 this.dragStartObject=0;
 this.tempDOMU=null;
 this.tempDOMM=null;
 this.waitDrag=0;
 if(window.dhtmlDragAndDrop)return window.dhtmlDragAndDrop;
 window.dhtmlDragAndDrop=this;

 return this;
};
 
 dhtmlDragAndDropObject.prototype.removeDraggableItem=function(htmlNode){
 htmlNode.onmousedown=null;
 htmlNode.dragStarter=null;
 htmlNode.dragLanding=null;
}
 dhtmlDragAndDropObject.prototype.addDraggableItem=function(htmlNode,dhtmlObject){
 htmlNode.onmousedown=this.preCreateDragCopy;
 htmlNode.dragStarter=dhtmlObject;
 this.addDragLanding(htmlNode,dhtmlObject);
}
 dhtmlDragAndDropObject.prototype.addDragLanding=function(htmlNode,dhtmlObject){
 htmlNode.dragLanding=dhtmlObject;
}
 dhtmlDragAndDropObject.prototype.preCreateDragCopy=function(e)
{
 if(window.dhtmlDragAndDrop.waitDrag){
 window.dhtmlDragAndDrop.waitDrag=0;
 document.body.onmouseup=window.dhtmlDragAndDrop.tempDOMU;
 document.body.onmousemove=window.dhtmlDragAndDrop.tempDOMM;
 return false;
}

 window.dhtmlDragAndDrop.waitDrag=1;
 window.dhtmlDragAndDrop.tempDOMU=document.body.onmouseup;
 window.dhtmlDragAndDrop.tempDOMM=document.body.onmousemove;
 window.dhtmlDragAndDrop.dragStartNode=this;
 window.dhtmlDragAndDrop.dragStartObject=this.dragStarter;
 document.body.onmouseup=window.dhtmlDragAndDrop.preCreateDragCopy;
 document.body.onmousemove=window.dhtmlDragAndDrop.callDrag;

 if((e)&&(e.preventDefault)){e.preventDefault();return false;}
 return false;
};
 dhtmlDragAndDropObject.prototype.callDrag=function(e){
 if(!e)e=window.event;
 dragger=window.dhtmlDragAndDrop;

 if((e.button==0)&&(_isIE))return dragger.stopDrag();
 if(!dragger.dragNode){
 dragger.dragNode=dragger.dragStartObject._createDragNode(dragger.dragStartNode,e);
 if(!dragger.dragNode)return dragger.stopDrag();
 dragger.gldragNode=dragger.dragNode;
 document.body.appendChild(dragger.dragNode);
 document.body.onmouseup=dragger.stopDrag;
 dragger.waitDrag=0;
 dragger.dragNode.pWindow=window;
 dragger.initFrameRoute();
}


 if(dragger.dragNode.parentNode!=window.document.body){
 var grd=dragger.gldragNode;
 if(dragger.gldragNode.old)grd=dragger.gldragNode.old;

 
 grd.parentNode.removeChild(grd);
 var oldBody=dragger.dragNode.pWindow;
 if(_isIE){
 var div=document.createElement("Div");
 div.innerHTML=dragger.dragNode.outerHTML;
 dragger.dragNode=div.childNodes[0];}
 else dragger.dragNode=dragger.dragNode.cloneNode(true);
 dragger.dragNode.pWindow=window;
 dragger.gldragNode.old=dragger.dragNode;
 document.body.appendChild(dragger.dragNode);
 oldBody.dhtmlDragAndDrop.dragNode=dragger.dragNode;
}

 dragger.dragNode.style.left=e.clientX+15+(dragger.fx?dragger.fx*(-1):0)+(document.body.scrollLeft||document.documentElement.scrollLeft)+"px";
 dragger.dragNode.style.top=e.clientY+3+(dragger.fy?dragger.fy*(-1):0)+(document.body.scrollTop||document.documentElement.scrollTop)+"px";
 if(!e.srcElement)var z=e.target;else z=e.srcElement;
 dragger.checkLanding(z,e.clientX,e.clientY);
}
 
 dhtmlDragAndDropObject.prototype.calculateFramePosition=function(n){
 
 if(window.name){
 var el =parent.frames[window.name].frameElement.offsetParent;
 var fx=0;
 var fy=0;
 while(el){fx+= el.offsetLeft;fy+= el.offsetTop;el = el.offsetParent;}
 if((parent.dhtmlDragAndDrop)){var ls=parent.dhtmlDragAndDrop.calculateFramePosition(1);fx+=ls.split('_')[0]*1;fy+=ls.split('_')[1]*1;}
 if(n)return fx+"_"+fy;
 else this.fx=fx;this.fy=fy;
}
 return "0_0";
}
 dhtmlDragAndDropObject.prototype.checkLanding=function(htmlObject,x,y){

 if((htmlObject)&&(htmlObject.dragLanding)){if(this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding);
 this.lastLanding=htmlObject;this.lastLanding=this.lastLanding.dragLanding._dragIn(this.lastLanding,this.dragStartNode,x,y);}
 else{
 if((htmlObject)&&(htmlObject.tagName!="BODY"))this.checkLanding(htmlObject.parentNode,x,y);
 else{
 if(this.lastLanding)this.lastLanding.dragLanding._dragOut(this.lastLanding,x,y);this.lastLanding=0;
 if(this._onNotFound)this._onNotFound();
}
}
}
 dhtmlDragAndDropObject.prototype.stopDrag=function(e,mode){
 dragger=window.dhtmlDragAndDrop;
 if(!mode)
{
 dragger.stopFrameRoute();
 var temp=dragger.lastLanding;
 dragger.lastLanding=null;
 if(temp)temp.dragLanding._drag(dragger.dragStartNode,dragger.dragStartObject,temp);
}
 dragger.lastLanding=null;
 if((dragger.dragNode)&&(dragger.dragNode.parentNode==document.body))dragger.dragNode.parentNode.removeChild(dragger.dragNode);
 dragger.dragNode=0;
 dragger.gldragNode=0;
 dragger.fx=0;
 dragger.fy=0;
 dragger.dragStartNode=0;
 dragger.dragStartObject=0;
 document.body.onmouseup=dragger.tempDOMU;
 document.body.onmousemove=dragger.tempDOMM;
 dragger.tempDOMU=null;
 dragger.tempDOMM=null;
 dragger.waitDrag=0;
}
 
 dhtmlDragAndDropObject.prototype.stopFrameRoute=function(win){
 if(win)
 window.dhtmlDragAndDrop.stopDrag(1,1);
 
 for(var i=0;i<window.frames.length;i++)
 if((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
 window.frames[i].dhtmlDragAndDrop.stopFrameRoute(window);
 if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
 parent.dhtmlDragAndDrop.stopFrameRoute(window);
}
 dhtmlDragAndDropObject.prototype.initFrameRoute=function(win,mode){
 if(win){


 window.dhtmlDragAndDrop.preCreateDragCopy();
 window.dhtmlDragAndDrop.dragStartNode=win.dhtmlDragAndDrop.dragStartNode;
 window.dhtmlDragAndDrop.dragStartObject=win.dhtmlDragAndDrop.dragStartObject;
 window.dhtmlDragAndDrop.dragNode=win.dhtmlDragAndDrop.dragNode;
 window.dhtmlDragAndDrop.gldragNode=win.dhtmlDragAndDrop.dragNode;
 window.document.body.onmouseup=window.dhtmlDragAndDrop.stopDrag;
 window.waitDrag=0;
 if(((!_isIE)&&(mode))&&((!_isFF)||(_FFrv<1.8)))
 window.dhtmlDragAndDrop.calculateFramePosition();
}
 if((parent.dhtmlDragAndDrop)&&(parent!=window)&&(parent!=win))
 parent.dhtmlDragAndDrop.initFrameRoute(window);
 for(var i=0;i<window.frames.length;i++)
 if((window.frames[i]!=win)&&(window.frames[i].dhtmlDragAndDrop))
 window.frames[i].dhtmlDragAndDrop.initFrameRoute(window,((!win||mode)?1:0));

}

var _isFF=false;var _isIE=false;var _isOpera=false;var _isKHTML=false;var _isMacOS=false;

if(navigator.userAgent.indexOf('Macintosh')!= -1)_isMacOS=true;
if((navigator.userAgent.indexOf('Safari')!= -1)||(navigator.userAgent.indexOf('Konqueror')!= -1))
 _isKHTML=true;
else if(navigator.userAgent.indexOf('Opera')!= -1){
 _isOpera=true;
 _OperaRv=parseFloat(navigator.userAgent.substr(navigator.userAgent.indexOf('Opera')+6,3));
}
else if(navigator.appName.indexOf("Microsoft")!=-1)
 _isIE=true;
else{
 _isFF=true;
 var _FFrv=parseFloat(navigator.userAgent.split("rv:")[1])
}

 
 
function isIE(){
 if(navigator.appName.indexOf("Microsoft")!=-1)
 if(navigator.userAgent.indexOf('Opera')== -1)
 return true;
 return false;
}

 
dtmlXMLLoaderObject.prototype.doXPath = function(xpathExp,docObj){
 if((_isOpera)||(_isKHTML))return this.doXPathOpera(xpathExp,docObj);
 if(_isIE){
 if(!docObj)
 if(!this.xmlDoc.nodeName)
 docObj = this.xmlDoc.responseXML
 else
 docObj = this.xmlDoc;
 return docObj.selectNodes(xpathExp);
}else{
 var nodeObj = docObj;
 if(!docObj){
 if(!this.xmlDoc.nodeName){
 docObj = this.xmlDoc.responseXML
}else{
 docObj = this.xmlDoc;
}
}
 if(docObj.nodeName.indexOf("document")!=-1){
 nodeObj = docObj;
}else{
 nodeObj = docObj;
 docObj = docObj.ownerDocument;

}
 var rowsCol = new Array();
 var col = docObj.evaluate(xpathExp,nodeObj,null,XPathResult.ANY_TYPE,null);
 var thisColMemb = col.iterateNext();
 while(thisColMemb){
 rowsCol[rowsCol.length] = thisColMemb;
 thisColMemb = col.iterateNext();
}
 return rowsCol;
}
}
 
if((window.Node)&&(!_isKHTML))
Node.prototype.removeNode = function(removeChildren)
{
 var self = this;
 if(Boolean(removeChildren))
{
 return this.parentNode.removeChild(self);
}
 else
{
 var range = document.createRange();
 range.selectNodeContents(self);
 return this.parentNode.replaceChild(range.extractContents(),self);
}
}

function _dhtmlxError(type,name,params){
 if(!this.catches)
 this.catches=new Array();

 return this;
}

_dhtmlxError.prototype.catchError=function(type,func_name){
 this.catches[type]=func_name;
}
_dhtmlxError.prototype.throwError=function(type,name,params){
 if(this.catches[type])return this.catches[type](type,name,params);
 if(this.catches["ALL"])return this.catches["ALL"](type,name,params);
 alert("Error type: "+arguments[0]+"\nDescription: "+arguments[1]);
 return null;
}

window.dhtmlxError=new _dhtmlxError();


 
 
dtmlXMLLoaderObject.prototype.doXPathOpera = function(xpathExp,docObj){
 
 var z=xpathExp.replace(/[\/]+/gi,"/").split('/');
 var obj=null;
 var i=1;

 if(!z.length)return [];
 if(z[0]==".")
 obj=[docObj];
 else if(z[0]=="")
{
 obj=this.xmlDoc.responseXML.getElementsByTagName(z[i].replace(/\[[^\]]*\]/g,""));
 i++;
}
 else return [];

 for(i;i<z.length;i++)
 obj=this._getAllNamedChilds(obj,z[i]);

 if(z[i-1].indexOf("[")!=-1)
 obj=this._filterXPath(obj,z[i-1]);
 return obj;
}

dtmlXMLLoaderObject.prototype._filterXPath = function(a,b){
 var c=new Array();
 var b=b.replace(/[^\[]*\[\@/g,"").replace(/[\[\]\@]*/g,"");
 for(var i=0;i<a.length;i++)
 if(a[i].getAttribute(b))
 c[c.length]=a[i];

 return c;
}
dtmlXMLLoaderObject.prototype._getAllNamedChilds = function(a,b){
 var c=new Array();
 for(var i=0;i<a.length;i++)
 for(var j=0;j<a[i].childNodes.length;j++)
 if(a[i].childNodes[j].tagName==b)c[c.length]=a[i].childNodes[j];

 return c;
}

function dhtmlXHeir(a,b){
 for(c in b)
 if(typeof(b[c])=="function")a[c]=b[c];
 return a;
}
function dhtmlxEvent(el,event,handler){
 if(el.addEventListener)
 el.addEventListener(event,handler,false);
 else if(el.attachEvent)
 el.attachEvent("on"+event,handler);
}

// ccc-head.js includes dhtmlXMenuBar.js:

/*
Copyright Scand LLC http://www.scbr.com
This version of Software is free for using in non-commercial applications. For commercial use please contact info@scbr.com to obtain license
*/ 
 

 


 function dhtmlXMenuBarObject(htmlObject,width,height,name,vMode,gfxPath,httpsdummy){
 if(typeof(htmlObject)!="object")
 this.parentObject=document.getElementById(htmlObject);
 else
 this.parentObject=htmlObject;
 if(!this.parentObject)this.parentObject=document.body;


 if((_isIE)&&(this.parentObject==document.body))
{
 var zdiv=document.createElement("DIV");
 zdiv.style.position="absolute";
 zdiv.style.zIndex=30;
 zdiv.style.top=0;
 zdiv.style.left=0;
 document.body.insertBefore(zdiv,document.body.firstChild);
 this.parentObject=zdiv;
}


 if(!vMode)this.flsmd=true;
 this.tname=name;
 this.topMenu=this;
 this.width=width;
 this.height=height;
 this.topNod=0;
 this._httpsdummy=httpsdummy;
 this.ieFix=(document.all?true:false);

 var detect = navigator.userAgent.toLowerCase();
 place = detect.indexOf('opera')+1;
 if(place)this.ieFix=false;

 this.ieWinMode=true;
 this.ieWinModeState=0;
 this.zIndex=30;
 this.maxItems=99;
 this.echsw=true;
 this.sysGfxPath=gfxPath;
 this.dividerCell=0;
 this.firstCell=0;
 this.nameCell=0;
 this.crossCell=0;
 this.echsw2=true;
 
 this.tableCSS="menuTable";
 this.titleCSS="menuName";
 this.secTableCSS="secondMenuTable";
 
 this.extraMode=convertStringToBoolean(vMode);
 
 this.defaultAction=0;
 this.onShow=0;
 this.onHide=0;
 
 var lastOpenedPanel=0;
 var lastSelectedItem=0;
 
 this.items=new Array();
 this.itemsCount=0;
 this.gitems=new Array();
 this.gitemsCount=0;
 
 this.subMenus=new Array();
 this.subMenusCount=0;
 

 if(!this.extraMode)
 this._createPanel();
 else
 this._createVPanel();

 
 this.hiddenForm=document.createElement("FORM");
 this.hiddenForm.style.display="none";
 this.parentObject.appendChild(this.hiddenForm);

 if(this._extendedInit)this._extendedInit();
 this.xmlLoader=new dtmlXMLLoaderObject(this._parseXMLTree,this);
 this.setMenuMode("classic");

 this.setBarSize(this.width,this.height);
 this.showBar();
 return this;
}
 
 dhtmlXMenuBarObject.prototype = new dhtmlXProtobarObject;


 
 dhtmlXMenuBarObject.prototype.setZIndex=function(zIndex){
 this.zIndex=zIndex;
 this.topNod.style.zIndex=this.zIndex;
 if(this.topNod.ieFix)this.topNod.ieFix.style.zIndex=this.zIndex-1;
 if((_isIE)&&(this.parentNode.style.position=="absolute"))this.parentNode.style.zIndex=zIndex;
}
 
 dhtmlXMenuBarObject.prototype.setIconSize=function(size){
 this._aimsize=size;
}

 
 function dhtmlXMenuBarPanelObject(parentPanel,parentItem,mode,minWidth,withoutImages){
 this.extraMode=!convertStringToBoolean(mode);
 this.parentPanel=parentPanel;
 this.parentItem=parentItem;
 this.parentObject=parentPanel.parentObject;
 this.topMenu=parentPanel.topMenu;
 this.topNod=0;
 this.dividerCell=0;
 this.firstCell=0;
 this.nameCell=0;
 this.crossCell=0;
 this.maxItems=99;
 this.items=new Array();
 this.itemsCount=0;
 this.withoutImages=(withoutImages==1);
 this.mixedImages=(withoutImages==2);
 if(minWidth)this.width=minWidth;

 if((!this.topMenu.flsmd)||(this.topMenu!=this.parentPanel))
 this.parentItem.setHasChild(true);
 
 if(mode)
 this._createVPanel=this.topMenu._createPanel;
 else
 this._createVPanel=this.topMenu._createVPanel;

 

 this._createVPanel();
 
 this.topNod.panel=this;
 this.topNod.onmouseover=this.topMenu._onmouseoverZ;
 this.topNod.onmouseout=this.topMenu._onmouseoutZ;
 
 parentItem.subMenu=this;
 this.topNod.style.position="absolute";
 this.topMenu.subMenus[this.topMenu.subMenusCount]=this;
 this.topMenu.subMenusCount++;
 return this;
}
 
 
 
 dhtmlXMenuBarObject.prototype.enableIESelectBoxFix=function(mode){
 this.ieFix=convertStringToBoolean(mode);
};
 
 dhtmlXMenuBarObject.prototype.enableTooltip=function(mode){
 this._endtt=(!convertStringToBoolean(mode));
};


 
 dhtmlXMenuBarObject.prototype.disableSmartPositioning=function(mode){
 this._skipAPP=convertStringToBoolean(mode);
};


 
 dhtmlXMenuBarObject.prototype.enableMenuHandle=function(mode){
 if(convertStringToBoolean(mode))this.dividerCell.style.display="";
 else this.dividerCell.style.display="none";
};
 
 dhtmlXMenuBarObject.prototype.enableChildIcon=function(mode){
 this.echsw=convertStringToBoolean(mode);
};
 
 dhtmlXMenuBarObject.prototype.enableChildIconSwitching=function(mode){
 this.echsw2=convertStringToBoolean(mode);
};
 
 dhtmlXMenuBarObject.prototype.enableWindowOpenMode=function(mode){
 this.ieWinMode=convertStringToBoolean(mode);
};
 
 
 dhtmlXMenuBarObject.prototype._getItemIndex=function(id){
 for(var i=0;i<this.gitemsCount;i++)
{
 if(this.gitems[i].id==id)return i;
};
 return -1;
};
 
 dhtmlXMenuBarObject.prototype.getItem=function(itemId){
 var z=this._getItemIndex(itemId);
 if(z>=0)return this.gitems[z];
};
 

 
 
 dhtmlXMenuBarObject.prototype._showScroll=function(node,order,rest,mode){
 if(!node.items[order])return;
 
 if(mode=="")
 if(rest==1)node.cAr[2]++;
 else node.cAr[0]--;
 else 
 if(rest==1)node.cAr[0]++;
 else node.cAr[2]--;

 if((!node.items[order].CSSTag)||(node.items[order].hide))
{
 node.items[order].topNod.parentNode.style.display=mode;
 this._showScroll(node,order*1+rest*1,rest,mode);
}
 else
{
 node.items[order].topNod.parentNode.style.display=mode;
}

}
 
 
 dhtmlXMenuBarObject.prototype._fixScrollState=function(node,rest){
 
 if(parseInt(node.topNod.offsetWidth)>parseInt(node.topNod.width))
 node.topNod.width=node.topNod.offsetWidth;
 
 var flag=0;

 if(rest>0){
 this._showScroll(node,node.cAr[0],1,"none");
 this._showScroll(node,node.cAr[2],1,"");
}
 else{
 this._showScroll(node,node.cAr[0]-1,-1,"");
 this._showScroll(node,node.cAr[2]-1,-1,"none");
}
 z.scrollState+=rest*1;
 
 
 if((node.scrollState*1+node.maxItems*1)==(node.realItemsCount))
 node.scrollDown.className="menuScrollerDisabled";
 else
{
 node.scrollDown.className="menuScrollerEnabled";
 flag++;
}
 
 if(node.scrollState==0)
 node.scrollUp.className="menuScrollerDisabled";
 else
{
 node.scrollUp.className="menuScrollerEnabled";
 flag++;
}
 
 
 return flag;
}



 
 dhtmlXMenuBarObject.prototype._scrollstart=function(){
 if(this.timeoutops)clearTimeout(this.timeoutops);
 z=this.parentNode.parentNode.parentNode.menu;
 if(z.scrollDown==this)
 var rest=1;
 else
 var rest=-1;
 
 if(z.topMenu._fixScrollState(z,rest)==2)
 this.timeoutops=setTimeout(new z.topMenu._delayedTimerCall(this,"onmouseover",0,0),333);
}
 
 dhtmlXMenuBarObject.prototype._scrollend=function(node){
 if(this.timeoutops)window.clearTimeout(this.timeoutops);
}
 
 dhtmlXMenuBarObject.prototype._scrollCheck=function(node){
 var z_count=0;
 for(var i=0;i<node.itemsCount;i++)
 if((node.items[i].CSSTag)&&(!node.items[i].hide))z_count++;

 node.realItemsCount=z_count;
 node.cAr=new Array(0,0,0);
 if((node.realItemsCount>node.maxItems)&&(node.scrollDown)){
 node.scrollDown.style.display="";
 node.scrollUp.style.display="";
 node.scrollDown.className='menuScrollerEnabled';
 node.scrollState=0;
 node.scrollUp.onmouseover=this._scrollstart;
 node.scrollUp.onmouseout=this._scrollend;
 node.scrollDown.onmouseover=this._scrollstart;
 node.scrollDown.onmouseout=this._scrollend;
 node.cAr[2]=0;

 var z_count=0;
 var b_flag=true;
 for(var i=0;i<node.itemsCount;i++)
{
 if((node.items[i].CSSTag)&&(!node.items[i].hide))z_count++;
 if(z_count>node.maxItems){
 node.items[i].topNod.parentNode.style.display="none";
 if(node.cAr[2]==0)node.cAr[2]=i;}
 else{
 node.items[i].topNod.parentNode.style.display="";
}

}
}
}

 dhtmlXMenuBarObject.prototype._scrollClear=function(node){
 for(var i=0;i<node.itemsCount;i++){
 if((node.items[i].CSSTag)&&(!node.items[i].hide))
 node.items[i].topNod.parentNode.style.display="";
 if(node.scrollDown)
 node.scrollDown.style.display="none";
 if(node.scrollUp)
 node.scrollUp.style.display="none";
}
}

 
 dhtmlXMenuBarObject.prototype.getPanel=function(panelId){
 var z=this._getGItemIndex(panelId);
 if(z<0)return this;
 else return this.gitems[z].subMenu;
}
 
 
 dhtmlXMenuBarObject.prototype.addItem=function(panel,item){
 if(this==panel)this.addFirstLevel(panel,item);
 else this.addSecondLevel(panel,item);
}
 
 
 dhtmlXMenuBarObject.prototype._addItem=function(panel,item){
 panel.items[panel.itemsCount]=item;
 panel.firstCell.parentNode.insertBefore(item.getTopNode(),panel.firstCell);
 item.getTopNode().style.marginBottom="20px";
 item.parentNod=this;
 item.parentPanel=panel;
 if(this.defaultAction)item.setAction(this.defaultAction);
 panel.itemsCount++;

 this.gitems[this.gitemsCount]=item;
 this.gitemsCount++;
}

 
 dhtmlXMenuBarObject.prototype.addItem_vertical=function(panel,item){
 panel.items[panel.itemsCount]=item;
 var tr=document.createElement("tr");
 tr.style.verticalAlign="top";
 tr.appendChild(item.getTopNode());
 panel.firstCell.parentNode.insertBefore(tr,panel.firstCell);
 item.parentNod=this;
 item.parentPanel=panel;
 if(this.defaultAction)item.setAction(this.defaultAction);
 panel.itemsCount++;

 this.gitems[this.gitemsCount]=item;
 this.gitemsCount++;
}

 
 dhtmlXMenuBarObject.prototype._getGItemIndex=function(id){
 
 return(this._getItemIndex(id));
};
 
 
 dhtmlXMenuBarObject.prototype.removeItem=function(id){
 var z=this._getGItemIndex(id);
 if(z>=0){
 var panel=this.gitems[z].parentPanel;
 if(this.gitems[z].removeItem)this.gitems[z].removeItem();

 if(panel.firstCell.tagName=="TR")
 var zw=this.gitems[z].getTopNode().parentNode
 else
 var zw=this.gitems[z].getTopNode().parentNode
 zw.parentNode.removeChild(zw);

 panel.itemsCount--;
 for(var i=0;i<panel.itemsCount;i++)
 if(panel.items[i]==this.gitems[z]){
 panel.items[i]=panel.items[i+1];
 panel.items[i+1]=this.gitems[z];
}
 panel.items[panel.itemsCount]=0;

 this.gitemsCount--;
 for(var i=z;i<this.gitemsCount;i++){
 this.gitems[i]=this.gitems[i+1];
}
 this.gitems[this.gitemsCount]=0;



}
}
 
 
 dhtmlXMenuBarObject.prototype._parseXMLTree=function(that,node,level,parentNode,aTempNode,mode){
 if(!node){
 node=that.xmlLoader.getXMLTopNode("menu");

 if(that._awaitXML){
 aTempNode=that._awaitXML;
 parentNode=aTempNode.parentPanel;

 level=1;
 that._awaitXML=null;
 mode=this.modeValue;
}
 else{
 level=0;
 parentNode=that;

 mode=node.getAttribute("mode");
 if(mode)that.setMenuMode(mode);

 var menuAlign=node.getAttribute("menuAlign");
 if(menuAlign)that.setBarAlign(menuAlign);

 that.maxItems=node.getAttribute("maxItems")||99;
 var absolutePosition=node.getAttribute("absolutePosition");
 var aleft=node.getAttribute("left");
 var atop=node.getAttribute("top");
 if(absolutePosition)that.topNod.style.top=parseInt(atop || 0)+"px";
 if(absolutePosition)that.topNod.style.left=parseInt(aleft || 0)+"px";
 if(absolutePosition=="yes")that.topNod.style.position="absolute";

 var name=node.getAttribute("name");
 if(name)that.setTitleText(name);

 var width=node.getAttribute("width");
 var height=node.getAttribute("height");
 that.setBarSize(width,height);

 var imageTextButtonCssClass=node.getAttribute("imageTextButtonCssClass");
 var globalTextCss=node.getAttribute("globalTextCss");

 that.globalSecondCss=node.getAttribute("globalSecondCss");
 that.globalCss=node.getAttribute("globalCss");
 that.globalTextCss=node.getAttribute("globalTextCss");
 if(node.getAttribute("withoutImages"))that.withoutImages=true;
 if(node.getAttribute("mixedImages"))that.mixedImages=true;
 that.type=node.getAttribute("type")||"a1";
}
}



 
 if(level){
 
 var parentNode=new dhtmlXMenuBarPanelObject(parentNode,aTempNode,((mode!="classic")&&(mode!="popup")),node.getAttribute("panelWidth"),(node.getAttribute("withoutImages")?1:(node.getAttribute("mixedImages")?2:0)));
 parentNode.maxItems=node.getAttribute("maxItems")||that.maxItems;
}

 for(var i=0;i<node.childNodes.length;i++)
{
 if(node.childNodes[i].nodeType==1)
{
 var localItem=node.childNodes[i]

 if(!level)
{
 if((!localItem.getAttribute("className"))&&(that.globalCss))
 localItem.setAttribute("className",that.globalCss);
}
 else
 if(!localItem.getAttribute("className"))
{
 if(that.globalSecondCss)
 localItem.setAttribute("className",that.globalSecondCss);
 else 
 localItem.setAttribute("className","menuButtonSecond");
}
 
 
 
 if((!localItem.getAttribute("textClassName"))&&(that.globalTextCss))
 localItem.setAttribute("textClassName",that.globalTextCss);

 
 var tempsrc=localItem.getAttribute("src");
 if(parentNode.withoutImages){
 localItem.setAttribute("src","");
 localItem.setAttribute("src2",that.sysGfxPath+"blank.gif");
}
 else 
{
 if((parentNode.mixedImages)&&(tempsrc==null))
 tempsrc=that.sysGfxPath+"blank.gif";
 else 
 tempsrc=that.sysGfxPath+(tempsrc||"blank.gif");
 
 localItem.setAttribute("src",tempsrc);
}

 tempsrc=localItem.getAttribute("wide");
 if(tempsrc==null){
 localItem.setAttribute("width","100%");
}

 if(that._endtt)localItem.setAttribute("tooltip","");
 if(that._aimsize)localItem.setAttribute("imageSize",that._aimsize);

 var z=eval("window.dhtmlX"+localItem.tagName+"Object");
 if(z)
 var TempNode= new z(localItem,node.getAttribute("type")||that.type);
 else 
 var TempNode=null;

 if(localItem.tagName=="divider")
 if((level)||(that.modeValue=="popup"))
 that.addItem(parentNode,new dhtmlXMenuDividerYObject(localItem.getAttribute("id")));
 else
 that.addItem(parentNode,new dhtmlXMenuDividerXObject(localItem.getAttribute("id")));
 else
 if(TempNode)
 if(level)
 that.addItem(parentNode,TempNode);
 else
 that.addItem(parentNode,TempNode);

 if(localItem.getAttribute("disabled"))
 TempNode.disable();

 if(that.checkXMLChild(localItem))that._parseXMLTree(that,localItem,level+1,parentNode,TempNode,mode);
}
}

 that._scrollCheck(parentNode);

 if((level==0)&&(that.topMenu.waitCall))that.topMenu.waitCall();
}

 
 dhtmlXMenuBarObject.prototype.checkXMLChild=function(node){
 for(var i=0;i<node.childNodes.length;i++)
 if(node.childNodes[i].nodeType==1)return true;

 return false;

}

 
 dhtmlXMenuBarObject.prototype._createPanel=function()
{
 if(!this.width)this.width=1;
 if(!this.height)this.height=1;

 var div=document.createElement("div");
 div.innerHTML='<table cellpadding="0" cellspacing="0" class="'+this.topMenu.tableCSS+'" width="'+this.width+'" height="'+this.height+'"><tbody>'+
 '<tr>'+
 '<td width="3px" style="display:none"><div class="menuHandle">&nbsp;</div></td>'+
 '<td class="'+this.topMenu.titleCSS+'" style="display:none">'+this.topMenu.tname+'</td>'+
 '<td></td>'+
 '<td align="right" width="100%" class="'+this.topMenu.titleCSS+'">&nbsp;'+this.topMenu.tname+'</td>'+
 '<td >&nbsp;</td>'+
 '</tr></tbody></table>';
 var table=div.childNodes[0];
 table.style.display="none";
 table.setAttribute("UNSELECTABLE","on");
 table.onselectstart=this.topMenu.badDummy;
 this.topNod=table;
 this.dividerCell=table.childNodes[0].childNodes[0].childNodes[0];
 this.dividerCell.menu=this;
 this.preNameCell=this.dividerCell.nextSibling;
 this.firstCell=this.preNameCell.nextSibling;
 this.nameCell=this.firstCell.nextSibling;
 this.crossCell=this.nameCell.nextSibling;
 if(this.topMenu!=this){
 this.dividerCell.style.display="none";
 this.preNameCell.style.display="none";
 this.nameCell.style.display="none";
 this.crossCell.style.display="none";
 table.className=this.topMenu.secTableCSS;
}
 this.topNod.style.zIndex=this.topMenu.zIndex;

 if(this.topMenu.ieFix)
{
 var iframe=document.createElement("IFRAME");
 if(this.topMenu.sysGfxPath)
 iframe.src=(this._httpsdummy||(this.topMenu.sysGfxPath+"blank.gif"));

 iframe.style.zIndex=this.topMenu.zIndex-1;iframe.style.position="absolute";
 iframe.style.display="none";iframe.scrolling="no";iframe.frameBorder=0;
 this.parentObject.appendChild(iframe);
 this._del_iframe=iframe;

 this.topNod.ieFix=iframe;
}
 this.parentObject.appendChild(table);
 this._del_table=table;
};
 
 
 
 dhtmlXMenuBarObject.prototype.setMenuCSS=function(table,title,secTable){
 this.tableCSS=table;
 this.titleCSS=title;
 this.secTableCSS=secTable;
 this.topNod.className=this.tableCSS;
 this.preNameCell.className=this.titleCSS;
 this.nameCell.className=this.titleCSS;
 
}


 dhtmlXMenuBarObject.prototype._adjustGFXPath=function(path){
 if(this.extraMode){
 this.topNod.rows[0].cells[0].childNodes[0].src=path+'btn_up1.gif';
 this.topNod.rows[this.topNod.rows.length-3].cells[0].childNodes[0].src=path+'btn_up2.gif';
}
}
 
 dhtmlXMenuBarObject.prototype._createVPanel=function()
{
 if(!this.width)this.width=120;
 if(!this.height)this.height=20;
 var div=document.createElement("div");
 div.innerHTML='<table cellpadding="0" cellspacing="0" class="'+this.topMenu.tableCSS+'" width="'+this.width+'" ><tbody>'+
 '<tr ><td class="menuScrollerDisabled" style="display:none"><img src="'+this.topMenu.sysGfxPath+'btn_up1.gif"/></td></tr>'+
 '<tr><td class="'+this.topMenu.titleCSS+'" style="display:none">'+this.tname+'</td></tr>'+
 '<tr><td></td></tr>'+
 '<tr><td class="menuScrollerDisabled" style="display:none"><img src="'+this.topMenu.sysGfxPath+'btn_up2.gif"/></td></tr>'+
 '<tr><td align="right" class="'+this.topMenu.titleCSS+'" style="display:none">'+this.tname+'</td></tr>'+
 '<tr><td></td></tr>'+
 '</tbody></table>';

 var table=div.childNodes[0];
 table.style.display='none';
 this.topNod=table;
 table.onselectstart=this.topMenu.badDummy;
 table.setAttribute("UNSELECTABLE","on");

 this.dividerCell=table.childNodes[0].childNodes[0].childNodes[0];
 
 table.menu=this;
 this.scrollUp=this.dividerCell;
 this.scrollonmouseover="";
 this.preNameCell=table.childNodes[0].childNodes[1].childNodes[0];
 this.firstCell=table.childNodes[0].childNodes[2];
 this.scrollDown=table.childNodes[0].childNodes[3].childNodes[0];
 this.nameCell=table.childNodes[0].childNodes[4].childNodes[0];
 this.crossCell=table.childNodes[0].childNodes[5].childNodes[0];

 if(this.topMenu!=this){
 
 this.preNameCell.parentNode.style.display="none";
 this.nameCell.parentNode.style.display="none";
 this.crossCell.parentNode.style.display="none";
 table.className=this.topMenu.secTableCSS;
}
 
 this.topNod.style.zIndex=this.topMenu.zIndex;

 if(this.topMenu.ieFix)
{
 var iframe=document.createElement("IFRAME");
 iframe.style.zIndex=this.topMenu.zIndex-1;iframe.style.position="absolute";
 iframe.src=(this._httpsdummy||(this.topMenu.sysGfxPath+"blank.gif"));
 iframe.style.display="none";iframe.scrolling="no";iframe.frameBorder=0;
 this.parentObject.appendChild(iframe);
 this._del_iframe=iframe;

 this.topNod.ieFix=iframe;
}
 this.parentObject.appendChild(table);
 this._del_table=table;
};

 
 
 

 
 
 
 
 function dhtmlXMenuItemObject(id,text,width,src,className,disableImage,href,target,type,image_size){
 type=type||"a1";
 var src2="";
 var tooltip="";
 if(id.tagName=="MenuItem")
{
 type=text||"a1";
 src=id.getAttribute("src");
 src2=id.getAttribute("src2");
 text=id.getAttribute("name");
 className=id.getAttribute("className");
 disableImage=id.getAttribute("disableImage");
 width=id.getAttribute("width");
 href=id.getAttribute("href");
 target=id.getAttribute("target");
 tooltip=id.getAttribute("tooltip");
 if((tooltip!=="")&&(!tooltip))tooltip=text;
 image_size=id.getAttribute("imageSize");
 id=id.getAttribute("id");
}
 if(id)this.id=id;
 else this.id=(new Date()).valueOf();
 
 src2=src2||src;

 image_size=parseInt(image_size)||18;


 this.topNod=0;
 this.action=0;
 this.persAction=0;
 this.src=src;
 this.text=text;
 this.href=href;
 this.target=target;

 this.className=className||"menuButton";
 this.textClassName="defaultMenuText";
 this.disableImage=disableImage;

 td=document.createElement("td");
 this.topNod=td;td.align="center";
 td.noWrap=true;

 td.innerHTML="<table align='left' cellpadding='0' cellspacing='0' border='0' "+(width?("width='"+width+"'"):"")+" height='100%'><tr><td width='"+(2+image_size)+"px' style=' "+(src?"":"display:none;")+"'><img src='"+src2+"' border='0' width='"+image_size+"px' height='"+image_size+"px'/></td><td width='100%' align='left' style=' "+(src?" padding-left:2px;":"")+" overflow:hidden;' ><table width='100%' height='100%' cellpadding='0' cellspacing='0'><tr><td title='"+tooltip+"' class='"+this.textClassName+"' nowrap='nowrap' >"+this.text+"</td><td width='12px'><img style='display:none'/></td></tr></table></td></tr></table>";
 this.imageTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[0].childNodes[0];
 this.childMenuTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0].childNodes[0].childNodes[0].childNodes[1].childNodes[0];
 this.textTag=this.childMenuTag.parentNode.parentNode.childNodes[0];

 switch(type){
 case "a1":
 this.CSSTag=td;
 this.CSSImageTag=null;
 break;
 case "a2":
 this.CSSTag=td.childNodes[0];
 this.CSSImageTag=null;
 break;
 case "a3":
 this.CSSTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
 this.CSSImageTag=null;
 break;
 case "b1":
 this.CSSTag=td;
 this.CSSImageTag=this.imageTag.parentNode;
 break;
 case "b2":
 this.CSSTag=td.childNodes[0];
 this.CSSImageTag=this.imageTag.parentNode;
 break;
 case "b3":
 this.CSSTag=td.childNodes[0].childNodes[0].childNodes[0].childNodes[1];
 this.CSSImageTag=this.imageTag.parentNode;
 break;
}
 td.id="menuItem_"+this.id;
 this.CSSTag.className=this.className;
 td.objectNode=this;
 this.enable();
 return this;
};



 dhtmlXMenuItemObject.prototype=new dhtmlXButtonPrototypeObject;

 
 dhtmlXMenuItemObject.prototype.enable=function(){
 if(this.disableImage)this.imageTag.src=this.src;
 else
 if(!this.className)
 this.topNod.className=this.objectNode.className;
 else
 this.topNod.className=this.className;

 if(this.textTag)
 this.textTag.className=this.textClassName;


 
 this.topNod.onmouseover=this._onmouseoverX;
 this.topNod.onmouseout=this._onmouseoutX;
 this.topNod.onmousedown=this._onmousedownX;
 this.topNod.onmouseup=this._onclickX;
};
 
 
 dhtmlXMenuItemObject.prototype._onmousedownX=function(e){if((!this.objectNode.parentPanel.parentPanel)&&(this.objectNode.subMenu))this.objectNode._onclickX(e,this.objectNode);};
 
 
 dhtmlXMenuItemObject.prototype.setHasChild = function(mode){
 if((convertStringToBoolean(mode))&&(this.parentPanel.topMenu.echsw)){
 this.childMenuTag.src=this.parentPanel.topMenu.sysGfxPath+'btn_rt1.gif';
 this.childMenuTag.style.display='';
}
 else this.childMenuTag.style.display='none';
};
 
 
 dhtmlXMenuItemObject.prototype.setText = function(newText){
 this.textTag.innerHTML=newText;
};
 

 dhtmlXMenuItemObject.prototype._onclickX=function(e,that){
 if(!e)e=event;
 e.cancelBubble=true;

 if(!that)that=this.objectNode;
 var thatM=that.parentPanel.topMenu;
 if(that.topNod.dstatus)return;

 if((thatM.ieWinMode)&&(!thatM.ieWinModeState)&&(that.subMenu))
{
 that.parentPanel.topMenu._onItemOver(that,that.subMenu);
 if(document.body.currentActiveMenu!=thatM)
 if(document.body.onmouseup){document.body.onmouseup();}
 
 if(thatM.realWinModeStart)
{

 that.parentPanel.topMenu.ieWinModeState=1;
 

 if(document.body.onmouseup!=thatM._onclickclose)
{
 thatM.olddoc=document.body.onmouseup;
 document.body.onmouseup=thatM._onclickclose;
}

 document.body.currentActiveMenu=that.parentPanel.topMenu;
 
 thatM.realWinModeStart=0;
}
 else thatM.realWinModeStart=1;
 return;
}
 
 if((thatM.ieWinMode)&&(thatM.ieWinModeState)&&(that.subMenu)){
 if(!thatM.realWinModeStart)
{
 thatM.realWinModeStart=1;
 return;
}
 else
 thatM.realWinModeStart=0;
}

 thatM.realWinModeStart=0;
 thatM.ieWinModeState=0;

 thatM.dropTimers(that.parentPanel);
 thatM._closePanel(that.parentPanel);
 thatM.lastSelectedItem=0;
 thatM.probablyCloseMe=0;
 thatM.lastOpenedPanel="";

 if(that.parentPanel.topMenu.ieWinMode){
 if(that.parentPanel.topMenu.olddoc)
 document.body.onclick=that.parentPanel.topMenu.olddoc;
 else
 document.body.onclick=null;
}

 if((that.parentPanel.topMenu.ieWinMode)&&(!that.parentPanel.parentPanel)&&(that.subMenu))
{
 return;
}
 
 that.parentPanel.topMenu._unMarkItem(that,"down");
 setTimeout(new that.parentPanel.topMenu._delayedTimerCall(that,"_onclickY",0,0),100);

 return;
 
};

 dhtmlXMenuBarObject.prototype._onclickclose=function(e){
 var that=this.currentActiveMenu;
 if(that.olddoc)
 document.body.onmouseup=that.olddoc;
 else
 document.body.onmouseup=null;
 that.realWinModeStart=0;
 that.lastOpenedPanel="";
 that.ieWinModeState=0;
 that.dropTimers(that);
 that._closePanel(that);
 that.lastSelectedItem=0;
}
 dhtmlXMenuBarObject.prototype.close=function(e){
 if(this.olddoc)
 document.body.onmouseup=this.olddoc;
 else
 document.body.onmouseup=null;
 that.realWinModeStart=0;
 that.lastOpenedPanel="";
 that.ieWinModeState=0;
 that.dropTimers(this);
 that._closePanel(this);
 that.lastSelectedItem=0;
}
 
 dhtmlXMenuItemObject.prototype._onclickY=function(){
 if((!this.persAction)||(this.persAction()))
 if((!this.action)||(this.action(this.id)))
 if(this.href){
 if(this.target){
 var form=this.parentPanel.topMenu.hiddenForm;
 form.action=this.href;
 form.target=this.target;
 form.method="POST";
 form.submit();
}
 else document.location.href=this.href;
 return false;
}
 return false;
};
 
 
 dhtmlXMenuItemObject.prototype._onmouseoverY=function(e){
 var that=this.parentPanel.topMenu;
 if((!that.ieWinMode)||(that.ieWinModeState))
 this.parentPanel.topMenu._onItemOver(this,this.subMenu);
 else
{
 if((that.lastSelectedItem)&&(that.lastSelectedItem!=item))
 this.parentPanel.topMenu._unMarkItem(that.lastSelectedItem);
 
 this.parentPanel.topMenu._markItem(this);

}
};
 
 
 dhtmlXMenuItemObject.prototype._onmouseoutY=function(e){
 this.parentPanel.topMenu._onItemOut(this,this.subMenu);
};

 
 dhtmlXMenuBarObject.prototype.dropTimers=function(panel){
 if(!panel)return;
 z=panel.topNod.timeoutop;
 if(z)clearTimeout(z);
 
 if(!panel.parentPanel)return;
 var z=panel.parentPanel.topNod.timeoutop;
 if(z)clearTimeout(z);
 
 var z=panel.parentItem.topNod.timeoutop;
 if(z)clearTimeout(z);


};

 
 dhtmlXMenuBarObject.prototype._onmouseoverZ=function(e){
 if(!e)e=event;e.cancelBubble=true;
 that=this.panel.topMenu;
 if(this.timeoutop)clearTimeout(this.timeoutop);
 that.dropTimers(this.panel);
 that._onItemOver(0,this.panel);
 

};

 
 dhtmlXMenuBarObject.prototype._onmouseoutZ=function(e){
 if(!e)e=event;e.cancelBubble=true;
 that=this.panel.topMenu;
 if(this.timeoutop)clearTimeout(this.timeoutop);
 
 if((!that.ieWinMode))
{
 this.timeoutop=setTimeout(new that._delayedTimerCall(this.panel.topMenu,"_onItemOut",0,this.panel),200);
}
 
};
 
 
 dhtmlXMenuBarObject.prototype._delayedTimerCall=function(object,functionName,a,b,time){
 this.callFunc=function(){
 var ax=a;
 var bx=b;
 object[functionName](ax,bx);
}
 return this.callFunc;
}
 
 
 
 dhtmlXMenuBarObject.prototype._onItemOut=function(item,panel){
 
 if(!panel){
 if((item)&&(!item.subMenu))
 this._unMarkItem(item);
 return;
}
 if(this.ieWinMode)
 if((panel.topMenu==panel)||((item)&&(this.ieWinModeState==1)))return;
 if(item)this._unMarkItem(item);
 this._closePanel();
}
 
 
 dhtmlXMenuBarObject.prototype._onItemOver=function(item,panel){
 if(item){
 if((this.lastSelectedItem)&&(this.lastSelectedItem!=item))
{
 if((!this.lastSelectedItem.subMenu)||(this.lastSelectedItem.subMenu!=item.parentPanel))
 this._unMarkItem(this.lastSelectedItem);
}

 this.lastSelectedItem=item;

 if(this.ieWinMode)
{
 
 this._markItem(item,"down");
}
 else
{
 
 this._markItem(item);
}
 var zp=item.parentPanel;
 if((zp._lastSelectedItem)&&(zp._lastSelectedItem!=item))
 if(zp._lastSelectedItem.subMenu)
 this._closePanel(zp._lastSelectedItem.subMenu);

 
 item.parentPanel._lastSelectedItem=item;
}
 if(panel)this._openPanel(panel);
}

 
 dhtmlXMenuBarObject.prototype._openPanel=function(panel){

 if((this.lastOpenedPanel)&&(this.lastOpenedPanel!=panel)&&(this.lastOpenedPanel.parentPanel!=panel)&&(this.lastOpenedPanel!=panel.parentPanel))
{
 this._closePanel(this.lastOpenedPanel);
}
 
 var z=panel.topNod.timeoutop;
 if(z)clearTimeout(z);
 if(panel.topNod.style.display=="")return;
 if(this.lastOpenedPanel!=panel)
{
 this.lastOpenedPanel=panel;
 switch(this.modeValue){
 case "classic":
 if(panel.topMenu!=panel.parentPanel){
 panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
 panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px";}
 else{
 panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)+"px";
 panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetHeight*1-1+"px";}
 break;
 case "popup":
 panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
 panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px";
 break;
 case "betta":
 if(panel.topMenu!=panel.parentPanel){
 panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+"px";
 panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+panel.parentItem.topNod.offsetHeight*1-1+"px";}
 else{
 panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetWidth*1+"px";
 panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)+"px";}
 break;
 case "alfa":
 panel.topNod.style.top=getAbsoluteTop(panel.parentItem.topNod)*1+panel.parentItem.topNod.offsetHeight*1-1+"px";
 panel.topNod.style.left=getAbsoluteLeft(panel.parentItem.topNod)+"px";
 break;
}
 panel.topNod.style.display="";
 if(panel.topNod.ieFix)
{
 panel.topNod.ieFix.style.top=panel.topNod.style.top;
 panel.topNod.ieFix.style.left=panel.topNod.style.left;
 panel.topNod.ieFix.style.width=panel.topNod.offsetWidth+"px";
 panel.topNod.ieFix.style.height=panel.topNod.offsetHeight+"px";
 panel.topNod.ieFix.style.display="";
}
}
 if(!this._skipAPP)this._fixPanelPosition(panel);
}

 dhtmlXMenuBarObject.prototype._fixPanelPosition=function(panel,mode){
 var uf=0;
 if(panel.parentPanel){
 var xs=document.body.offsetWidth-15+document.body.scrollLeft;
 var ys=document.body.offsetHeight-15+document.body.scrollTop;
 
 if((panel.topNod.offsetWidth+parseInt(panel.topNod.style.left))>xs)
{
 
 if(!panel.parentPanel.extraMode){
 
 var z=xs-panel.topNod.offsetWidth;
 if(z<0)z=0;
 panel.topNod.style.left=z+"px";
 if(panel.topNod.ieFix)panel.topNod.ieFix.style.left=z+"px";
}
 else{
 
 var z=parseInt(panel.topNod.style.left)-panel.topNod.offsetWidth-panel.parentItem.topNod.offsetWidth;
 if(z<0){
 var z2=parseInt(panel.topNod.style.top)+panel.parentItem.topNod.offsetHeight;
 panel.topNod.style.top=z2+"px";
 if(panel.topNod.ieFix)panel.topNod.ieFix.style.top=z2+"px";

 z=xs-panel.topNod.offsetWidth;if(z<0)z=0;}
 panel.topNod.style.left=z+"px";
 if(panel.topNod.ieFix)panel.topNod.ieFix.style.left=z+"px";
}

}
 if((panel.topNod.offsetHeight+parseInt(panel.topNod.style.top))>ys)
{
 

 
 if(panel.parentPanel.extraMode){
 
 var z=ys-panel.topNod.offsetHeight;
 if(z<0)z=0;
 panel.topNod.style.top=z+"px";
 if(panel.topNod.ieFix)panel.topNod.ieFix.style.top=z+"px";
}
 else{
 
 var z=parseInt(panel.topNod.style.top)-panel.topNod.offsetHeight-panel.parentItem.topNod.offsetHeight;
 if(z<0){
 var z2=parseInt(panel.topNod.style.left)+panel.parentItem.topNod.offsetWidth;
 panel.topNod.style.left=z2+"px";
 if(panel.topNod.ieFix)panel.topNod.ieFix.style.left=z2+"px";
 uf=1;
 z=ys-panel.topNod.offsetHeight;if(z<0)z=0;}
 panel.topNod.style.top=z+"px";
 if(panel.topNod.ieFix)panel.topNod.ieFix.style.top=z+"px";
}
 
}
 
}
 
 if((uf)&&(!mode))this._fixPanelPosition(panel,1);
}
 
 dhtmlXMenuBarObject.prototype._closePanel=function(panel){
 if(!panel)return;
 
 
 
 if((this.lastSelectedItem)&&(this.lastSelectedItem.parentPanel==panel))this._unMarkItem(this.lastSelectedItem);
 this._closeBottomPanels(panel);
 this._closeTopPanels(panel);

 this.lastOpenedPanel="";
}

 dhtmlXMenuBarObject.prototype._closeTopPanels=function(panel){
 if((this.lastSelectedItem)&&(this.lastSelectedItem.parentPanel==panel))this._unMarkItem(this.lastSelectedItem);
 for(var i=0;i<panel.itemsCount;i++)
{
 var zi=panel.items[i];
 if((zi.subMenu)&&(zi.subMenu.topNod.style.display!="none"))
{
 zi.subMenu.topNod.style.display="none";
 this._unMarkItem(zi.subMenu.parentItem);
 if(zi.subMenu.topNod.ieFix)zi.subMenu.topNod.ieFix.style.display="none"
 this._closeTopPanels(zi.subMenu);
 return;
}
}
 
}
 
 dhtmlXMenuBarObject.prototype._closeBottomPanels=function(panel,ieWinMode){
 if(panel.parentPanel)
{
 
 
 if((!this.lastSelectedItem)||(this.lastSelectedItem.parentPanel!=panel.parentPanel))
{
 this._closeBottomPanels(panel.parentPanel);
}
 else this.lastOpenedPanel=panel;
 panel.topNod.style.display="none";
 this._unMarkItem(panel.parentItem);
 if(panel.topNod.ieFix)panel.topNod.ieFix.style.display="none"
}
}
 
 
 dhtmlXMenuBarObject.prototype._unMarkItem=function(item){
 item.CSSTag.className=item.className;
 if(item.CSSImageTag)item.CSSImageTag.className="";
 if((item.childMenuTag.src!="")&&(this.topMenu.echsw)&&(this.topMenu.echsw2))
 item.childMenuTag.src=this.topMenu.sysGfxPath+"btn_rt1.gif";
 
}
 
 dhtmlXMenuBarObject.prototype._markItem=function(item,over){
 over=over||"over";
 item.CSSTag.className=item.className+over;
 if(item.CSSImageTag)item.CSSImageTag.className=item.className+over+"img";
 
 if((item.childMenuTag.src!="")&&(this.topMenu.echsw)&&(this.topMenu.echsw2))
 item.childMenuTag.src=this.topMenu.sysGfxPath+"btn_rt2.gif";
 
}
 
 
 dhtmlXMenuBarObject.prototype.setMenuMode=function(modeValue){
 this.modeValue=modeValue;
 switch(modeValue){
 case "classic":
 this.addFirstLevel=this._addItem;
 this.addSecondLevel=this.addItem_vertical;
 break;
 case "alfa":
 this.addFirstLevel=this._addItem;
 this.addSecondLevel=this._addItem;
 break;
 case "popup":
 this.addFirstLevel=this.addItem_vertical;
 this.addSecondLevel=this.addItem_vertical;
 break;
 case "betta":
 this.addFirstLevel=this.addItem_vertical;
 this.addSecondLevel=this._addItem;
 break;
};
}

 

 
 
 
 function dhtmlXMenuDividerYObject(id){
 this.topNod=0;
 if(id)this.id=id;else this.id=0;
 td=document.createElement("td");
 this.topNod=td;td.align="center";td.style.padding="2px 2px 1px 2px";
 td.innerHTML="<div class='menuDividerY'>&nbsp;</div>";
 if(!document.all)td.childNodes[0].style.height="0px";
 return this;
};
 dhtmlXMenuDividerYObject.prototype = new dhtmlXButtonPrototypeObject;
 
 

 
 
 function dhtmlXMenuDividerXObject(id){
 this.topNod=0;
 if(id)this.id=id;else this.id=0;
 td=document.createElement("td");
 this.topNod=td;td.align="center";td.style.paddingRight="2px";td.style.paddingLeft="2px";td.width="4px";
 td.innerHTML="<div class='menuDivider'></div >";
 if(!document.all){td.childNodes[0].style.width="0px";td.style.padding="0px 0px 0px 0px";td.style.margin="0px 0px 0px 0px";}
 return this;
};
 dhtmlXMenuDividerXObject.prototype = new dhtmlXButtonPrototypeObject;
 


// ccc-head.js includes dhtmlXProtoBar.js:

/*
Copyright Scand LLC http://www.scbr.com
This version of Software is free for using in non-commercial applications. For commercial use please contact info@scbr.com to obtain license
*/ 

 
 function dhtmlXProtobarObject(){
 return this;
}
 
 
 dhtmlXProtobarObject.prototype.setOnShowHandler=function(func){
 if(typeof(func)=="function")this.onShow=func;else this.onShow=eval(func);
};

 
 dhtmlXProtobarObject.prototype._getItemIndex=function(id){
 for(var i=0;i<this.itemsCount;i++)
{
 if(this.items[i].id==id)return i;
};
 return -1;
};
 
 dhtmlXProtobarObject.prototype.setGfxPath=function(path){
 this.sysGfxPath=path;
 if(this._adjustGFXPath)this._adjustGFXPath(path);
};
 
 
 dhtmlXProtobarObject.prototype.setOnHideHandler=function(func){
 if(typeof(func)=="function")this.onHide=func;else this.onHide=eval(func);
};
 
 dhtmlXProtobarObject.prototype.setItemAction=function(id,action){
 var z=this._getItemIndex(id);
 if(z>=0){
 this.items[z].setSecondAction(action);
};
};
 
 dhtmlXProtobarObject.prototype.getItem=function(itemId){
 var z=this._getItemIndex(itemId);
 if(z>=0)return this.items[z];
};
 
 dhtmlXProtobarObject.prototype.hideButtons=function(idList){
 if(!idList){
 for(var i=0;i<this.itemsCount;i++){
 var z=this.items[i].getTopNode();
 z.style.display="none";
 if(this.extraMode)z.parentNode.style.display="none";
 this.items[i].hide=1;
}
 return 0;
}
 
 var temp=idList.split(",");
 for(var i=0;i<temp.length;i++)
{
 this.hideItem(temp[i]);
};
};
 
 dhtmlXProtobarObject.prototype.showButtons=function(idList){
 if(!idList){
 for(var i=0;i<this.itemsCount;i++){
 var w=this.items[i].getTopNode();
 w.style.display="";
 if(this.extraMode)w.parentNode.style.display="";
 this.items[i].hide=0;
}
 return 0;
}
 
 var temp=idList.split(",");
 for(var i=0;i<temp.length;i++)
{
 this.showItem(temp[i]);
};
};
 
 dhtmlXProtobarObject.prototype.disableItem=function(itemId){
 var z=this.getItem(itemId);
 if(z){if(z.disable)z.disable();}
};
 
 dhtmlXProtobarObject.prototype.enableItem=function(itemId){
 var z=this.getItem(itemId);
 if(z){if(z.enable)z.enable();}
};
 
 
 dhtmlXProtobarObject.prototype.hideItem=function(itemId){
 var z=this.getItem(itemId);
 if(z){
 var w=z.getTopNode();
 w.style.display="none";
 if(this.extraMode)w.parentNode.style.display="none";
 z.hide=1;
 if(z.parentPanel){
 this._scrollClear(z.parentPanel);
 this._scrollCheck(z.parentPanel);
}
}
}
 
 dhtmlXProtobarObject.prototype.showItem=function(id){
 var z=this.getItem(id);
 if(z){
 var w=z.getTopNode();
 w.style.display="";
 if(this.extraMode)w.parentNode.style.display="";
 z.hide=0;
 if(z.parentPanel){
 this._scrollClear(z.parentPanel);
 this._scrollCheck(z.parentPanel);
}
}
}
 
 dhtmlXProtobarObject.prototype.setOnClickHandler=function(func){
 if(typeof(func)=="function")this.defaultAction=func;else this.defaultAction=eval(func);
};
 
 dhtmlXProtobarObject.prototype.setTitleText=function(newText){
 this.tname=newText;
 this.nameCell.innerHTML=newText;
 this.preNameCell.innerHTML=newText;
};
 
 
 dhtmlXProtobarObject.prototype.setBarSize=function(width,height){
 if(width)this.topNod.width=width;
 if(height)this.topNod.height=height;
};
 
 dhtmlXProtobarObject.prototype.resetBar=function(idList){
 for(var i=0;i<this.itemsCount;i++)
 this.hideItem(this.items[i].id);
 var temp=idList.split(",");
 for(var i=0;i<temp.length;i++)
{
 this.showItem(temp[i]);
};
};





 


 dhtmlXProtobarObject.prototype.loadXMLFor=function(file,itemId){
 var z=this._getItemIndex(itemId);
 if(z>=0)this._awaitXML=this.gitems[z];
 this.xmlLoader.loadXML(file);
};


 


 dhtmlXProtobarObject.prototype.loadXML=function(file,afterCall){
 this.waitCall=afterCall||0;
 this.xmlLoader.loadXML(file);};

 
 dhtmlXProtobarObject.prototype.loadXMLString=function(xmlString,afterCall){
 this.waitCall=afterCall||0;
 this.xmlLoader.loadXMLString(xmlString);};

 
 dhtmlXProtobarObject.prototype.showBar=function(){
 this.topNod.style.display="";
 if((this.topNod.ieFix)&&(this.topNod.style.position=="absolute")){
 this.topNod.ieFix.style.display="";
 this.topNod.ieFix.style.position="absolute";
 this.topNod.ieFix.style.top=this.topNod.style.top;
 this.topNod.ieFix.style.left=this.topNod.style.left;
 this.topNod.ieFix.style.width=this.topNod.offsetWidth+"px";
 this.topNod.ieFix.style.height=this.topNod.offsetHeight+"px";
}
 if(this.onShow)this.onShow();
};
 
 
 
 dhtmlXProtobarObject.prototype.hideBar=function(){
 this.topNod.style.display="none";
 if(this.topNod.ieFix)this.topNod.ieFix.style.display="none";
 if(this.onHide)this.onHide();
};
 
 
 dhtmlXProtobarObject.prototype.setBarAlign=function(align){
 if((align=="left")||(align=="top")){this.preNameCell.innerHTML="";
 this.preNameCell.style.display="none";
 this.nameCell.style.display="";
 this.nameCell.width="100%";
 this.nameCell.innerHTML=this.tname;
 
};
 if((align=="center")||(align=="middle")){
 this.preNameCell.style.display="";
 this.preNameCell.width="50%";
 this.nameCell.style.display="";
 this.nameCell.width="50%";
 this.nameCell.innerHTML=this.tname;
 this.preNameCell.innerHTML=this.tname;
};
 if((align=="right")||(align=="bottom")){
 this.nameCell.innerHTML="";
 this.nameCell.style.display="none";
 this.preNameCell.style.display="";
 this.preNameCell.width="100%";
 this.preNameCell.innerHTML=this.tname;
};
};
 
 dhtmlXProtobarObject.prototype.dummyFunc=function(){return true;};
 dhtmlXProtobarObject.prototype.badDummy=function(){return false;};

 

 
function dhtmlXButtonPrototypeObject(){
 return this;
};
 
 dhtmlXButtonPrototypeObject.prototype.setAction=function(func){
 if(typeof(func)=="function")this.action=func;else this.action=eval(func);
}
 
 dhtmlXButtonPrototypeObject.prototype.setSecondAction=function(func){
 if(typeof(func)=="function")this.persAction=func;else this.persAction=eval(func);
};
 
 dhtmlXButtonPrototypeObject.prototype.enable=function(){
 if(this.disableImage)this.imageTag.src=this.src;
 else 
 if(!this.className)
 this.topNod.className=this.objectNode.className;
 else 
 this.topNod.className=this.className;

 if(this.textTag)
 this.textTag.className=this.textClassName;

 this.topNod.onclick=this._onclickX;
 this.topNod.onmouseover=this._onmouseoverX;
 this.topNod.onmouseout=this._onmouseoutX;
 this.topNod.onmousedown=this._onmousedownX;
 this.topNod.onmouseup=this._onmouseupX;
};
 
 dhtmlXButtonPrototypeObject.prototype.disable=function(){
 if(this.disableImage)
{
 this.imageTag.src=this.disableImage;
}
 else this.topNod.className="iconGray";

 if(this.textTag)
 this.textTag.className="buttonTextDisabled";


 this.topNod.onclick=this.dummy;
 this.topNod.onmouseover=this.dummy;
 this.topNod.onmouseout=this.dummy;
 this.topNod.onmousedown=this.dummy;
 this.topNod.onmouseup=this.dummy;
};

 
 dhtmlXButtonPrototypeObject.prototype._onclickX=function(e,that){
 if(!that)that=this.objectNode;
 if(that.topNod.dstatus)return;
 if((!that.persAction)||(that.persAction()))
 if(that.action){that.action(that.id);}
};
 
 dhtmlXButtonPrototypeObject.prototype.setHTML=function(htmlText){
 this.topNod.innerHTML=htmlText;
};
 
 dhtmlXButtonPrototypeObject.prototype.setAltText=function(imageText){
 this.imageTag.alt=imageText;
};
 
 dhtmlXButtonPrototypeObject.prototype.setImage=function(imageSrc,disabledImageSrc){
 this.src=imageSrc;
 if(disabledImageSrc)this.disableImage=disabledImageSrc;
 
 if(this.topNod.onclick==this.dummy)
{if(disabledImageSrc)this.imageTag.src=disabledImageSrc;}
 else
 this.imageTag.src=imageSrc;
};
 
 dhtmlXButtonPrototypeObject.prototype.dummy=function(){};
 
 dhtmlXButtonPrototypeObject.prototype.getTopNode=function(){return this.topNod;}
 
 dhtmlXButtonPrototypeObject.prototype._onmouseoverY=function(){
 if(this._mvImage)
 this.imageTag.src=this._mvImage;
 else
 this.topNod.className=this.className+'Over';
};
 
 dhtmlXButtonPrototypeObject.prototype._onmouseoutY=function(){
 if(this._mnImage)
 this.imageTag.src=this._mnImage;
 else
 this.topNod.className=this.className;
};
 
 dhtmlXButtonPrototypeObject.prototype._onmousedownX=function(){this.className=this.objectNode.className+'Down';return true;};
 
 dhtmlXButtonPrototypeObject.prototype._onmouseupX=function(){this.className=this.objectNode.className;return true;};


 
 dhtmlXButtonPrototypeObject.prototype._onmouseoutX=function(e){
 if(!e)e=event;
 
 if(this.timeoutop)clearTimeout(this.timeoutop);
 this.timeoutop=setTimeout(this.objectNode._delayedTimerCall(this.objectNode,"_onmouseoutY"),100);
};
 
 dhtmlXButtonPrototypeObject.prototype._onmouseoverX=function(e){
 if(!e)e=event;
 
 if(this.timeoutop)clearTimeout(this.timeoutop);
 this.timeoutop=setTimeout(this.objectNode._delayedTimerCall(this.objectNode,"_onmouseoverY"),50);
};
 
 dhtmlXButtonPrototypeObject.prototype._delayedTimerCall=function(object,functionName,time){
 this.callFunc=function(){
 eval("object."+functionName+"();");
}
 return this.callFunc;
}
 dhtmlXButtonPrototypeObject.prototype._arg2obj=function(n,list){
 var nAtr=new Object();
 for(var i=0;i<n.length;i++)
 nAtr[list[i]]=n[i];
 return nAtr;
}


