function mainMenuObject(name) {this.name = name;this.cmdHeight = 25;this.cmdWidth = 125;this.cmdPixelsBetween = 20;this.cmdOffsetLeft = 0;this.cmdOffsetTop = 0;this.mainHeight = 25;this.mainWidth = 125;this.mainPixelsBetween = this.cmdPixelsBetween;this.mainOffsetLeft = 0;this.mainOffsetTop = 0;this.mainOffsetStart = 0;this.bgBar = true;this.bgBarLeft = 0;this.bgBarTop = 0;this.bgBarHeight = 25;this.bgBarWidth = "100%";this.bgBarColor = "#ffffff";this.bgBarOrientation = "Top";this.aMasterMenus = new Array();this.aActiveMenus = new Array();this.menusoff = "mouse";this.menusoffTimer = 1;this.menusChunk = 10;this.menusUnfoldTime = .99;this.menusDelay = (this.menusUnfoldTime * 1000) / (100 / parseInt(this.menusChunk));this.menusUnfold = 1;this.page = new PageCoords();this.posBgBar = posBgBar;this.makeMasterMenu = makeMasterMenu;this.showSubmenu = showSubmenu;this.hideSubmenu = hideSubmenu;this.hideAll = hideAll;this.styleMenu = styleMenu;this.hideLastMenu = hideLastMenu;this.findMenu = findMenu;this.is_TopMost = is_TopMost;this.initMenus = initMenus;this.doPercent = doPercent;this.resized = resized;this.unFoldMenu = unFoldMenu;this.MenuOff = MenuOff;this.MakeInt = MakeInt;}function MakeInt() {this.cmdHeight=parseInt(this.cmdHeight);this.cmdWidth=parseInt(this.cmdWidth);this.cmdPixelsBetween=parseInt(this.cmdPixelsBetween);this.cmdOffsetLeft=parseInt(this.cmdOffsetLeft);this.cmdOffsetTop=parseInt(this.cmdOffsetTop);this.mainHeight=parseInt(this.mainHeight);this.mainWidth=parseInt(this.mainWidth);this.mainOffsetLeft=parseInt(this.mainOffsetLeft);this.mainOffsetTop=parseInt(this.mainOffsetTop);this.mainOffsetStart=parseInt(this.mainOffsetStart);this.bgBarLeft=parseInt(this.bgBarLeft);this.bgBarTop=parseInt(this.bgBarTop);this.menusoffTimer=parseInt(this.menusoffTimer);this.menusChunk=parseInt(this.menusChunk);this.menusUnfoldTime=parseFloat(this.menusUnfoldTime);this.menusUnfold=parseInt(this.menusUnfold);}function initMenus(menu) {this.MakeInt();this.posBgBar();explorerev = '';var sTemp = this.name + ".resized();";fFunc = new Function(sTemp);window.onresize=fFunc;this.MenuOff();return;}function MenuOff() {var sTemp = "";if (this.menusoff == "timer") {sTemp = "setTimeout(\"";}sTemp += this.name + ".hideAll();";if (this.menusoff == "timer") {sTemp += "\"," + (this.menusoffTimer * 1000) + ");";}var Trans = thenamedgrp[this.name + 'Trans'];fFunc = new Function(sTemp);if(this.menusoff == "mouse" || this.menusoff == "timer") {Trans.onmouseover(fFunc);Trans.onclick("");}else {Trans.onclick(fFunc);Trans.onmouseover("");}Trans.set_zindex(25);Trans.visible();return;}function resized(page) {var page2 = new PageCoords();if(page2.x2 != this.page.x2 || page2.y2 != this.page.y2) {location.reload();this.page = new PageCoords();}}function findMenu(name) {for ( i = 0 ;i < this.aActiveMenus.length;i++ ) {if(this.aActiveMenus[i].indexOf(name) != -1) return i;}return -1;}function is_TopMost(name) {name = name + "_0";for ( i = 0 ;i < this.aMasterMenus.length;i++ ) {if(this.aMasterMenus[i] == name) return true;}return false;}function showSubmenu(cmdShow,cmdName,cmdNumber) {this.MakeInt();var oShow = thenamedgrp[cmdShow + "_0"];var oName = thenamedgrp[cmdName + "_0"];if(typeof(oShow) == "undefined") {return;}if(typeof(oName) == "undefined") {return;}var x=0,i=0, j=0, k=0, iAdd=0,iPadding,iBorder;var cmdNameLeft = parseInt(oName.get_left());var cmdNameTop = parseInt(oName.get_top());var TopMost = this.is_TopMost(cmdName);x = this.aActiveMenus.length;for( i = this.aActiveMenus.length-1 ;i != -1 ;i--) {if(this.aActiveMenus[i] == cmdName){break;}if(this.aActiveMenus[i] != cmdName) {k = thenamedgrp[this.aActiveMenus[i]+ "_0"].get_size();for(j = 0;j < k;j++) {thenamedgrp[this.aActiveMenus[i] + "_" + j].hide();}--x;}}this.aActiveMenus.length = x;oShow.set_zindex(oName.get_zindex()+2);if(!TopMost) {if(cmdShow == this.aActiveMenus[this.aActiveMenus.length-1]) {return;}oShow.move((parseInt(thenamedgrp[cmdName + "_" + cmdNumber].get_width()) + cmdNameLeft)+ this.cmdOffsetLeft,((parseInt(thenamedgrp[cmdName + "_" + cmdNumber].get_height()) * cmdNumber)+ cmdNameTop)+ parseInt(this.cmdOffsetTop));styleMenu(cmdShow,cmdName,0);}else {this.hideAll();var Trans = thenamedgrp[this.name + 'Trans'];Trans.set_zindex = 1000;Trans.move(0,0);Trans.set_left(0);Trans.set_top(0);Trans.set_width(this.page.x2);Trans.set_height(this.page.y2);TransImage = eval(document.images[this.name + "Img"]);if(typeof(TransImage) != 'undefined') {TransImage.width = this.page.x2 - 10;TransImage.height = this.page.y2 - 10;}if(this.bgBarOrientation == "Top") {oShow.move(cmdNameLeft + this.mainOffsetLeft,this.bgBarTop + parseInt(oName.get_height()) + this.mainOffsetTop);this.styleMenu(cmdShow,cmdName,0);}else {oShow.move(parseInt(oName.get_width()) + this.mainOffsetLeft + cmdNameLeft,cmdNameTop + this.mainOffsetTop );this.styleMenu(cmdShow,cmdName,0);}}this.aActiveMenus[this.aActiveMenus.length] = cmdShow;x = oShow.get_size();iBorder = 1;iPading = 0;for(i = 1;i < x;i++) {thenamedgrp[cmdShow + "_" + i].set_zindex(oName.get_zindex()+2);var oParentDiv = thenamedgrp[cmdShow + "_" + (i-1)];if(oBrowser.ie || oBrowser.ns5)iAdd = parseInt(oParentDiv.get_height()) - parseInt(oParentDiv.get_borderWidth('B'));if(oBrowser.ns5)iAdd -= parseInt(oParentDiv.get_borderWidth('T'));if(oBrowser.ns4){thenamedgrp[cmdShow + "_" + i].set_paddingWidth('T',0);thenamedgrp[cmdShow + "_" + i].set_paddingWidth('B',0);iAdd = parseInt(oParentDiv.get_height()) + parseInt(oParentDiv.get_paddingWidth('T')) + parseInt(oParentDiv.get_paddingWidth('B')) + parseInt(oParentDiv.get_borderWidth('T'));}iAdd += parseInt(oParentDiv.get_top());thenamedgrp[cmdShow + "_" + i].move(oShow.get_left(), iAdd);this.styleMenu(cmdShow,cmdName,i);}}function hideLastMenu(name) {var x=0, j=0, i=0;i = this.aActiveMenus.length-1;if(this.aActiveMenus[i] == name || i < 0) {return;}x = thenamedgrp[this.aActiveMenus[i] + "_0"].get_size();for(j = 0;j < x;j++) {thenamedgrp[this.aActiveMenus[i] + "_" + j].hide();}this.aActiveMenus.length = i;}function hideSubmenu(name) {thenamedgrp[name].hide();}function hideAll() {var x=0, j=0, i=0;for ( i = this.aActiveMenus.length-1 ;i != -1;i--) {x = thenamedgrp[this.aActiveMenus[i]+ "_0"].get_size();for(j = 0;j < x;j++) {thenamedgrp[this.aActiveMenus[i] + "_" + j].hide();}}this.aActiveMenus.length = 0;var Trans = thenamedgrp[this.name + 'Trans'];Trans.set_left(0);Trans.set_top(0);Trans.set_width(0);Trans.set_height(0);if(typeof(document.images[this.name + 'Img']) != 'undefined' ) {document.images[this.name + 'Img'].width = 1;document.images[this.name + 'Img'].height = 1;}}function makeMasterMenu(name,visible) {var iSpace=0, iLeft = 0;this.MakeInt();var MMenu = thenamedgrp[name];if(this.bgBarOrientation == "Top") {this.aMasterMenus.length > 0 ? iLeft = parseInt(thenamedgrp[this.aMasterMenus[this.aMasterMenus.length-1]].get_left()) + parseInt(thenamedgrp[this.aMasterMenus[this.aMasterMenus.length-1]].get_width()) : iLeft = parseInt(this.mainOffsetStart);iSpace = this.bgBarLeft + iLeft;this.aMasterMenus.length > 0 ? iSpace += this.mainPixelsBetween : iSpace;MMenu.move((0 + parseInt(iSpace)),parseInt(this.bgBarTop));}else {if(this.aMasterMenus.length) {iSpace = this.aMasterMenus.length * this.mainPixelsBetween + (this.aMasterMenus.length * this.mainHeight);}else {iSpace = this.aMasterMenus.length* this.mainHeight;}MMenu.move(this.bgBarLeft,iSpace + this.mainOffsetStart + parseInt(this.bgBarTop) );}MMenu.set_zindex(50);if(visible) {MMenu.visible();}this.aMasterMenus[this.aMasterMenus.length] = name;}function posBgBar() {this.MakeInt();var oPage = new PageCoords();var bgBar = thenamedgrp[this.name + "bgBar"];bgBar.hide();if(this.bgBarOrientation == "Top") {bgBar.set_width(doPercent(this.bgBarWidth,oPage.x2));bgBar.set_height(doPercent(this.bgBarHeight,oPage.y2));}else {bgBar.set_width(doPercent(this.bgBarWidth,this.mainWidth));bgBar.set_height(doPercent(this.bgBarHeight,oPage.y2));}bgBar.set_top(this.bgBarTop);bgBar.set_left(this.bgBarLeft);bgBar.move(this.bgBarLeft,this.bgBarTop);bgBar.set_bgColor(this.bgBarColor);if(this.bgBar) {bgBar.visible();}var aSaveMenus = new Array();for(i = 0;i < this.aMasterMenus.length;i++) {aSaveMenus[i] = this.aMasterMenus[i];}this.aMasterMenus.length = 0;for(i=0;i < aSaveMenus.length;i++) {this.makeMasterMenu(aSaveMenus[i],true);}}function doPercent(num,of) {if(num) {if(num.toString().indexOf("%") != -1) {iPercent = parseFloat(num)/100;return ( of * iPercent);}else {return parseFloat(num);}}else {return 0;}}function unFoldMenu(name,nChunk,step,delay,type) {nWidth = parseInt(thenamedgrp[name].get_width());nHeight = parseInt(thenamedgrp[name].get_height());nWidthPercent = this.doPercent(nChunk + "%",nWidth);nHeightPercent = this.doPercent(nChunk + "%",nHeight);nWidth += 20;nHeight += 20;if(type == 0) {thenamedgrp[name].clip_obj(0,0,nHeight,nWidth,false);}else if(type == 1) {thenamedgrp[name].clip_obj(0,0,nHeightPercent,nWidthPercent,false);}else if(type == 2) {thenamedgrp[name].clip_obj(0,0,nHeightPercent,nWidth,false);}else if(type == 3) {thenamedgrp[name].clip_obj(0,0,nHeight,nWidthPercent,false);}nChunk += step;if ((nChunk+step) <= 100) {window.setTimeout("unFoldMenu('" + name + "'," + nChunk + "," + step + "," + delay + "," + type + ")",delay);}else {thenamedgrp[name].clip_obj(0,0,nHeight,nWidth,false);}}function styleMenu(cmdShow,cmdName,i) {var sOnColor = eval(cmdShow + '.onColor;');var sOffColor = eval(cmdShow + '.offColor;');var sMouseOver = new Function("thenamedgrp['" + cmdShow + "_" + i + "'].set_bgColor('" + sOnColor + "');");var sMouseOut =  new Function("thenamedgrp['" + cmdShow + "_" + i + "'].set_bgColor('" + sOffColor + "');");thenamedgrp[cmdShow + "_" + i].onmouseover(sMouseOver);thenamedgrp[cmdShow + "_" + i].onmouseout(sMouseOut);thenamedgrp[cmdShow + "_" + i].set_bgColor(sOffColor);if(!oBrowser.ns4){thenamedgrp[cmdShow+ "_" + i].clip_obj(0,0,0,0);}thenamedgrp[cmdShow + "_" + i].visible();if(!oBrowser.ns4){this.unFoldMenu(cmdShow+ "_" + i,this.menusChunk,this.menusChunk,(this.menusUnfoldTime * 1000) / (100 / parseInt(this.menusChunk)),this.menusUnfold);}}
