//copyright 2002-2052, 黎现云(Li Xianyun)
/*************2010.5.17 add start *********************************/
/*创建兼容 IE/FireFox 的 event 及 event 的 srcElement、fromElement、toElement 属性
自然，我们都习惯了 IE，在 IE 中要在函数中获得各事件对象很容易，直接用 event、event.srcElemtn、event.fromElement、event.toElement 就行了。
在 FireFox 中获得触发事件的元素可以用 event.target，但其他两个 fromElement 和 toElement 就要费些周折。
*/
//addEventListener是为一个事件添加一个监听
//此处if判断是否是火狐浏览器
if(window.addEventListener) { FixPrototypeForGecko(); }

function  FixPrototypeForGecko()
  {
      //prototype属性允许你向一个对象添加属性和方法
      //__defineGetter__和__defineSetter__是Firefox的特有方法，可以利用来它自定义对象的方法。
      //使用方法见：http://cindylu520.javaeye.com/admin/blogs/588667
      //runtimeStyle   运行时的样式！如果与style的属性重叠，将覆盖style的属性！
      HTMLElement.prototype.__defineGetter__("runtimeStyle",element_prototype_get_runtimeStyle);
      //代表事件状态，如事件发生的元素，键盘状态，鼠标位置和鼠标按钮状态。
      window.constructor.prototype.__defineGetter__("event",window_prototype_get_event);
      //event.srcElement当前事件的源,IE下,event对象有 srcElement属性,但是没有target属性;Firefox下,event对象有target属性,但是没有srcElement属性.但他们的作用是相当的
      Event.prototype.__defineGetter__("srcElement",event_prototype_get_srcElement);
      //当前事件有移动成分时，如onmouseover、onmouseout等 fromElement、toElement表示移动事件的两个端点
      Event.prototype.__defineGetter__("fromElement",  element_prototype_get_fromElement);
      Event.prototype.__defineGetter__("toElement", element_prototype_get_toElement);

  }

function  element_prototype_get_runtimeStyle() { return  this.style; }
function  window_prototype_get_event() { return  SearchEvent(); }
function  event_prototype_get_srcElement() { return  this.target; }

function element_prototype_get_fromElement() {
      var node;
      //relatedTarget 事件属性返回与事件的目标节点相关的节点。
      //对于 mouseover 事件来说，该属性是鼠标指针移到目标节点上时所离开的那个节点。
      //对于 mouseout 事件来说，该属性是离开目标时，鼠标指针进入的节点。
      //对于其他类型的事件来说，这个属性没有用。
      if(this.type == "mouseover") node = this.relatedTarget;
      else if (this.type == "mouseout") node = this.target;
      if(!node) return;
      while (node.nodeType != 1)
          node = node.parentNode;
      return node;
  }

function  element_prototype_get_toElement() {
          var node;
          if(this.type == "mouseout")  node = this.relatedTarget;
          else if (this.type == "mouseover") node = this.target;
          if(!node) return;
          while (node.nodeType != 1)
             node = node.parentNode;
          return node;
  }

function  SearchEvent()
  {
      if(document.all) return  window.event;

      func = SearchEvent.caller;

      while(func!=null){
          var  arg0=func.arguments[0];

          if(arg0 instanceof Event) {
              return  arg0;
          }
         func=func.caller;
      }
      return   null;
  }
/*好了，现在不管是在 IE 中还是在 FireFox 中，触发事件后都有了 event、event.srcElement、event.fromElement、event.toElement 属性了。*/
function test(){
alert("event:" + event +", srcElement:"+event.srcElement.innerHTML+
", fromElement:"+event.fromElement.innerHTML + ", toElement:"+event.toElement.innerHTML)
}
//document.write('<button onmouseout="test()">MouseOut</button>\r\n');
//document.write('<button onmouseover="test()">MouseOver</button>\r\n');
/*************2010.5.17 add end *********************************/
document.write('<style type="text/css">\r\n');
//document.write('.coolMenu{font-size:14px;border: 1px solid buttonface; padding: 1px; cursor: pointer;font-family:黑体;font-weight: 300; color:#FFFFFF}\r\n');
//document.write('.coolButton{font-size:12px;border: 1px solid buttonface; padding: 1px; cursor: pointer;font-family:宋体;font-weight: 400; color:#FFFFFF}\r\n');
//document.write('.coolMenu{font-size:15px; font-family:黑体;font-weight: 400; color:#FFFFFF;FILTER: alpha(opacity=100);}\r\n');////自定义主菜单显示样式
//document.write('.coolMenu{font-size:15px; font-family:宋体;font-weight: 500; color:#FFFFFF;FILTER: alpha(opacity=100);}\r\n');////自定义主菜单显示样式
//document.write('.coolMenu{font-size:14px; font-family:宋体;font-weight: bold; color:#FFFFFF;FILTER: alpha(opacity=100);}\r\n');////自定义主菜单显示样式
document.write('.coolMenu{font-size:14px; font-family:宋体; color:#FFFFFF;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=100);':'opacity:1;')+'}\r\n');////自定义主菜单显示样式
//document.write('.coolMenu{font-size:13px; font-family:宋体;font-weight: bold; color:#FFFFFF;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=90);':'opacity:0.9;')+'}\r\n');////自定义主菜单显示样式
//document.write('.coolMenu{font-size:14px; font-family:宋体;font-weight: bold; color:#FFFFFF;FILTER: alpha(opacity=60) Dropshadow(offx=1,offy=0,color=#CE6001) Dropshadow(offx=0,offy=1,color=#CE6001) Dropshadow(offx=0,offy=-1,color=#CE6001) Dropshadow(offx=-1,offy=0,color=#CE6001);}\r\n');////自定义主菜单显示样式
//document.write('.coolButton{font-size:14px; font-family:宋体;font-weight: bold; color:#000000;FILTER: alpha(opacity=100);}\r\n');////自定义子菜单显示样式 BACKGROUND-COLOR:#ADADAD
//document.write('.coolButton{font-size:13px; font-family:宋体;font-weight: bold; color:#000000;FILTER: alpha(opacity=80);}\r\n');////自定义子菜单显示样式 BACKGROUND-COLOR:#ADADAD
document.write('.coolButton{font-size:13px; font-family:宋体; color:#FFFFFF;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=80);':'opacity:0.8;')+'}\r\n');////自定义子菜单显示样式 BACKGROUND-COLOR:#ADADAD
//document.write('.coolButton{font-size:12px; font-family:宋体; color:#000000;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=80);':'opacity:0.8;')+'}\r\n');////自定义子菜单显示样式 BACKGROUND-COLOR:#ADADAD
document.write('</style>\r\n');
var menuinfo="";
var mmenus    = new Array();
var misShow   = new Boolean();
misShow=false;
var misdown   = new Boolean();
misdown=false;
var mnumberofsub=0;
var musestatus=false;
var mpopTimer = 1;
var menunum=11;//菜单个数:2009.10.07 add
mmenucolor='#0A6CA9';//菜单背景颜色
mfontcolor='#FFFFFF';//菜单字体颜色
msubfontcolor='#FFFFFF';//子菜单字体颜色
mmenuoutcolor='#0EA8DC';//鼠标移到子菜单上的颜色
SubMenuColorFlag="1";//子菜单动态颜色显示标志
mmenuincolor='#0EA8DC';//鼠标移到主菜单上的颜色
MainMenuColorFlag="0";//主菜单动态颜色显示标志
MainMenuTextFlag="1";//主菜单文本显示标志
MainMenuCompartPicFlag="1";//主菜单启用分隔图片标志
MainMenuLimitWidthFlag="0";//主菜单宽度限制标志
MainMenuCompartPic="<img src='images/menu_line.jpg' width='2' height='34'>";//主菜单分隔图片
mmenuoutbordercolor='#CACACA';
mmenuinbordercolor='#CACACA';
mmidoutcolor='#000000';
mmidincolor='#000000';
mmenuovercolor='#014493';//鼠标移到菜单上字体的颜色
mitemedge='0';
msubedge='0';
mmenuunitwidth=Math.floor(mmenuwidth/menunum)-(MainMenuColorFlag=="1"?0:5);//主菜单动态颜色显示相关L433
mmenuitemwidth=Math.floor(mmenuwidth/menunum)-(MainMenuColorFlag=="1"?0:5);
mmenuheight=27;//一般设为23，菜单为下拉式时该值不能大于18，若实在有必要则必须调整bgroundImage
//mmenuwidth=498;//调用前需传递该参数
mmenuadjust=10;//左侧偏移量
//mmenuadjustV=15;//调用前需传递该参数
mmenuadjustV+=10;//修正
menuButton='images/mbn.gif';//菜单按钮
menuButtonHeight=34;//菜单按钮高度
//mfonts='font-size:13px; font-family:宋体; color:#FFFFFF;';
mfonts='font-size:14px; font-family:宋体; color:#FFFFFF;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=100);':'opacity:1;')+'';
//mfonts='font-size:13px; font-family:宋体;font-weight: bold; color:#FFFFFF;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=90);':'opacity:0.9;')+'';
//mfonts='font-size:14px; font-family:宋体;font-weight: bold; color:#FFFFFF;FILTER: alpha(opacity=100)';
//mfonts='font-size:16px; font-family:宋体;font-weight: bold; color:#FFFFFF;FILTER: alpha(opacity=100) Dropshadow(offx=1,offy=0,color=#CE6001) Dropshadow(offx=0,offy=1,color=#CE6001) Dropshadow(offx=0,offy=-1,color=#CE6001) Dropshadow(offx=-1,offy=0,color=#CE6001)';
//msubfonts='font-size:16px; font-family:宋体;font-weight: bold; color:#FFFFFF;FILTER: alpha(opacity=100) Dropshadow(offx=1,offy=0,color=#FBAEB1) Dropshadow(offx=0,offy=1,color=#FBAEB1) Dropshadow(offx=0,offy=-1,color=#FBAEB1) Dropshadow(offx=-1,offy=0,color=#FBAEB1)';
msubfonts='font-size:13px; font-family:宋体; color:#FFFFFF;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=80);':'opacity:0.8;')+'';
//msubfonts='font-size:12px; font-family:宋体;font-weight: bold; color:#FFFFFF;'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'FILTER: alpha(opacity=80);':'opacity:0.8;')+'';
mcursor='pointer';
var lineArrayFlag='1';//子菜单是否排成一行
//bgroundImage='images/'+((lineArrayFlag=='1')?('islinemid.gif'):(((SubMenuColorFlag=='1')?('menuminibg.gif'):('menubg.gif'))));
//bgroundImage='images/'+((lineArrayFlag=='1')?('islinemid.gif'):(((SubMenuColorFlag=='1')?('menuminibgblank.gif'):('menubg.gif'))));
//bgroundImage='images/'+((lineArrayFlag=='1')?('islinemid.gif'):(((SubMenuColorFlag=='1')?('menuminibg30.gif'):('menubg.gif'))));
//bgroundImage='images/'+((lineArrayFlag=='1')?('islinemid.gif'):(((SubMenuColorFlag=='1')?('menuminibg25.gif'):('menubg.gif'))));
//bgroundImage='images/'+((lineArrayFlag=='1')?('islinemid.gif'):(((SubMenuColorFlag=='1')?('menuminibg25.gif'):('menubg.gif'))));
bgroundImage='images/'+((lineArrayFlag=='1')?('islinemid.gif'):(((SubMenuColorFlag=='1')?('menuminibg25.gif'):('menubg.gif'))));
var subitemcanbgflag='0';//子菜单是否需要背景图片
var subitemcanbgcolorflag='1';//子菜单是否需要背景颜色

//子菜单弹出速度
var swipeSteps = 1;
var swipemsec = 25;
var swipeArray = new Array();
var buttonAlign='center';//按钮的对齐方式
//********** 子菜单闪烁特效 开始 ***************/
var subItemLightitFlag='0';//子菜单闪烁标志
function high(which2){
theobject=which2;
highlighting=setInterval("highlightit(theobject)",100);
}
function low(which2){
if (window.highlighting)
clearInterval(highlighting);
if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
  which2.filters.alpha.opacity=100;
else
  which2.style.opacity=1;
}
function highlightit(cur2){
if (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1 && cur2.filters.alpha.opacity<100)
  {
  cur2.filters.alpha.opacity+=5;
  }
else if(window.navigator.userAgent.toLowerCase().indexOf("msie")<1 && cur2.style.opacity<1)
  {
  cur2.style.opacity+=0.05;
  }
else if (window.highlighting)
  {
  clearInterval(highlighting);
  }
}
//********** 子菜单闪烁特效 结束 ***************/
function swipe(el, dir, steps, msec) {
        if (steps == null) steps = swipeSteps;
        if (msec == null) msec = swipemsec;
        if (el.swipeIndex == null)
                el.swipeIndex = swipeArray.length;
        if (el.swipeTimer != null)
                window.clearTimeout(el.swipeTimer);
        swipeArray[el.swipeIndex] = el;
        el.style.clip = "rect(-99999, 99999, 99999, -99999)";
        if (el.swipeCounter == null || el.swipeCounter == 0) {
                el.orgLeft  = el.offsetLeft;
                el.orgTop  = el.offsetTop;
                el.orgWidth = el.offsetWidth;
                el.orgHeight  = el.offsetHeight;
        }
        el.swipeCounter = steps;
        el.style.clip = "rect(0,0,0,0)";
        //alert("repeat(" + dir + "," + el.swipeIndex + "," + steps + "," + msec + "), "+msec);
        window.setTimeout("repeat(" + dir + "," + el.swipeIndex + "," + steps + "," + msec + ")", msec);
}
function repeat(dir, index, steps, msec) {
        el = swipeArray[index];
        var left   = el.orgLeft;
        var top    = el.orgTop;
        var width  = el.orgWidth;
        var height = el.orgHeight;
        //alert("el.swipeCounter:"+el.swipeCounter);
        if (el.swipeCounter == 0) {
                el.style.clip = "rect(-99999, 99999, 99999, -99999)";
                return;
        }
        else {
                el.swipeCounter--;
                el.style.visibility = "visible";
                switch (dir) {
                        case 2:
                                el.style.clip = "rect(" + height*el.swipeCounter/steps + "," + width + "," + height + "," + 0 + ")";
                                el.style.top  = top - height*el.swipeCounter/steps;
                                //alert("el.style.clip:"+el.style.clip);
                                //alert("el.style.top:"+el.style.top);
                                break;
                        case 8:
                                el.style.clip = "rect(" + 0 + "," + width + "," + height*(steps-el.swipeCounter)/steps + "," + 0 + ")";
                                el.style.top  = top + height*el.swipeCounter/steps;
                                break;
                        case 6:
                                el.style.clip = "rect(" + 0 + "," + width + "," + height + "," + width*(el.swipeCounter)/steps + ")";
                                el.style.left  = left - width*el.swipeCounter/steps;
                                break;
                        case 4:
                                el.style.clip = "rect(" + 0 + "," + width*(swipeSteps - el.swipeCounter)/steps + "," + height + "," + 0 + ")";
                                el.style.left  = left + width*el.swipeCounter/steps;
                                break;
                }

                el.swipeTimer = window.setTimeout("repeat(" + dir + "," + index + "," + steps + "," + msec + ")", msec);
        }
}
var mtmpleft="";
var mtmptop="";
function hideSwipe(el) {
        window.clearTimeout(el.swipeTimer);
        el.style.visibility = "hidden";
        el.style.clip = "rect(-99999, 99999, 99999, -99999)";
        el.swipeCounter = 0;
        if(mtmpleft!="")el.style.left = mtmpleft;
        if(mtmptop!="")el.style.top = mtmptop;
}

function stoperror(){
return true;
}
window.onerror=stoperror;
function mpopOut() {
mpopTimer = setTimeout('mallhide()', 500);
}
function getReal(el, type, value) {
        temp = el;
        while ((temp != null) && (temp.tagName != "BODY")) {
                if (((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?eval("temp." + type):window.eval("temp." + type)) == value) {
                //if (eval("temp." + type) == value) {
                        el = temp;
                        return el;
                }
                temp = temp.parentElement;
        }
        return el;
}


function mMenuRegister(menu)
{
  mmenus[mmenus.length] = menu
  return (mmenus.length - 1)
}

function mMenuItem(caption,command,target,isline,statustxt,level,img,sizex,sizey,pos){
        this.items = new Array();
        if(pos=="10")
        //this.caption="<font face='Webdings' style='font-size: 6pt'>4</font> "+caption;
        //this.caption="|&nbsp;"+caption+"&nbsp;";
        this.caption="&nbsp;"+caption+"&nbsp;";
        else if(pos=="3")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?(''):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img src=images/menupre1.gif width=13 height=10 border=0><img src=images/touming.gif width=2 height=10 border=0>"+caption;
        else if(pos=="4")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?(''):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img src=images/menupre2.gif width=13 height=10 border=0><img src=images/touming.gif width=2 height=10 border=0>"+caption;
        else if(pos=="5")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?(''):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img src=images/menupre3.gif width=13 height=10 border=0><img src=images/touming.gif width=2 height=10 border=0>"+caption;
        else if(pos=="6")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?(''):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img src=images/menupre4.gif width=13 height=10 border=0><img src=images/touming.gif width=2 height=10 border=0>"+caption;
        else if(pos=="7")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?(''):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img src=images/menupre5.gif width=13 height=10 border=0><img src=images/touming.gif width=2 height=10 border=0>"+caption;
        else if(pos=="8")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?(''):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img src=images/menupre6.gif width=13 height=10 border=0><img src=images/touming.gif width=2 height=10 border=0>"+caption;
        else if(pos=="9")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?('<img src=images/touming.gif width=5 height=10 border=0>'):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img align=absmiddle src=images/menupre7.gif width=3 height=6 border=0><img src=images/touming.gif width=5 height=10 border=0>"+caption;
        else if(pos!="")
        this.caption=""+((lineArrayFlag=='1')?('<img src=images/touming.gif width=15 height=10 border=0>'):(((SubMenuColorFlag=='1')?(''):('<img src=images/touming.gif width=25 height=10 border=0>'))))+"<img src=images/menupre.gif width=13 height=10 border=0><img src=images/touming.gif width=2 height=10 border=0>"+caption;
        else
        this.caption="&nbsp;"+caption+"&nbsp;";
        this.command=command;
        this.target=target;
        this.isline=isline;
        this.statustxt=statustxt;
        if(level!=null){mnumberofsub++;
        this.hasc=mnumberofsub;}
        this.level=level;
        this.img=img;
        this.sizex=sizex;
        this.sizey=sizey;
        this.pos=pos;
}

function mMenu(caption,command,target,img,sizex,sizey,pos){
        this.items = new Array();
        this.caption=""+caption;
        this.command=command;
        this.target=target;
        this.img=img;
        this.sizex=sizex;
        this.sizey=sizey;
        this.pos=pos;
        this.id=mMenuRegister(this);
}
function mMenuAddItem(item)
{
  this.items[this.items.length] = item
  item.parent = this.id;
  this.children=true;
}

mMenu.prototype.addItem = mMenuAddItem;
mMenuItem.prototype.addsubItem = mMenuAddItem;

function mtoout(src){

src.style.borderLeftColor=mmenuoutbordercolor;
src.style.borderRightColor=mmenuinbordercolor;
src.style.borderTopColor=mmenuoutbordercolor;
src.style.borderBottomColor=mmenuinbordercolor;
if(SubMenuColorFlag=="1")
src.style.backgroundColor=mmenuoutcolor;//鼠标移到子菜单上的颜色
//src.style.backgroundImage="";
src.style.textDecoration="none";//underline
src.style.color=mmenuovercolor;
src.style.height=mmenuheight;
if(subItemLightitFlag=='1')
  {
  if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
    src.filters.alpha.opacity=0;
  else
    src.style.opacity=0;
  high(src);
  }
}
function mtoin(src){

src.style.borderLeftColor=mmenuinbordercolor;
src.style.borderRightColor=mmenuoutbordercolor;
src.style.borderTopColor=mmenuinbordercolor;
src.style.borderBottomColor=mmenuoutbordercolor;
if(MainMenuColorFlag=="1")
src.style.backgroundColor=mmenuincolor;//鼠标移到主菜单上的颜色
//src.style.backgroundImage="url('images/menubgtop.gif')";
src.style.textDecoration="none";
src.style.color=mmenuovercolor;
src.style.height=mmenuheight;
}
function mnochange(src){
src.style.borderLeftColor=mmenucolor;
src.style.borderRightColor=mmenucolor;
src.style.borderTopColor=mmenucolor;
src.style.borderBottomColor=mmenucolor;
if(MainMenuColorFlag=="1"||SubMenuColorFlag=="1")
src.style.backgroundColor='';//鼠标离开主菜单上的颜色
//src.style.backgroundImage="";
src.style.textDecoration="none";
src.style.textColor="#000000";
//alert(String(src.id));
src.style.color=String(src.id)==''?msubfontcolor:mfontcolor;
src.style.height=mmenuheight;
}
function mallhide(){
        for(var nummenu=0;nummenu<mmenus.length;nummenu++){
                var themenu=document.getElementById('mMenu'+nummenu);
                var themenudiv=document.getElementById('mmenudiv'+nummenu);
                mnochange(themenu);
                mmenuhide(themenudiv);
                }
        for(nummenu=1;nummenu<=mnumberofsub;nummenu++){
                var thesub=document.getElementById('msubmenudiv'+nummenu);
                msubmenuhide(thesub);
                mnochange(document.getElementById('mp'+nummenu));
                document.getElementById("mitem"+nummenu).style.color=msubfontcolor;
                }
}
function mmenuhide(menuid){
if(SubMenuColorFlag=="1")
  {
  if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
    menuid.style.filter='Alpha(Opacity=100)';
  else
    menuid.style.opacity=1;
  }
//menuid.style.filter='';
hideSwipe(menuid);
misShow=false;
}
function msubmenuhide(menuid){
if(SubMenuColorFlag=="1")
  {
  if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
    menuid.style.filter='Alpha(Opacity=100)';
  else
    menuid.style.opacity=1;
  }
//menuid.style.filter='';
menuid.style.visibility='hidden';
}
function mmenushow(menuid,pid){
if(SubMenuColorFlag=="1")
  {
  if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
    menuid.style.filter='Alpha(Opacity=80)';
  else
    menuid.style.opacity=0.8;
  }
//menuid.style.filter='';
var tmpleft=0;
var tmpcmp=0;
var tmpmwidth=0;
if(!(document.all)) mposflag=document.getElementById("mposflag");
if(lineArrayFlag=='1')
  {
  tmpleft=parseInt(mposflag.offsetLeft)+parseInt(pid.offsetLeft)+mmenuadjust;
  menuid.style.top=parseInt(mposflag.offsetTop)+parseInt(mmenutable.offsetHeight)+mmenuadjustV;
  }
else
  {
  tmpleft=parseInt(mposflag.offsetLeft)+parseInt(pid.offsetLeft)+mmenuadjust;
  menuid.style.top=parseInt(mposflag.offsetTop)+parseInt(mmenutable.offsetHeight)+mmenuadjustV;
  }
//alert('menuid.style.left:'+menuid.style.left+' document.body.clientWidth:'+document.body.clientWidth+' document.body.scrollLeft:'+document.body.scrollLeft);
/*
if(mmenuitemwidth+parseInt(tmpleft)>document.body.clientWidth+document.body.scrollLeft)
  menuid.style.left=document.body.clientWidth+document.body.scrollLeft-mmenuitemwidth;
else
  menuid.style.left=tmpleft;
/**/
tmpmwidth=menuid.childNodes[0].clientWidth;
//tmpcmp=(parseInt(tmpmwidth)+parseInt(tmpleft))-(parseInt(document.body.clientWidth)+parseInt(document.body.scrollLeft));
tmpcmp=(parseInt(tmpmwidth)+parseInt(tmpleft))-(parseInt(mmenuwidth));
//alert('menuid.style.left:'+tmpleft+' menuid.style.width:'+menuid.style.width+' parseInt(menuid.style.width)+mmenuitemwidth+parseInt(tmpleft):'+(parseInt(menuid.style.width)+mmenuitemwidth+parseInt(tmpleft))+' document.body.clientWidth+document.body.scrollLeft:'+(document.body.clientWidth+document.body.scrollLeft));
//var new_window=window.open("","","width=500,height=400,scrollbars=yes,resizable=yes");
//dispOBJProp(menuid.childNodes[0],new_window);
//alert('menuid:'+String(menuid.id)+' pid:'+String(pid.id)+' menuid.childNodes[0].clientWidth:'+tmpmwidth+' menuid.style.left:'+tmpleft+' menuid.style.width:'+menuid.style.width+' tmpcmp:'+tmpcmp+' mmenuitemwidth:'+mmenuitemwidth+' tmpleft:'+tmpleft+' document.body.clientWidth:'+document.body.clientWidth+' document.body.scrollLeft:'+document.body.scrollLeft);

//alert('tmpmwidth:'+tmpmwidth+' tmpleft:'+tmpleft+' document.body.clientWidth:'+document.body.clientWidth+' document.body.scrollLeft:'+document.body.scrollLeft);

if(tmpcmp>0)
  menuid.style.left=parseInt(mmenuwidth)-parseInt(tmpmwidth);
else
  menuid.style.left=parseInt(tmpleft);
//alert('menuid.style.left:'+menuid.style.left+' menuid.style.width:'+menuid.style.width);
mtmpleft=menuid.style.left;
mtmptop=menuid.style.top;
//swipe(menuid,2,4);
swipe(menuid,2,swipeSteps);
misShow=true;
}
function mshowsubmenu(menuid,pid,rid){
var tmpleft=0;
var tmpcmp=0;
var tmpmwidth=0;
if(SubMenuColorFlag=="1")
  {
  if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
    menuid.style.filter='Alpha(Opacity=80)';
  else
    menuid.style.opacity=0.8;
  }
//menuid.style.filter='';
//menuid.style.left=pid.offsetWidth+rid.offsetLeft;
tmpleft=pid.offsetWidth+rid.offsetLeft+5;
menuid.style.top=pid.offsetTop+rid.offsetTop-3;
//menuid.style.top=pid.offsetTop+rid.offsetTop;
tmpmwidth=menuid.childNodes[0].clientWidth;
tmpcmp=(parseInt(tmpmwidth)+parseInt(tmpleft))-(parseInt(mmenuwidth));
if(tmpcmp>0)
  menuid.style.left=parseInt(mmenuwidth)-parseInt(tmpmwidth);
else
  menuid.style.left=parseInt(tmpleft);
/*
if(menuid.style.width+mmenuitemwidth+parseInt(menuid.style.left)>document.body.clientWidth+document.body.scrollLeft)
menuid.style.left=document.body.clientWidth+document.body.scrollLeft-mmenuitemwidth;
/**/
//alert('menuid.style.left1:'+menuid.style.left+' menuid.style.width1:'+menuid.style.width);
menuid.style.visibility='visible';
}
function mmenu_over(menuid,x){
toel = getReal(window.event.toElement, "className", "coolButton");
fromel = getReal(window.event.fromElement, "className", "coolButton");
if (toel == fromel) return;
if(x<0){
  misShow = false;
  mallhide();
  mtoout(document.getElementById("mMenu"+x));
}else{

  mallhide();
  mtoin(document.getElementById("mMenu"+x));
  mmenushow(menuid,document.getElementById("mMenu"+x));

}
clearTimeout(mpopTimer);
}
function mmenu_out(x){
toel = getReal(window.event.toElement, "className", "coolButton");
fromel = getReal(window.event.fromElement, "className", "coolButton");
if (toel == fromel) return;
if (misShow){
mtoin(document.getElementById("mMenu"+x));
}else{
mnochange(document.getElementById("mMenu"+x));
}
mpopOut()
}
function mmenu_down(menuid,x){
  if(misShow){
  mmenuhide(menuid);
  mtoout(document.getElementById("mMenu"+x));
  }
  else{
  mtoin(document.getElementById("mMenu"+x));
  mmenushow(menuid,document.getElementById("mMenu"+x));
  misdown=true;
  }
}
function mmenu_up(){
  misdown=false;
}
function mmenuitem_over(menuid,item,x,j,i){
toel = getReal(window.event.toElement, "className", "coolButton");
fromel = getReal(window.event.fromElement, "className", "coolButton");
if (toel == fromel) return;
srcel = getReal(window.event.srcElement, "className", "coolButton");
        for(nummenu=1;nummenu<=mnumberofsub;nummenu++){
                var thesub=document.getElementById('msubmenudiv'+nummenu);
                if(!(menuid==thesub||menuid.style.tag>=thesub.style.tag)){
                msubmenuhide(thesub);
                mnochange(document.getElementById('mp'+nummenu));
                document.getElementById("mitem"+nummenu).style.color=msubfontcolor;
                }
        }
if(item)document.getElementById("mitem"+item).style.color=mmenuovercolor;
if(misdown||item){
        mtoin(srcel);
}
else{
        mtoout(srcel);
}
if(x==-1)mthestatus=document.getElementById("msub"+j).items[i].statustxt;
if(j==-1)mthestatus=mmenus[x].items[i].statustxt;
if(mthestatus!=""){
        musestatus=true;
        window.status=mthestatus;
}
clearTimeout(mpopTimer);
}
function mmenuitem_out(hassub){
toel = getReal(window.event.toElement, "className", "coolButton");
fromel = getReal(window.event.fromElement, "className", "coolButton");
if (toel == fromel) return;
srcel = getReal(window.event.srcElement, "className", "coolButton");
if(!hassub)mnochange(srcel);
if(musestatus)window.status="";
mpopOut()
if(subItemLightitFlag=='1')
  {
  if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
    srcel.filters.alpha.opacity=100;
  else
    srcel.style.opacity=1;
  }
low(srcel);
}
function mmenuitem_down(){
srcel = getReal(window.event.srcElement, "className", "coolButton");
mtoin(srcel)
misdown=true;
}
function mmenuitem_up(){
srcel = getReal(window.event.srcElement, "className", "coolButton");
mtoout(srcel)
misdown=false;
}
function mexec3(j,i){
var cmd;
if(document.getElementById("msub"+j).items[i].target=="blank"){
  cmd = "window.open('"+document.getElementById("msub"+j).items[i].command+"')";
}else{
  cmd = document.getElementById("msub"+j).items[i].target+".location=\""+document.getElementById("msub"+j).items[i].command+"\"";
}
if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
  eval(cmd);
else
  window.eval(cmd);
}
function mexec2(x){
var cmd;
if(mmenus[x].target=="blank"){
  cmd = "window.open('"+mmenus[x].command+"')";
}else{
  cmd = mmenus[x].target+".location=\""+mmenus[x].command+"\"";
}
if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
  eval(cmd);
else
  window.eval(cmd);
}
function mexec(x,i){
var cmd;
if(mmenus[x].items[i].target=="blank"){
  cmd = "window.open('"+mmenus[x].items[i].command+"')";
}else{
  cmd = mmenus[x].items[i].target+".location=\""+mmenus[x].items[i].command+"\"";
}
if(window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
  eval(cmd);
else
  window.eval(cmd);
}
function mbody_click(){

if (misShow){
        srcel = getReal(window.event.srcElement, "className", "coolButton");
        for(var x=0;x<=mmenus.length;x++){
                if(srcel.id=="mMenu"+x)
                return;
        }
        for(x=1;x<=mnumberofsub;x++){
                if(srcel.id=="mp"+x)
                return;
        }
        mallhide();
}
}
document.onclick=mbody_click;

function mwritetodocument(){
      var mwb=0;
                     //var stringx='<div id="mposflag" style="position:absolute;"></div><table  id=mmenutable border=0 cellpadding=3 cellspacing=2 width='+mmenuwidth+' height='+mmenuheight+' bgcolor='+mmenucolor+
                     var stringx='\r\n<div id="mposflag" style="position:absolute;overflow: visible;"></div>\r\n<table id=mmenutable border=0 cellpadding=0 cellspacing=0 width='+(mmenuwidth+0)+' height='+(mmenuheight+0)+
                     ' onselectstart="'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'event.returnValue=false':'event.preventDefault()')+'"'+
                     ' style="'+((MainMenuColorFlag=="1")?((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?"filter:Alpha(Opacity=50,finishopacity=60,style=1);":"opacity:0.5;"):(""))+'cursor:'+mcursor+';'+mfonts+
                     ' border-left: '+mwb+'px solid '+mmenuoutbordercolor+';'+
                     ' border-right: '+mwb+'px solid '+mmenuinbordercolor+'; '+
                     'border-top: '+mwb+'px solid '+mmenuoutbordercolor+'; '+
                     'border-bottom: '+mwb+'px solid '+mmenuinbordercolor+'; padding:0px">\r\n<tr>'
                     for(var x=0;x<mmenus.length;x++){
                             var thismenu=mmenus[x];
                             var imgsize="";
                             if(thismenu.sizex!="0"||thismenu.sizey!="0")imgsize=" width="+thismenu.sizex+" height="+thismenu.sizey;
                             var ifspace="";
                             //if(thismenu.caption!="")ifspace=" ";
                             if(thismenu.caption!="")ifspace="";
                             stringx += "\r\n<td nowrap class=coolMenu id=mMenu"+x+" style='border: "+mitemedge+"px solid "+mmenucolor+"'"+
                             ""+((MainMenuColorFlag=="1")?(MainMenuLimitWidthFlag=="1"?" width="+mmenuunitwidth:""):(""))+" onmouseover=mmenu_over(mmenudiv"+x+
                             ","+x+") onmouseout=mmenu_out("+x+
                             ") onmousedown=mmenu_down(mmenudiv"+x+","+x+")";
                                   if(thismenu.command!=""){
                                       stringx += " onmouseup=mmenu_up();mexec2("+x+");";
                                   }else{
                                             stringx += " onmouseup=mmenu_up()";
                                   }
                                   if(thismenu.pos=="0"){
                                       stringx += " align="+buttonAlign+"><img align=absmiddle src='"+thismenu.img+"'"+imgsize+">"+ifspace+thismenu.caption+"</td>";
                                   }else if(thismenu.pos=="1"){
                                       stringx += " align="+buttonAlign+">"+thismenu.caption+ifspace+"<img align=absmiddle src='"+thismenu.img+"'"+imgsize+"></td>";
                                   }else if(thismenu.pos=="2"){
                                       stringx += " align="+buttonAlign+" background='"+thismenu.img+"'>"+thismenu.caption+"</td>";
                                   }else{
                                       stringx += " align="+buttonAlign+">"+thismenu.caption+"</td>";
                                   }
                             stringx += (MainMenuCompartPicFlag=="1" && x+1<mmenus.length)?"<td align='center'>"+MainMenuCompartPic+"</td>":"";
                     }
                     //stringx+="<td width=*> </td></tr></table>";
                     stringx+="\r\n</tr>\r\n</table>";


                     for(var x=0;x<mmenus.length;x++){
                             thismenu=mmenus[x];
                        if(x<0){
                        stringx+='\r\n<div id=mmenudiv'+x+' style="visiable:none"></div>';
                        }else{
                        stringx+='\r\n<div id=mmenudiv'+x+
                        ' style="'+((SubMenuColorFlag=="1")?((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?"filter:Alpha(Opacity=50,finishopacity=60,style=1);":"opacity:0.5;"):(""))+'cursor:'+mcursor+';position:absolute;';
                        //' style="cursor:'+mcursor+';position:absolute;';
                        if(lineArrayFlag=='1')
                          //stringx+='width:'+(mmenuwidth/2)+'px; z-index:'+(x+100);
                          stringx+=' z-index:'+(x+100);
                        else
                          stringx+='width:'+mmenuitemwidth+'px; z-index:'+(x+100);
                        if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                        stringx+=';border-left: 0px solid '+mmidoutcolor+
                        ';border-top: 0px solid '+mmidoutcolor;}
                        if(lineArrayFlag=='1')
                        stringx+=';border-right: 0px solid '+mmenuinbordercolor+
                        ';border-bottom: 0px solid '+mmenuinbordercolor+';visibility:hidden" onselectstart="'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'event.returnValue=false':'event.preventDefault()')+'">'+
                             '\r\n<table border="0" align="'+buttonAlign+'" cellpadding="0" cellspacing="0" '+
                             'style="'+msubfonts+' border-left: 0px solid '+mmenuoutbordercolor;
                        else
                        stringx+=';border-right: 0px solid '+mmenuinbordercolor+
                        ';border-bottom: 0px solid '+mmenuinbordercolor+';visibility:hidden" onselectstart="'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'event.returnValue=false':'event.preventDefault()')+'">'+
                             '\r\n<table width="100%" border="0" height="100%" align="'+buttonAlign+'" cellpadding="0" cellspacing="2" '+
                             'style="'+msubfonts+' border-left: 0px solid '+mmenuoutbordercolor;
                             if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                             stringx+=';border-right: 0px solid '+mmidincolor+
                             ';border-bottom: 0px solid '+mmidincolor;}
                             stringx+=';border-top: 0px solid '+mmenuoutbordercolor+
                             ';padding: 0px"'+(subitemcanbgcolorflag=="1"?(' bgcolor='+mmenucolor):'')+(subitemcanbgflag=="1"?(' background='+bgroundImage):'')+'>';
                             if(lineArrayFlag=='1' && thismenu.items.length>1)
                               stringx += "\r\n<tr>"+(subitemcanbgflag=="1"?"\r\n<td nowrap background='images/islinepre.gif' width=9 height=38></td>":"");
                             else
                               stringx += "";
                             for(var i=0;i<thismenu.items.length;i++){
                                     var thismenuitem=thismenu.items[i];
                                     var imgsize="";
                                     if(thismenuitem.sizex!="0"||thismenuitem.sizey!="0")imgsize=" width="+thismenuitem.sizex+" height="+thismenuitem.sizey;
                                     var ifspace="";
                                     if(thismenu.caption!="")ifspace=" ";
                                     if(thismenuitem.hasc!=null){
                                     if(lineArrayFlag=='1')
                                     stringx += "\r\n<td nowrap id=mp"+thismenuitem.hasc+" class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                                     "' width=100% onmouseout=mmenuitem_out(true) onmouseover=\"mmenuitem_over(mmenudiv"+x+
                                     ",'"+thismenuitem.hasc+"',"+x+",-1,"+i+");mshowsubmenu(msubmenudiv"+thismenuitem.hasc+",mp"+thismenuitem.hasc+",mmenudiv"+x+");\""+
                                     ">\r\n<table onmouseup=mmenuitem_up();mexec("+x+","+i+"); id=mitem"+thismenuitem.hasc+" cellspacing='0' cellpadding='0' border='0' width='100%' style='"+msubfonts+"'>\r\n<td nowrap ";
                                     else
                                     stringx += "\r\n<tr>\r\n<td nowrap id=mp"+thismenuitem.hasc+" class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                                     "' width=100% onmouseout=mmenuitem_out(true) onmouseover=\"mmenuitem_over(mmenudiv"+x+
                                     ",'"+thismenuitem.hasc+"',"+x+",-1,"+i+");mshowsubmenu(msubmenudiv"+thismenuitem.hasc+",mp"+thismenuitem.hasc+",mmenudiv"+x+");\""+
                                     ">\r\n<table onmouseup=mmenuitem_up();mexec("+x+","+i+"); id=mitem"+thismenuitem.hasc+" cellspacing='0' cellpadding='0' border='0' width='100%' style='"+msubfonts+"'>\r\n<tr><td nowrap ";
                                       if(thismenuitem.pos=="0"){
                                         stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td>\r\n<td nowrap ";
                                       }else if(thismenuitem.pos=="1"){
                                         stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td>\r\n<td nowrap ";
                                       }else if(thismenuitem.pos=="2"){
                                         stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td>\r\n<td nowrap background='"+thismenuitem.img+"'";
                                       }else{
                                         stringx += ">"+thismenuitem.caption+"</td>\r\n<td nowrap ";
                                       }
                                       if(lineArrayFlag=='1')
                                       stringx += " align=right width='1'><font style='font: 12px Webdings;font-size: 6pt'>8</font></td></tr></table></td>";
                                       else
                                       stringx += " align=right width='1'><font style='font: 12px Webdings;font-size: 6pt'>8</font></td></tr></table></td></tr>";
                                     }else if(!thismenuitem.isline){
                                     if(lineArrayFlag=='1')
                                     stringx += "\r\n<td nowrap class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                                     "' height="+mmenuheight+" onmouseover=\"mmenuitem_over(mmenudiv"+x+
                                     ",false,"+x+",-1,"+i+");\" onmouseout=mmenuitem_out() onmousedown=mmenuitem_down() onmouseup=";
                                     else
                                     stringx += "\r\n<tr>\r\n<td nowrap class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                                     "' width=100% height="+mmenuheight+" onmouseover=\"mmenuitem_over(mmenudiv"+x+
                                     ",false,"+x+",-1,"+i+");\" onmouseout=mmenuitem_out() onmousedown=mmenuitem_down() onmouseup=";
                                 stringx += "mmenuitem_up();mexec("+x+","+i+"); ";
                                   if(thismenuitem.pos=="0"){
                                         stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td></tr>";
                                       }else if(thismenuitem.pos=="1"){
                                         stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td></tr>";
                                       }else if(thismenuitem.pos=="2"){
                                         stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td></tr>";
                                       }else{
                                         if(lineArrayFlag=='1')
                                         stringx += ">"+thismenuitem.caption+"</td>";
                                         else
                                         stringx += ">"+thismenuitem.caption+"</td></tr>";
                                       }
                                 }else{
                                     stringx+='\r\n<tr><td nowrap height="1" onmousemove="clearTimeout(mpopTimer);"><img height="1" width="1" src="none.gif" border="0"></td>\r\n</tr>\r\n';
                                     }
                             }
                             if(lineArrayFlag=='1' && thismenu.items.length>1)
                               stringx += (subitemcanbgflag=="1"?"\r\n<td nowrap background='images/islineend.gif' width=8 height=38></td>":"")+"\r\n</tr>";
                             else
                               stringx += "";
                             stringx+='\r\n</table>\r\n</div>\r\n'
                             }
                }

for(var j=1;j<=mnumberofsub;j++){
thisitem=eval("msub"+j);//document.getElementById("msub"+j);
stringx+='\r\n<div id=msubmenudiv'+j+
                        ' style="'+((SubMenuColorFlag=="1")?((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?"filter:Alpha(Opacity=50,finishopacity=80,style=1);":"opacity:0.5;"):(""))+'tag:'+thisitem.level+';cursor:'+mcursor+';position:absolute;'+
                        //' style="tag:'+thisitem.level+';cursor:'+mcursor+';position:absolute;'+
                        'width:'+mmenuitemwidth+'px; z-index:'+(j+200);
                        if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                        stringx+=';border-left: 1px solid '+mmidoutcolor+
                        ';border-top: 1px solid '+mmidoutcolor;}
                        stringx+=';border-right: 1px solid '+mmenuinbordercolor+
                        ';border-bottom: 1px solid '+mmenuinbordercolor+';visibility:hidden" onselectstart="'+((window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?'event.returnValue=false':'event.preventDefault()')+'">\n'+
                             '\r\n<table  width="100%" border="0" height="100%" align="center" cellpadding="0" cellspacing="2" '+
                             'style="'+msubfonts+' border-left: 0px solid '+mmenuoutbordercolor;
                             if(mmenuinbordercolor!=mmenuoutbordercolor&&msubedge=="0"){
                             stringx+=';border-right: 0px solid '+mmidincolor+
                             ';border-bottom: 0px solid '+mmidincolor;}
                             stringx+=';border-top: 0px solid '+mmenuoutbordercolor+
                             ';padding: 0px"'+(subitemcanbgcolorflag=="1"?(' bgcolor='+mmenucolor):'')+(subitemcanbgflag=="1"?(' background='+bgroundImage):'')+'>';
                             for(var i=0;i<thisitem.items.length;i++){
                                     var thismenuitem=thisitem.items[i];
                                     var imgsize="";
                                     if(thismenuitem.sizex!="0"||thismenuitem.sizey!="0")imgsize=" width="+thismenuitem.sizex+" height="+thismenuitem.sizey;
                                     var ifspace="";
                                     if(thismenu.caption!="")ifspace=" ";
                                     if(thismenuitem.hasc!=null){
                                     stringx += "\r\n<tr>\r\n<td nowrap id=mp"+thismenuitem.hasc+" class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                                     "' width=100% onmouseout=mmenuitem_out(true) onmouseover=\"mmenuitem_over(msubmenudiv"+j+
                                     ",'"+thismenuitem.hasc+"',-1,"+j+","+i+");mshowsubmenu(msubmenudiv"+thismenuitem.hasc+",mp"+thismenuitem.hasc+",msubmenudiv"+j+");\""+
                                     "><table onmouseup=mmenuitem_up();mexec3("+j+","+i+"); id=mitem"+thismenuitem.hasc+" cellspacing='0' cellpadding='0' border='0' width='100%' style='"+msubfonts+"'>\r\n<tr>\r\n<td nowrap ";

                                       if(thismenuitem.pos=="0"){
                                         stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td>\r\n<td nowrap ";
                                       }else if(thismenuitem.pos=="1"){
                                         stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td>\r\n<td nowrap";
                                       }else if(thismenuitem.pos=="2"){
                                         stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td>\r\n<td nowrap background='"+thismenuitem.img+"'";
                                       }else{
                                         stringx += ">"+thismenuitem.caption+"</td>\r\n<td nowrap ";
                                       }
                                       stringx += " align=right width='5'><font style='font: 12px Webdings;font-size: 6pt'>8</font></td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n";
                                     }else if(!thismenuitem.isline){
                                     stringx += "<tr><td nowrap class=coolButton style='border: "+mitemedge+"px solid "+mmenucolor+
                                     "' width=100% height="+mmenuheight+" onmouseover=\"mmenuitem_over(msubmenudiv"+j+
                                     ",false,-1,"+j+","+i+");\" onmouseout=mmenuitem_out() onmousedown=mmenuitem_down() onmouseup=";
                                     stringx += "mmenuitem_up();mexec3("+j+","+i+"); ";
                                 if(thismenuitem.pos=="0"){
                                         stringx += "><img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+">"+ifspace+thismenuitem.caption+"</td>\r\n</tr>";
                                       }else if(thismenuitem.pos=="1"){
                                         stringx += ">"+thismenuitem.caption+ifspace+"<img align=absmiddle src='"+thismenuitem.img+"'"+imgsize+"></td>\r\n</tr>";
                                       }else if(thismenuitem.pos=="2"){
                                         stringx += "background='"+thismenuitem.img+"'>"+thismenuitem.caption+"</td>\r\n</tr>";
                                       }else{
                                         stringx += ">"+thismenuitem.caption+"</td>\r\n</tr>";
                                       }
                                     }else{
                                     stringx+='\r\n<tr>\r\n<td nowrap height="1" onmousemove="clearTimeout(mpopTimer);"><img height="1" width="1" src="none.gif" border="0"></td>\r\n</tr>';
                                     }
                             }
stringx+='</table>\r\n</div>\r\n'
}
  menuinfo="<div align='left' id='JsMenuCSS' style='z-index:1000;overflow: visible;'>"+stringx+"</div>";
/*
//调试
if(document.all)
  openwindow007.document.write(menuinfo);
else
  openwindow007=document.getElementById("openwindow007").contentWindow.document.write(menuinfo);
/**/
//document.write("<div align='left' id='JsMenuCSS' style='z-index:100;'>"+stringx+"</div>");
}
//首页
mpmenu0=new mMenu(((MainMenuTextFlag=="1")?('返回首页'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'index.php','top','','','','');
//中心简介
mpmenu1=new mMenu(((MainMenuTextFlag=="1")?('中心简介'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=中心简介&text=中心简介','top','','','','');
mpmenu1.addItem(new mMenuItem('中心介绍','mainpages.php?field_name=中心介绍&text=中心介绍','top',false,'',null,'','','',''));
mpmenu1.addItem(new mMenuItem('办学理念','mainpages.php?field_name=办学理念&text=办学理念','top',false,'',null,'','','','10'));
mpmenu1.addItem(new mMenuItem('家长课堂','mainpages.php?field_name=家长课堂&text=家长课堂','top',false,'',null,'','','','10'));
mpmenu1.addItem(new mMenuItem('专家讲座','mainpages.php?field_name=专家讲座&text=专家讲座','top',false,'',null,'','','','10'));
//注意力训练
//mMenuItem(caption,command,target,isline,statustxt,level,img,sizex,sizey,pos)
mpmenu2=new mMenu(((MainMenuTextFlag=="1")?('注意力训练'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth-10)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=注意力训练&text=注意力训练','top','','','','');
mpmenu2.addItem(new mMenuItem('常见问题','mainpages.php?field_name=常见问题&text=常见问题','top',false,'',null,'','','',''));
mpmenu2.addItem(new mMenuItem('训练方式','mainpages.php?field_name=训练方式&text=训练方式','top',false,'',null,'','','','10'));
mpmenu2.addItem(new mMenuItem('注意力课程体系','mainpages.php?field_name=注意力课程体系&text=注意力课程体系','top',false,'',null,'','','','10'));
mpmenu2.addItem(new mMenuItem('注意力课程设置','mainpages.php?field_name=注意力课程设置&text=注意力课程设置','top',false,'',null,'','','','10'));
mpmenu2.addItem(new mMenuItem('培训效果','mainpages.php?field_name=培训效果&text=培训效果','top',false,'',null,'','','','10'));
/*
msub1=new mMenuItem('服务网络','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',2,'','','','10');
msub1.addsubItem(new mMenuItem('重庆市','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub1.addsubItem(new mMenuItem('北京市','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub2=new mMenuItem('其他省市','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',3,'','','','10');
msub2.addsubItem(new mMenuItem('成都','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub2.addsubItem(new mMenuItem('西安','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub2.addsubItem(new mMenuItem('贵阳','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub2.addsubItem(new mMenuItem('兰州','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub2.addsubItem(new mMenuItem('昆明','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub2.addsubItem(new mMenuItem('长沙','mainpages.php?field_name=服务网络&text=服务网络','top',false,'',null,'','','','10'));
msub1.addsubItem(msub2);
mpmenu2.addItem(msub1);
/**/
//情商乐园
mpmenu3=new mMenu(((MainMenuTextFlag=="1")?('情商乐园'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+10)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=情商乐园&text=情商乐园','top','','','','');
//mpmenu3.addItem(new mMenuItem('商业作品','mainpages.php?field_name=商业作品&text=商业作品','top',false,'',null,'','','','10'));
/*
msub3=new mMenuItem('商业作品','mainpages.php?field_name=商业作品&text=商业作品','top',false,'',2,'','','','10');
msub3.addsubItem(new mMenuItem('电器数码','mainpages.php?field_name=电器数码&text=商业作品&custom_name=商业作品','top',false,'',null,'','','','10'));
msub3.addsubItem(new mMenuItem('房地产','mainpages.php?field_name=房地产&text=商业作品&custom_name=商业作品','top',false,'',null,'','','','10'));
msub3.addsubItem(new mMenuItem('家装建材','mainpages.php?field_name=家装建材&text=商业作品&custom_name=商业作品','top',false,'',null,'','','','10'));
msub3.addsubItem(new mMenuItem('日用品','mainpages.php?field_name=日用品&text=商业作品&custom_name=商业作品','top',false,'',null,'','','','10'));
msub3.addsubItem(new mMenuItem('食品、饮料','mainpages.php?field_name=食品、饮料&text=商业作品&custom_name=商业作品','top',false,'',null,'','','','10'));
msub3.addsubItem(new mMenuItem('医药学校','mainpages.php?field_name=医药学校&text=商业作品&custom_name=商业作品','top',false,'',null,'','','','10'));
mpmenu3.addItem(msub3);
/**/
mpmenu3.addItem(new mMenuItem('闪耀情商','mainpages.php?field_name=闪耀情商&text=闪耀情商','top',false,'',null,'','','',''));
mpmenu3.addItem(new mMenuItem('课程目标','mainpages.php?field_name=课程目标&text=课程目标','top',false,'',null,'','','','10'));
mpmenu3.addItem(new mMenuItem('课程模式','mainpages.php?field_name=课程模式&text=课程模式','top',false,'',null,'','','',''));
mpmenu3.addItem(new mMenuItem('课程体系','mainpages.php?field_name=课程体系&text=课程体系','top',false,'',null,'','','',''));
mpmenu3.addItem(new mMenuItem('课程设置','mainpages.php?field_name=课程设置&text=课程设置','top',false,'',null,'','','','10'));
mpmenu3.addItem(new mMenuItem('选择我们','mainpages.php?field_name=选择我们&text=选择我们','top',false,'',null,'','','',''));
//感觉统合
mpmenu4=new mMenu(((MainMenuTextFlag=="1")?('感觉统合'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=感觉统合&text=感觉统合','top','','','','');
mpmenu4.addItem(new mMenuItem('什么叫感觉统合','mainpages.php?field_name=什么叫感觉统合&text=什么叫感觉统合','top',false,'',null,'','','',''));
mpmenu4.addItem(new mMenuItem('感觉统合失调的原因和表现','mainpages.php?field_name=感觉统合失调的原因和表现&text=感觉统合失调的原因和表现','top',false,'',null,'','','','10'));
mpmenu4.addItem(new mMenuItem('感觉统合课程体系','mainpages.php?field_name=感觉统合课程体系&text=感觉统合课程体系','top',false,'',null,'','','','10'));
mpmenu4.addItem(new mMenuItem('感觉统合课程设置','mainpages.php?field_name=感觉统合课程设置&text=感觉统合课程设置','top',false,'',null,'','','','10'));
//精英夏令营
mpmenu5=new mMenu(((MainMenuTextFlag=="1")?('精英夏令营'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=精英夏令营&text=精英夏令营','top','','','','');
mpmenu5.addItem(new mMenuItem('夏令营目标','mainpages.php?field_name=夏令营目标&text=夏令营目标','top',false,'',null,'','','','10'));
mpmenu5.addItem(new mMenuItem('营会活动项目','mainpages.php?field_name=营会活动项目&text=营会活动项目','top',false,'',null,'','','','10'));
mpmenu5.addItem(new mMenuItem('夏令营地概况','mainpages.php?field_name=夏令营地概况&text=夏令营地概况','top',false,'',null,'','','','10'));
mpmenu5.addItem(new mMenuItem('夏令营安全保障','mainpages.php?field_name=夏令营安全保障&text=夏令营安全保障','top',false,'',null,'','','','10'));
mpmenu5.addItem(new mMenuItem('夏令营师资团队','mainpages.php?field_name=夏令营师资团队&text=夏令营师资团队','top',false,'',null,'','','','10'));
//AQ成长计划
mpmenu6=new mMenu(((MainMenuTextFlag=="1")?('AQ成长计划'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=AQ成长计划&text=AQ成长计划','top','','','','');
mpmenu6.addItem(new mMenuItem('AQ课程目标','mainpages.php?field_name=AQ课程目标&text=AQ课程目标','top',false,'',null,'','','',''));
mpmenu6.addItem(new mMenuItem('AQ课程介绍','mainpages.php?field_name=AQ课程介绍&text=AQ课程介绍','top',false,'',null,'','','','10'));
mpmenu6.addItem(new mMenuItem('安全保障','mainpages.php?field_name=安全保障&text=安全保障','top',false,'',null,'','','','10'));
//教学效果
mpmenu7=new mMenu(((MainMenuTextFlag=="1")?('教学效果'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth-10)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=教学效果&text=教学效果','top','','','','');
mpmenu7.addItem(new mMenuItem('学员闪耀榜','mainpages.php?field_name=学员闪耀榜&text=学员闪耀榜','top',false,'',null,'','','','10'));
mpmenu7.addItem(new mMenuItem('家长心声','mainpages.php?field_name=家长心声&text=家长心声','top',false,'',null,'','','',''));
mpmenu7.addItem(new mMenuItem('成功案例','mainpages.php?field_name=成功案例&text=成功案例','top',false,'',null,'','','','10'));
//专家团队
mpmenu8=new mMenu(((MainMenuTextFlag=="1")?('专家团队'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=专家团队&text=专家团队','top','','','','');
mpmenu8.addItem(new mMenuItem('专家顾问','mainpages.php?field_name=专家顾问&text=专家顾问','top',false,'',null,'','','',''));
mpmenu8.addItem(new mMenuItem('教学顾问','mainpages.php?field_name=教学顾问&text=教学顾问','top',false,'',null,'','','','10'));
mpmenu8.addItem(new mMenuItem('师资团队','mainpages.php?field_name=师资团队&text=师资团队','top',false,'',null,'','','','10'));
//在线测试
mpmenu9=new mMenu(((MainMenuTextFlag=="1")?('在线测试'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=在线测试&text=在线测试','top','','','','');
//在线报名
mpmenu10=new mMenu(((MainMenuTextFlag=="1")?('在线报名'):('<img src="'+menuButton+'" width="'+(mmenuitemwidth+0)+'" height="'+menuButtonHeight+'">')),'mainpages.php?field_name=在线报名&text=在线报名','top','','','','');

mwritetodocument();
//特殊菜单结束
//输出
var tsinfo=menuinfo;
//alert(tsinfo);
document.write(tsinfo);
//页面对象属性
function dispOBJProp(object_string,window_name) {
    var actual_object = (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)?eval(object_string):window.eval(object_string);
    var property_message = "\r\n\r\nHere are the property values for " + object_string + ":\r\n\r\n";
    for (var property_name in actual_object) {
        property_message += object_string + "." + property_name + " = " + actual_object[property_name] + "\r\n\r\n";
    }
    property_message="<pre>"+property_message+"</pre>";
    if(window_name=="")
      document.write(property_message);
    else
      window_name.document.write(property_message);
}
