
﻿ var Project=Class.create();Project.prototype={initialize:function(data1,data2,data3,data4,data5,data6,data7,data8,oSummary,oImageType,oLeed,oArchitectCredit,image1Path,image2Path,image3Path,image4Path,image5Path){this.id=data1.strip();this.practiceAreaId=data2.strip();this.areaId=data3.strip();this.subAreaId=data4.strip();this.itemId=data5.strip();this.name=data6.strip();this.location=data7.strip();this.description=data8;this.summary=oSummary;this.leed=oLeed;this.architectCredit=oArchitectCredit;this.path=image1Path;this.images=[];var i=0;if(image1Path!=null){this.images[i]=image1Path;i++;}
if(image2Path!=null){this.images[i]=image2Path;i++;}
if(image3Path!=null){this.images[i]=image3Path;i++;}
if(image4Path!=null){this.images[i]=image4Path;i++;}
if(image5Path!=null){this.images[i]=image5Path;i++;}
this.imageType=oImageType;},mainPageThumbnail:function(){var mpt=(this.path!=null)?this.path.gsub('.jpg','____.jpg'):'';return mpt;},mainPageDetailImage:function(){var mpt=(this.path!=null)?this.path.gsub('.jpg','___.jpg'):'';return mpt;},projectPageThumbnail:function(imageNumber){var mpt=(this.images[imageNumber]!=null)?this.images[imageNumber].gsub('.jpg','__.jpg'):'';return mpt;},projectPageDetailImage:function(imageNumber){var mpt=(this.images[imageNumber]!=null)?this.images[imageNumber].gsub('.jpg','_.jpg'):'';return mpt;}}
var LocationItem=Class.create();LocationItem.prototype={initialize:function(data1,data2,data3,data4,data5,oAddress,oPhoneNumbers,oImagePath,oLeftPosition,oTopPosition,lng,lat,cName,cTitle,cEmail,cImage,oTitle,oAirport){this.name=data1;this.type=data2;this.id=data3;this.country=data4;this.province=data5;this.address=oAddress;this.phoneNumbers=oPhoneNumbers;this.officeImage=oImagePath;this.officeLeft=oLeftPosition;this.officeTop=oTopPosition;this.latitude=parseFloat(lat);this.longitude=parseFloat(lng);this.contactName=cName;this.contactTitle=cTitle;this.contactEmail=cEmail;this.officeTitle=oTitle;this.contactImage=cImage;this.airport=oAirport;}}
var NewsReleaseItem=Class.create();NewsReleaseItem.prototype={initialize:function(oId,oTitle,oDate,oDescription,oArchived,oImagePath,oLeftValue,oItemNumber){this.id=oId;this.title=oTitle;this.description=oDescription;this.date=oDate;this.archived=oArchived;this.imagePath=oImagePath;this.leftValue=oLeftValue;this.itemNumber=oItemNumber;}}
var AnnouncementItem=Class.create();AnnouncementItem.prototype={initialize:function(oId,oTitle,oDate,oDescription,oArchived,oImagePath){this.id=oId;this.title=oTitle;this.description=oDescription;this.date=oDate;this.archived=oArchived;this.imagePath=oImagePath;}}
var ContentItem=Class.create();ContentItem.prototype={initialize:function(oId,oTitle,oSubTitle,oText1){this.id=oId;this.title=oTitle;this.description=oText1;this.subtitle=oSubTitle;}}
var IRContentItem=Class.create();IRContentItem.prototype={initialize:function(oId,oTitle,oText1,oText2,oText3,oIsHTML){this.id=oId;this.title=oTitle;this.text1=oText1;this.text2=oText2;this.text3=oText3;this.isHTML=oIsHTML;}}
var IRLocationItem=Class.create();IRLocationItem.prototype={initialize:function(oId,oLeftPosition){this.id=oId;this.leftPosition=oLeftPosition;}}
var ContentLinkItem=Class.create();ContentLinkItem.prototype={initialize:function(oId,oLeftPosition){this.id=oId;this.leftPosition=oLeftPosition;}}
var TestimonialItem=Class.create();TestimonialItem.prototype={initialize:function(oId,oName,oTitle,oAnswer1,oAnswer2,oAnswer3,oAnswer4,oAnswer5,oAnswer6,oAnswer7,oAnswer8,oAnswer9,oLargeImage,thumbnailImage){this.id=oId;this.name=oName;this.title=oTitle;this.answer1=oAnswer1;this.answer2=oAnswer2;this.answer3=oAnswer3;this.answer4=oAnswer4;this.answer5=oAnswer5;this.answer6=oAnswer6;this.answer7=oAnswer7;this.answer8=oAnswer8;this.answer9=oAnswer9;this.thumbnail=thumbnailImage;this.largeImage=oLargeImage;}}
var SectorItem=Class.create();SectorItem.prototype={initialize:function(oId,oName){this.id=oId;this.name=oName;}}
var ServiceItem=Class.create();ServiceItem.prototype={initialize:function(oId,oName){this.id=oId;this.name=oName;}}
var PageContent=Class.create();PageContent.prototype={initialize:function(data1,data2,data3,data4,data5,data6,data7){this.id=data1.strip();this.practiceAreaId=data2.strip();this.areaId=data3.strip();this.subAreaId=data4.strip();this.itemId=data5.strip();this.title=data6.strip();this.description=data7.strip();}}
var AboutContent=Class.create();AboutContent.prototype={initialize:function(oId,oTitle,oDescription,ofilePath,ofilePath2,ofilePath3){this.id=oId;this.title=oTitle;this.description=oDescription;this.imagePath=ofilePath;this.imagePath2=ofilePath2;this.imagePath3=ofilePath3;}}
var AwardLinkItem=Class.create();AwardLinkItem.prototype={initialize:function(oYear,oLeft){this.left=oLeft;this.year=oYear;}}
var AwardContentItem=Class.create();AwardContentItem.prototype={initialize:function(oId,oProjectName,oYear,oPlace,oAwardSubmission,oAwardName,oSponsoringOrg,oAssociateArchitect){this.id=oId;this.projectname=oProjectName;this.year=oYear;this.place=oPlace;this.awardsubmission=oAwardSubmission;this.awardname=oAwardName;this.sponsoringorg=oSponsoringOrg;this.associatearchitect=oAssociateArchitect;}}
var ECContentItem=Class.create();ECContentItem.prototype={initialize:function(oName,oDate,oType,oList){this.name=oName;this.date=oDate;this.type=oType;this.list=oList;}}
var FRDocumentItem=Class.create();FRDocumentItem.prototype={initialize:function(oTitle,oFile,oYear,oIndent){this.title=oTitle;this.filepath=oFile;this.year=oYear;this.indent=oIndent;}}
var FAQItem=Class.create();FAQItem.prototype={initialize:function(oQuestion,oAnswer){this.question=oQuestion;this.answer=oAnswer;}}
var DocumentItem=Class.create();DocumentItem.prototype={initialize:function(oTitle,oFile){this.title=oTitle;this.filepath=oFile;}}
var YearItem=Class.create();YearItem.prototype={initialize:function(oId,oName){this.id=oId;this.name=oName;}}
var ImageItem=Class.create();ImageItem.prototype={initialize:function(oId,oTitle,oThumbnail,oLargeImage){this.id=oId;this.title=oTitle;this.thumbnail=oThumbnail;this.largeImage=oLargeImage;}}
var AcquisitionItem=Class.create();AcquisitionItem.prototype={initialize:function(oName,oLocation,oDate,oSegments){this.name=oName;this.location=oLocation;this.date=oDate;this.segments=oSegments;}}
var ApplicationTipItem=Class.create();ApplicationTipItem.prototype={initialize:function(oNumber,oQuestion,oAnswer){this.number=oNumber;this.question=oQuestion;this.answer=oAnswer;}}
var SystemContentItem=Class.create();SystemContentItem.prototype={initialize:function(oTitle,oContent){this.title=oTitle;this.content=oContent;}}
function getFullDateString(date){var dateArray=date.split("/");var year=dateArray[2].substring(0,4);var date=dateArray[1];var month=parseInt(dateArray[0]);var monthName=(month==1)?'January':(month==2)?'February':(month==3)?'March':(month==4)?'April':(month==5)?'May':(month==6)?'June':(month==7)?'July':(month==8)?'August':(month==9)?'September':(month==10)?'October':(month==11)?'November':'December';return monthName+' '+date+', '+year;}
var DirectorItem=Class.create();DirectorItem.prototype={id:null,name:null,position:null,title:null,location:null,description:null,smallImage:null,largeImage:null,initialize:function(id,name,title,position,location,description,smallImage,largeImage){this.id=id;this.name=name;this.title=title;this.position=position;this.location=location;this.description=description;this.smallImage=smallImage;this.largeImage=largeImage;}}
var GovernanceItem=Class.create();GovernanceItem.prototype={text:null,description:null,initialize:function(text,description){this.text=text;this.description=description;}}
function getFirstChildNodeValue(listItem,id){var nv=listItem.getElementsByTagName(id)[0];if(nv==null){return"";}
else{var curValue='';if(nv.firstChild!=null)
{var i=0;while(i<nv.childNodes.length)
{curValue+=nv.childNodes[i].nodeValue;i++;}}
return curValue;}}
﻿Event.observe(window,'load',function(){var hnp=$('headerNavPanel');Event.observe(hnp,'mouseover',moNav,false);Event.observe(hnp,'mouseout',moNav,false);Event.observe(hnp,'click',clickNav,false);var searchButton=$('searchButton');if(searchButton){Event.observe(searchButton,'mouseover',moButton,false);Event.observe(searchButton,'mouseout',moButton,false);}
var searchButton=$('homeButton');if(searchButton){Event.observe(searchButton,'mouseover',moButton,false);Event.observe(searchButton,'mouseout',moButton,false);}
var hl=$('headerLogo');if(hl!=null)
Event.observe(hl,'click',goHome,false);});function goHome(e){document.location.href='default.htm';}
var scrolling=false;function moButton(e){var item=(e.fromElement!=null)?e.fromElement:e.target;if(item.id=='')
item=(e.toElement!=null)?e.toElement:e.rangeParent;if(item.id=='searchButton'){item.src=(e.type=='mouseover')?'../images/button_find_hover.gif':'../images/button_find.gif';}
else if(item.id=='homeButton'){item.src=(e.type=='mouseover')?'../images/homebuttonhover.gif':'../images/homebutton.gif';}}
function moNavPanel(e){var item=(e.fromElement!=null)?e.fromElement:e.target;var toElement=(e.toElement!=null)?e.toElement:e.rangeParent;if((toElement!=null)&&(toElement.id!=null)&&(toElement.id.indexOf('headerNavPanel')>-1)){return;}
if((item.id=='headerNavPanel')&&(toElement.id.indexOf('hnp')==-1)){if(!scrolling){scrolling=true;var navPanel=$('headerNavPanel');if(navPanel.style.left!='-680px'){navPanel.morph({left:'-680px'},{duration:1.2,queue:{scope:'hnScope',position:'with-last'}});$('hnpControl').src='../images/buttons/npcLeft.png';}
scrolling=false;}}}
function moNav(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if((item.id=='headerNavPanel')||(item.id=='hnpControl'))return;var itemId=parseInt(item.id.gsub('hnpItemLabel',''));var itemSet=(itemId<=5)?'ms':(itemId<=8)?'cin':'la';var hnpItem=$('hnpItem'+itemId);var replaceImg,origImg;if(itemSet=='ms'){replaceImg=(item.className=='activeNavLabel')?'../images/buttons/navBoxBlue.gif':'../images/buttons/navBoxBlueHover.gif';origImg=(item.className=='activeNavLabel')?'../images/buttons/navBoxBlueHover.gif':'../images/buttons/navBoxBlue.gif';}
else if(itemSet=='cin'){replaceImg=(item.className=='activeNavLabel')?'../images/buttons/navBoxRed.gif':'../images/buttons/navBoxRedHover.gif';origImg=(item.className=='activeNavLabel')?'../images/buttons/navBoxRedHover.gif':'../images/buttons/navBoxRed.gif';}
else if(itemSet=='la'){replaceImg=(item.className=='activeNavLabel')?'../images/buttons/navBoxOrange.gif':'../images/buttons/navBoxOrangeHover.gif';origImg=(item.className=='activeNavLabel')?'../images/buttons/navBoxOrangeHover.gif':'../images/buttons/navBoxOrange.gif';}
if(item.id.indexOf('hnpItemLabel')>-1){if(!item.id.gsub)
return;var id=item.id.gsub('hnpItemLabel','');if(itemSet=='ms'){hnpItem.src=(e.type=='mouseover')?replaceImg:origImg;item.style.color=(e.type=='mouseover')?'#6699cc':'#00457C';}
else if(itemSet=='cin'){hnpItem.src=(e.type=='mouseover')?replaceImg:origImg;item.style.color=(e.type=='mouseover')?'#ff0033':'#840c2c';}
else if(itemSet=='la'){hnpItem.src=(e.type=='mouseover')?replaceImg:origImg;item.style.color=(e.type=='mouseover')?'#ff6600':'#EAA758';}}}
function clickNav(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if((item.id=='hnpControl')||(item.id=='headerNavPanel'))return;var curId=(item.id!=null)?item.id.substring(item.id.length-1,item.id.length):0;switch(curId){case'6':document.location.href='careers.html';break;case'7':document.location.href='investorrelations.html';break;case'8':document.location.href='news.html';break;case'9':document.location.href='locationmap.html';break;case'0':document.location.href='aboutus.html';break;default:document.location.href='marketsector.html?paid='+curId;break;}}
var cScroller,pScroller;function showContactPanel(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if((item.id=='footerLinks')||(item.id=='portalsLink'))return;var dhp=$('detailHoverPanel');if((item.id=='privacyLink')||(item.id=='copyrightLink')){if(sysItems.length==0){getPrivacyPolicy();}}
if(item.id=='homeLink'){document.location.href='default.htm';return;}
else if((item.id=='privacyLink')||(item.id=='privacyPolicyLink')){if(dhp.style.top=='26px')
$('dhpTextPanelWrapper').morph({top:'-430px'},{duration:0.8,queue:{scope:'showScope',position:'end'}});else
$('dhpTextPanelWrapper').style.top='-430px';if(pScroller==null)
pScroller=new Control.Scroller($('privacyContent'),$('pccHandle'),$('pccTrack'),{visibleHeight:335,delta:5});pScroller.slider.setValue(0,0);}
else if((item.id=='contactUsPanelLink')||(item.id=='contactUsLink')){if(dhp.style.top=='26px')
$('dhpTextPanelWrapper').morph({top:'-860px'},{duration:0.8,queue:{scope:'showScope',position:'end'}});else
$('dhpTextPanelWrapper').style.top='-860px';}
else if(item.id=='copyrightLink'){if(dhp.style.top=='26px')
$('dhpTextPanelWrapper').morph({top:'0px'},{duration:0.8,queue:{scope:'showScope',position:'end'}});else
$('dhpTextPanelWrapper').style.top='0px';if(cScroller==null)
cScroller=new Control.Scroller($('copyrightContent'),$('cccHandle'),$('cccTrack'),{visibleHeight:335,delta:5});cScroller.slider.setValue(0,0);}
if(dhp.style.top!='26px'){dhp.morph({top:'26px'},{duration:0.8,queue:{scope:'showScope',position:'end'}});$('dhpCover').style.left='0px';}}
function moFooterLinks(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if(item.id=='')return;if(item.id=='footerLinks')return;item.style.color=(e.type=='mouseover')?'#EAA758':(item.id=='privacyPolicyLink')?'blue':'#AFAFAF';}
function closeContactWindow(){var dhp=$('detailHoverPanel');if(dhp.style.top=='26px'){dhp.morph({top:'1030px'},{duration:0.7,queue:{scope:'showScope',position:'end'}});$('dhpCover').style.left='1030px';}}
Event.observe('searchButton','click',searchSubmit,false);Event.observe('homeButton','click',homeSubmit,false);function searchSubmit(){var searchText=document.getElementById('searchInput').value;if(searchText!='')
{document.location.href="sitesearch.html?s="+searchText;}
return false;}
function homeSubmit(){document.location.href="/default.htm";}
function mo_ContactClose(e){var item=(e.srcElement!=null)?e.srcElement:e.target;item.style.color=(e.type=='mouseover')?'#00457C':'#fff';}
function mo_ContactSubmit(e){var item=(e.srcElement!=null)?e.srcElement:e.target;item.style.color=(e.type=='mouseover')?'#00457c':'#fff';}
function submitContactForm(e){var item=(e.srcElement!=null)?e.srcElement:e.target;var subject=$('cfSubject');var firstName=$('cfFirstName');var lastName=$('cfLastName');var email=$('cfEmail');var city=$('cfCity');var province=$('cfProvince');var ms=$('cfMarketSector');var marketsectorValue=(ms!=null)?ms.value:'';var gs=$('cfSubject');var generalSubjectValue=(gs!=null)?gs.value:'';var feedback=$('cfFeedback');if((subject.value!='')&&(firstName.value!='')&&(lastName.value!='')&&(email.value!='')&&(city.value!='')&&(province.value!='')&&((marketsectorValue!='')||(generalSubjectValue!=''))&&(feedback.value!='')){var itemId=item.id;var toField='';var subjectValue=subject.value.stripScripts().stripTags();var firstNameValue=firstName.value.stripScripts().stripTags();var lastNameValue=lastName.value.stripScripts().stripTags();var emailValue=email.value.stripScripts().stripTags();var cityValue=city.value.stripScripts().stripTags();var provinceValue=province.value.stripScripts().stripTags();var feedbackValue=feedback.value.stripScripts().stripTags();if(!validEmail(emailValue)){alert('Invalid Email address. Please enter a valid email address.');return;}
var qs='';if((ms==null)||((subject.style.left=='148px')&&(generalSubjectValue!=''))){toField='info@stantec.com';qs='subject='+generalSubjectValue+'&firstName='+firstNameValue+'&lastName='+lastNameValue+'&from='+emailValue+'&city='+cityValue+'&province='+provinceValue+'&marketsector='+generalSubjectValue+'&feedback='+feedbackValue+'&to='+toField;}
else if((ms!=null)&&(ms.style.left=='148px')&&(marketsectorValue!='')){toField='askstantec@stantec.com';qs='subject='+marketsectorValue+'&firstName='+firstNameValue+'&lastName='+lastNameValue+'&from='+emailValue+'&city='+cityValue+'&province='+provinceValue+'&marketsector='+marketsectorValue+'&feedback='+feedbackValue+'&to='+toField;}
if(qs==''){alert('Please complete all fields in this form.');return;}
var opt={method:'post',onSuccess:handleSubmitContactForm,on404:handleError,onFailure:handleError};new Ajax.Request('xmlQuery/contact/contactus.aspx?'+qs,opt);}
else{alert('Please complete all fields in this form.');}}
function validEmail(email){var atSign=email.indexOf("@")
var period=email.lastIndexOf(".")
var result=false;if((email=="")||(atSign==-1)||(period==-1)||(atSign==0))
return false;if((atSign>period)||(period-atSign==1)||(period==(email.length-1))){return false;}
if((email.indexOf("#")>-1)||(email.indexOf("!")>-1)||(email.indexOf("$")>-1)||(email.indexOf("%")>-1)||(email.indexOf("^")>-1)||(email.indexOf("&")>-1)||(email.indexOf("*")>-1)||(email.indexOf("?")>-1)||(email.indexOf(" ")>-1)||(email.indexOf("+")>-1)||(email.indexOf(";")>-1))
return false;return true;}
var handleSubmitContactForm=function(req){var data=(req.responseText.indexOf('Success')>-1);finishSubmitEmail(data,req.responseText);}
function finishSubmitEmail(result,errorMsg){if(result){alert('Thank you for your message.');new Effect.Event({queue:{position:'end',scope:'showScope'},beforeUpdate:function(){$('cfFirstName').value='';$('cfLastName').value='';$('cfEmail').value='';$('cfCity').value='';$('cfProvince').value='';if($('cfMarketSector')!=null)
$('cfMarketSector').selectedIndex=0;$('cfSubject').selectedIndex=0;$('cfFeedback').value='';}});closeContactWindow();}
else{alert('Please verify your email address. ');}}
var sysItems=[];var sysLink='';function getSystemContent(dest){var opt={method:'post',onSuccess:handleGetSystemContent,on404:handleError,onFailure:handleError};sysLink=dest;new Ajax.Request('xmlQuery/systemContent.aspx',opt);}
var handleGetSystemContent=function(req)
{var contentData=req.responseXML.getElementsByTagName('SystemContent');var item=null;var systemItems;var title,content;if(contentData.length>0){for(var i=0;i<contentData.length;i++)
{title=getFirstChildNodeValue(contentData[i],'Title');content=getFirstChildNodeValue(contentData[i],'Content');item=new SystemContentItem(title,content);sysItems.push(item);}}
loadSystemContent();}
function loadSystemContent(){for(var i=0;i<sysItems.length;i++){if(sysItems[i].title=='privacy')
$('privacyContent').innerHTML=sysItems[i].content;else if(sysItems[i].title=='copyright')
$('copyrightContent').innerHTML=sysItems[i].content;}
if(sysLink=='portal')
openPortal();}
function openPortal()
{if(sysItems.length==0)
getSystemContent('portal');else{var portalItem=sysItems.find(function(n){return n.title=='portal'});var link=portalItem.content.gsub('<div>','').gsub('</div>','');window.open(link);}}
function getPrivacyPolicy(){if(sysItems.length==0)
getSystemContent();else
loadSystemContent();}
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}
if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}
var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}
return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs,videoType)
{var str='';if(isIE&&isWin&&!isOpera)
{str+='<object ';for(var i in objAttrs)
{str+=i+'="'+objAttrs[i]+'" ';}
str+='>';for(var i in params)
{str+='<param name="'+i+'" value="'+params[i]+'" /> ';}
str+='</object>';}
else
{str+='<embed ';for(var i in embedAttrs)
{str+=i+'="'+embedAttrs[i]+'" ';}
str+='> </embed>';}
var d=document.createElement('div');d.style.width='420px';d.style.height='420px';d.style.paddingLeft=(lastWindow=='videotestimonial')?"45px":'88px';d.style.paddingTop=(lastWindow=='videotestimonial')?"0px":'30px';d.style.verticalAlign='middle';d.innerHTML=str;var avd=(lastWindow=='videotestimonial')?$('testimonialVideoDiv'):$('ourWorkVideoDiv');avd.appendChild(d);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblclick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}
if(typeof Effect=='undefined')
throw("accordion.js requires including script.aculo.us' effects.js library!");var accordion=Class.create();accordion.prototype={showAccordion:null,currentAccordion:null,duration:null,effects:[],animating:false,autoSize:false,initialize:function(container,options){if(!$(container)){throw(container+" doesn't exist!");return false;}
this.options=Object.extend({resizeSpeed:8,classNames:{toggle:'accordion_toggle',toggleActive:'accordion_toggle_active',content:'accordion_content'},defaultSize:{height:null,width:null},direction:'vertical',onEvent:'click',autoSize:false},options||{});this.duration=((11-this.options.resizeSpeed)*0.15);this.autoSize=this.options.autoSize;var accordions=$$('#'+container+' .'+this.options.classNames.toggle);accordions.each(function(accordion){if(this.options.onEvent=='click'){try
{if((clickAccordion!=undefined)&&(clickAccordion!=null)){Event.observe(accordion,'click',clickAccordion,false);}}
catch(ex2)
{}}
if(this.options.onEvent=='mouseover')
{Event.observe(accordion,'mouseout',cancelOperation,false);Event.observe(accordion,'mouseover',doAccordionMouseOver,false);}
else
{Event.observe(accordion,this.options.onEvent,this.activate.bind(this,accordion),false);}
if(this.options.direction=='horizontal'){var options=$H({width:'0px'});}else{var options=$H({height:'0px'});}
options.merge({display:'none'});this.currentAccordion=$(accordion.next(0)).setStyle(options);}.bind(this));},activate:function(accordion){if(this.animating){return false;}
this.effects=[];this.currentAccordion=$(accordion.next(0));this.currentAccordion.setStyle({display:'block'});this.currentAccordion.previous(0).addClassName(this.options.classNames.toggleActive);if(this.options.direction=='horizontal'){this.scaling=$H({scaleX:true,scaleY:false});}else{this.scaling=$H({scaleX:false,scaleY:true});}
if(this.currentAccordion!=this.showAccordion){this._handleAccordion();}},deactivate:function(){var options=$H({duration:this.duration,scaleContent:false,transition:Effect.Transitions.sinoidal,queue:{position:'end',scope:'accordionAnimation'},scaleMode:{originalHeight:this.options.defaultSize.height?this.options.defaultSize.height:this.currentAccordion.scrollHeight,originalWidth:this.options.defaultSize.width?this.options.defaultSize.width:this.currentAccordion.scrollWidth},afterFinish:function(){this.showAccordion.setStyle({height:'auto',display:'none'});this.showAccordion=null;}.bind(this)});options.merge(this.scaling);this.showAccordion.previous(0).removeClassName(this.options.classNames.toggleActive);new Effect.Scale(this.showAccordion,0,options);this.animating=false;},_handleAccordion:function(){var options=$H({sync:true,scaleFrom:0,scaleContent:false,transition:Effect.Transitions.sinoidal,scaleMode:{originalHeight:this.options.defaultSize.height?this.options.defaultSize.height:this.currentAccordion.scrollHeight,originalWidth:this.options.defaultSize.width?this.options.defaultSize.width:this.currentAccordion.scrollWidth}});options.merge(this.scaling);this.effects.push(new Effect.Scale(this.currentAccordion,100,options));if(this.showAccordion){this.showAccordion.previous(0).removeClassName(this.options.classNames.toggleActive);options=$H({sync:true,scaleContent:false,transition:Effect.Transitions.sinoidal});options.merge(this.scaling);this.effects.push(new Effect.Scale(this.showAccordion,0,options));}
new Effect.Parallel(this.effects,{duration:this.duration,queue:{position:'end',scope:'accordionAnimation'},beforeStart:function(){this.animating=true;}.bind(this),afterFinish:function(){if(this.showAccordion){this.showAccordion.setStyle({display:'none'});}
if(this.autoSize){$(this.currentAccordion).setStyle({height:'auto'});}
this.showAccordion=this.currentAccordion;this.animating=false;}.bind(this)});}}
var myTimer;var myItem;function doAccordionMouseOver(e)
{myItem=(e.srcElement!=null)?e.srcElement:e.target;if(myItem==null){myItem=(e!=null)?e:null;}
if(myItem!=null)
setTimeout("doDelayedAccordionMouseOver();",300);return false;}
function doDelayedAccordionMouseOver(){if(accordionLoaded){bottomAccordion.activate(myItem);runStudentLoungeUpdate(myItem);}
return false;}
function cancelOperation(){clearTimeout(myTimer);return false;}
﻿
var columnName;function getContentOnly(cn){columnName=cn;var opt={method:'post',onSuccess:handleGetContentOnly,on404:handleError,onFailure:handleError};new Ajax.Request('xmlQuery/careers/ContentOnly.aspx?cn='+cn,opt);}
var handleGetContentOnly=function(req){var dataFromXML=req.responseXML.getElementsByTagName('CareersContent');var description;if(dataFromXML.length>0){var curRow=dataFromXML[0];description=getFirstChildNodeValue(curRow,columnName);}
finishSimpleFullTextViewLoad(description);}
function getContentWithImages(cn){columnName=cn;var listName=(cn=='Benefits')?'CareersBenefits':(cn=='Diversity')?'CareersDiversity':(cn=='Learning')?'CareersLearning':(cn=='Compensation')?'CareersCompensation':(cn=='VisionAndValues')?'CareersVisionAndValues':(cn=='ProfessionalDevelopment')?'CareersProfessionalDevelopment':(cn=='WhyChooseStantec')?'CareersWhyChooseStantec':'';var opt={method:'post',onSuccess:handleGetContentWithImages,on404:handleError,onFailure:handleError};new Ajax.Request('xmlQuery/careers/ContentWithImages.aspx?cn='+cn+'&ln='+listName,opt);}
var handleGetContentWithImages=function(req){var dataFromXML=req.responseXML.getElementsByTagName('CareersContent');var data;if(dataFromXML.length>0){var curRow=dataFromXML[0];data=getFirstChildNodeValue(curRow,columnName);}
var imagesFromXML=req.responseXML.getElementsByTagName('Images');var title,large,thumbnail,item,id;curImageList.clear();for(var i=0;i<imagesFromXML.length;i++){var curRow=imagesFromXML[i];thumbnail='../../'+getFirstChildNodeValue(curRow,'ThumbnailImage');large='../../'+getFirstChildNodeValue(curRow,'LargeImage');title=getFirstChildNodeValue(curRow,'Title');id=columnName+getFirstChildNodeValue(curRow,'ID');item=new ImageItem(id,title,thumbnail,large);curImageList.push(item);loadedImages.push(item);}
finishWhyChooseStantecView(data);}
function getPeopleStrategyContent(){var opt={method:'post',onSuccess:handleGetPSContent,on404:handleError,onFailure:handleError};new Ajax.Request('xmlQuery/careers/PeopleStrategy.aspx',opt);}
var handleGetPSContent=function(req){var dataFromXML=req.responseXML.getElementsByTagName('PeopleStrategyContent');var title,description;var images=[];var topImage1Thumbnail,topImage2Thumbnail,topImage3Thumbnail,topImage4Thumbnail,topImage5Thumbnail;if(dataFromXML.length>0){var curRow=dataFromXML[0];title=getFirstChildNodeValue(curRow,"Title");description=getFirstChildNodeValue(curRow,"PeopleStrategy");getImageString("TopImage1Thumbnail",curRow,images);getImageString("TopImage2Thumbnail",curRow,images);getImageString("TopImage3Thumbnail",curRow,images);getImageString("TopImage4Thumbnail",curRow,images);getImageString("TopImage5Thumbnail",curRow,images);}
var dataFromXML=req.responseXML.getElementsByTagName('Testimonial');var name,large,thumbnail,item;for(var i=0;i<dataFromXML.length;i++){var curRow=dataFromXML[i];thumbnail=getFirstChildNodeValue(curRow,'ThumbnailImage');large=getFirstChildNodeValue(curRow,'LargeImage');name=getFirstChildNodeValue(curRow,'ProfileName');item=new TestimonialItem(name.toLowerCase(),name,'',getFirstChildNodeValue(curRow,'Question1Answer'),getFirstChildNodeValue(curRow,'Question2Answer'),getFirstChildNodeValue(curRow,'Question3Answer'),getFirstChildNodeValue(curRow,'Question4Answer'),getFirstChildNodeValue(curRow,'Question5Answer'),getFirstChildNodeValue(curRow,'Question6Answer'),getFirstChildNodeValue(curRow,'Question7Answer'),getFirstChildNodeValue(curRow,'Question8Answer'),getFirstChildNodeValue(curRow,'Question9Answer'),'../../'+large,'../../'+thumbnail);testimonials.push(item);}
questions.push('Tell what you like most about working at Stantec');questions.push('What was your starting role at Stantec?');questions.push('What do you appreciate most about working at Stantec?');questions.push('What are one or two things that have helped you most in your career?');questions.push('What are the opportunities for Career Development (internal and/or external)?');questions.push('What are some informal learning opportunities that you have used that are effective?');questions.push('What do you like most about your work?');questions.push('What advice do you have for others who are considering a similar role or path?');questions.push('Knowing what you do now, would you approach this career (or job) in the same way?');finishWorkEnvironmentViewLoad(description,images);}
function getImageString(cn,curRow,imageList){curImage=getFirstChildNodeValue(curRow,cn);if(curImage!=''){var iCount=imageList.length;var item=new ImageItem(lastItem+iCount,'','../../'+curImage,'')
imageList.push(item);loadedImages.push(item);}}
function getWorkEnvironmentContent(){var opt={method:'post',onSuccess:handleGetWorkEnvironmentContent,on404:handleError,onFailure:handleError};new Ajax.Request('xmlQuery/careers/WorkEnvironment.aspx',opt);}
var handleGetWorkEnvironmentContent=function(req){var dataFromXML=req.responseXML.getElementsByTagName('WorkEnvironmentContent');var title,description;var topImages=[];var bottomImages=[];var topImage1Thumbnail,topImage2Thumbnail,topImage3Thumbnail,topImage4Thumbnail,topImage5Thumbnail;if(dataFromXML.length>0){var curRow=dataFromXML[0];title=getFirstChildNodeValue(curRow,"Title");description=getFirstChildNodeValue(curRow,"WorkEnvironment");getImageString("TopImage1Thumbnail",curRow,topImages);getImageString("TopImage2Thumbnail",curRow,topImages);getImageString("TopImage3Thumbnail",curRow,topImages);getImageString("TopImage4Thumbnail",curRow,topImages);getImageString("TopImage5Thumbnail",curRow,topImages);getImageString("BottomImage1Thumbnail",curRow,topImages);getImageString("BottomImage2Thumbnail",curRow,topImages);getImageString("BottomImage3Thumbnail",curRow,topImages);getImageString("BottomImage4Thumbnail",curRow,topImages);getImageString("BottomImage5Thumbnail",curRow,topImages);}
finishWorkEnvironmentViewLoad(description,topImages);}
function getStudentLoungeContent(){var opt={method:'post',onSuccess:handleGetStudentLoungeContent,on404:handleError,onFailure:handleError};new Ajax.Request('xmlQuery/careers/StudentLoungeContent.aspx',opt);}
var handleGetStudentLoungeContent=function(req){var dataFromXML=req.responseXML.getElementsByTagName('CareersContent');var overview,cei,cf,ngr,sp;if(dataFromXML.length>0){var curRow=dataFromXML[0];overview=getFirstChildNodeValue(curRow,'StudentLoungeOverview');cei=getFirstChildNodeValue(curRow,'StudentLoungeCooperativeEducationAndInternships');cf=getFirstChildNodeValue(curRow,'StudentLoungeCareerFairs');ngr=getFirstChildNodeValue(curRow,'StudentLoungeNewGraduateRecruitment');sp=getFirstChildNodeValue(curRow,'StudentLoungeSummerPlacements');studentLoungeItems.push(new ContentItem('studentlounge','Student Lounge','Overview',overview));studentLoungeItems.push(new ContentItem('studentlounge','Student Lounge','New Graduate Recruitment',ngr));studentLoungeItems.push(new ContentItem('studentlounge','Student Lounge','Cooperative Education & Internships',cei));studentLoungeItems.push(new ContentItem('studentlounge','Student Lounge','Summer Placements',sp));studentLoungeItems.push(new ContentItem('studentlounge','Student Lounge','Career Fairs',cf));}
finishStudentLoungeLoad(studentLoungeItems);}
function handleError(){}
function sendContactUsMail(){var opt={method:'post',onSuccess:handleSendMail,on404:handleError,onFailure:handleError};new Ajax.Request('contactus.aspx',opt);}
var handleSendMail=function(req){}
function getApplicationTips(){var opt={method:'post',onSuccess:handleGetApplicationTipsContent,on404:handleError,onFailure:handleError};new Ajax.Request('xmlQuery/careers/ApplicationTips.aspx',opt);}
var handleGetApplicationTipsContent=function(req){var dataFromXML=req.responseXML.getElementsByTagName('CareersContent');var description;if(dataFromXML.length>0){var curRow=dataFromXML[0];description=getFirstChildNodeValue(curRow,"ApplicationTips");}
finishSimpleFullTextViewLoad(description);var dataFromXML=req.responseXML.getElementsByTagName('ApplicationTipsContent');var id,question,answer;for(var i=0;i<dataFromXML.length;i++){var curRow=dataFromXML[i];id=getFirstChildNodeValue(curRow,'ID');question=getFirstChildNodeValue(curRow,'Question');answer=getFirstChildNodeValue(curRow,'Answer');applicationTips.push(new ApplicationTipItem(id,question,answer));}
finishAddApplicationTips();}
function setImages(itemId,psImages,psTopImages){psImages.clear();path='';if(itemId=='workenvironment'){psImages[0]=path+'../images/careers/we1_.jpg';psImages[1]=path+'../images/careers/we2_.jpg';psImages[2]=path+'../images/careers/we3_.jpg';psImages[3]=path+'../images/careers/we4_.jpg';psImages[4]=path+'../images/careers/we5_.jpg';psImages[5]=path+'../images/careers/we6_.jpg';psImages[6]=path+'../images/careers/we7_.jpg';psImages[7]=path+'../images/careers/we8_.jpg';psImages[8]=path+'../images/careers/we9_.jpg';psImages[9]=path+'../images/careers/we10_.jpg';}
else if(itemId=='peoplestrategy'){psImages[0]=path+'../images/careers/angie_.jpg';psImages[1]=path+'../images/careers/dan_.jpg';psImages[2]=path+'../images/careers/gloria_.jpg';psImages[3]=path+'../images/careers/john_.jpg';psImages[4]=path+'../images/careers/lauren_.jpg';psImages[5]=path+'../images/careers/lisa_.jpg';psImages[6]=path+'../images/careers/paul_.jpg';psTopImages.clear();psTopImages[0]=path+'../images/careers/ps6_.jpg';psTopImages[1]=path+'../images/careers/ps2_.jpg';psTopImages[2]=path+'../images/careers/ps3_.jpg';}
else if(itemId=='whychoosestantec'){psImages[0]=path+'../images/careers/whychoosestantec.jpg';}
else if(itemId=='diversity'){psImages[0]=path+'../images/careers/d1_.jpg';psImages[1]=path+'../images/careers/d2_.jpg';psImages[2]=path+'../images/careers/d3_.jpg';}
else if(itemId=='professionaldevelopment'){psImages[0]=path+'../images/careers/pd1_.jpg';psImages[1]=path+'../images/careers/pd2_.jpg';psImages[2]=path+'../images/careers/pd3_.jpg';psImages[3]=path+'../images/careers/pd4_.jpg';}
else if(itemId=='learning'){psImages[0]=path+'../images/careers/l1_.jpg';psImages[1]=path+'../images/careers/l2_.jpg';psImages[2]=path+'../images/careers/l3_.jpg';psImages[3]=path+'../images/careers/l4_.jpg';}
else if(itemId=='benefits'){psImages[0]=path+'../images/careers/b1_.jpg';psImages[1]=path+'../images/careers/b2_.jpg';psImages[2]=path+'../images/careers/b3_.jpg';psImages[3]=path+'../images/careers/b4_.jpg';}
else if(itemId=='compensation'){psImages[0]=path+'../images/careers/c1_.jpg';psImages[1]=path+'../images/careers/c2_.jpg';}
else if(itemId=='visionsandvalues'){psImages[0]=path+'../images/careers/v1_.jpg';psImages[1]=path+'../images/careers/v2_.jpg';psImages[2]=path+'../images/careers/v3_.jpg';psImages[3]=path+'../images/careers/v4_.jpg';}}
var links=[];var content=[];var questions=[];var testimonials=[];var applicationTips=[];var studentLoungeItems=[];var curImageList=[];var loadedImages=[];var contentItemDiv='position:relative;top:0px;left:0px;width:496px;margin:0px;padding:0px;';var spanTextHeader='position:absolute;left:0px;top:0px;height:20px;width:496px;font-family: Arial, Helvetica, sans-serif;font-weight:bold;line-height: 14pt;font-size: 8pt; color:#5883AD;';var spanText='position:relative;left:0px;top:20px;width:496px;font-family: Arial, Helvetica, sans-serif;font-size: 8pt; color:#333333;';var spanQuestion='position:relative;left:0px;top:20px;width:496px;font-family: Arial, Helvetica, sans-serif; line-height: 14pt;font-size: 8pt; font-weight:bold; color:#111;';var cdnCScroller;var usCScroller;var mcScroller,tqccScroller,dccScroller,lccScroller,oScroller,bccScroller,atccScroller,vvccScroller,cccScroller;var pmScroller;var lastWindow='';var lastItem='overview';var showedLargeImage=false;var scrollDistance=100;var scroller;var scrollStart=0;var scrollToValue;Event.observe(window,'load',function(){tqccScroller=new Control.Scroller('whychoosestantecMCTAContent','tqccHandle','tqccTrack',{visibleHeight:322,delta:5,heightPadding:308},false);dccScroller=new Control.Scroller('diversityMCTAContent','dccHandle','dccTrack',{visibleHeight:322,delta:5,heightPadding:58},false);lccScroller=new Control.Scroller('learningMCTAContent','lccHandle','lccTrack',{visibleHeight:322,delta:5,heightPadding:358},false);mcScroller=new Control.Scroller('mainContentTextArea','mccHandle','mccTrack',{visibleHeight:446,delta:5},false);occScroller=new Control.Scroller('testimonialPanel','occHandle','occTrack',{visibleHeight:302,delta:5,heightPadding:358},false);bccScroller=new Control.Scroller('benefitsMCTAContent','bccHandle','bccTrack',{visibleHeight:322,delta:5,heightPadding:358},false);cccScroller=new Control.Scroller('compensationMCTAContent','ccccHandle','ccccTrack',{visibleHeight:322,delta:5,heightPadding:358},false);vvccScroller=new Control.Scroller('visionsandvaluesMCTAContent','vvccHandle','vvccTrack',{visibleHeight:446,delta:5,heightPadding:358},false);atccScroller=new Control.Scroller('applicationtipsMCTAContent','atccHandle','atccTrack',{visibleHeight:446,delta:5},false);initLinks();initCareersLinks();showContent(null);});function showMainContent(flashFile){if(!isFlashLoaded()){loadFlash(flashFile);}}
function initCareersLinks(){var cdnCL=$('cdnCareersLink');var usCL=$('usCareersLink');var soL=$('studentOppLink');var intlCL=$('intlCareersLink');if(navigator.userAgent.indexOf("IE")!=-1){Event.observe(cdnCL,'click',showCdnCareersContent,false);Event.observe(usCL,'click',showUSCareersContent,false);Event.observe(soL,'click',showStudentOpportunities,false);Event.observe(intlCL,'click',showIntlCareersContent,false);}
else{Event.observe(cdnCL,'click',showFirefoxCdnCareersContent,false);Event.observe(usCL,'click',showFirefoxUSCareersContent,false);Event.observe(intlCL,'click',showIntlCareersContent,false);Event.observe(soL,'click',showStudentOpportunities,false);}
Event.observe(cdnCL,'mouseover',moElement,false);Event.observe(cdnCL,'mouseout',moElement,false);Event.observe(usCL,'mouseover',moElement,false);Event.observe(usCL,'mouseout',moElement,false);Event.observe(soL,'mouseover',moElement,false);Event.observe(soL,'mouseout',moElement,false);Event.observe(intlCL,'mouseover',moElement,false);Event.observe(intlCL,'mouseout',moElement,false);}
var cdnSCScroller;var usSCScroller;var ffStockContentDiv='position:absolute;left:0px;top:0px;height:444px;width:1204px;overflow:hidden;display:none';var ffChartSpan='cursor:pointer;position:absolute;left:5px;top:3px;height:20px;width:100px;font-family: Arial, Helvetica, sans-serif;font-weight:bold;line-height: 14px;font-size: 9pt; color:#5883AD;';var ffQuoteSpan='cursor:pointer;position:absolute;left:110px;top:3px;height:20px;width:100px;font-family: Arial, Helvetica, sans-serif;font-weight:bold;line-height: 14px;font-size: 9pt; color:#5883AD;';var ffCdnChartDiv='position:absolute;left:0px;top:-385px;height:780px;width:500px;overflow:hidden;';var ffCdnQuoteDiv='position:absolute;left:510px;top:0px;height:380px;width:500px;overflow:hidden';var ffUSChartDiv='position:absolute;left:0px;top:-350px;height:733px;width:500px;overflow:hidden;';var ffUSQuoteDiv='position:absolute;left:510px;top:0px;height:345px;width:500px;overflow:hidden';var ffContentWrapperDiv='position:absolute;left:0px;top:30px;height:414px;width:1204px;overflow:hidden;';var ffWrapperSpanDiv='position:absolute;background-color:#E4EAF2;left:0px;top:0px;height:22px;width:516px;';function showStudentOpportunities(){openCareers('student');}
function initLinks(){links.push(new IRLocationItem('applicationtips',0));links.push(new IRLocationItem('interviewingtips',-510));links.push(new IRLocationItem('overview',-3570));links.push(new IRLocationItem('whychoosestantec',-1020));links.push(new IRLocationItem('studentlounge',-1530));links.push(new IRLocationItem('peoplestrategy',-2040));links.push(new IRLocationItem('visionsandvalues',-2550));links.push(new IRLocationItem('diversity',-3060));links.push(new IRLocationItem('compensation',-4080));links.push(new IRLocationItem('benefits',-4590));links.push(new IRLocationItem('learning',-5100));links.push(new IRLocationItem('workenvironment',-5610));links.push(new IRLocationItem('professionaldevelopment',-6120));links.push(new IRLocationItem('videotestimonial',-6630));links.push(new IRLocationItem('ourwork',-7140));var link,curContentHolder,left;for(var i=0;i<links.length;i++){link=$(links[i].id);Event.observe(link,'click',showContent,false);Event.observe(link,'mouseover',moElement,false);Event.observe(link,'mouseout',moElement,false);curContentHolder=$(links[i].id+'MCTAContent');left=parseInt(links[i].leftPosition)*-1;curContentHolder.style.left=left+'px';}
var cul=$('footerLinks');Event.observe(cul,'click',showContactPanel,false);Event.observe(cul,'mouseover',moFooterLinks,false);Event.observe(cul,'mouseout',moFooterLinks,false);var dhpclose=$('dhpCloseButton');Event.observe(dhpclose,'click',closeContactWindow,false);Event.observe(dhpclose,'mouseover',mo_ContactClose,false);Event.observe(dhpclose,'mouseout',mo_ContactClose,false);var cfsubmit=$('careersCFSubmitButton');Event.observe(cfsubmit,'click',submitContactForm,false);Event.observe(cfsubmit,'mouseover',mo_ContactSubmit,false);Event.observe(cfsubmit,'mouseout',mo_ContactSubmit,false);var ppLink=$('privacyPolicyLink');Event.observe(ppLink,'click',showContactPanel,false);Event.observe(ppLink,'mouseover',moFooterLinks,false);Event.observe(ppLink,'mouseout',moFooterLinks,false);var cb=$('closePEButton');Event.observe(cb,'click',closeLargeImagePanel,false);Event.observe(cb,'mouseover',moElement,false);Event.observe(cb,'mouseout',moElement,false);var cfb=$('closeFPEButton');Event.observe(cfb,'click',closeLargeImagePanel,false);Event.observe(cfb,'mouseover',moElement,false);Event.observe(cfb,'mouseout',moElement,false);var cul=$('pmImageList');var til=$('topImageList');Event.observe(cul,'click',showLargeImagePanel,false);Event.observe(cul,'mouseover',moImageElement,false);Event.observe(cul,'mouseout',moImageElement,false);Event.observe(til,'click',showLargeImagePanel,false);Event.observe(til,'mouseover',moImageElement,false);Event.observe(til,'mouseout',moImageElement,false);var cbLink=$('careersBack');Event.observe(cbLink,'click',closeCareersPanel,false);Event.observe(cbLink,'mouseover',moElement,false);Event.observe(cbLink,'mouseout',moElement,false);}
function closeCareersPanel(e){resetViews();}
function moElement(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if((item.id=='closePEButton')||(item.id=='closeFPEButton'))
item.style.color=(e.type=='mouseover')?'#5883AD':'#fff';else{if((item.id=='careersBack')||(item.id=='overview'))
item.style.color=(e.type=='mouseover')?'#00457C':((item.id=='overview')||(item.id=='careersBack'))?'#fff':(item.id=='contactUsLink')?'#BFBFBF':'#5883AD';else
item.style.color=(e.type=='mouseover')?'#EAA758':((item.id=='overview')||(item.id=='careersBack'))?'#fff':(item.id=='contactUsLink')?'#BFBFBF':'#5883AD';}}
function resetViews(){var mcWrapper=$('mainContentWrapper');var rbw=$('rightBottomWrapper');var rtw=$('rightTopWrapper');var cont=$('container');if((cont.style.height!='484px')&&(cont.style.height!='')){cont.morph({height:'484px'},{duration:1.0,queue:{scope:'move2Scope',position:'with-last'}});$('footer').morph({top:'555px'},{duration:1.0,queue:{scope:'move2Scope',position:'with-last'}});}
if(mcWrapper.style.top=='-490px'){var uswd=$('usffscWrapperDiv');if(uswd!=null)uswd.innerHTML='';var ccwd=$('cdnffscWrapperDiv');if(ccwd!=null)ccwd.innerHTML='';$('usCareersContentWrapper').style.top='980px';mcWrapper.morph({top:'28px'},{duration:1.0,queue:{scope:'moveScope',position:'end'}});rbw.morph({top:'324px'},{duration:1.0,queue:{scope:'moveScope',position:'with-last'}});rtw.morph({top:'28px'},{duration:1.0,queue:{scope:'moveScope',position:'with-last'}});$('careersBackLink').morph({left:'980px'},{duration:0.4,queue:{scope:'moveScope',position:'with-last'}});$('cdnCareersContentWrapper').morph({top:'490px'},{duration:1.0,queue:{scope:'moveScope',position:'with-last'}});var sccw=$('cdnCareersContentControlWrapper');if(sccw.style.left!='741px')
sccw.morph({left:'741px'},{duration:0.4,queue:{scope:'moveScope',position:'with-last'}});}
else if(mcWrapper.style.top=='-980px'){var ccwd=$('cdnffscWrapperDiv');if(ccwd!=null)ccwd.innerHTML='';var uswd=$('usffscWrapperDiv');if(uswd!=null)uswd.innerHTML='';$('cdnCareersContentWrapper').style.top='490px';mcWrapper.morph({top:'28px'},{duration:1.0,queue:{scope:'moveScope',position:'end'}});rbw.morph({top:'324px'},{duration:1.0,queue:{scope:'moveScope',position:'with-last'}});rtw.morph({top:'28px'},{duration:1.0,queue:{scope:'moveScope',position:'with-last'}});$('careersBackLink').morph({left:'980px'},{duration:0.4,queue:{scope:'moveScope',position:'with-last'}});$('usCareersContentWrapper').morph({top:'980px'},{duration:1.0,queue:{scope:'moveScope',position:'with-last'}});var usccw=$('usCareersContentControlWrapper');if(usccw.style.left!='741px')
usccw.morph({left:'741px'},{duration:0.4,queue:{scope:'moveScope',position:'with-last'}});}
else if(mcWrapper.style.top==''){mcWrapper.style.top='28px';}
if((lastWindow=='whychoosestantec')){$('pmImageList').style.top='4px';var pep=$('pictureExpandPanel');if(pep.style.top=='28px'){closeLargeImagePanel($('closePEButton'));}
var dccw=$('dContentControlWrapper');var tqccw=$('tqContentControlWrapper');var lccw=$('lContentControlWrapper');var bccw=$('bContentControlWrapper');var vvccw=$('vvContentControlWrapper');var cccw=$('cContentControlWrapper');if(dccw.style.left!='530px')dccw.morph({left:'530px'},{duration:0.3,queue:{scope:'hide2Scope',position:'end'}});if(tqccw.style.left!='530px')tqccw.morph({left:'530px'},{duration:0.3,queue:{scope:'hide2Scope',position:'with-last'}});if(lccw.style.left!='530px')lccw.morph({left:'530px'},{duration:0.3,queue:{scope:'hide2Scope',position:'with-last'}});if(bccw.style.left!='530px')bccw.morph({left:'530px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});if(vvccw.style.left!='530px')vvccw.morph({left:'530px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});if(cccw.style.left!='530px')cccw.morph({left:'530px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});$('mainContentTextArea').style.height='444px';$('pictureMenuContent').morph({top:'490px'},{duration:0.3,queue:{scope:'hideScope',position:'front'}});if(pmScroller!=null)pmScroller.slider.setValue(0,0);var li=$('largeImage');li.src='../images/careers/spacer.gif'
li.style.display='none';li.style.borderWidth='0px'}
else if((lastWindow=='workenvironment')||(lastWindow=='peoplestrategy')){var fpep=$('fullPictureExpandPanel');if(fpep.style.left!='-530px'){fpep.morph({left:'-530px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});$('closeFPEButton').morph({left:'-30px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});}
var tpm=$('topPictureMenu');if(tpm.style.top!='-162px')
tpm.morph({top:'-162px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});var pmc=$('pictureMenuContent')
if(pmc.style.top!='490px')
pmc.morph({top:'490px'},{duration:0.3,queue:{scope:'hideScope',position:'with-last'}});var fli=$('fullLargeImage');fli.src='../images/careers/spacer.gif'
fli.style.display='none';fli.style.borderWidth='0px'
if(pmScroller!=null)pmScroller.slider.setValue(0,0);if(lastWindow=='peoplestrategy'){if(lastImageId!=''){var pep=$('pictureExpandPanel');if(pep.style.top=='29px'){var tp=$('testimonialPanel');if(tp.style.left!='-1024px'){tp.morph({left:'-1024px'},{duration:0.8,queue:{scope:'move2Scope',position:'end'}});$('oContentControlWrapper').morph({top:'490px'},{duration:0.2,queue:{scope:'move2Scope',position:'with-last'}});}
if(lastImageId.indexOf('pm')>-1){var pep=$('pictureExpandPanel');pep.morph({top:'490px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});$('closePEButton').morph({top:'490px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});}}}}}
else if(lastWindow=='applicationtips'){var ats=$('atContentControlWrapper');if(ats.style.left!='530px')
ats.morph({left:'530px'},{duration:0.3,queue:{scope:'hideScope',position:'end'}});var mccw=$('mainContentControlWrapper');if(mccw.style.left!='530px')
mccw.morph({left:'530px'},{duration:0.3,queue:{scope:'hideScope',position:'end'}});}
else if(lastWindow=='mainpage'){if(isFlashLoaded())
unloadFlash();}
else if(lastWindow=='videotestimonial'){$('testimonialVideoDiv').innerHTML='';}
else if(lastWindow=='ourwork'){$('ourWorkVideoDiv').innerHTML='';}}
function showContent(e){var item=(e==null)?$('overview'):(e.srcElement!=null)?e.srcElement:e.target;var curItem=null;var curItemId=null;if(item!=null)
{curItem=$(item.id);lastItem=item.id;curItemId=item.id;}
if(!item)
return;if((curItemId!=null)&&(!isRefreshingFromHistory)&&(!dhtmlHistory.isFirstLoad()))
{var state=new State();state.itemId=curItemId;state.itemName=$(curItemId).innerHTML;currentState=state;setTitle();sendCurrentStateToHistory();setTimeout("setTitle()",400);}
else
{setTitle();}
isRefreshingFromHistory=false;if(item.id=='leftBottomContent')return;var itemId=item.id;resetViews();setHeader();if((itemId=='whychoosestantec')||(itemId=='diversity')||(itemId=='professionaldevelopment')||(itemId=='learning')||(itemId=='benefits')){lastWindow='whychoosestantec';lastItem=itemId;whyChooseStantecView(itemId);}
else if(itemId=='studentlounge'){lastWindow='studentlounge';studentLoungeView(itemId);}
else if((itemId=='peoplestrategy')||(itemId=='workenvironment')){lastWindow=itemId;workEnvironmentView(itemId);}
else if((itemId=='applicationtips')||(itemId=='interviewingtips')||(itemId=='visionsandvalues')||(itemId=='compensation')){lastWindow='applicationtips';simpleFullTextView(itemId);}
else if(itemId=='overview'){lastWindow='mainpage';showMainContent('/flash/pa_flash/paanimation.swf?paid=6');}
else if(itemId=='videotestimonial'){lastWindow='videotestimonial';$('mainHeaderText').innerHTML='International Recruitment';showVideo('testimonial');}
else if(itemId=='ourwork'){lastWindow='ourwork';$('mainHeaderText').innerHTML='Our Work is Our Passion';showVideo('ourwork');}
var leftValue=links.findAll(function(n){return n.id==itemId});if(leftValue[0]!=null)
if(e==null)
$('mainContentTextArea').style.left=leftValue[0].leftPosition+'px';else
$('mainContentTextArea').morph({left:leftValue[0].leftPosition+'px'},{duration:0.8,queue:{scope:'hide2Scope',position:'end'}});if(item.id!='overview'){$('overviewLink').morph({left:'474px'},{duration:0.8,queue:{scope:'hide2Scope',position:'end'}});}
else{var ol=$('overviewLink');if(ol.style.left!='')
ol.morph({left:'540px'},{duration:0.8,queue:{scope:'hide2Scope',position:'end'}});}}
function showVideo(videoType){if(videoType=='testimonial')
setTimeout('showInternational()',1000);else
setTimeout('showOurWork()',1000);}
function showInternational()
{if(AC_FL_RunContent==0){alert("This page requires AC_RunActiveContent.js.");var obj='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '+'width="400" height="300" id="International Recruitment Video8" align="middle"> '+'<param name="allowScriptAccess" value="sameDomain" />'+'<param name="movie" value="/flash/stream/International Recruitment Video8.swf" /> '+'<param name="quality" value="high" /> '+'<param name="bgcolor" value="#ffffff" /> '+'<embed src="/flash/stream/International Recruitment Video8.swf" '+'quality="high"'+'bgcolor="#ffffff" '+'width="400" '+'height="300" '+'name="International Recruitment Video8" '+'align="middle" '+'allowScriptAccess="sameDomain" '+'type="application/x-shockwave-flash" '+'pluginspage="http://www.macromedia.com/go/getflashplayer" />';var d=document.createElement('div');d.style.width='420px';d.style.height='420px';d.style.paddingLeft="40px";d.style.verticalAlign='middle';d.innerHTML=obj;var avd=$('testimonialVideoDiv');avd.appendChild(d);}
else
{AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','400','height','300','src','/flash/stream/International Recruitment Video8','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','align','middle','play','true','loop','true','scale','showall','wmode','window','devicefont','false','id','International Recruitment Video8','bgcolor','#ffffff','name','International Recruitment Video8','menu','true','allowFullScreen','false','allowScriptAccess','sameDomain','movie','/flash/stream/International Recruitment Video8','salign','');}}
function showOurWork()
{if(AC_FL_RunContent==0){alert("This page requires AC_RunActiveContent.js.");var obj='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" '+'width="400" height="300" id="Our Work Video" align="middle"> '+'<param name="allowScriptAccess" value="sameDomain" />'+'<param name="movie" value="/flash/stream/our_work/our_passion_video_stream.swf" /> '+'<param name="quality" value="high" /> '+'<param name="bgcolor" value="#ffffff" /> '+'<embed src="/flash/stream/our_work/our_passion_video_stream.swf" '+'quality="high"'+'bgcolor="#ffffff" '+'width="320" '+'height="250" '+'name="Our Passion Video" '+'align="middle" '+'allowScriptAccess="sameDomain" '+'type="application/x-shockwave-flash" '+'pluginspage="http://www.macromedia.com/go/getflashplayer" />';var d=document.createElement('div');d.style.width='420px';d.style.height='420px';d.style.paddingLeft="40px";d.style.verticalAlign='middle';d.innerHTML=obj;var avd=$('ourWorkVideoDiv');avd.appendChild(d);}
else
{AC_FL_RunContent('codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0','width','320','height','250','src','/flash/stream/our_work/our_passion_video_stream','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','align','middle','play','true','loop','true','scale','showall','wmode','window','devicefont','false','id','Our Work Video','bgcolor','#ffffff','name','Our Work Video','menu','true','allowFullScreen','false','allowScriptAccess','sameDomain','movie','/flash/stream/our_work/our_passion_video_stream','salign','');}}
function showMovie(){var flashMovieSource='/flash/stream/International Recruitment Video8.swf';var avd=$('testimonialVideoDiv');}
function simpleFullTextView(itemId,item){var curPanel=$(itemId+'MCTAContent');if(curPanel.innerHTML==''){var cn=(itemId=='overview')?'Overview':(itemId=='applicationtips')?'ApplicationTips':(itemId=='interviewingtips')?'InterviewTips':(itemId=='visionsandvalues')?'VisionAndValues':(itemId=='compensation')?'Compensation':'';if(itemId=='applicationtips')
getApplicationTips();else
getContentOnly(cn);}
else{finishSimpleFullTextViewLoad();}}
function finishSimpleFullTextViewLoad(description){if(description!=null){var curDiv=Builder.node('div',{style:contentItemDiv},'');var curText1=Builder.node('div',{style:spanText+';top:0px;color:#666;'},'');curText1.innerHTML=description;curDiv.appendChild(curText1);$(lastItem+'MCTAContent').appendChild(curDiv);}
if((lastItem!='compensation')&&(lastItem!='overview')&&(lastItem!='applicationtips')){$('mainContentControlWrapper').morph({left:'514px'},{duration:0.3,queue:{scope:'hideScope',position:'end'}});mcScroller.slider.setValue(0,0);}
else if(lastItem=='applicationtips'){atccScroller.slider.setValue(0,0);$('atContentControlWrapper').morph({left:'514px'},{duration:0.3,queue:{scope:'hideScope',position:'end'}});}
else if(lastItem=='visionsandvalues'){vvccScroller.slider.setValue(0,0);$('vvContentControlWrapper').morph({left:'514px'},{duration:0.3,queue:{scope:'hideScope',position:'end'}});}}
function finishAddApplicationTips(){var curDiv=$('applicationtipsMCTAContent');var curItem;var cq,question,answer;var c;var cqWrapper=Builder.node('div',{style:spanQuestion+';top:0px;width:495px;color:#840c2c;cursor:pointer;'},'');cqWrapper.id='questionsWrapper';var altItem=';top:0px;width:495px;color:maroon;cursor:pointer;background-color:#EAEAEA';var regItem=';top:0px;width:495px;color:#666;cursor:pointer;';hrLine=Builder.node('div',{style:spanText+';width:495px;color:#000;'},'');hrLine.innerHTML='<hr>';curDiv.appendChild(hrLine);for(var i=0;i<applicationTips.length;i++){curItem=applicationTips[i];c=curItem.question;question=Builder.node('div',{style:spanQuestion+';width:495px;color:#5883AD'},c);question.id='question'+curItem.number;answer=Builder.node('div',{style:spanText+';width:495px;color:#000;'},'');hrLine=Builder.node('div',{style:spanText+';width:495px;color:#000;'},'');answer.innerHTML=curItem.answer;hrLine.innerHTML='<hr>';curDiv.appendChild(question);curDiv.appendChild(answer);curDiv.appendChild(Builder.node('div',{style:spanText+';height:14px;width:495px;color:#000;'},''));curDiv.appendChild(hrLine);}}
function moQuestion(e){var item=(e.srcElement!=null)?e.srcElement:e.target;var ii=item.id.gsub('questionLink','');var il=parseInt(ii)%2;item.style.color=(e.type=='mouseover')?'#e68e19':(il==0)?'maroon':'#666';}
function workEnvironmentView(itemId){var psc=(itemId=='peoplestrategy')?$('peoplestrategyMCTAContent'):$('workenvironmentMCTAContent');if(psc.innerHTML==''){if(itemId=='peoplestrategy')
getPeopleStrategyContent();else
getWorkEnvironmentContent();}
else{finishWorkEnvironmentViewLoad();}}
function finishWorkEnvironmentViewLoad(description,topImages){var psImages=[];var psTopImages=[];if(topImages==null)
psTopImages=loadedImages.findAll(function(n){return n.id.indexOf(lastItem)>-1});else
psTopImages=topImages;var cur;if(lastWindow=='peoplestrategy'){for(var i=0;i<testimonials.length;i++){cur=$('pmImage'+i);cur.src=testimonials[i].thumbnail;cur.style.display='inline';cur.style.cursor='pointer';cur.style.width='84px';}
psImages=testimonials;var twidth=testimonials.length*110;$('pmImageList').style.width=twidth+'px';$('pmTrack').style.width='506px';pmScroller=new Control.Scroller('pmImageList','pmHandle','pmTrack',{visibleWidth:506,axis:'horizontal'},false);}
else{$('pmImage0').style.width='84px';for(var i=0;i<5;i++){cur=$('pmImage'+i);cur.src=psTopImages[i].thumbnail;cur.style.display='inline';cur.style.cursor='pointer';psImages.push(psTopImages[i]);}
for(var i=0;i<5;i++){cur=$('topImage'+i);cur.src=psTopImages[i+5].thumbnail;cur.style.display='inline';}}
var til=$('topImageList');if(psTopImages.length<5)
til.style.left=(psTopImages.length==4)?'60px':(psTopImages.length==3)?'116px':(psTopImages.length==2)?'158px':'212px';else
til.style.left='14px';if(lastWindow=='workenvironment')
til.style.left='14px';var psc=(lastItem=='peoplestrategy')?$('peoplestrategyMCTAContent'):$('workenvironmentMCTAContent');if(psc.innerHTML==''){var curDiv;if(lastItem=='peoplestrategy')
curDiv=Builder.node('div',{style:contentItemDiv},'');else
curDiv=Builder.node('div',{style:contentItemDiv+';top:110px;'},'');var curText1=Builder.node('span',{style:spanText},'');curText1.innerHTML=description;curDiv.appendChild(curText1);psc.appendChild(curDiv);}
var cul=$('pmImageList');var fli=$('fullLargeImage');fli.src='../images/careers/spacer.gif';fli.style.display='block';fli.style.borderWidth='4px'
var li=$('largeImage');li.src='../images/careers/spacer.gif'
li.style.display='block';li.style.borderWidth='0px'
var cfb=$('closeFPEButton');cfb.style.left='-30px';cfb.style.top='29px';$('pictureExpandPanel').style.height='451px';cul.morph({left:'14px',top:'4px'},{duration:0.8,queue:{scope:'hideScope',position:'end'}});var pmc=$('pictureMenuContent');pmc.style.height='104px';var topValue=(lastWindow=='peoplestrategy')?'360px':'380px';pmc.morph({top:topValue},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});if(lastItem=='workenvironment')
$('topPictureMenu').morph({top:'-1px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});if(psImages.length<=5){var leftValue=(psImages.length==5)?14:400-(psImages.length*84);cul.morph({left:leftValue+'px',top:'4px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});$('pmControlWrapper').morph({top:'122px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});}
else{cul.morph({left:'14px',top:'4px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});$('pmControlWrapper').morph({top:'106px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});}}
var accordionLoaded=false;var bottomAccordion;var ngrSLScroller,oSLScroller,ceiSLSCroller,spSLScroller,cfSLScroller;function studentLoungeView(itemId){var cch=$(itemId+'MCTAContent');cch.style.display='block';if(!accordionLoaded){bottomAccordion=new accordion('horizontal_container',{classNames:{toggle:'horizontal_accordion_toggle',toggleActive:'horizontal_accordion_toggle_active',content:'horizontal_accordion_content'},defaultSize:{width:197},onEvent:'mouseover',direction:'horizontal'});bottomAccordion.activate($$('#horizontal_container .horizontal_accordion_toggle')[0]);accordionLoaded=true;}
if(studentLoungeItems.length==0)
getStudentLoungeContent();else
finishStudentLoungeLoad();}
function finishStudentLoungeLoad(items){var curItem;if(items!=null){for(var i=0;i<items.length;i++){curItem=items[i];if(curItem.subtitle=='Overview'){$('overviewContent').innerHTML=curItem.description;}
else if(curItem.subtitle=='New Graduate Recruitment'){$('ngrContent').innerHTML=curItem.description;}
else if(curItem.subtitle=='Cooperative Education & Internships'){$('ceiContent').innerHTML=curItem.description;}
else if(curItem.subtitle=='Summer Placements'){$('spContent').innerHTML=curItem.description;}
else if(curItem.subtitle=='Career Fairs'){$('cfContent').innerHTML=curItem.description;}}}
if(ngrSLScroller==null)
ngrSLScroller=new Control.Scroller('ngrContent','ngrslccHandle','ngrslccTrack',{visibleHeight:346,delta:5},false);if(oSLScroller==null)
oSLScroller=new Control.Scroller('overviewContent','oslccHandle','oslccTrack',{visibleHeight:346,delta:5},false);if(ceiSLSCroller==null)
ceiSLSCroller=new Control.Scroller('ceiContent','ceislccHandle','ceislccTrack',{visibleHeight:346,delta:5},false);if(spSLScroller==null)
spSLScroller=new Control.Scroller('spContent','spslccHandle','spslccTrack',{visibleHeight:346,delta:5},false);if(cfSLScroller==null)
cfSLScroller=new Control.Scroller('cfContent','cfslccHandle','cfslccTrack',{visibleHeight:346,delta:5},false);}
function moveScroller(item1,item2,item3,item4,item5){item1.style.top='10px';item2.style.top='560px';item3.style.top='560px';item4.style.top='560px';item5.style.top='560px';}
function runStudentLoungeUpdate(item){var i=0;var slc=$('slContent');var itemId=item.id;var leftValue;var leftTitleValue;if(itemId=='accordionPane1Header'){leftValue='-30px';leftTitleValue='0px';moveScroller($('oslContentControlWrapper'),$('ngrslContentControlWrapper'),$('ceislContentControlWrapper'),$('spslContentControlWrapper'),$('cfslContentControlWrapper'));}
else if(itemId=='accordionPane2Header'){leftValue='-530px';leftTitleValue='-500px';moveScroller($('ngrslContentControlWrapper'),$('oslContentControlWrapper'),$('ceislContentControlWrapper'),$('spslContentControlWrapper'),$('cfslContentControlWrapper'));}
else if(itemId=='accordionPane3Header'){leftValue='-1030px';leftTitleValue='-1000px';moveScroller($('ceislContentControlWrapper'),$('ngrslContentControlWrapper'),$('oslContentControlWrapper'),$('spslContentControlWrapper'),$('cfslContentControlWrapper'));}
else if(itemId=='accordionPane4Header'){leftValue='-1530px';leftTitleValue='-1500px';moveScroller($('spslContentControlWrapper'),$('ngrslContentControlWrapper'),$('ceislContentControlWrapper'),$('oslContentControlWrapper'),$('cfslContentControlWrapper'));}
else{leftValue='-2030px';leftTitleValue='-2000px';moveScroller($('cfslContentControlWrapper'),$('ngrslContentControlWrapper'),$('ceislContentControlWrapper'),$('spslContentControlWrapper'),$('oslContentControlWrapper'));}
Effect.Queues.get('hideScope').each(function(e){e.cancel()});slc.morph({left:leftValue},{duration:0.8,queue:{scope:'hideScope',position:'end'}});$('slImagePanel').morph({top:leftTitleValue},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});}
var wcsvItemId='';function whyChooseStantecView(itemId,itemArray){var cch=$(itemId+'MCTAContent');var cn,titleIndex;wcsvItemId=itemId;if(itemId=='diversity'){$('dContentControlWrapper').morph({left:'514px'},{duration:0.8,queue:{scope:'hideScope',position:'end'}});dccScroller.slider.setValue(0,0);cn="Diversity";titleIndex="diversity";}
else if(itemId=='whychoosestantec'){$('tqContentControlWrapper').morph({left:'514px'},{duration:0.8,queue:{scope:'hideScope',position:'end'}});tqccScroller.slider.setValue(0,0);cn="WhyChooseStantec";titleIndex="whychoosestantec";}
else if(itemId=='learning'){$('lContentControlWrapper').morph({left:'514px'},{duration:0.8,queue:{scope:'hideScope',position:'end'}});lccScroller.slider.setValue(0,0);cn="Learning";titleIndex="learning";}
else if(itemId=='benefits'){$('bContentControlWrapper').morph({left:'514px'},{duration:0.8,queue:{scope:'hideScope',position:'end'}});bccScroller.slider.setValue(0,0);cn="Benefits";titleIndex="benefits";}
else if(itemId=='professionaldevelopment'){cn="ProfessionalDevelopment";titleIndex="professionaldevelopment";}
if(cch.innerHTML==''){getContentWithImages(cn);}
else{curImageList.clear();curImageList=loadedImages.findAll(function(n){return n.id.indexOf(cn)>-1});finishWhyChooseStantecView();}}
function setHeader(){var cn='One Team. Infinite Opportunities';if(lastItem=='diversity')
cn="Diversity";else if(lastItem=='whychoosestantec')
cn="Why Choose Stantec?";else if(lastItem=='learning')
cn="Learning";else if(lastItem=='benefits')
cn="Benefits";else if(lastItem=='professionaldevelopment')
cn="Professional Development";else if(lastItem=='studentlounge')
cn="Student Lounge";else if(lastItem=='peoplestrategy')
cn="People Strategy";else if(lastItem=='compensation')
cn="Compensation";else if(lastItem=='workenvironment')
cn="Work Environment";else if(lastItem=='visionsandvalues')
cn="Vision &amp; Values";else if(lastItem=='applicationtips')
cn="Application Tips";else if(lastItem=='interviewingtips')
cn="Interview Tips";$('mainHeaderText').innerHTML=cn;}
function finishWhyChooseStantecView(itemDescription){var curDiv,curText1;if(itemDescription!=null){curDiv=Builder.node('div',{style:contentItemDiv},'');curText1=Builder.node('div',{style:spanText+';top:0px;'},'');curText1.innerHTML=itemDescription;curDiv.appendChild(curText1);$(lastItem+'MCTAContent').appendChild(curDiv);}
else{curImageList}
var cur;if(lastItem=='whychoosestantec'){var cur=$('pmImage0');cur.style.display='inline';cur.style.cursor='default';cur.style.width='488px';cur.src=curImageList[0].thumbnail;$('pmControlWrapper').morph({top:'122px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});$('pmImageList').morph({left:'14px',top:'14px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});for(var i=1;i<11;i++)
$('pmImage'+i).style.display='none';}
else{$('pmImage0').style.width='84px';for(var i=0;i<curImageList.length;i++){cur=$('pmImage'+i);cur.src=curImageList[i].thumbnail;cur.style.cursor='default';cur.style.display='inline';}
var j=0;for(var i=curImageList.length;i<10;i++){cur=$('pmImage'+i);cur.src='';cur.style.display='none';j++;}
var cul=$('pmImageList');var li=$('largeImage');li.src='../images/careers/spacer.gif'
li.style.borderWidth='4px'
li.style.display='block';var imagesLength=curImageList.length;if(imagesLength<=5){var leftValue=(imagesLength==5)?14:(imagesLength==4)?400-(imagesLength*84):(imagesLength==3)?120:(imagesLength==2)?154:194;cul.morph({left:leftValue+'px',top:'14px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});$('pmControlWrapper').morph({top:'122px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});}
else{cul.morph({left:'14px',top:'4px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});$('pmControlWrapper').morph({top:'106px'},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});}}
var topValue='360px';var pmp=$('pictureMenuContent');pmp.morph({top:topValue},{duration:0.8,queue:{scope:'hideScope',position:'with-last'}});}
function closeLargeImagePanel(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if(item==null){item=e;if(e==null)return;}
if((item.id!='closePEButton')||(item.id!='closeFPEButton')){if(lastWindow=='whychoosestantec'){var pep=$('pictureExpandPanel');pep.morph({top:'490px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});$('closePEButton').morph({top:'490px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});}
else if((lastWindow=='workenvironment')||(lastWindow=='peoplestrategy')){if(lastWindow=='peoplestrategy'){var tp=$('testimonialPanel');if(tp.style.left!='-1024px'){tp.morph({left:'-1024px'},{duration:0.8,queue:{scope:'move2Scope',position:'end'}});$('oContentControlWrapper').morph({top:'490px'},{duration:0.8,queue:{scope:'hideScope',position:'end'}});}
if(lastImageId.indexOf('pm')>-1){var pep=$('pictureExpandPanel');pep.morph({top:'490px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});$('closePEButton').morph({top:'490px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});}}
var fpep=$('fullPictureExpandPanel');fpep.morph({left:'-530px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});$('closeFPEButton').morph({left:'-30px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});}}}
function showLargeImagePanel(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if((item.id=='pmImageList')||(item.id=='topImageList'))return;if((lastItem=='whychoosestantec')||(lastItem=='diversity')||(lastItem=='benefits')||(lastItem=='learning')||(lastItem=='professionaldevelopment'))return;var curItem=$(item.id);if(lastWindow=='whychoosestantec'){var pep=$('pictureExpandPanel');if((pep.style.top=='490px')||(pep.style.top=='')){var bc=(lastWindow=='overview')?'#d6e4ee':'#BED5E4';pep.morph({top:'28px',backgroundColor:bc},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});$('closePEButton').morph({top:'29px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});}
else{new Effect.Opacity($('largeImage'),{from:1,to:0.0,duration:0.5,queue:{scope:'pmPictureScope',position:'front'}});}}
else if((lastWindow=='workenvironment')||((lastWindow=='peoplestrategy')&&(item.id.indexOf('topImage')>-1))){var fpep=$('fullPictureExpandPanel');if((fpep.style.left=='-530px')||(fpep.style.left=='')){new Effect.Opacity($('fullLargeImage'),{from:1,to:0.0,duration:0.01,queue:{scope:'pmPictureScope',position:'front'}});fpep.morph({left:'224px'},{duration:1.0,queue:{scope:'move2Scope',position:'with-last'}});$('closeFPEButton').morph({left:'730px'},{duration:1.0,queue:{scope:'move2Scope',position:'with-last'}});}}
else if((lastWindow=='peoplestrategy')&&(item.id.indexOf('pm')>-1)){var pep=$('pictureExpandPanel');if((pep.style.top=='490px')||(pep.style.top=='')){var bc=(lastWindow=='peoplestrategy')?'#d6e4ee':'#BED5E4';pep.morph({top:'29px',backgroundColor:bc},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});$('closePEButton').morph({top:'29px'},{duration:0.8,queue:{scope:'move2Scope',position:'with-last'}});}
var tp=$('testimonialPanel');tp.morph({left:'-1024px'},{duration:0.5,queue:{scope:'move2Scope',position:'with-last'}});var imageIdStart=item.src.indexOf('Careers%20Images/')+17;var imageIdEnd=item.src.indexOf('__.jpg');var imageId=item.src.substring(imageIdStart,imageIdEnd);setTestimonial(imageId);}
$('imageHolder').src=curItem.src.gsub('__.jpg','_.jpg');lastImageId=item.id;setTimeout('finishShowLargeImagePanel()',500);}
var lastImageId;function finishShowLargeImagePanel(){var showTestimonial=((lastWindow=='peoplestrategy')&&(lastImageId.indexOf('pm')>-1));addImageMargins(showTestimonial);var li;if(showTestimonial){li=$('largeImage');li.src=$('imageHolder').src;new Effect.Opacity(li,{from:0.0,to:0.1,duration:1.0,queue:{scope:'pmPictureScope',position:'end'}});showedLargeImage=true;var occw=$('oContentControlWrapper');if(occw.style.top!='52px')occw.morph({top:'52px'},{duration:0.8,queue:{scope:'pmPictureScope',position:'with-last'}});occScroller.slider.setValue(0,0);var tp=$('testimonialPanel');tp.morph({left:'225px'},{duration:1.0,queue:{scope:'pmPictureScope',position:'with-last'}});}
else if(lastWindow=='whychoosestantec'){li=$('largeImage');li.src=$('imageHolder').src;if(showedLargeImage)
new Effect.Opacity(li,{from:0.0,to:1.0,duration:1.0,queue:{scope:'pmPictureScope',position:'end'}});showedLargeImage=true;}else if((lastWindow=='workenvironment')||((lastWindow=='peoplestrategy')&&(lastImageId.indexOf('topImage')>-1))){li=$('fullLargeImage');li.src=$('imageHolder').src;if(showedLargeImage)
new Effect.Opacity(li,{from:0.0,to:1.0,duration:1.0,queue:{scope:'pmPictureScope',position:'end'}});else
new Effect.Opacity(li,{from:0.0,to:1.0,duration:1.0,queue:{scope:'pmPictureScope',position:'end'}});showedLargeImage=true;}}
function setTestimonial(personId){var testimonialItem=testimonials.findAll(function(n){return n.name==personId});if(testimonialItem[0]!=null){var tp=$('testimonialPanel');tp.innerHTML='';var item=testimonialItem[0];var curDiv=Builder.node('div',{style:contentItemDiv+';left:4px;'},'');var curHeaderText=Builder.node('div',{style:spanTextHeader+';left:10px;width:480px;color:blue;text-align:center;color:#840c2c;font-size:10pt;'},item.name);curDiv.appendChild(curHeaderText);curDiv.appendChild(Builder.node('div',{style:spanText+';height:7px;left:10px;width:480px;color:#000;'},''));var question,answer;for(var i=0;i<questions.length;i++){question=Builder.node('div',{style:spanQuestion+';left:10px;width:480px;color:#5883AD'},'');question.innerHTML=questions[i];answer=Builder.node('div',{style:spanText+';left:10px;width:480px;color:#000;'},'');answer.innerHTML=getAnswer(i,item);curDiv.appendChild(question);curDiv.appendChild(answer);curDiv.appendChild(Builder.node('div',{style:spanText+';height:14px;left:10px;width:480px;color:#000;'},''));}
tp.appendChild(curDiv);}}
function getAnswer(i,item){var answer="";if(i==0)answer=item.answer1;else if(i==1)answer=item.answer2;else if(i==2)answer=item.answer3;else if(i==3)answer=item.answer4;else if(i==4)answer=item.answer5;else if(i==5)answer=item.answer6;else if(i==6)answer=item.answer7;else if(i==7)answer=item.answer8;else if(i==8)answer=item.answer9;else if(i==9)answer=item.answer10;return answer;}
function moImageElement(e){var item=(e.srcElement!=null)?e.srcElement:e.target;if((item.id=='pmImageList')||(lastItem=='whychoosestantec')||(lastItem=='learning')||(lastItem=='professionaldevelopment')||(lastItem=='benefits')||(lastItem=='diversity'))return;var curItem=$(item.id);if((e.type=='mouseover')&&(curItem!=null))
curItem.style.borderColor='#BED5E4';else if(curItem!=null)
curItem.style.borderColor='#fff';}
function addImageMargins(st){var ih=$('imageHolder');var iHeight=parseInt(ih.getHeight());var iWidth=parseInt(ih.getWidth());var oimd;if(st){oimd=$('largeImageWrapper');}
else{if(lastWindow=='whychoosestantec')
oimd=$('largeImageWrapper');else if((lastWindow=='workenvironment')||(lastWindow=='peoplestrategy'))
oimd=$('fullLargeImageWrapper');}
var yMargin=Math.round((oimd.offsetHeight-iHeight)/2)-5;var xMargin=Math.round((oimd.offsetWidth-iWidth)/2)-5;oimd.style.margin=yMargin+'px '+xMargin+'px '+yMargin+'px '+xMargin+'px';}
function showFirefoxCdnCareersContent(e){openCareers('Canada');}
function finishShowCDNCContentLoad(){$('cdnCTAContent').innerHTML='<iframe id=\"cdnCareersQuoteFrame\" src=\"http://jobs2-stantec.icims.com\" width=\"745px\" height=\"2000px\" frameborder=\"0\" scrolling=\"no\">'+'<ilayer src=\"http://jobs2-stantec.icims.com\"><a href=\"http://jobs2-stantec.icims.com\">Careers - Canada</a></ilayer></iframe>';$('cdnCTAContent').style.display='block';$('careersBackLink').morph({left:'920px'},{duration:0.4,queue:{scope:'moveScope',position:'end'}});}
function showFirefoxUSCareersContent(e){openCareers('US');}
function finishShowUSFFCContent(){$('usCTAContent').innerHTML='<iframe id=\"sxcQuoteFrame\" src=\"http://jobs-stantec.icims.com\" style=\"\" width=\"745px\" height=\"2000px\" frameborder=\"0\" scrolling=\"no\">'+'<ilayer src=\"http://jobs-stantec.icims.com\"><a href=\"http://jobs-stantec.icims.com\">Careers - US</a></ilayer></iframe>';$('usCTAContent').style.display='block';$('careersBackLink').morph({left:'920px'},{duration:0.4,queue:{scope:'moveScope',position:'end'}});}
function openCareers(ctry){var iLeft=(window.screen.availWidth-760)*0.5;var iTop=(window.screen.availHeight-525)*0.5;var iHeight=(window.screen.availHeight-200);var url="";if(ctry=="Canada"){url="http:/"+"/jobs2-stantec.icims.com/";}else if(ctry=="US"){url="http:/"+"/jobs-stantec.icims.com/";}else if(ctry=="Intl"){url="http:/"+"/jobs-stantec.icims.com/jobs/6850/job";}else{url="http://campusrecruiting-stantec.icims.com/jobs/intro";}
var options="directories=no,toolbar=yes,location=no,status=no,resizable=yes,menubar=yes,scrollbars=yes,width=760,height="+iHeight+",top=50,left="+iLeft;var careerWin=window.open(url,"careerWin",options);}
function showCdnCareersContent(e){openCareers('Canada');}
function showUSCareersContent(e){openCareers('US');}
function showIntlCareersContent(e){openCareers('Intl');}
function moveToItem(e){var item=(e.srcElement!=null)?e.srcElement:e.target;var curItemId=item.id.gsub('Link','');var body=$('applicationtipsMCTAContent');var topText=body.style.marginTop;var topValue=(topText=='')?0:Math.round(parseFloat(topText.gsub('px','')));var contactTop=$(curItemId).offsetTop;scrollStart=Math.abs(topValue);scrollToValue=contactTop;if(scrollStart>scrollToValue)
scrollUp();else
scrollDown();}
function moveSlider(sliderValue){atccScroller.slider.setValue(sliderValue,0);}
function scrollDown(){if((scrollStart+scrollDistance)>scrollToValue){atccScroller.updateView(scrollToValue);moveSlider(scrollToValue);return;}
if(scrollStart<scrollToValue){scrollStart=scrollStart+scrollDistance;atccScroller.updateView(scrollStart);moveSlider(scrollStart);setTimeout('scrollDown()',1);}
else if(scrollStart>=scrollToValue){atccScroller.updateView(scrollStart);moveSlider(scrollStart);}}
function scrollUp(){if((scrollStart-scrollDistance)<scrollToValue){atccScroller.updateView(scrollToValue);moveSlider(scrollToValue);return;}
if(scrollStart>scrollToValue){scrollStart=scrollStart-scrollDistance;atccScroller.updateView(scrollStart);moveSlider(scrollStart);setTimeout('scrollUp()',1);}
else if(scrollStart<=scrollToValue){atccScroller.updateView(scrollStart);moveSlider(scrollStart);}}
function loadFlash(flashFile){movieName=flashFile;var html='<object type="application/x-shockwave-flash" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" '+'  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" '+'  width="508" height="450" style="left:5px;position:absolute;top:-1px;" align="middle">'+'<param name="allowScriptAccess" value="sameDomain" />'+'<param name="movie" value="'+movieName+'" />'+'<param name="wmode" value="transparent" />'+'<param name="scale" value="default" />'+'<param name="quality" value="high" />'+'<param name="bgcolor" value="#CCCCCC" />'+'<param name="menu" value="false" />'+'<embed id="flashPlayer" src="'+movieName+'" name="flashPlayer" allowScriptAccess="sameDomain" '+'   type="application/x-shockwave-flash" scale="default" quality="high" wmode="transparent" menu="false" pluginspage="http://www.adobe.com/go/getflashplayer" '+'   quality="high" bgcolor="#333" scale="default" width="508" height="450" align="middle" style="top:0px;left:5px;z-index:5;" />'+'</object>';createFlashContainer(html);}
function unloadFlash(){if(isFlashLoaded()){new Effect.Appear($('contentSpinner'),{duration:0.4,queue:{scope:'hideScope',position:'end'}});var flashContainer=$('flashdiv');if(flashContainer.parentNode)
{flashContainer.parentNode.removeChild(flashContainer);}
new Effect.Event({delay:1.0,duration:0.0,beforeUpdate:function()
{$('mainContentTextArea').style.visibility='visible';new Effect.Fade($('contentSpinner'),{duration:1.4,queue:{scope:'hideScope',position:'end'}});}});}}
function isFlashLoaded(){var fd=$('flashdiv');if(fd==undefined)
return false;else if(fd==null)
return false;else
return true;}
function createFlashContainer(html){var flashContainer=$('flashdiv');if(!isFlashLoaded()){var mccw=$('mainContentControlWrapper');if(mccw.style.left!='530px'){mccw.morph({left:'530px'},{duration:0.4,queue:{scope:'initScope',position:'end'}});}
flashContainer=document.createElement('div');flashContainer.setAttribute("id","flashdiv");flashContainer.setAttribute("align","center");flashContainer.setAttribute("z-index","10");var mctaDiv=$('mainContentTextArea').parentNode;mctaDiv.appendChild(flashContainer);}
$('mainContentTextArea').style.visibility='hidden';flashContainer.innerHTML=html;return flashContainer;}
﻿var titlePrefix="Stantec";var State=Class.create();State.prototype={itemId:null,itemName:null,initialize:function(itemId,itemName)
{this.itemId=itemId;this.itemName=itemName;},copy:function(other)
{this.itemId=other.itemId;this.itemName=other.itemName;},getName:function()
{if(this.itemName==null)
return"Stantec Careers";return this.itemName;},getHashKey:function()
{return this.itemId;}}
var currentState=null;var isRefreshingFromHistory=false;Event.observe(window,'load',function()
{});function initialize()
{dhtmlHistory.addListener(handleHistoryChange);if(dhtmlHistory.isFirstLoad())
{firstLoad=true;}
if(dhtmlHistory.getCurrentLocation())
{currentState=getStateFromLocation(dhtmlHistory.getCurrentLocation());setTitle();dhtmlHistory.addListener(handleHistoryChange);}
if(currentState==null)
{currentState=new State();}
else
{handleHistoryChange('careers_'+currentState.itemId,currentState);}}
function getStateFromLocation(location)
{if(location)
{var str=null;if(location.indexOf('careers_')>-1)
{str=location.replace('careers_','');}
if(str)
{var state=new State();state.itemId=str;if($(str))
state.itemName=$(str).innerHTML;return state;}
return null;}
return null;}
function handleHistoryChange(newLocation,historyData){var histState=historyData;if((newLocation!=null)&&(histState==null))
{histState=getStateFromLocation(newLocation);}
if(histState)
{var state=null;if(newLocation)
{state=getStateFromLocation(newLocation);}
if(currentState==null)
currentState=new State();currentState.copy(histState);setTitle();if(dhtmlHistory.isInternetExplorer()){addToTitle(window.document.title);}
isRefreshingFromHistory=true;if(state.itemId!=currentState.itemId)
{currentState.copy(state);}
e=new Object();e.srcElement=$(currentState.itemId);if(!e.srcElement)
{showContent(null);}
else
{unloadFlash();showContent(e);}
setTitle();}}
function sendCurrentStateToHistory(){if(currentState==null)
return;addToTitle(window.document.title);if(currentState.itemId)
{dhtmlHistory.add('careers_'+currentState.itemId,currentState);}}
function addToTitle(title){var historyFrame=document.getElementById("DhtmlHistoryFrame");if(historyFrame){var title='';if((currentState==null)||(currentState.getName()==null))
{title=titlePrefix;}
else
{title=titlePrefix+' - '+stripTitle(currentState.getName());}
historyFrame.title=stripTitle(title);historyFrame.document.title=stripTitle(title);}}
function stripTitle(title){if(title){var sTitle=title.replace('<br>',' ');sTitle=sTitle.replace('<BR>',' ');sTitle=sTitle.replace('&amp;','&');return sTitle;}
return titlePrefix;}
function setTitle(){var titleObj=null;if(window.parent)
{titleObj=window.parent.document;}
else
{titleObj=window.document;}
if((currentState==null)||(currentState.getName()==null))
{titleObj.title=titlePrefix+" - Careers";}
else
{titleObj.title=titlePrefix+' - '+stripTitle(currentState.getName());}}