
var stepNum=0;var stepFx;var stepFxOptions={duration:900,transition:Fx.Transitions.Expo.easeInOut};var currentUID;var uidSeed=0;var slideFromDirection;var movedStep;var stepsDiv;var currentStep;var nextStep;var domain;var allowIFrameChange=false;var historyIFrame;var path;var initialUrl;var bodyLoaded=false;var internalLoad=true;var pageEnRoute=false;var allMenuItems=[];var allMenuContainers=[];var currentSelectedMenuItem;var internalDomain;var StateManager;window.addEvent("domready",function(event)
{if(window.innerHeight==null)
{window.innerHeight=document.documentElement.clientHeight;window.innerWidth=document.documentElement.clientWidth;}
var startLoad=function()
{adjustScreenRatios(true);}
startLoad.delay(1000);});function adjustScreenRatios(loadBodyWhenComplete)
{var homeHeader=$("HomeHeader");var mainDiv=$("mainDiv");if(window.innerWidth<=mainDiv.getSize().x.toInt())
{mainDiv.setStyle("width",window.innerWidth);}
changeMainDivHeight(window.innerHeight);var maxWidth=mainDiv.getSize().x.toInt();var leftColWidth=Math.round(maxWidth*0.34);var middleColWidth=Math.round(maxWidth*0.38);var rightColWidth=Math.round(maxWidth*0.24);var newPadding=(leftColWidth*0.5)-(198*0.5);var centerLabels=function()
{newPadding=(leftColWidth*0.5)-($("HomeHeader_TechTransactions").getSize().x*0.5);homeHeader.setStyle("padding-left",newPadding);}
centerLabels.delay(100)
var pad=homeHeader.getStyle("padding-left").toInt();homeHeader.setStyle("width",leftColWidth-newPadding);$("leftColumn").style.width=$("LeftFooter").style.width=leftColWidth+"px";$("middleColumn").setStyle("width",middleColWidth-3);var rightColumnGap=2;$("rightColumn").setStyle("width",rightColWidth-rightColumnGap);$("rightColumn").style.left=$("middleColumn").getStyle("width").toInt()+$("leftColumn").getStyle("width").toInt()+rightColumnGap+"px";if(window.innerHeight-628<100)
{$("LeftFooter").setStyle("height",100);}
else
{$("LeftFooter").setStyle("height",window.innerHeight-628);}
$("RightFooter").setStyle("height",$("LeftFooter").getStyle("height"));$("middleColumn").setStyle("left",leftColWidth+1);$("middleColumn").setStyle("height","100%");if(screen.availHeight<=768)
{$("middleColumn").setStyle("height",window.innerHeight);if(navigator.userAgent.toLowerCase().indexOf("msie 6")>-1)
{$("ClientLogin").setStyle("margin-right",0)}}
if(loadBodyWhenComplete!=null&&loadBodyWhenComplete)
{body_Load();}}
function changeMainDivHeight(value)
{var affectedDivs=["mainDiv","StepsDiv","leftColumn","middleColumn","rightColumn","navDiv"];for(var i=0;i<affectedDivs.length;i++)
{$(affectedDivs[i]).setStyle("height",value);}}
function loadPageViaUrl(url)
{if(url=="/index.cfm"||url=="/")
{loadHomepage();return;}
var urlSplit=url.split("/");var title=urlSplit[urlSplit.length-1].replace(/_/g," ");var mi=new MenuItem(title,url);mi.title=title;var pc=new CFAjaxPageContent();var pc_Callback=function(result)
{mi.parent={};mi.parent.leftImageSource=result[0];mi.parent.rightImageSource=result[1];var categorySelected=false;for(var i=0;i<allMenuContainers.length;i++)
{var mic=allMenuContainers[i];var newUrlCat=getLocationCategories(url)[0];if(mic.categoryUrlDisplay==newUrlCat)
{categorySelected=true;mic.selectMenuItem(mi);break;}}
if(!categorySelected)
{resetNavigation();}
loadPage(mi);};pc.setCallbackHandler(pc_Callback);pc.GetBGImagesFromUrl_remote(url);}
function loadHomepage(insertContent)
{if(!insertContent&&(path==null||path=="/"||path==""))
{return;}
var cfAjaxPC=new CFAjaxPageContent();cfAjaxPC.setAsyncMode();var cfAjax_Callback=function(result)
{resetNavigation();var hpContent;if(insertContent==null||!insertContent)
{hpContent=result.CONTENTAREA1;if(result.USECALLOUTBOX)
{hpContent+=getCalloutBoxWithContent(result.CONTENTAREA2);}
loadNewPageWithContent(hpContent,"up");}
else
{hpContent=result.CONTENTAREA1;if(result.USECALLOUTBOX)
{hpContent+=getCalloutBoxWithContent(result.CONTENTAREA2);}
currentStep.setContent(hpContent);convertInternalContent(currentStep.contentDiv);if(Browser.Engine.webkit)
{currentStep.setContent(result.CONTENTAREA1);convertInternalContent(currentStep.contentDiv);}
currentStep.setBgImages(["LeftSideBG_Home.jpg","RightSideBG_Home.jpg"]);}
document.title="GTC - GTC Law Group";}
var cfAjax_Error=function(errorCode,statusMsg)
{alert("Homepage error: "+statusMsg);}
cfAjaxPC.setCallbackHandler(cfAjax_Callback);cfAjaxPC.setErrorHandler(cfAjax_Error);cfAjaxPC.GetHomepageRemote();currentUID=-1;$("mainThrobberDiv").style.display="none";}
function getCalloutBoxWithContent(content)
{return"<div id='SideBarBox' style='margin-top: 50px;'>"+content+"</div>";}
function loadNewPageWithContent(content,direction)
{var mi=new MenuItem(location.hash.replace("#",""),"/");mi.content=content;if(direction==null)
{direction="down";}
if(direction=="up")
{currentUID=1;mi.uid=0;}
else
{currentUID=0;mi.uid=1;}
loadPage(mi);currentUID=-1;}
function loadPage(menuItem)
{if(pageEnRoute||menuItem.url==location.hash)
{return;}
pageEnRoute=true;menuItem.throbber.show();path=menuItem.url;location.hash=path;if(menuItem.title!=null&&menuItem.title!="")
{document.title="GTC - "+menuItem.title;}
else
{document.title="GTC - "+menuItem.label;}
if(!StateManager.disregardFromHistory)
{addToHistory();}
if(currentUID==null)
{currentUID=-1;}
if(currentUID>menuItem.uid)
{slideFromDirection="up";nextStep=new Step(--stepNum);stepsDiv.grab(nextStep,"top");}
else if(currentUID<menuItem.uid)
{slideFromDirection="down";nextStep=new Step(++stepNum);stepsDiv.grab(nextStep);}
else
{return;}
if(menuItem.content!=null)
{nextStep.setContent(menuItem.content);if(location.hash=="#/")
{nextStep.setBgImages(["LeftSideBG_Home.jpg","RightSideBG_Home.jpg"]);}
else
{nextStep.setDefaultBgImages();}
convertInternalContent(nextStep.contentDiv)
moveToNextStep(menuItem);}
else
{var internalURL=menuItem.url;if(internalURL.indexOf("?")>-1)
{internalURL+="&";}
else
{internalURL+="?";}
internalURL+="internal=true";var pageReq=new Request.HTML();pageReq.addEvent("complete",function()
{if(menuItem.parent!=null&&menuItem.parent.parent!=null&&menuItem.parent.parent.leftImageSource!=null)
{nextStep.setBgImages([menuItem.parent.parent.leftImageSource,menuItem.parent.parent.rightImageSource]);}
else
{if(menuItem.parent!=null&&menuItem.parent.leftImageSource!=null&&menuItem.parent.rightImageSource!=null)
{nextStep.setBgImages([menuItem.parent.leftImageSource,menuItem.parent.rightImageSource]);}
else
{nextStep.setDefaultBgImages();}}
nextStep.setContent(pageReq.response.html);if(pageReq.status!=200)
{nextStep.setContent("Error: "+pageReq.status+"<HR>"+pageReq.statusText)}
convertInternalContent(nextStep.contentDiv);menuItem.throbber.hide();StateManager.disregardFromHistory=false;moveToNextStep(menuItem);});pageReq.get(internalURL);}}
function convertInternalContent(contentContainer)
{var anchors=contentContainer.getElementsByTagName("a");for(var i=0;i<anchors.length;i++)
{var anchor=$(anchors[i]);var anchorDomainSplit=anchor.href.replace("http://","").split("/");var anchorDomain=anchorDomainSplit[0];var pathInfo=anchor.href.split(anchorDomainSplit[0])[1];anchor.pathInfo=pathInfo;if(anchorDomain==internalDomain)
{anchor.addEvent("click",function(event)
{event.stop();if(this.pathInfo.split("/")[1]=="documents")
{this.target="_blank";window.open(this.href);}
else
{loadPageViaUrl(this.pathInfo);}});}}
forms=contentContainer.getElementsByTagName("form");for(var i=0;i<forms.length;i++)
{var formItem=$(forms[i]);validateForm(formItem);}}
function toBoolean(value)
{var lvalue=value.toLowerCase();return(lvalue=="true"||lvalue==1||lvalue=="yes");}
function validateForm(formItem)
{formItem.addEvent("submit",function(event)
{event.stop();var formNeedsValidation=false;var formValidated=false;var formElementsRequiredFailed=[];var formData={};var elements=formItem.elements;for(var i=0;i<elements.length;i++)
{input=$(elements[i]);if(input.get("required")!=null&&toBoolean(input.get("required")))
{if(input.get("value")==""||input.get("value")==null)
{formNeedsValidation=true;formElementsRequiredFailed.push(input);}}
if(input.get("type")=="checkbox"&&!input.get("checked"))
{continue;}
if(input.get("type")=="radio"&&!input.get("checked"))
{continue;}
if(formData[input.get("name")]==null)
{formData[input.get("name")]=input.get("value");}
else
{formData[input.get("name")]+=","+input.get("value");}}
var submit=new Request.HTML({url:"http://"+domain+formItem.get("action")+"?internal&insert"})
if((formNeedsValidation&&formValidated)||!formNeedsValidation)
{submit.post(formData);setLoadingText("Submitting form...");}
else
{var alertMsg="";for(var i=0;i<formElementsRequiredFailed.length;i++)
{var fElem=formElementsRequiredFailed[i];if(fElem.get("message")!=""&&fElem.get("message")!=null)
{alertMsg+=fElem.get("message")+"\n";}
else
{alertMsg+="Please provide a value for "+fElem.get("name")+"\n";}}
alert(alertMsg);formElementsRequiredFailed[0].select();setLoadingText("Invalid Form Data.")
hideLoadingText(3000);}
submit.addEvent("success",function()
{loadPageViaUrl(formItem.get("action")+"?ThankYou");setLoadingText("Success.");hideLoadingText();});submit.addEvent("failure",function(event)
{alert("There was a problem submitting this form. Please try again later. ");setLoadingText("Failure.");hideLoadingText();var alertstring="";for(var prop in event)
{if(prop!="onreadystatechange"&&prop!="responseText"&&prop!="responseHTML")
{alertstring+=prop+":"+event[prop]+"\n";}}
alert("alertstring: \n\n"+alertstring);var datastring="";for(var prop in formData)
{datastring+=prop+": "+formData[prop]+"\n";}
alert("datastring:\n\n"+datastring)});});}
function moveToNextStep(menuItem)
{var top=parseInt(stepsDiv.style.top)-parseInt(stepsDiv.style.height);if(slideFromDirection=="up")
{top=parseInt(stepsDiv.style.top)+parseInt(stepsDiv.style.height);}
stepFx.start("top",top+"px");currentUID=menuItem.uid;currentStep=nextStep;menuItem.throbber.hide();}
function initializeVariables()
{currentStep=new Step(stepNum);var domainSplit=location.href.replace("http://","").split("/");domain=domainSplit[0];internalDomain=$("domainDiv").innerHTML;$("searchArrow").addEvent("click",function(event)
{event.stop();performSearch($("search").get("value"));$("search").set("value","");});$("GTCLogo").addEvent("click",function(event)
{event.stop();loadHomepage();});stepsDiv=$("StepsDiv");stepFx=new Fx.Tween(stepsDiv,stepFxOptions);stepFx.addEvent("complete",stepFx_Complete);StateManager=EXANIMO.managers.StateManager;StateManager.initialize();StateManager.history=[];StateManager.historyIndex=0;StateManager.disregardFromHistory=false;setInterval(history_Check,500);}
function history_Check()
{var locationUrl=location.hash.replace(/#/g,"");if(locationUrl=="")
{locationUrl="/";}
if(StateManager.history.length>0&&StateManager.history[StateManager.history.length-1]!=location.hash)
{StateManager.historyIndex--;StateManager.disregardFromHistory=true;loadPageViaUrl(locationUrl);StateManager.history.pop();}}
function executeAsyncFunctionality(homepageLoad)
{if(homepageLoad==null||homepageLoad)
{loadHomepage(true);}
else
{$("mainThrobberDiv").style.display="none";}
var cfAjaxDM=new CFAjaxDynamicMenu();cfAjaxDM.setAsyncMode();var cfAjaxDM_Callback=function(result)
{addNavigation(result);}
var cfAjaxDM_Error=function(errorCode,statusMsg)
{alert(statusMsg);}
cfAjaxDM.setCallbackHandler(cfAjaxDM_Callback);cfAjaxDM.setErrorHandler(cfAjaxDM_Error);cfAjaxDM.GetDynamicMenu_remote();}
function addNavigation(navData)
{setLoadingText("Building Navigation...");for(var c=0;c<navData.length;c++)
{var numChildren=0;var catObj=navData[c];var menu=new MenuItemContainer(catObj.CATEGORYID,catObj.NAME,"/index.cfm/"+catObj.URLDISPLAY);menu.leftImageSource=catObj.BGIMAGELEFT;menu.rightImageSource=catObj.BGIMAGERIGHT;menu.categoryUrlDisplay=catObj.URLDISPLAY;if(catObj.PAGES!=null)
{for(var i=0;i<catObj.PAGES.length;i++)
{var pageObj=catObj.PAGES[i];if(pageObj.PAGETYPE==2&&pageObj.CONTENTLENGTH==0)
{continue;}
var pageMI=new MenuItem(pageObj.NAME,"/index.cfm/"+catObj.URLDISPLAY);if(pageObj.PAGETYPE==4)
{pageMI.url+="/"+pageObj.URLDISPLAY;}
menu.addChild(pageMI);numChildren++;}}
if(catObj.SUBCATEGORIES!=null)
{for(var s=0;s<catObj.SUBCATEGORIES.length;s++)
{var subObj=catObj.SUBCATEGORIES[s];var subCatMI=new MenuItem(subObj.NAME,"/index.cfm/"+catObj.URLDISPLAY+"/"+subObj.URLDISPLAY);menu.addChild(subCatMI);numChildren++;for(var i=0;i<subObj.PAGES.length;i++)
{var subCatPageObj=subObj.PAGES[i];if(subCatPageObj.PAGETYPE==2&&subCatPageObj.CONTENTLENGTH==0)
{continue;}
var subCatPageMI=new MenuItem(subCatPageObj.NAME,"/index.cfm/"+catObj.URLDISPLAY+"/"+subObj.URLDISPLAY);if(subCatPageObj.PAGETYPE==4)
{subCatPageMI.url+="/"+subCatPageObj.URLDISPLAY;}
subCatMI.addChild(subCatPageMI);numChildren++;}}}
menu.numChildren=numChildren;addMenuItemCategory(menu);}
postNavigationProcessing();}
function postNavigationProcessing()
{createGradient();var pcRemote=new CFAjaxPageContent();var pcRemote_Callback=function(result)
{var myImages=new Asset.images(result,{onComplete:function()
{hideLoadingText();}});};pcRemote.setCallbackHandler(pcRemote_Callback);setLoadingText("Preloading images");pcRemote.GetImagesToPreload_remote();syncNavigationFromUrl();}
function syncNavigationFromUrl()
{for(var i=0;i<allMenuItems.length;i++)
{if(allMenuItems[i].url==location.hash.replace("#",""))
{var mItem=allMenuItems[i];if(mItem.select!=null&&mItem.numChildren==0)
{mItem.show();mItem.select();}}}}
function addMenuItemCategory(mic)
{if(mic==null)
{return;}
$("navDiv").appendChild(mic);$("navDiv").appendChild(new Spacer(5));}
function addToHistory()
{StateManager.setState(location.hash.replace(/#/g,""));StateManager.history.push(location.hash);StateManager.historyIndex++;}
function resetNavigation()
{if(currentSelectedMenuItem!=null)
{currentSelectedMenuItem.deselect();for(var i=0;i<allMenuContainers.length;i++)
{allMenuContainers[i].collapse();}}}
function setLoadingText(content)
{$("navThrobberDiv").innerHTML=content;$("navThrobberDiv").fade(1);}
function hideLoadingText(delay)
{if(delay==null)
{delay=0;}
setTimeout(function(){$("navThrobberDiv").fade(0);},delay);}
function performSearch(searchWords)
{loadPageViaUrl("/index.cfm/Information/Search?search="+escape(searchWords));}
function getLocationCategories(url)
{if(url==null)
{url=location.hash;}
return url.replace("#","").replace("/index.cfm/","").replace(/ /g,"").split("/");}
function browser_AddBookmark()
{var title=document.title;var url=location.href;if(window.sidebar!=null&&window.sidebar.addPanel!=null)
{window.sidebar.addPanel(title,url,"");}
else if(window.external!=null)
{try
{window.external.AddFavorite(url,title);}
catch(e)
{alert("Press Ctrl D to bookmark this page.");}}
else
{alert("Press Ctrl D to bookmark this page.");}}
function browser_MailTo()
{var to="";var subject=document.title.replace(/&/g,"and");var body="I would like you to visit this page at the GTC Law Group website: "+location.href.replace(/&/g,"%26");var mailLink="mailto:"+to+"?subject="+subject+"&body="+body.replace("/#","");location.href=mailLink}
function stepFx_Complete()
{var children=stepsDiv.getChildren();for(var i=0;i<children.length;i++)
{if(children[i]!=currentStep)
{stepsDiv.removeChild(children[i]);}}
pageEnRoute=false;}
function page_Print()
{var content=currentStep.getChildAt(1).innerHTML;var newwin=window.open('','printwin','left=0,top=0,width=740,height='+screen.availHeight);newwin.document.write('<HTML>\n<HEAD>\n');newwin.document.write('<script>\n');newwin.document.write('function chkstate(){\n');newwin.document.write('if(document.readyState=="complete"){\n');newwin.document.write('window.close()\n');newwin.document.write('}\n');newwin.document.write('else{\n');newwin.document.write('setTimeout("chkstate()",2000)\n');newwin.document.write('}\n');newwin.document.write('}\n');newwin.document.write('function print_win(){\n');newwin.document.write('window.print();\n');newwin.document.write('chkstate();\n');newwin.document.write('}\n');newwin.document.write('<\/script>\n');newwin.document.write('</HEAD>\n');newwin.document.write('<BODY onload="print_win()">\n');newwin.document.write('<img src="/graphics/page_printing/header.jpg" /><BR /><BR />\n\n');newwin.document.write(content);newwin.document.write('\n\n<BR /><img src="/graphics/page_printing/footer.jpg" /><BR /><BR />\n\n');newwin.document.write('</BODY>\n');newwin.document.write('</HTML>\n');newwin.document.close();}
function body_Load()
{initializeVariables();if($("locationDiv").innerHTML!="/index.cfm/index.cfm"&&$("locationDiv").innerHTML!="/index.cfm")
{location.href=location.href.replace("/index.cfm","#/index.cfm");}
else
{var strippedCurrentLocation=location.href.replace("http://","").replace("/","").replace("#","");if(strippedCurrentLocation==domain||strippedCurrentLocation==domain+"/"||strippedCurrentLocation==domain+"/index.cfm"||(location.href=="http://"+domain+"/index.cfm")||(location.href=="http://"+domain+"/index.cfm#"))
{loadHomepage(true);}
else
{loadPageViaUrl(location.href.split("#")[1]);}
stepsDiv.appendChild(currentStep);executeAsyncFunctionality(false);}}
function Throbber()
{var throbber=document.createElement("OBJECT");throbber.show=function()
{setLoadingText("Loading...");}
throbber.hide=function()
{hideLoadingText();}
throbber.hide();return throbber;}
function Spacer(size,direction)
{if(direction==null)
{direction="vertical";}
var spacer=document.createElement("DIV");if(direction=="vertical")
{spacer.style.width="0px";spacer.style.height=size+"px";}
else
{spacer.style.height="0px";spacer.style.width=size+"px";}
return spacer;}
function MenuItemContainer(id,label,url)
{var mic=$(document.createElement("DIV"));mic.categoryID=id;mic.categoryUrlDisplay;mic.leftImageSource;mic.rightImageSource;mic.label=label;mic.url=url;mic.expanded=false;mic.heightCollapsed="20px";mic.heightExpanded=mic.heightCollapsed;mic.fx=new Fx.Tween($(mic),{duration:500,transition:Fx.Transitions.Expo.easeInOut});mic.numChildren=0;allMenuContainers.push(mic);mic.addChild=function(mItemChild)
{mItemChild.parent=mic;mainBody.appendChild(mItemChild);}
mic.deselectAllChildren=function(uid)
{for(var i=0;i<mic.numChildren;i++)
{var childItem=mic.getChildAt(i);if(childItem!=null&&childItem.uid!=null&&childItem.uid!=uid)
{childItem.deselect();}}}
mic.selectMenuItem=function(item)
{mic.expand.delay(1000);for(var i=0;i<allMenuItems.length;i++)
{var childItem=allMenuItems[i]
if(childItem.url!=null&&item.url==childItem.url)
{childItem.select();break;}}}
mic.getChildAt=function(index)
{return mainBody.getChildren()[index];}
mic.toggle=function()
{if(mic.expanded)
{mic.collapse();}
else
{mic.expand();}}
mic.expand=function()
{if(mic.expanded)
{return;}
mic.style.height="auto";mic.heightExpanded=(parseInt(mic.getCoordinates().height)-2)+"px";mic.style.height=mic.heightCollapsed;if(mic.numChildren>0)
{var kids=allMenuContainers;for(var i=0;i<kids.length;i++)
{if(kids[i].collapse&&kids[i].categoryID!=mic.categoryID)
{kids[i].collapse();}}
mic.expanded=true;mic.fx.start("height",mic.heightExpanded);}}
mic.collapse=function()
{if(mic.numChildren>0)
{mic.expanded=false;mic.fx.start("height",mic.heightCollapsed);}}
mic.collapseAll=function()
{var kids=$("navDiv").getChildren();for(var i=0;i<kids.length;i++)
{kids[i].collapse();}}
mic.shut=function()
{mic.expanded=false;mic.style.height=mic.heightCollapsed;}
with(mic.style)
{cursor="pointer";border="1px outset #8599a4";background="url('/graphics/NavGradient.gif') repeat-y top right #FFFFFF";textAlign="left";padding="2px";paddingBottom="0px";width="180px";overflow="hidden";position="relative";}
var header=$(document.createElement("DIV"));with(header.style)
{fontSize="11px";color="#525c5e";fontWeight="bold";paddingLeft="7px";textTransform="uppercase";}
header.innerHTML=mic.label;mic.appendChild(header);header.addEvent("click",function(event)
{mic.toggle();});mic.appendChild(new Spacer(2));var mainBody=$(document.createElement("DIV"));with(mainBody.style)
{width="100%";}
mic.appendChild(mainBody);mic.shut();return mic;}
function MenuItem(label,url)
{var mItem=$(document.createElement("DIV"));mItem.parent;mItem.label=label;mItem.url=url;mItem.throbber=new Throbber();mItem.uid=uidSeed++;mItem.urlPath;mItem.content;mItem.numChildren=0;mItem.selected=false;allMenuItems.push(mItem);mItem.addChild=function(child)
{child=$(child);child.parent=mItem;child.parent.numChildren++;child.addEvent("click",function(event)
{event.stop();});child.parent.removeEvents("mouseover");child.parent.removeEvents("mouseout");child.parent.removeEvents("click");child.parent.addEvent("click",function(event)
{var childMenuItem=child.parent.getChildAt(1).getChildren()[0];if(childMenuItem!=null&&childMenuItem.label!=null)
{loadPage(childMenuItem);}});child.parent.appendChild(child);var parentLabelContainer=$(document.createElement("DIV"));with(child.parent.style)
{fontWeight="bold";padding="7px 0px 0px 0px";}
with(child.style)
{fontWeight="normal";paddingLeft="10px";}}
mItem.appendLabel=function(text)
{mItemText.innerHTML+=text;}
mItem.getChildAt=function(index)
{return $(mItem.getChildren()[index]);}
mItem.show=function()
{if(mItem.parent!=null&&mItem.parent.expand!=null)
{mItem.parent.expand();}
else if(mItem.parent!=null&&mItem.parent.parent!=null&&mItem.parent.parent.expand!=null)
{mItem.parent.parent.expand();}}
mItem.select=function()
{if(currentSelectedMenuItem!=null)
{currentSelectedMenuItem.deselect();}
currentSelectedMenuItem=mItem;this.selected=true;this.style.backgroundColor="#22404a";}
mItem.deselect=function()
{mItem.style.backgroundColor="#59889A";mItem.selected=false;}
with(mItem.style)
{cursor="pointer";backgroundColor="#59889A";overflow="hidden";padding="0px 0px 0px 0px";}
var mItemBody=$(document.createElement("DIV"));mItemBody.style.paddingLeft="10px";var mItemText=$(document.createElement("A"));mItemText.innerHTML=mItemText.title=mItem.label;with(mItemText.style)
{color="#FFFFFF";overflowX="hidden";fontSize="11px";margin="0px";lineHeight="14px";}
mItemBody.appendChild(mItemText);mItem.appendChild(mItemBody);mItem.addEvent("click",function(event)
{if(mItem.selected||pageEnRoute)
{return;}
mItem.select();internalLoad=false;loadPage(mItem);});mItem.addEvent("mouseover",function(event)
{if(mItem.selected)
{return;}
mItem.style.backgroundColor="#22404a";});mItem.addEvent("mouseout",function(event)
{if(mItem.selected)
{return;}
mItem.style.backgroundColor="#59889A";});return mItem;}
function Step(num)
{var iDiv=document.createElement("DIV");iDiv.number=num;iDiv.contentDiv;iDiv.leftDiv;iDiv.rightDiv;iDiv.getChildAt=function(index)
{return iDiv.childNodes[index];}
iDiv.setContent=function(content)
{if(content==null)
{content="";}
mDivContent.innerHTML=content;}
iDiv.setBgImages=function(images)
{lDiv.style.background="url('/graphics/CategoryImages/"+images[0]+"') repeat-y";rDiv.style.background="url('/graphics/CategoryImages/"+images[1]+"') repeat-y";}
iDiv.setDefaultBgImages=function()
{iDiv.setBgImages(["LeftSideBG_Default.jpg","RightSideBG_Default.jpg"]);}
with(iDiv.style)
{position="absolute";top=num*parseInt($("mainDiv").style.height)+"px";height=$("mainDiv").style.height;}
var lCol=$("leftColumn");var lDiv=document.createElement("DIV");iDiv.leftDiv=lDiv;with(lDiv.style)
{position='absolute';top=lCol.style.top;left=lCol.style.left;width=lCol.style.width;height=lCol.style.height;backgroundImage="url('/graphics/CategoryImages/LeftImage_1.jpg')";}
iDiv.appendChild(lDiv);var mCol=$("middleColumn");var mDiv=document.createElement("DIV");iDiv.middleDiv=mDiv;mDiv.className="ContentContainer";with(mDiv.style)
{top=mCol.style.top;left=mCol.style.left;width=mCol.style.width;height=mCol.style.height;backgroundColor="#FFFFFF";overflowX="hidden";}
var mDivContent=document.createElement("DIV");iDiv.contentDiv=mDivContent;mDivContent.className="ContentArea";with(mDivContent.style)
{top=mDiv.style.top;left=mDiv.style.left;}
mDiv.appendChild(mDivContent);iDiv.appendChild(mDiv);var rCol=$("rightColumn");var rDiv=document.createElement("DIV");iDiv.rightDiv=rDiv;with(rDiv.style)
{position="absolute";top=rCol.style.top;left=rCol.style.left;width=rCol.style.width;height=rCol.style.height;}
iDiv.appendChild(rDiv);return iDiv;}
