﻿
function isLegacyBrowser()
{if(typeof legacyBrowser!="undefined"&&legacyBrowser==true)return true;else return false;}
var activePayGroupTab;var activeFreeGroupTab;function tab_onactive(target)
{if(target.id=="tabAbout4DSystems")
{if(isMoreInfoActive)
{isMoreInfoActive=false;$('trAbout4DSystems').style.display="none";if(isLegacyBrowser())
{$('trMainRow').style.display="block";}
else
{$('trMainRow').style.display="table-row";}
KlarityInc.WebControls.Tab.setTabGroupActive("tabAbout4DSystems",false,true);var a=activePayGroupTab;var b=activeFreeGroupTab;if(a)
KlarityInc.WebControls.Tab.setActive(a,true);else
KlarityInc.WebControls.Tab.setActive("tabPayAssess",true,true);if(b)
KlarityInc.WebControls.Tab.setActive(b,true);else
KlarityInc.WebControls.Tab.setActive("tabFreeAssess",true,true);}
else
{isMoreInfoActive=true;LoadMoreInfoContent(String.format("AboutTheAuthorFAQs-{0}.txt",UIC));}}
else
{isMoreInfoActive=false;$('trAbout4DSystems').style.display="none";$('trMainRow').style.display="";$('FlashBookPanel').style.display="";KlarityInc.WebControls.Tab.setActive("tabAbout4DSystems",false);if(target.getAttribute("tabgroup")=="payGroup")
activePayGroupTab=target;if(target.getAttribute("tabgroup")=="freeGroup")
activeFreeGroupTab=target;if(activePayGroupTab)
{if(target!=activePayGroupTab)
KlarityInc.WebControls.Tab.setActive(activePayGroupTab,true);}
else
{KlarityInc.WebControls.Tab.setActive("tabPayWorkshops",true,true);}
if(activeFreeGroupTab)
{if(target!=activeFreeGroupTab)
KlarityInc.WebControls.Tab.setActive(activeFreeGroupTab,true);}
else
{KlarityInc.WebControls.Tab.setActive("tabFreeDiagnose",true,true);}
if(target.id=="tabFreeDiagnose")
{$('imgTryItNow').style.display="";}
else if(target.id=="tabFreeAssess"||target.id=="tabFreeWorkshops")
{$('imgTryItNow').style.display="none";}}
target.style.fontWeight="bold";}
function tab_oninactive(target)
{target.style.fontWeight="";}
function tab_onmouseenter(target)
{target.style.fontWeight="bold";}
function tab_onmouseleave(target)
{target.style.fontWeight="";}
var assessmentRequest=null;var isMoreInfoActive=false;function $alert(message)
{var lblMessage=document.createElement("LABEL");$(lblMessage).update(message);$(AlertDialog.contentElement).update(lblMessage);AlertDialog.setVisible(true);InfoDialog.setVisible(false);}
var delay=8000;function $info(message)
{if(InfoDialog.containerElement.style.display!="none")
{window.setTimeout(function()
{$info(message);},1000)
return;}
window.isInfoMsgVisible=true;var lblMessage=document.createElement("LABEL");$(lblMessage).update(message);$(InfoDialog.contentElement).update(lblMessage);AlertDialog.setVisible(false);InfoDialog.setVisible(true);window.setTimeout(function()
{$('InfoDialog').fade();},delay);}
function HideDialogs()
{InfoDialog.setVisible(false);AlertDialog.setVisible(false);}
var runningServies=[];function GenericWebService_onfailure(err,passthru)
{if(passthru&&passthru.runningService)
runningServies.pop(passthru.runningService);var message=err.get_message();if(message.split('|')[0]=="OK")
{$info(message.split('|')[1]);return;}
if(message.indexOf("Principal must be of type BusinessPrincipal, not System.Security.Principal.WindowsPrincipal")!=-1)
{$alert("Your session has timed out. Please log in to resume.");return;}
$alert(message);}
function flashbook_onclick()
{new Ajax.Updater('BuyTheBookPlaceholder',String.format('content/text/BuyTheBook-{0}.txt',UIC),{method:'get'});$('BuyTheBookDialog').appear();}
function loadContentDialog(docName,link,successDelegate)
{if(typeof successDelegate=="undefined")
{successDelegate=null;}
new Ajax.Updater('contentDialogPlaceholder',String.format('content/text/{0}-{1}.txt',docName,UIC),{method:'get',onSuccess:successDelegate});var dialogHeader=$('contentDialog').select("H3")[0];if(link==window)
dialogHeader.update("&#160;");else
dialogHeader.update($(link).innerHTML);$('contentDialogPlaceholder').scrollTop=0;$('contentDialog').style.display="block";}
function LoadPreferredMemberDialog(link)
{PreferredMemberDialog.Center();PreferredMemberDialog.setTop("100px");PreferredMemberDialog.setVisible(true);}
function LoadMoreInfoContent(fileName)
{new Ajax.Updater('divAboutAuthor','content/text/'+fileName,{method:'get'});if($('trAbout4DSystems').style.display=="")return;$('trAbout4DSystems').style.display="";$('trMainRow').style.display="none";var payGroupCollection=$$("TABLE[tabgroup=payGroup]");var freeGroupCollection=$$("TABLE[tabgroup=freeGroup]");payGroupCollection.each(function(el)
{if(el._active&&el._active==true)activePayGroupTab=el;});freeGroupCollection.each(function(el)
{if(el._active&&el._active==true)activeFreeGroupTab=el;});KlarityInc.WebControls.Tab.setTabGroupActive("tabPayAssess",false,true);KlarityInc.WebControls.Tab.setTabGroupActive("tabFreeAssess",false,true);KlarityInc.WebControls.Tab.setTabGroupActive("tabAbout4DSystems",true,true);}
var tweets=null;function ShowAllTweets()
{var tweetContent="";var maxlen=Math.min(tweets.length,8);for(var i=0;i<maxlen;i++)
{var tweet=tweets[i];tweetContent+=tweet.text+"<br/><span style='color: gray;'>"+String.format("Posted: {0}",tweet.created_at.split(' +')[0])+"</span><br/><br/>";}
$('lblLatestTweet').innerHTML=tweetContent;}
var isLoggedIn=false;var My4D_ActiveWindow=null;function DisplaySlidingPanel(targetWindow)
{if(isLegacyBrowser())
{LegacyBrowserDialog.setVisible(true);return;}
$('MB_overlay').style.display="block";if(My4D_ActiveWindow)
{Effect.SlideUp(My4D_ActiveWindow,{afterFinish:function()
{Effect.SlideDown(targetWindow);My4D_ActiveWindow=targetWindow;$('stuff').style.display="block";$('divPasswordRecovery').style.display='none';}});}
else
{Effect.SlideDown(targetWindow);My4D_ActiveWindow=targetWindow;}}
function RecoverPassword()
{Effect.SlideUp('My4D_LoginWindow',{afterFinish:function()
{$('stuff').style.display="none";$('divPasswordRecovery').style.display='block';Effect.SlideDown('My4D_LoginWindow');}});}
var My4D={Close:function(delegate)
{if(My4D_ActiveWindow)
{Effect.SlideUp(My4D_ActiveWindow,{afterFinish:function()
{My4D_ActiveWindow=null;$('MB_overlay').style.display="none";if(typeof delegate=="function")
delegate();}});}},Login:function()
{PortalServices.Login($('LoginEmail').value,$('LoginPassword').value,function(result,passthru)
{isLoggedIn=true;if(!assessmentRequest)
assessmentRequest=new AssessmentRequest();assessmentRequest.Contact={};assessmentRequest.Contact.portalUser=result;assessmentRequest.Contact.EmailAddress=result.Email;My4D.Close(function()
{$('LoginEmail').value="";$('LoginPassword').value="";});$info('Welcome back, '+result.FirstName);LoginResult();},GenericWebService_onfailure);},ShowNetworkMemberWizardPage1:function()
{DisplaySlidingPanel('My4D_NetworkMemberWizardPage1');},ShowNetworkMemberWizardPage2:function()
{DisplaySlidingPanel('My4D_NetworkMemberWizardPage2');},ShowNetworkMemberWizardPage3:function()
{DisplaySlidingPanel('My4D_NetworkMemberWizardPage3');},ShowNetworkMemberWizardPage4:function()
{DisplaySlidingPanel('My4D_NetworkMemberWizardPage4');},ShowNetworkMemberWizardPage5:function()
{DisplaySlidingPanel('My4D_NetworkMemberWizardPage5');},ConfirmNetworkMemberRegistration:function()
{var companyName=$('txtCompanyName').value;if(companyName=="")
{$alert("Company Name is required for registration.");return;}
PortalServices.AddNetworkMember(companyName,function()
{alert("Done");});},ShowContactInfo:function(infoSectionId,linkData)
{if(!assessmentRequest)
assessmentRequest=new AssessmentRequest();if(typeof infoSectionId!="undefined")
{assessmentRequest.InformationSection=infoSectionId;}
if(typeof linkData!="undefined")
{assessmentRequest.linkData=linkData;}
DisplaySlidingPanel('My4D_CountryContactInfo');},ShowRegistration:function(infoSectionId,linkData)
{if(!assessmentRequest)
assessmentRequest=new AssessmentRequest();if(typeof infoSectionId!="undefined")
{assessmentRequest.InformationSection=infoSectionId;}
if(typeof linkData!="undefined")
{assessmentRequest.linkData=linkData;}
DisplaySlidingPanel('My4D_AffiliationWindow');},LinkAction:function(infoSectionId,hyperlink,linkData)
{if(typeof infoSectionId=="undefined")
{$alert("LinkAction failed. InformationSection Id is undefined");return;}
if(isLoggedIn)
{My4D.SelectView(infoSectionId,null,linkData);}
else
{My4D.ShowLogin(infoSectionId,linkData,hyperlink.innerHTML);}},ShowLogin:function(infoSectionId,linkData,hyperlinkText)
{if(!assessmentRequest)
assessmentRequest=new AssessmentRequest();if(typeof infoSectionId!="undefined")
{assessmentRequest.InformationSection=infoSectionId;}
assessmentRequest.linkData=(typeof linkData=="undefined")?null:linkData;DisplaySlidingPanel('My4D_LoginWindow');},SelectContactInfo:function(affiliation)
{if(window.contactInfoBox)
{window.contactInfoBox.style.display='none';}
window.contactInfoBox=$('divContactInfo_'+affiliation.Name);contactInfoBox.style.display='block';ContactWindowDialog.setVisible(true);this.Close();},CloseContactInfo:function()
{window.contactInfoBox.style.display="none";window.contactInfoBox=null;ContactWindowDialog.setVisible(false);},SetAffiliation:function(affiliation)
{$('divFieldCenter').style.display="none";$('divOtherCountry').style.display="none";if(affiliation==Affiliation.NASA)
{assessmentRequest.Contact=new NASAContact();$('ddlFieldCenter').selectedIndex=0;$('divFieldCenter').style.display="block";}
else if(affiliation==Affiliation.OTHER)
{assessmentRequest.Contact=new OtherContact();$('divOtherCountry').style.display="block";}
else
{assessmentRequest.Contact=new Contact();}
assessmentRequest.Contact.Affiliation=affiliation;DisplaySlidingPanel('My4D_RegisterWindow');},ResendLoginEmail:function()
{if(runningServies.indexOf(this.ResendLoginEmail)!=-1)return;runningServies.push(this.ResendLoginEmail);PortalServices.ResendLoginEmail(assessmentRequest.Contact.EmailAddress,function(result,passthru)
{runningServies.pop(passthru.runningService);$info("Login email sent successfully");},GenericWebService_onfailure,{runningService:this.ResendLoginEmail});},Register:function()
{if($('txtFirstName').value=="")
{$alert("First Name is required for registration");return;}
if($('txtLastName').value=="")
{$alert("Last Name is required for registration");return;}
if($('txtEmailAddress').value=="")
{$alert("Email Address is required for registration");return;}
if($('txtPassword').value=="")
{$alert("Password is required for registration.");return;}
if($('txtPassword').value!=$('txtPasswordMatch').value)
{$alert("The password and its confirmation field do not match");return;}
if(assessmentRequest.Contact instanceof NASAContact)
{if($('ddlFieldCenter').selectedIndex==0)
{$alert("NASA Location is required for those with a NASA affiliation");return;}}
if(assessmentRequest.Contact instanceof OtherContact)
{if($('txtOtherCountryName').value=="")
{$alert("Country Name is required for registration");return;}}
if($('txtPhone').value!="")
{var pval=$('txtPhone').value;var raw=pval.replace(/-/g,'');if(isNaN(raw))
{$alert("Phone may only contain hyphens and numeric digits");return;}}
assessmentRequest.Contact.FirstName=$('txtFirstName').value;assessmentRequest.Contact.LastName=$('txtLastName').value;assessmentRequest.Contact.EmailAddress=$('txtEmailAddress').value;assessmentRequest.Contact.Phone=$('txtPhone').value;var Password=$('txtPassword').value;var FieldCenterText=null;if(assessmentRequest.Contact.FieldCenter!=null)
{assessmentRequest.Contact.FieldCenter=$('ddlFieldCenter').value;FieldCenterText=$('ddlFieldCenter')[$('ddlFieldCenter').selectedIndex].firstChild.nodeValue;}
if(assessmentRequest.Contact.CountryName!=null)
{assessmentRequest.Contact.CountryName=$('txtOtherCountryName').value;}
if(runningServies.indexOf(this.Register)!=-1)return;runningServies.push(this.Register);var infoSection=assessmentRequest.InformationSection;if(infoSection==14)infoSection=0;if(!infoSection)infoSection=0;PortalServices.AddUser(assessmentRequest.Contact.FirstName,assessmentRequest.Contact.LastName,assessmentRequest.Contact.EmailAddress,FieldCenterText,Password,assessmentRequest.Contact.Affiliation.Name,infoSection,$('txtOtherCountryName').value,assessmentRequest.Contact.Phone,function(result,passthru)
{HideDialogs();runningServies.pop(passthru.runningService);assessmentRequest.Contact.portalUser=result;$info("Registration completed successfully.");$('txtFirstName').value="";$('txtLastName').value="";$('txtEmailAddress').value="";$('txtPassword').value="";$('txtPasswordMatch').value="";$('ddlFieldCenter').selectedIndex=0;My4D.Close();LoginResult();},function(err,passthru)
{if(passthru&&passthru.runningService)
runningServies.pop(passthru.runningService);var msg=err.get_message();if(msg.substring(0,1)=="{")
{var jerr=eval("("+msg+")");var imsg=jerr.Message;imsg=imsg.replace(/\\\"/g,"&quot;");if(jerr.Type==JExceptionType.OK)
{$info(imsg,jerr.DisplayDuration);My4D.Close();}
else if(jerr.Type==JExceptionType.Alert)
{$alert(imsg,jerr.DisplayDuration);}}
else
{GenericWebService_onfailure(err,passthru);}},{runningService:this.Register});},LogOut:function()
{PortalServices.LogOut(function()
{$('divLoginInfo2').style.display="none";$$('.RegisterSection').each(function(el)
{el.style.display="block";});$$('.LoggedInSection').each(function(el)
{el.style.display="none";});assessmentRequest=null;isLoggedIn=false;buildLearningToolLinksOnce=0;BuildLearningToolLinks();$info("Successfully logged out");});},RecoverPassword:function()
{var email=$('txtRecoverPasswordEmail').value;if(email=="")
{$alert("E-mail Address field may not be blank");return;}
PortalServices.ResendPassword(email,function()
{My4D.Close(function()
{$('stuff').style.display="block";$('divPasswordRecovery').style.display='none';});$info(String.format("Account password sent to {0}",$('txtRecoverPasswordEmail').value));},GenericWebService_onfailure);},ContactNetworkMember:function()
{var email=assessmentRequest.Contact.EmailAddress;var infoSectionId=assessmentRequest.InformationSection;var contactReason=$('txtContactReason').value;PortalServices.SaveUserAction(email,infoSectionId,contactReason,function()
{My4D_ActiveWindow='My4D_ContactReasonPanel';My4D.Close(My4D.RegistrationComplete)},GenericWebService_onfailure);},RegistrationComplete:function()
{if(assessmentRequest.isNewRegistration==true)
{$info("Registration completed successfully. A 4-D Network Member will contact you by email shortly.");}
else
{$info("A 4-D Network Member will contact you by email shortly.");}},RegisterClientRequest:function(infoSectionId,contactReason)
{if(typeof contactReason=="undefined")contactReason="";PortalServices.SaveUserAction(assessmentRequest.Contact.EmailAddress,infoSectionId,contactReason,null,GenericWebService_onfailure);},SelectView:function(infoSectionId,newRegistration,linkData)
{if(!assessmentRequest)
assessmentRequest=new AssessmentRequest();assessmentRequest.InformationSection=infoSectionId;assessmentRequest.isNewRegistration=newRegistration;$$('.RegistrationConfirmed').each(function(el)
{if(newRegistration==true)
el.style.display="block";else
el.style.display="none";});if(infoSectionId==InformationSection.FreeTeamAssessment||assessmentRequest.InformationSection==InformationSection.FreeIndividualAssessment)
{PortalServices.UserHasCurrentFreeAssessment(assessmentRequest.Contact.EmailAddress,UserHasCurrentFreeAssessment_Response,GenericWebService_onfailure,{infoSectionId:assessmentRequest.InformationSection});}
else if(infoSectionId==InformationSection.RequestOneFullTeamAssessmentWithSupport)
{var requestSupport=true;PortalServices.RequestOneFullTeamAssessment(assessmentRequest.Contact.EmailAddress,requestSupport,function()
{$('spnTeamIndPlaceholder1').update('Team');InitTDADialog.setVisible(false);RequestAssessmentWithSupportDialog.Center();RequestAssessmentWithSupportDialog.setVisible(true);},GenericWebService_onfailure);}
else if(infoSectionId==InformationSection.RequestOneFullTeamAssessmentNoSupport)
{var requestSupport=false;PortalServices.RequestOneFullTeamAssessment(assessmentRequest.Contact.EmailAddress,requestSupport,function()
{$('spnTeamIndPlaceholder2').update('Team');InitTDADialog.setVisible(false);RequestAssessmentNoSupportDialog.Center();RequestAssessmentNoSupportDialog.setVisible(true);},GenericWebService_onfailure);}
else if(infoSectionId==InformationSection.RequestOneFullIndividualAssessmentWithSupport)
{var requestSupport=true;PortalServices.RequestOneFullIndividualAssessment(assessmentRequest.Contact.EmailAddress,true,function()
{$('spnTeamIndPlaceholder1').update('Individual');InitIDADialog.setVisible(false);RequestAssessmentWithSupportDialog.Center();RequestAssessmentWithSupportDialog.setVisible(true);},GenericWebService_onfailure);}
else if(infoSectionId==InformationSection.RequestOneFullIndividualAssessmentNoSupport)
{var requestSupport=false;PortalServices.RequestOneFullIndividualAssessment(assessmentRequest.Contact.EmailAddress,false,function()
{$('spnTeamIndPlaceholder2').update('Individual');InitIDADialog.setVisible(false);RequestAssessmentNoSupportDialog.Center();RequestAssessmentNoSupportDialog.setVisible(true);},GenericWebService_onfailure);}
else if(infoSectionId==InformationSection.FifthForceBriefingWhite)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/fifth force/'Fifth Force' Briefing - (B&W printing).ppt";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.FifthForceBriefingBlue)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/fifth force/'Fifth Force' Briefing - (projection).ppt";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.FifthForceManuscript)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/fifth force/The Fifth Force narrative (color printing).doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.FifthForceManuscriptBW)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/fifth force/The Fifth Force narrative (B&W printing).doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.Practicum)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/Practicum.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.R4DClientBriefing)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/New 4-D Client Briefing.ppt";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.DownloadCompleteWDA)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Workshop Delivery Assets - Complete.zip";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.DownloadWorkshopSlides)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/4-D Workshop Slides.zip";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopWorkbook)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Workshop Workbook - Jan 2012.docx";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.OneDayIntroduction)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/One-day Introduction.zip";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.OneDayWorkbook)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/One-day Workbook - Jan 2012.docx";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopOnePageOverview)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/One-Page Workshop Overview.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopAdvancePreparation)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Workshop Advance Preparation.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.PreWorkshopConversation)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Pre-workshop Conversation with Team Leaders.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopEmails)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Pre and Post Workshop e-mails.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopEmailsNASA)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Pre and Post Workshop e-mails (NASA).doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopFacilityRequirements)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Workshop Facility Requirements.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.Workshop2ndChairPresenters)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Workshop Second-Chair Presenters.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopVideoIndex)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Workshop Video Clip Index.xls";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkshopProcessObservers)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Workshop Process Observers.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.ContextShiftingWorksheet)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Context Shifting Worksheet.ppt";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.IDAParticipantSelectionGuidelines)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/IDA Participant Selection Guidelines.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.IDAReportBriefingGuidance)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/The 4-D IDA Report Briefing Guidance.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.PreWorkshopAssessmentsTimeline)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Pre-Workshop Individual Assessments Timelines.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.FourDIntro)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Introduction to 4-D Systems.ppt";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.WorkbookIntro)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/WorkshopDeliveryAssets/Introduction Workbook.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.Join4DNetwork)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/Becoming a 4-D Network Member.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.FourDDevelopmentProcess)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/4-D Development Overview.docx";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.AssessmentDashboards)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/Assessment Dashboards.doc";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.KeynoteSpeechOneHour)
{this.RegisterClientRequest(infoSectionId);var url="content/downloads/One Hour Keynote Speech.ppt";window.open(url,"downloads");}
else if(infoSectionId==InformationSection.R4DProcesses)
{$('ProcessesLibraryFrame').src="ProcessesLibrary.aspx";ProcessesLibraryDialog.setVisible(true);}
else if(typeof linkData!="undefined"&&linkData!=null)
{if(linkData.HasActiveAssessment==false)
{var emailAddress=assessmentRequest.Contact.portalUser.Email;var assessmentGuid=linkData.AssessmentGuid;PortalServices.StartLearningTool(emailAddress,linkData.PortalInfoId,assessmentGuid,function(url)
{window.open(url,"learningtool");},GenericWebService_onfailure);}
else
{if(linkData.ParticipantStatus=="Complete")
{var ok=window.confirm("Are you sure you wish to reset the learning tool?");if(!ok)return;var emailAddress=assessmentRequest.Contact.portalUser.Email;var assessmentGuid=linkData.AssessmentGuid;PortalServices.ResetLearningTool(emailAddress,assessmentGuid,function(result)
{buildLearningToolLinksOnce=0;BuildLearningToolLinks();$info("Learning tool successfully reset");},GenericWebService_onfailure);}
else
{window.open(linkData.Url,"learningtool");}}}
else
{$('txtContactReason').value="";DisplaySlidingPanel('My4D_ContactReasonPanel');}}}
function UserHasCurrentFreeAssessment_Response(response,passthru)
{if(response==true)
{$('divConfirmationA'+passthru.infoSectionId).style.display="none";$('divConfirmationB'+passthru.infoSectionId).style.display="block";}
else if(assessmentRequest.InformationSection==InformationSection.FreeTeamAssessment)
{$('spnEmailPlaceholder'+passthru.infoSectionId).update(assessmentRequest.Contact.EmailAddress);$('divConfirmationA'+passthru.infoSectionId).style.display="block";$('divConfirmationB'+passthru.infoSectionId).style.display="none";PortalServices.InitFreeAssessment(assessmentRequest.Contact.EmailAddress,"Tea",null,GenericWebService_onfailure);}
else if(assessmentRequest.InformationSection==InformationSection.FreeIndividualAssessment)
{$('spnEmailPlaceholder'+passthru.infoSectionId).update(assessmentRequest.Contact.EmailAddress);$('divConfirmationA'+passthru.infoSectionId).style.display="block";$('divConfirmationB'+passthru.infoSectionId).style.display="none";PortalServices.InitFreeAssessment(assessmentRequest.Contact.EmailAddress,"Ind",null,GenericWebService_onfailure);}}
function ReportActStateChange(userId,actState)
{PortalServices.GetAssessmentState(function(result,passthru)
{if(result.HasActiveAssessment==true)
{if(result.Type=="Tea")
{$('lnkRequestFreeTeam').style.display="none";$('lnkOpenFreeTeam').style.display="inline";$('lnkOpenFreeTeam').down("A").href=result.Url;}
else if(result.Type=="Ind")
{$('lnkRequestFreeInd').style.display="none";$('lnkOpenFreeInd').style.display="inline";$('lnkOpenFreeInd').down("A").href=result.Url;}}
else
{if($('lnkOpenFreeTeam').style.display=="inline")
{$('lnkRequestFreeTeam').style.display="inline";$('lnkOpenFreeTeam').style.display="none";}
else if($('lnkOpenFreeInd').style.display=="inline")
{$('lnkRequestFreeInd').style.display="inline";$('lnkOpenFreeInd').style.display="none";}}});}
function ViewAction(infoSectionId)
{}
var ytplayer;function LaunchYouTubeDialog()
{YouTubeDialog.setVisible(true);if(ytplayer)
{ytplayer.playVideo();}}
function YouTubeDialog_onclose()
{YouTubeDialog.setVisible(false);if(ytplayer)
{ytplayer.pauseVideo();}}
function onYouTubePlayerReady(playerId)
{ytplayer=document.getElementById("myytplayer");ytplayer.playVideo();}
var workshopvid1player;function LaunchWorkshopVideo1()
{WorkshopVideoDialog1.Center();WorkshopVideoDialog1.setVisible(true);$('ifmWorkshopVideos').src="content/video/Workshop Slides 0-X.html";}
function WorkshopVideo1_onclose()
{WorkshopVideoDialog1.setVisible(false);$('ifmWorkshopVideos').src="";}
function LaunchWorkshopVideo2()
{$('ifmWorkshopVideos').src="content/video/Workshop Slides 1-X.html";}
function LaunchWorkshopVideo3()
{$('ifmWorkshopVideos').src="content/video/Workshop Slides 2-X.html";}
function LaunchWorkshopVideo4()
{$('ifmWorkshopVideos').src="content/video/4-D Workshop 3-X.html";}
function LaunchWorkshopVideo5()
{$('ifmWorkshopVideos').src="content/video/4-D Workshop Slides 4-X.html";}
function LaunchWorkshopVideo6()
{$('ifmWorkshopVideos').src="content/video/4-D Workshop Slides 5-X.html";}
function LaunchWorkshopVideo7()
{$('ifmWorkshopVideos').src="content/video/Workshop Slides 6-X.html";}
function LaunchWorkshopVideo8()
{$('ifmWorkshopVideos').src="content/video/Workshop Slides 7-X - Culture and Proj Mindset.html";}
function LaunchWorkshopVideo9()
{$('ifmWorkshopVideos').src="content/video/Workshop Slides 8-X Context Shifting, Leadership Effectiveness and Words.html";}
function LaunchWorkshopVideo10()
{$('ifmWorkshopVideos').src="content/video/Workshop Slides 9-X - Story-lines.html";}
function LaunchWorkshopVideo11()
{$('ifmWorkshopVideos').src="content/video/Workshop Slides 10-X - Emotions.html";}
function LaunchNewClientBriefingVideo1()
{NewClientBriefingVideoDialog.Center();NewClientBriefingVideoDialog.setVisible(true);$('ifmNewClientBriefingVideos').src="content/video/New Client Briefing - 1.html";}
function NewClientBriefingVideo_onclose()
{NewClientBriefingVideoDialog.setVisible(false);$('ifmNewClientBriefingVideos').src="";}
function LaunchNewClientBriefingVideo2()
{$('ifmNewClientBriefingVideos').src="content/video/New Client Briefing - 2.html";}
function LoginResult()
{$('spnUsername').update(assessmentRequest.Contact.portalUser.Email);$('divLoginInfo2').style.display="block";if(assessmentRequest.InformationSection)
{My4D.SelectView(assessmentRequest.InformationSection,true,assessmentRequest.linkData);}
$$('.RegisterSection').each(function(el)
{el.style.display="none";});$$('.LoggedInSection').each(function(el)
{el.style.display="block";});PortalServices.GetAssessmentState(function(result,passthru)
{if(result.HasActiveAssessment==true)
{if(result.Type=="Tea")
{$('lnkRequestFreeTeam').style.display="none";$('lnkOpenFreeTeam').style.display="inline";$('lnkOpenFreeTeam').down('A').href=result.Url;}
else if(result.Type=="Ind")
{$('lnkRequestFreeInd').style.display="none";$('lnkOpenFreeInd').style.display="inline";$('lnkOpenFreeInd').down('A').href=result.Url;}}});BuildLearningToolLinks();}
var buildLearningToolLinksOnce=0;function BuildLearningToolLinks()
{if(isLoggedIn)
{if(buildLearningToolLinksOnce==1)
return;else
buildLearningToolLinksOnce=1;}
PortalServices.GetLearningToolLinks(function(result,passthru)
{if(result.length>0)
{for(var i=0,len=result.length;i<len;i++)
{BuildLearningToolLink(result[i]);}}
else
{}},GenericWebService_onfailure);}
function BuildLearningToolLink(linkData)
{var link;switch(linkData.PortalInfoId)
{case 21:link=$('lnkLT4DOverview');break;case 25:link=$('LT4DWorkshop');break;case 50:link=$('LTFifthForce');break;default:return;break;}
link.innerHTML=linkData.LinkName;$(link).observe("click",function()
{if(linkData.ShowDialogue==true&&linkData.PercentComplete==0)
{$('LearingToolsDialogTextPlaceholder').update(linkData.DialogueText);var innerLink=document.createElement("A");innerLink.href="#";innerLink.innerHTML="Start the "+linkData.LinkName;$(innerLink).observe("click",function()
{My4D.LinkAction(linkData.PortalInfoId,this,linkData);});$('LearingToolsDialogLinkPlaceholder').update(innerLink);LearningToolsDialog.setHeaderText(linkData.LinkName);LearningToolsDialog.Center();LearningToolsDialog.setVisible(true);}
else
{My4D.LinkAction(linkData.PortalInfoId,this,linkData);}});}
function PortalServices_GetUser()
{PortalServices.GetUser(function(result)
{isLoggedIn=true;if(!assessmentRequest)
assessmentRequest=new AssessmentRequest();assessmentRequest.Contact={};assessmentRequest.Contact.portalUser=result;assessmentRequest.Contact.EmailAddress=result.Email;PortalServices.GetQueuedAction(function(InfoId)
{if(InfoId!=0)
{My4D.SelectView(InfoId,true);}
PortalServices.GetQueuedMessage(function(result)
{if(result!="")
{var arr=result.split("|");if(arr[0]=="OK")$info(arr[1]);if(arr[0]=="ALERT")$alert(arr[1]);}
else
{$info(String.format("Welcome back, {0}",assessmentRequest.Contact.portalUser.FirstName));}});});LoginResult();},function()
{BuildLearningToolLinks();});}
var browserCompatibilityDialog=null;function viewBrowserCompatibilityDialog()
{if(!browserCompatibilityDialog)
{browserCompatibilityDialog=new KlarityInc.WebControls.Dialog(true);browserCompatibilityDialog.clone("templateDialog");document.body.appendChild(browserCompatibilityDialog.containerElement);browserCompatibilityDialog.setHeaderText("Your Browser");browserCompatibilityDialog.setDraggable(true);browserCompatibilityDialog.setNavigateUrl("BrowserCompatibility/BrowserCompatibility.aspx",true);browserCompatibilityDialog.setWidth("500px");browserCompatibilityDialog.setHeight("230px");}
browserCompatibilityDialog.setVisible(true);}
document.observe('keydown',function(event)
{if(event.keyCode==123&&event.ctrlKey&&event.altKey)
{debugger;}});window.onscroll=function(event)
{var winscroll=window.document.documentElement.scrollTop;if(typeof window.pageYOffset=="number")
{winscroll=window.pageYOffset;}
var dialog=$('contentDialog');if(winscroll>parseInt(dialog.style.top))
{$('contentDialog').style.top=winscroll+"px";}
else
{}}
window.onresize=function(event)
{var winscroll=window.document.documentElement.scrollTop;var dialog=$('contentDialog');var bottomY=winscroll+parseInt(dialog.style.height)+parseInt(dialog.style.top);if(bottomY>window.document.documentElement.clientHeight)
{var offset=parseInt(dialog.style.top)-(bottomY-window.document.documentElement.clientHeight)-40;if(offset<0)offset=0;dialog.style.top=offset+"px";}}
function window_onload()
{if($qs('ca')=="true")
{$info("Activation successfully cancelled");}
if($qs('lo')=="true")
{$info("Successfully logged out");}
var winscroll=window.document.documentElement.scrollTop;var dialog=$('contentDialog');var bottomY=winscroll+parseInt(dialog.style.height)+parseInt(dialog.style.top);if(bottomY>window.document.documentElement.clientHeight)
{var offset=parseInt(dialog.style.top)-(bottomY-window.document.documentElement.clientHeight)-40;if(offset<0)offset=0;dialog.style.top=offset+"px";}
$('bobo2').setOpacity(0.8);$('bobo3').setOpacity(0.8);$('bobo4').setOpacity(0.8);$('MB_overlay').setOpacity(0.65);PortalServices_GetUser();$$('.PreferredMemberMain').each(function(el)
{el.observe('click',function()
{var extra=el.up().down(".PreferredMemberExtra");if(extra.style.display=="block")
{extra.style.display="none";}
else
{extra.style.display="block";}});});$('LoginPassword').observe('keydown',function(event)
{if(event.keyCode==13)
{My4D.Login();}});$('txtPasswordMatch').observe('keydown',function(event)
{if(event.keyCode==13)
{My4D.Register();}});$$('H4.MoreInfoCategory').invoke('observe','click',function(event)
{var el=$(event.target);if(el.tagName!="H4")el=el.up("H4");el=el.next();var children=el.childElements();var newChildDisplay=(children[0].style.display=="")?"block":"";for(var i=0,len=children.length;i<len;i++)
{children[i].style.display=newChildDisplay;}});$$('.KlarityTab').each(function(el)
{el.observe('mouseenter',function()
{tab_onmouseenter(el);});el.observe('mouseleave',function()
{tab_onmouseleave(el);});});$$('.SlidePanelCloseImage').each(function(el)
{el.observe('mouseover',function()
{el.src="images/close3-hover.png";});el.observe('mouseout',function()
{el.src="images/close3.png";});});var payGroupCollection=$$("TABLE[tabgroup=payGroup]");var freeGroupCollection=$$("TABLE[tabgroup=freeGroup]");if(window.location.hash!=""&&window.location.hash!="#")
{var anchors=$$('A[href='+window.location.hash+']');if(anchors.length>0)
{if(typeof anchors[0].click=="object")
anchors[0].click();else
eval(anchors[0].getAttribute("onclick"));}
else
{payGroupCollection[0]._active=true;freeGroupCollection[0]._active=true;}}
$('lblLatestTweet').update("Loading twitter feed ...");new Ajax.Request('twitterrequest.aspx',{method:'get',onSuccess:function(transport)
{tweets=eval(transport.responseText);var latestTweet=tweets[0];ShowAllTweets();}});if(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version==7)
{$('tabAbout4DSystems').style.marginLeft="6px";}
else
{$('tabAbout4DSystems').style.marginLeft="36px";}
try{document.execCommand("BackgroundImageCache",false,true)}catch(e){}
var params={wmode:"transparent"};swfobject.embedSWF(String.format("site_anim_08_sized-{0}.swf",UIC),"FlashBookPanel","270","300","8","#336699",null,params);var params={allowScriptAccess:"always",wmode:"transparent"};var atts={id:"myytplayer"};swfobject.embedSWF("http://www.youtube.com/v/VpqT2Fz4ZQg?enablejsapi=1&playerapiid=ytplayer","ytapiplayer","480","385","8",null,null,params,atts);YouTubeDialog.Center();$$('.FieldCenterList').each(function(el)
{el.observe('change',function()
{if(this.selectedIndex==0)
DOM.getPreviousSibling(el).style.visibility="visible";else
DOM.getPreviousSibling(el).style.visibility="hidden";});el.selectedIndex=0;});}
document.observe("dom:loaded",window_onload);
