function jsonCallBack(b){for(var e=0;e<b.length;e++){z=b[e].subList;var j=document.getElementById("firstid");var d=document.getElementById("secondid");var a=document.getElementById("thirdid");var c=document.getElementById("fouthid");if(b[e].url=="http://www.huawei.com/solutions.do"&&true==dojo.lang.isArray(z)){j.setAttribute("rel","ddsubmenu1")}if(b[e].url=="http://www.huawei.com/products_services.do"&&true==dojo.lang.isArray(z)){d.setAttribute("rel","ddsubmenu2")}if(b[e].url=="http://www.huawei.com/technology.do"&&true==dojo.lang.isArray(z)){a.setAttribute("rel","ddsubmenu3")}if(b[e].url=="http://support.huawei.com/support/index.jsp?colID=ROOTENWEB|CO0000000169"&&true==dojo.lang.isArray(z)){c.setAttribute("rel","ddsubmenu4")}var h="";name=b[e].name;if(true==dojo.lang.isArray(z)){var g=new Array();g[e]=document.createElement("ul");g[e].className="ddsubmenustyle";g[e].id="ddsubmenu"+parseInt(e+1);document.body.appendChild(g[e]);dojo.lang.forEach(z,function(i,k){f=i.subList;h+="<li><a ";h+=" href='"+i.url+"' ";if(true==dojo.lang.isArray(f)){h+=">"+i.name+"</a>";h+="<ul> ";dojo.lang.forEach(f,function(l,m){h+="<li><a";h+=" href='"+l.url+"' ";h+=">"+l.name+"</a></li>"});h+="</ul>";h+="</li>"}else{h+=">"+i.name+"</a></li>"}});g[e].innerHTML=h}}}if(typeof dd_domreadycheck=="undefined"){var dd_domreadycheck=false}var ddlevelsmenu={enableshim:true,arrowpointers:{downarrow:["ddlevelsfiles/arrow-down.gif",11,7],rightarrow:["http://www.huawei.com/wwwres/v1/en/css/vicss/img/arrow-rightwww.gif",5,5],showarrow:{toplevel:false,sublevel:true}},hideinterval:100,effects:{enableswipe:true,enablefade:true,duration:350},httpsiframesrc:"blank.htm",topmenuids:[],topitems:{},subuls:{},lastactivesubul:{},topitemsindex:-1,ulindex:-1,hidetimers:{},shimadded:false,nonFF:!/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent),getoffset:function(b,a){return(b.offsetParent)?b[a]+this.getoffset(b.offsetParent,a):b[a]},getoffsetof:function(a){a._offsets={left:this.getoffset(a,"offsetLeft"),top:this.getoffset(a,"offsetTop")}},getwindowsize:function(){this.docwidth=window.innerWidth?window.innerWidth-10:this.standardbody.clientWidth-10;this.docheight=window.innerHeight?window.innerHeight-15:this.standardbody.clientHeight-18},gettopitemsdimensions:function(){for(var a=0;a<this.topmenuids.length;a++){var d=this.topmenuids[a];for(var b=0;b<this.topitems[d].length;b++){var e=this.topitems[d][b];var c=document.getElementById(e.getAttribute("rel"));e._dimensions={w:e.offsetWidth,h:e.offsetHeight,submenuw:c.offsetWidth,submenuh:c.offsetHeight}}}},isContained:function(a,b){var b=window.event||b;var d=b.relatedTarget||((b.type=="mouseover")?b.fromElement:b.toElement);while(d&&d!=a){try{d=d.parentNode}catch(b){d=a}}if(d==a){return true}else{return false}},addpointer:function(d,g,a,c){var e=document.createElement("img");e.src=a[0];e.style.width=a[1]+"px";e.style.height=a[2]+"px";if(g=="rightarrowpointer"){e.style.left=d.offsetWidth-a[2]-5+"px"}e.className=g;var b=d.childNodes[d.firstChild.nodeType!=1?1:0];if(b&&b.tagName=="SPAN"){d=b}if(c=="before"){d.insertBefore(e,d.firstChild)}else{d.appendChild(e)}},css:function(b,a,c){var d=new RegExp("(^|\\s+)"+a+"($|\\s+)","ig");if(c=="check"){return d.test(b.className)}else{if(c=="remove"){b.className=b.className.replace(d,"")}else{if(c=="add"&&!d.test(b.className)){b.className+=" "+a}}}},addshimmy:function(b){var c=(!window.opera)?document.createElement("iframe"):document.createElement("div");c.className="ddiframeshim";c.setAttribute("src",location.protocol=="https:"?this.httpsiframesrc:"about:blank");c.setAttribute("frameborder","0");b.appendChild(c);try{c.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"}catch(a){}return c},positionshim:function(h,c,a,g,e){if(h._istoplevel){var e=window.pageYOffset?window.pageYOffset:this.standardbody.scrollTop;var d=h._offsets.top-e;var b=e+this.docheight-h._offsets.top-h._dimensions.h;if(d>0){this.shimmy.topshim.style.left=g+"px";this.shimmy.topshim.style.top=e+"px";this.shimmy.topshim.style.width="99%";this.shimmy.topshim.style.height=d+"px"}if(b>0){this.shimmy.bottomshim.style.left=g+"px";this.shimmy.bottomshim.style.top=h._offsets.top+h._dimensions.h+"px";this.shimmy.bottomshim.style.width="99%";this.shimmy.bottomshim.style.height=b+"px"}}},hideshim:function(){this.shimmy.topshim.style.width=this.shimmy.bottomshim.style.width=0;this.shimmy.topshim.style.height=this.shimmy.bottomshim.style.height=0},buildmenu:function(d,g,c,e,a,b){g._master=d;g._pos=e;g._istoplevel=a;if(a){this.addEvent(g,function(h){ddlevelsmenu.hidemenu(ddlevelsmenu.subuls[this._master][parseInt(this._pos)],g,b)},"click")}this.subuls[d][e]=c;g._dimensions={w:g.offsetWidth,h:g.offsetHeight,submenuw:c.offsetWidth,submenuh:c.offsetHeight};this.getoffsetof(g);c.style.left=0;c.style.top=0;c.style.visibility="hidden";this.onmouseout=function(){};this.addEvent(g,function(p){if(!ddlevelsmenu.isContained(this,p)){var h=ddlevelsmenu.subuls[this._master][parseInt(this._pos)];if(this._istoplevel){var q=this.firstChild;var k=this.firstChild.id;var m=k.substr(0,(k.length-6));q.src=contextPath+"/images/"+m+"_red.gif";ddlevelsmenu.css(this,"selected","add");clearTimeout(ddlevelsmenu.hidetimers[this._master][this._pos])}else{var i=this.childNodes[0];ddlevelsmenu.css(i,"selected","add")}ddlevelsmenu.getoffsetof(g);var u=window.pageXOffset?window.pageXOffset:ddlevelsmenu.standardbody.scrollLeft;var t=window.pageYOffset?window.pageYOffset:ddlevelsmenu.standardbody.scrollTop;var o=this._offsets.left+this._dimensions.submenuw+(this._istoplevel&&b=="topbar"?0:this._dimensions.w);var w=this._offsets.top+this._dimensions.submenuh;var v=(this._istoplevel?this._offsets.left+(b=="sidebar"?this._dimensions.w:0):this._dimensions.w);if(o-u>ddlevelsmenu.docwidth){v+=-this._dimensions.submenuw+(this._istoplevel&&b=="topbar"?this._dimensions.w:-this._dimensions.w)}var l=navigator.appName;var s=navigator.appVersion;var n=s.split(";");var j=n[1].replace(/[ ]/g,"");if(l=="Microsoft Internet Explorer"&&j=="MSIE6.0"){h.style.left=v+"px"}else{h.style.left=v-4+"px"}var r=(this._istoplevel?this._offsets.top+(b=="sidebar"?0:this._dimensions.h):this.offsetTop);if(w-t>ddlevelsmenu.docheight){if(this._dimensions.submenuh<this._offsets.top+(b=="sidebar"?this._dimensions.h:0)-t){r+=-this._dimensions.submenuh+(this._istoplevel&&b=="topbar"?-this._dimensions.h:this._dimensions.h)}else{r+=-(this._offsets.top-t)+(this._istoplevel&&b=="topbar"?-this._dimensions.h:0)}}h.style.top=r+"px";if(ddlevelsmenu.enableshim&&(ddlevelsmenu.effects.enableswipe==false||ddlevelsmenu.nonFF)){ddlevelsmenu.positionshim(g,h,b,u,t)}else{h.FFscrollInfo={x:u,y:t}}ddlevelsmenu.showmenu(g,h,b)}},"mouseover");this.addEvent(g,function(i){var h=ddlevelsmenu.subuls[this._master][parseInt(this._pos)];if(this._istoplevel){if(!ddlevelsmenu.isContained(this,i)&&!ddlevelsmenu.isContained(h,i)){ddlevelsmenu.hidemenu(h,g,b)}}else{if(!this._istoplevel&&!ddlevelsmenu.isContained(this,i)){ddlevelsmenu.hidemenu(h,g,b);ddlevelsmenu.css(this.childNodes[0],"selected","remove")}}},"mouseout")},setopacity:function(a,b){a.style.opacity=b;if(typeof a.style.opacity!="string"){a.style.MozOpacity=b}},showmenu:function(d,b,a){if(this.effects.enableswipe||this.effects.enablefade){if(this.effects.enableswipe){var c=(d._istoplevel&&a=="topbar")?d._dimensions.submenuh:d._dimensions.submenuw;b.style.width=b.style.height=0;b.style.overflow="hidden"}if(this.effects.enablefade){this.setopacity(b,0)}clearInterval(b._animatetimer1);b._curanimatedegree=0;b.style.visibility="visible";clearInterval(b._animatetimer);b._starttime=new Date().getTime();b._animatetimer=setInterval(function(){ddlevelsmenu.revealmenu(d,b,c,a)},10)}else{b.style.visibility="visible"}},revealmenu:function(e,c,d,b){var a=new Date().getTime()-c._starttime;if(a<this.effects.duration){if(this.effects.enableswipe){if(c._curanimatedegree==0){c.style[e._istoplevel&&b=="topbar"?"width":"height"]="auto"}c.style[e._istoplevel&&b=="topbar"?"height":"width"]=(c._curanimatedegree*d)+"px"}if(this.effects.enablefade){this.setopacity(c,c._curanimatedegree)}}else{clearInterval(c._animatetimer);if(this.effects.enableswipe){c.style.width="auto";c.style.height="auto";c.style.overflow="visible"}if(this.effects.enablefade){this.setopacity(c,1);c.style.filter=""}if(this.enableshim&&c.FFscrollInfo){this.positionshim(e,c,b,c.FFscrollInfo.x,c.FFscrollInfo.y)}}c._curanimatedegree=(1-Math.cos((a/this.effects.duration)*Math.PI))/4},hidemenu:function(g,i,d){var h=(i._istoplevel&&d=="topbar")?i._dimensions.submenuh:i._dimensions.submenuw;if(typeof g._pos!="undefined"){this.css(this.topitems[g._master][parseInt(g._pos)],"selected","remove");var a=this.topitems[g._master][parseInt(g._pos)];var c=a.childNodes[0].id;var b=c.substr(0,(c.length-6));var e=a.childNodes[0].className;if(e!="slectedobj"){a.childNodes[0].src=contextPath+"/images/"+b+".gif"}else{a.childNodes[0].src=contextPath+"/images/"+b+"_red.gif"}if(this.enableshim){this.hideshim()}}clearInterval(g._animatetimer);g.style.left=0;g.style.top="-1000px";g.style.visibility="hidden"},addEvent:function(b,c,a){if(b.addEventListener){b.addEventListener(a,c,false)}else{if(b.attachEvent){b.attachEvent("on"+a,function(){return c.call(b,window.event)})}}},domready:function(a){if(dd_domreadycheck){a();return}if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){document.removeEventListener("DOMContentLoaded",arguments.callee,false);a();dd_domreadycheck=true},false)}else{if(document.attachEvent){if(document.documentElement.doScroll&&window==window.top){(function(){if(dd_domreadycheck){a();return}try{document.documentElement.doScroll("left")}catch(b){setTimeout(arguments.callee,0);return}a();dd_domreadycheck=true})()}}}if(document.attachEvent&&parent.length>0){this.addEvent(window,function(){a()},"load")}},init:function(b,e){this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;this.topitemsindex=-1;this.ulindex=-1;this.topmenuids.push(b);this.topitems[b]=[];this.subuls[b]=[];this.hidetimers[b]=[];if(this.enableshim&&!this.shimadded){this.shimmy={};this.shimmy.topshim=this.addshimmy(document.body);this.shimmy.bottomshim=this.addshimmy(document.body);this.shimadded=true}var k=document.getElementById(b);var d=k.getElementsByTagName("a");this.getwindowsize();for(var h=0;h<d.length;h++){if(d[h].getAttribute("rel")){this.topitemsindex++;this.ulindex++;var m=d[h];this.topitems[b][this.topitemsindex]=m;var n=document.getElementById(m.getAttribute("rel"));document.body.appendChild(n);n.style.zIndex=2000;n._master=b;n._pos=this.topitemsindex;this.addEvent(n,function(){ddlevelsmenu.hidemenu(this,m,e)},"click");var o=(e=="sidebar")?"rightarrowpointer":"downarrowpointer";var j=(e=="sidebar")?this.arrowpointers.rightarrow:this.arrowpointers.downarrow;if(this.arrowpointers.showarrow.toplevel){this.addpointer(m,o,j,(e=="sidebar")?"before":"after")}this.buildmenu(b,m,n,this.ulindex,true,e);n.onmouseover=function(){clearTimeout(ddlevelsmenu.hidetimers[this._master][this._pos])};this.addEvent(n,function(i){if(!ddlevelsmenu.isContained(this,i)&&!ddlevelsmenu.isContained(ddlevelsmenu.topitems[this._master][parseInt(this._pos)],i)){var c=this;if(ddlevelsmenu.enableshim){ddlevelsmenu.hideshim()}ddlevelsmenu.hidetimers[this._master][this._pos]=setTimeout(function(){ddlevelsmenu.hidemenu(c,m,e)},ddlevelsmenu.hideinterval)}},"mouseout");var g=n.getElementsByTagName("ul");for(var l=0;l<g.length;l++){this.ulindex++;var a=g[l].parentNode;if(this.arrowpointers.showarrow.sublevel){this.addpointer(a.getElementsByTagName("a")[0],"rightarrowpointer",this.arrowpointers.rightarrow,"before")}this.buildmenu(b,a,g[l],this.ulindex,false,e)}}else{d[h].onmouseover=function(){var i=this.firstChild.id;var c=i.substr(0,(i.length-6));this.firstChild.src=contextPath+"/images/"+c+"_red.gif"};d[h].onmouseout=function(){var i=this.firstChild.id;var c=i.substr(0,(i.length-6));if(this.firstChild.className=="slectedobj"){this.firstChild.src=contextPath+"/images/"+c+"_red.gif"}else{this.firstChild.src=contextPath+"/images/"+c+".gif"}}}}this.addEvent(window,function(){ddlevelsmenu.getwindowsize();ddlevelsmenu.gettopitemsdimensions()},"resize")},setup:function(b,a){this.domready(function(){ddlevelsmenu.init(b,a)})}};var contextPath="//www.huawei.com/wwwres/v1/en";