
var gsubNavId='',gsubNavHeaderId='',gsubNavBodyLeft='',gsubNavBodyRight='',gsubNavBodyBottom='';var divSubNavigation=null,divSubNavigationHeader=null,divSubNavigationBodyLeft=null,divSubNavigationBodyRight=null,divSubNavigationBottom=null,divSubNavTitle=null;var gLoadedSuccessfully=false;var isThreadsInProcess=false,isAnimationCompleted=false,isDataLoadedForRight=false,isDataLoadedForLeft=false;var gSelectedSubNavLeftMenuId="temp_";var gPrevMainNavId="";var gblnFromMainNav=true,threadWatchTimeoutCounter=0,threadWatchTimeoutLimit=10000;var gblnIFrameAdded=false;var gCurrentIFrameName="newmainiframe";var gRightContentId="";var gSubNavRightPageName="";var gSubNavRightPageId="";var timeOutForViewType="";var callFrom="";var gblnScroll=false;var inactiveScroll="";var initialSubNavHt='',initialSubNavWt='',maxh='',maxw='',initialSubNavMiddleHt='',gDirection='';var middleTable;var middleTD;var widthPixelPerIteration=150;var heightPixelPerIteration=250;var heightPixelPerIteration;var countIteration=1;var totalIteration;var lastStep;var lastHtDiff=11;var transEffect=5;var loopCnt=100;function openSubNav(leftContentId,rightContentId,selectedMenuId,subNavTitle,mainNavId){attachClass("subnavbgtbl1","hide");if(isThreadsInProcess)return;if(!getElements())return;var subNavRightPart=document.getElementById('mscomsubnavright');if(gblnIFrameAdded&&subNavRightPart!=null)
{var iFrameSubNavCurrent=subNavRightPart.removeChild(document.getElementById(gCurrentIFrameName));}
if(subNavRightPart!=null)
{subNavRightPart.innerHTML="<iframe style='display:none' frameborder='0' id='newmainiframe' name='newmainiframe' title='newmainiframe' src='' width=100% height=100% marginheight='0' marginwidth='0' scrolling='auto' />";gblnIFrameAdded=true;}
var divTable=document.getElementById(gPrevMainNavId).parentElement;detachClass(gPrevMainNavId,"");attachClass(mainNavId,"mainmenuselected");attachStyle(divTable,'height','110px');gPrevMainNavId=mainNavId;isThreadsInProcess=true;isAnimationCompleted=false;isDataLoadedForRight=false;isDataLoadedForLeft=false;mscomAjax.getData(previewMode=="true"?pageIdSubNavLeft+"||cp-documentid="+leftContentId:"/"+pageNameSubNavLeft+"?cp-documentid="+leftContentId,callBackSubNavigationLeft);gblnFromMainNav=true;callFrom="";getSubNavRightPageName();gRightContentId=rightContentId;mscomAjax.getDataViaIFrame(previewMode=="true"?gSubNavRightPageId+"||cp-documentid="+rightContentId:"/"+gSubNavRightPageName+"?cp-documentid="+rightContentId,gCurrentIFrameName);divSubNavTitle=document.getElementById('SubNavTitle');if(divSubNavTitle!=null){divSubNavTitle.tempInnerHTML=subNavTitle;}
if(divSubNavigation.style.display=="block"){gDirection=false;showSubNavagation();}
else{if(divSubNavTitle!=null){divSubNavTitle.innerHTML=subNavTitle;}
gDirection=true;showSubNavagation();}
gSelectedSubNavLeftMenuId="subnavleftlink"+selectedMenuId;threadWatchTimeoutCounter=0;trackFirstOpeningSecondryNav();}
function getSubNavRightPageName(){var dropoptionslistObject=null;dropoptionslistObject=document.getElementById('dropoptionslist');if(mainNavigationflag==0){gSubNavRightPageName=pageNameSubNavRightThumbnail;if(previewMode=="true")gSubNavRightPageId=pageIdSubNavRightThumbnail;}
else if(dropoptionslistObject!=null)
{var viewOptions=dropoptionslistObject.getElementsByTagName('LI');for(var g=0;g<viewOptions.length;g++)
{var optionObject=viewOptions[g];if(optionObject.className!=""&&optionObject.className=="drpoptselect")
{switch(optionObject.id)
{case"list":gSubNavRightPageName=pageNameSubNavRightList;if(previewMode=="true")
{gSubNavRightPageId=pageIdSubNavRightList;}
break;case"thumbnail":gSubNavRightPageName=pageNameSubNavRightThumbnail;if(previewMode=="true")
{gSubNavRightPageId=pageIdSubNavRightThumbnail;}
break;case"details":gSubNavRightPageName=pageNameSubNavRightDetails;if(previewMode=="true")
{gSubNavRightPageId=pageIdSubNavRightDetails;}
break;default:gSubNavRightPageName=pageNameSubNavRightThumbnail;if(previewMode=="true")
{gSubNavRightPageId=pageIdSubNavRightThumbnail;}}
break;}}}}
function ShowSubNavRightContent(rightContentId,selectedMenuId){if(isThreadsInProcess)return;gblnFromMainNav=false;callFrom="Left";getSubNavRightPageName();gRightContentId=rightContentId;mscomAjax.getDataViaIFrame(previewMode=="true"?gSubNavRightPageId+"||cp-documentid="+rightContentId:"/"+gSubNavRightPageName+"?cp-documentid="+rightContentId,gCurrentIFrameName);var gSelectedSubNavLeftMenuIdDiv=document.getElementById(gSelectedSubNavLeftMenuId);attachClass(gSelectedSubNavLeftMenuIdDiv,"");var selectedMenuIdDiv=document.getElementById(selectedMenuId);attachClass(selectedMenuIdDiv,"selectedsubnav");gSelectedSubNavLeftMenuId=selectedMenuId;}
function chnageIFrameStyle(id,style){var iFrameSubNav=document.getElementById(id);if(iFrameSubNav){iFrameSubNav.style.display=style;}}
function checkSubNavagationThread(){if((isAnimationCompleted&&(isDataLoadedForRight||threadWatchTimeoutCounter>threadWatchTimeoutLimit)&&isDataLoadedForLeft)){showMscomsubnavigation();chnageIFrameStyle(gCurrentIFrameName,'inline');var subNavLeftPart=document.getElementById('subNavLeftScrollLinks');if(subNavLeftPart!=null&&subNavLeftPart.tempInnerHTML!=null){subNavLeftPart.innerHTML=subNavLeftPart.tempInnerHTML;subNavLeftPart.tempInnerHTML="";}
attachClass(gSelectedSubNavLeftMenuId,"selectedsubnav");toggleLeftScroll();}
else
{threadWatchTimeoutCounter=threadWatchTimeoutLimit+1;window.setTimeout("checkSubNavagationThread()",100);}}
function showSubNavagation(){attachStyle(divSubNavigation,'display','block');var mscomsubnavigationDIV=document.getElementById('mscomsubnavigation');maxh=mscomsubnavigationDIV.offsetHeight-lastHtDiff;maxw=mscomsubnavigationDIV.offsetWidth;initialSubNavWt=0;totalIteration=Math.floor(maxh/heightPixelPerIteration);lastStep=(maxh-30)%heightPixelPerIteration;heightPixelPerIteration+=lastStep/totalIteration;attachStyle('mscomsubnavleft','display','none');attachStyle('subnavrightouter','display','none');attachStyle('subnavfooterdiv','display','none');if(gDirection){initialSubNavHt=30;attachStyle('mscomsubnavtop','display','none');middleTable=document.getElementById('subnavbgtbl');attachStyle(middleTable,'height',initialSubNavHt+"px");attachStyle(middleTable,'width',initialSubNavWt+"px");attachStyle(middleTable,'display','block');ExpandHorizontal();}
else
{middleTable=document.getElementById('subnavbgtbl');initialSubNavHt=maxh;attachStyle(middleTable,'display','block');collapsDivEffect();}}
function ExpandHorizontal()
{if(initialSubNavWt<=maxw)
{initialSubNavWt+=widthPixelPerIteration;attachStyle(middleTable,'width',initialSubNavWt);window.setTimeout("ExpandHorizontal()",loopCnt);}
else
{ExpandVerticle();}}
function ExpandVerticle()
{if(countIteration<=totalIteration)
{initialSubNavHt+=heightPixelPerIteration;countIteration+=1;attachStyle(middleTable,'height',initialSubNavHt);window.setTimeout("ExpandVerticle()",loopCnt);}
else
{initialSubNavWt=0;initialSubNavHt=0;countIteration=0;toggleLeftScroll();attachClass('pagewidth1002','pageblur');attachClass("subnavbgtbl1","hide");isThreadsInProcess=false;isAnimationCompleted=true;checkSubNavagationThread();}}
function showMscomsubnavigation(){attachStyle('mscomsubnavigation','display','block');attachStyle('mscomsubnavtop','display','block');attachStyle(divSubNavigationBodyLeft,'display','block');attachStyle(divSubNavigationBodyRight,'display','block');var subnavbgtable=document.getElementById('subnavbgtbl');attachStyle(subnavbgtable,'display','none');var footerDiv=document.getElementById('subnavfooterdiv');attachStyle(footerDiv,'display','block');}
function collapsDivEffect()
{if(initialSubNavHt>=30)
{attachStyle(middleTable,'height',initialSubNavHt);initialSubNavHt-=heightPixelPerIteration;window.setTimeout("collapsDivEffect()",loopCnt);isThreadsInProcess=true;}
else
{if(divSubNavTitle!=null)
divSubNavTitle.innerHTML=divSubNavTitle.tempInnerHTML;attachStyle('mscomsubnavtop','display','block');expandSubSequentDivEffect();attachClass("subnavbgtbl","hide");}}
function expandSubSequentDivEffect(){var subnavbgtable=document.getElementById('subnavbgtbl');attachStyle(subnavbgtable,'display','block');var objmscomsubnavigation=document.getElementById('mscomsubnavigation');if(initialSubNavHt<=maxh)
{initialSubNavHt+=heightPixelPerIteration;if(initialSubNavHt>objmscomsubnavigation.offsetHeight-lastHtDiff)
{subnavbgtable.style.height=objmscomsubnavigation.offsetHeight-lastHtDiff;}
else
{attachStyle(subnavbgtable,'height',initialSubNavHt+"px");}
window.setTimeout("expandSubSequentDivEffect()",loopCnt);isThreadsInProcess=true;}
else
{isThreadsInProcess=false;isAnimationCompleted=true;checkSubNavagationThread();toggleLeftScroll();}}
function callBackSubNavigationLeft(response){if(response.status==200){var divSubNavScrollLink=document.getElementById('subNavLeftScrollLinks');if(divSubNavScrollLink!=null)
divSubNavScrollLink.tempInnerHTML=response.responseText;}
isDataLoadedForLeft=true;}
function callBackSubNavigationRightIFRame(innerHTML){isDataLoadedForRight=true;}
function initSubNav(subNavId,subNavHeaderId,subNavBodyLeft,subNavBodyRight,subNavBodyBottom){gsubNavId=subNavId;gsubNavHeaderId=subNavHeaderId;gsubNavBodyLeft=subNavBodyLeft;gsubNavBodyRight=subNavBodyRight;gsubNavBodyBottom=subNavBodyBottom;}
initSubNav('subnavouter','mscomsubnavtop','mscomsubnavleft','subnavrightouter','subnavbottominner');function closeSubNav(){divSubNavigation=document.getElementById(gsubNavId);attachStyle(divSubNavigation,'display','none');detachClass(gPrevMainNavId);if(typeof(container_mainnav_activelink)!="undefined"){gPrevMainNavId=container_mainnav_activelink;attachClass(container_mainnav_activelink,"mainmenuselected");}
detachClass("pagewidth1002")
var mscomsubnavigationID=document.getElementById('mscomsubnavigation');attachStyle(mscomsubnavigationID,'top',0+"px");attachStyle(mscomsubnavigationID,'left',0+"px");var tempsubnavbgtable=document.getElementById('subnavbgtbl');attachStyle(tempsubnavbgtable,'height',0+"px");attachStyle(tempsubnavbgtable,'width',0+"px");countIteration=1;}
function toggleLeftScroll(){var divSubNavigationScroll=document.getElementById('subNavLeftScrollLinks');if(divSubNavigationScroll!=null){var needScroll=(divSubNavigationScroll.offsetHeight>divSubNavigationScroll.parentElement.offsetHeight);attachStyle(divSubNavigationScroll,'marginTop','0px');divSubNavigationScroll=document.getElementById('scrollUpParent');if(divSubNavigationScroll!=null){divSubNavigationScroll.style.display=needScroll?"block":"none";}
divSubNavigationScroll=document.getElementById('scrollDownParent');if(divSubNavigationScroll!=null){divSubNavigationScroll.style.display=needScroll?"block":"none";}
if(needScroll){attachClass('scrollUpParentDiv','scrollinact');attachClass('scrollUpDownDiv','scrolldown');}}}
function getElements(){gLoadedSuccessfully=false;divSubNavigation=document.getElementById(gsubNavId);if(divSubNavigation==null)
return false;divSubNavigationHeader=document.getElementById(gsubNavHeaderId);if(divSubNavigationHeader==null)
return false;divSubNavigationBodyLeft=document.getElementById(gsubNavBodyLeft);if(divSubNavigationBodyLeft==null)
return false;divSubNavigationBodyRight=document.getElementById(gsubNavBodyRight);if(divSubNavigationBodyRight==null)
return false;divSubNavigationBottom=document.getElementById(gsubNavBodyBottom);if(divSubNavigationBottom==null)
return false;gLoadedSuccessfully=true;return true;}
function scroll(subNavLinkId,direction){gblnScroll=true;keepScrolling(subNavLinkId,direction)}
function keepScrolling(subNavLinkId,direction){if(!gblnScroll){return;}
var divSubNavLeftScrollLink=document.getElementById(subNavLinkId);if(divSubNavLeftScrollLink==null){return;}
if(divSubNavLeftScrollLink.offsetHeight<divSubNavLeftScrollLink.parentElement.offsetHeight){return;}
attachClass('scrollUpParentDiv','scrollup');attachClass('scrollDownParentDiv','scrolldown');var currentMTop=divSubNavLeftScrollLink.style.marginTop;if(currentMTop=="")
currentMTop=0;var newTop=parseInt(currentMTop)+(direction?5:-5);if(direction&&newTop>0){attachClass('scrollUpParentDiv','scrollinact');inactiveScroll="up";scrollOut('scrollUpParent','up');newTop=0;}
else if(!direction&&(newTop+divSubNavLeftScrollLink.offsetHeight)<divSubNavLeftScrollLink.parentElement.offsetHeight){attachClass('scrollDownParentDiv','scrollinact');inactiveScroll="down";scrollOut('scrollDownParent','down');newTop=divSubNavLeftScrollLink.parentElement.offsetHeight-divSubNavLeftScrollLink.offsetHeight;}
else{inactiveScroll="none";}
attachStyle(divSubNavLeftScrollLink,'marginTop',newTop+"px");window.setTimeout("keepScrolling('"+subNavLinkId+"',"+direction+")",10);}
function stopScrolling(){gblnScroll=false;}
function scrollHover(imgId,dirn){var scrollImgurl=document.getElementById(imgId).src.split('gbl');if(dirn=='down'){if(inactiveScroll=="down")
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_down_list_rest.gif";else
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_down_list_hover.gif";}
else if(dirn=='up')
{if(inactiveScroll=="up")
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_up_list_rest.gif";else
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_up_list_hover.gif";}}
function scrollOut(imgId,dirn){var scrollImgurl=document.getElementById(imgId).src.split('gbl');if(dirn=='down'){document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_down_list_rest.gif";}
else
{document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_up_list_rest.gif";}}
function scrollDown(imgId,dirn){var scrollImgurl=document.getElementById(imgId).src.split('gbl');if(dirn=='down'){if(inactiveScroll=="down")
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_down_list_rest.gif";else
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_down_list_pressed.gif";}
else
{if(inactiveScroll=="up")
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_up_list_rest.gif";else
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_up_list_pressed.gif";}}
function scrollUp(imgId,dirn){var scrollImgurl=document.getElementById(imgId).src.split('gbl');if(dirn=='down'){if(inactiveScroll=="down")
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_down_list_rest.gif";else
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_down_list_hover.gif";}
else
{if(inactiveScroll=="up")
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_up_list_rest.gif";else
document.getElementById(imgId).src=scrollImgurl[0]+"gbl/i/1/scroll_up_list_hover.gif";}}
function fnHoverEffect(eachchild){eachchild.className='eachchild rowhover cf';}
function fnOutEffect(eachchild){eachchild.className='eachchild cf';}
function showViewType(){attachClass('dropoptionslist','showviewtype');timeOutForViewType=setTimeout("attachClass('dropoptionslist','hideviewtype')",3000);}
function clearTimeForViewType(){clearTimeout(timeOutForViewType);}
function hideViewType(){timeOutForViewType=setTimeout("attachClass('dropoptionslist','hideviewtype')",1000);}
function showThumbnail(){mscomAjax.getDataViaIFrame(previewMode=="true"?pageIdSubNavRightThumbnail+"||cp-documentid="+gRightContentId:"/"+pageNameSubNavRightThumbnail+"?cp-documentid="+gRightContentId,gCurrentIFrameName);attachClass('dropoptionslist','hideviewtype');if(document.getElementById('dropoptions')!=null){var thumbnail=document.getElementById('dropoptions').src.split('gbl');document.getElementById('dropoptions').src=thumbnail[0]+"gbl/i/1/dropoptionthumbnails.gif";}
attachClass('thumbnail','drpoptselect');detachClass('list');detachClass('details');}
function showList(){attachClass('dropoptionslist','hideviewtype');mscomAjax.getDataViaIFrame(previewMode=="true"?pageIdSubNavRightList+"||cp-documentid="+gRightContentId:"/"+pageNameSubNavRightList+"?cp-documentid="+gRightContentId,gCurrentIFrameName);if(document.getElementById('dropoptions')!=null){var thumbnail=document.getElementById('dropoptions').src.split('gbl');document.getElementById('dropoptions').src=thumbnail[0]+"gbl/i/1/dropoptionlist.gif";}
detachClass('thumbnail');attachClass('list','drpoptselect');detachClass('details');}
function showDetails(){mscomAjax.getDataViaIFrame(previewMode=="true"?pageIdSubNavRightDetails+"||cp-documentid="+gRightContentId:"/"+pageNameSubNavRightDetails+"?cp-documentid="+gRightContentId,gCurrentIFrameName);attachClass('dropoptionslist','hideviewtype');if(document.getElementById('dropoptions')!=null){var thumbnail=document.getElementById('dropoptions').src.split('gbl');document.getElementById('dropoptions').src=thumbnail[0]+"gbl/i/1/dropoptiondetails.gif";}
detachClass('thumbnail');detachClass('list');attachClass('details','drpoptselect');}
function trackLinkActivity(url,goUrl)
{try{if(document.getElementById("reportingimage")!=null){document.getElementById("reportingimage").src=goUrl;}
window.top.location=url;}
catch(e){window.top.location=url;}}
