//START Humana.H1.PlanPointer.Web.js.common.js
var numberOfSliderTicks=150;var numberOfSliderTickMarks=5;var inadrag = false;function makeIntroductoryDiv(){
var div = document.createElement("div");Sys.UI.DomElement.addCssClass(div,'refineExplain');div.id = "IntroductoryDiv";if(identifiers["PP/PLAN/REFINE_EXPLAIN"])
div.innerHTML = identifiers["PP/PLAN/REFINE_EXPLAIN"].Value;return div;}
function makeDoneDiv(){
var div = document.createElement("div");div.className="WelcomeText";div.innerHTML = identifiers["PP/PLAN/REFINE_DONE"].Value;return div;}
function tabPanelClick(planIdent, tabName){
if(tabName != "Overview"){
cm.createPlanScenarioTag(Plans.healthPlans[planIdent].Name, tabName);}
}
function revealAnotherPerson(){
var x = getElementsByClassName($get('SecondQuestion'), 'Person');for(var i=2;i<x.length;i++){
if(x[i].style.display=="none"){
x[i].style.display = "";break;}
} 
numberOfPeopleVisible++;if(numberOfPeopleVisible == maxNumberOfPeople){
$get("AddMoreWrap").style.display = "none";}
}
function removePerson(removelink){
numberOfPeopleVisible--;removelink.parentNode.style.display = "none";if( $get("AddMoreWrap").style.display == "none"){
if(numberOfPeopleVisible < maxNumberOfPeople){
$get("AddMoreWrap").style.display = ""
}
}
}
function getElementsByClassName(node, classname){
var a = [];var re = new RegExp('\\b' + classname + '\\b');var els = node.getElementsByTagName("*");for(var i=0,j=els.length;i<j;i++)
if(re.test(els[i].className))a.push(els[i]);return a;}
function coremetricsTagForVisiblePlans(){
var greyWrap = $get('GreyWrap');var greyWrapLocation = Sys.UI.DomElement.getLocation($get('GreyWrap'));for(var planBar in Plans.healthPlans){
if ((Plans.healthPlans[planBar].visible) && (! Plans.healthPlans[planBar].coremetricsFlag)){
var position = Sys.UI.DomElement.getLocation($get("BarTitle_" + planBar));if( (position.x > greyWrapLocation.x) && (position.x < (greyWrapLocation.x + greyWrap.clientWidth))){
cm.createPageElementTagsForPlans(Plans.healthPlans[planBar].Name);Plans.healthPlans[planBar].coremetricsFlag = true;}
}
}
}
function resetCoremetricsFlag(){
for(var planBar in Plans.healthPlans){
Plans.healthPlans[planBar].coremetricsFlag = false;}
}
function enableQuestionArea(enable){
questionAreaEnabled=enable;$get("QuestionAreaDisable").style.display=enable?"none":"";$get("QuestionAreaDisable").style.height=$get("GreyWrap").offsetHeight + "px";$get("NextQuestion").disabled = ! enable;if(enable)
Sys.UI.DomElement.removeCssClass($get('NextQuestion'),"nextQuestionDisabled");else
Sys.UI.DomElement.addCssClass($get('NextQuestion'),"nextQuestionDisabled");$get("SpinnerDiv").style.display=enable?"none":"";}
function secondPageDataRetrieved(jsReturn){ 
Sys.Debug.trace("running secondPageDataRetrieved");compareViewHealthPlan = jsReturn.CompareViewHealthPlan
if(jsReturn.ErrorIdentifiers.length>0){
$get("UpdateProgressSpinner").style.display="none";enableStartButton();var htmlArray=[];htmlArray.push("<ul>");for(var i=0;i<jsReturn.ErrorIdentifiers.length;i++){
if(jsReturn.ErrorIdentifiers[i].Ident=="REDIRECT"){
Sys.Debug.trace("Redirecting to: " + jsReturn.ErrorIdentifiers[i].Value);window.location.href=jsReturn.ErrorIdentifiers[i].Value;return;}else if(jsReturn.ErrorIdentifiers[i].Ident=="PP/WEL/ERR_ZIPNOPLANS" || jsReturn.ErrorIdentifiers[i].Ident=="PP/WEL/ERR_ZIP"){
$get("ZipCodeMinimumLengthValidator").style.display="";$get("ZipCodeMinimumLengthValidator").innerHTML=jsReturn.ErrorIdentifiers[i].Value;}else{
htmlArray.push("<li>");htmlArray.push(jsReturn.ErrorIdentifiers[i].Value);htmlArray.push("</li>");}
}
htmlArray.push("</ul>");$get('ApplicantsValidator').innerHTML=htmlArray.join("");$get('ApplicantsValidator').style.display =""
}else{
stateInformation=jsReturn.StateInformation;var expires = new Date();expires.setTime(expires.getTime()+(365*24*60*60*1000));var host=document.location.host.substr(document.location.host.lastIndexOf(".",document.location.host.lastIndexOf(".")-1)+1);if(host.indexOf(":")) host=host.substr(0,host.indexOf(":"));setCookie("StateCookie",jsReturn.stateName,expires,"/","",false);var strState = getCookie('StateCookie');$get('ApplicantsValidator').style.display ="none";cm.createConversionEventTag();identifiers=jsReturn.Identifiers;survey=jsReturn.Survey;evaluateRankEngineIdentifier=jsReturn.EvaluateRankEngineIdentifier;surveyIdentifier=jsReturn.SurveyIdentifier;Plans.healthPlans = jsReturn.HealthPlans;askedQuestions=[];askedQuestionsAnswers=[];currentQuestionIndex=-1;if(typeof(introductoryDiv)=="undefined") introductoryDiv=makeIntroductoryDiv();if(typeof(doneDiv)=="undefined") doneDiv=makeDoneDiv();var previousQuestionLink = $get(clientIDs['PreviousQuestionLink']);$addHandler(previousQuestionLink,"click", PreviousQuestionDivClick );createQuestionButtons();$get("InitialQuestions").parentNode.removeChild($get("InitialQuestions"))
if(Plans.healthPlans==null){
$get("NoPlans").style.display = "";$get("NoPlans").innerHTML = identifiers["PP/WEL/ERR_ZIPNOPLANS"].Value;}else{
$get("PlansOverlay").style.display = "";$get("GraphControls").style.display = "";$get("DisclaimerRefineText").innerHTML = identifiers["PP/PLAN/REFINE_DISCLAIMER"].Value;$get("GraphControls").style.display = "";$get("CompareButton").style.display = "";$get("HelpButtonWrap").style.display = "";$get("CompareButton").disabled = true;$get("compareDisableDiv").style.display = "";$get("InitialDisclaimer").style.display = "none";$get("LegendAndCompare").style.display = "";$get(clientIDs['QuestionsList']).appendChild(introductoryDiv);$get(clientIDs["NextQuestion"]).style.display="";if(typeof(identifiers["PP/PLAN/REFINE_EXPLAIN"])=="undefined" || identifiers["PP/PLAN/REFINE_EXPLAIN"].Value==""){
$get(clientIDs["NextQuestion"]).style.display="";$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_NEXT"].Value;gotoNextQuestion();}else{
$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_START"].Value;Sys.Debug.trace("making history event for introductory text");var state={};state.description="introductory text";state.magic = magic;state.callback="goToPreviousQuestion(null,true)";state.isCompareOpen=isCompareOpen;Sys.Application.get_history().addHistoryPoint(state);}
setTimeout(function(){coremetricsTagForVisiblePlans();}, 1000);createRegistrationTag();cm.createPageViewTagForRefinementAnswers(1, null, null);cm.createConversionEventInitiationTagForRefinementStep(1);Plans.createGraphTable(jsReturn.InitialRanking);LoadHeader(strState);} 
var so = new SWFObject(identifiers["PP/PLAN/HELP_CONTENT"].Value, "helpswf", "790", "170", "6", "#FFffff");$find('HelpButtonCollapse').add_expandComplete(function(){
so.write("flashcontent");});$find('HelpButtonCollapse').add_collapseStart(function(){
$get('flashcontent').innerHTML = "";});}
}
var questionCounter;function createQuestionButtons(){
questionCounter = 0;$get("QuestionPagination").innerHTML = identifiers["PP/PLAN/QUESTIONS_ANSWERED"].Value;for (var j = 0;j < askedQuestions.length;j++) {
questionCounter++;makeQuestionButton(askedQuestions[j], questionCounter-1 ,currentQuestionIndex>=(questionCounter-1));}
for (var k = 0;k < survey.Questions.length;k++) {
if (Array.indexOf(askedQuestions,survey.Questions[k]) == -1) { 
questionCounter++;makeQuestionButton(survey.Questions[k], questionCounter-1 ,currentQuestionIndex>=(questionCounter-1));}
}
}
function createRegistrationTag(){
var gender;var tobaccoAnswer;if( stateInformation.Application.Applicants[0].Tobacco== Humana.H1.Quote.Common.DataTransferObjects.TobaccoApplicantTypes.N) {
tobaccoAnswer = "nonsmoker" ;}
else tobaccoAnswer = "smoker";Sys.Debug.trace("Tobacco answer for the coremetrics: " +tobaccoAnswer);if(stateInformation.Application.Applicants[0].Gender == Humana.H1.Quote.Common.DataTransferObjects.GenderTypes.M){
gender = "male" ;} 
else gender = "female";cm.createRegistrationTag(magic, stateInformation.Application.Applicants[0].Age, gender, stateInformation.Application.StateAbbr, stateInformation.Application.ZipCode ,stateInformation.Application.Applicants.length,tobaccoAnswer)
}
function setupCollapsiblePanelHandlers(healthPlan){
$find("CollapsiblePanelExtender_" + healthPlan.Ident).planIdent = healthPlan.Ident;$find("CollapsiblePanelExtender_" + healthPlan.Ident).add_expandStart(function(obj){
$get('Total_'+healthPlan.Ident).style.fontWeight = "";bringExpandedPlaninView(obj.planIdent);if(typeof (Plans.numberOfOpenPlans) == "undefined"){
Plans.numberOfOpenPlans = 1;}else{
Plans.numberOfOpenPlans ++;}
if (!isCompareOpen) {
$get('Graph1').style.height = "400px";$get('Graph1').style.height = "";}
});$find("CollapsiblePanelExtender_" + healthPlan.Ident).add_expandStart(function(obj){
$get('tabParentDiv_' +obj.planIdent).style.display = "";$get('QuestionPaginationWrap').style.display = "none";$get('Graph1').style.overflow = "";$get('ShowDetails_'+obj.planIdent).parentNode.parentNode.className = "expanded";});$find("CollapsiblePanelExtender_" + healthPlan.Ident).add_expandComplete(function(obj){
showPriceTable(obj.planIdent, false);$get('tabContainer_'+obj.planIdent+'_body').style.overflowY = 'auto';$get('tabContainer_' +obj.planIdent).style.display = "";$get('tabParentDiv_' +obj.planIdent).style.display = "none";$get("bh_" + obj.planIdent).style.width = '330px';});$find("CollapsiblePanelExtender_" + healthPlan.Ident).add_collapseStart(function(obj){
$get("bh_" + healthPlan.Ident).style.width = '';$get('CheckBoxWrap_'+healthPlan.Ident).style.width = "";getElementsByClassName($get('PriceCell_'+healthPlan.Ident),'PriceLabel')[0].style.width = "";$get('tabContainer_'+obj.planIdent+'_body').style.overflowY = '';$get('Total_'+healthPlan.Ident).style.fontWeight = "bold";showPriceTable(obj.planIdent, true);$get('tabContainer_' +obj.planIdent).style.display = "none";$get('tabParentDiv_' +obj.planIdent).style.display = "";});$find("CollapsiblePanelExtender_" + healthPlan.Ident).add_collapseComplete(function(obj){
$get('tabParentDiv_' +obj.planIdent).style.display = "none";$get('CheckBoxWrap_'+healthPlan.Ident).style.width = "100%";getElementsByClassName($get('PriceCell_'+healthPlan.Ident),'PriceLabel')[0].style.width = "100%";$get('ShowDetails_'+obj.planIdent).parentNode.parentNode.className = "";removeDisableDiv(obj.planIdent);if((Sys.UI.DomElement.getBounds($get('GraphTable')).x + Sys.UI.DomElement.getBounds($get('GraphTable')).width + 90) - Sys.UI.DomElement.getBounds($get("RightPaddle")).x < 20)
$get("RightPaddleInactive").style.zIndex = 110;else
$get("RightPaddleInactive").style.zIndex = 90;});}
function removeDisableDiv(planIdent){
Plans.numberOfOpenPlans --;if(Plans.numberOfOpenPlans <= 0){
$get('RefinementBlockDisable').style.display = "none";if(!isCompareOpen)
$get('QuestionPaginationWrap').style.display = "";$get('Graph1').style.overflow = "hidden";$get('GraphTable').style.zoom = 1;$get('GraphTable').style.zoom = '';}
}
function bringExpandedPlaninView(planIdent){
var greyWrapWidth = $get('GreyWrap').clientWidth;var greyWrapLocation = Sys.UI.DomElement.getLocation($get('GreyWrap'));var position = Sys.UI.DomElement.getLocation($get("BarTitle_" + planIdent));var expandedWidth = $find("CollapsiblePanelExtender_" +planIdent).get_ExpandedWidth();var horizontalMovement;if((position.x + expandedWidth) - (greyWrapLocation.x + greyWrapWidth) > 20){
horizontalMovement = -1 * (expandedWidth + 20)
}else if(position.x < greyWrapLocation.x){
horizontalMovement = greyWrapLocation.x - position.x + 20;}
if(horizontalMovement){
var sh = new AjaxControlToolkit.Animation.MoveAnimation($get('Graph1'), Plans.horizontalScrollDuration ,Plans.fps,horizontalMovement , null, true);sh.add_ended(function(){
if((Sys.UI.DomElement.getBounds($get('GraphTable')).x) - Sys.UI.DomElement.getBounds($get("LeftPaddle")).x > 20){
$get("LeftPaddleInactive").style.zIndex = 110;}else{
$get("LeftPaddleInactive").style.zIndex = 90;}
if((Sys.UI.DomElement.getBounds($get('GraphTable')).x + Sys.UI.DomElement.getBounds($get('GraphTable')).width) + 90 - Sys.UI.DomElement.getBounds($get("RightPaddle")).x < 20){
$get("RightPaddleInactive").style.zIndex = 110;}
else{
$get("RightPaddleInactive").style.zIndex = 90;} 
});sh.play();}
}
function showPriceTable(planIdent, hidePriceTable){
if (! hidePriceTable){
getElementsByClassName($get('PriceCell_'+planIdent),'PriceLabel')[0].style.width = "33%";$get('CheckBoxWrap_'+planIdent).style.width = "33%";$get('RefinementBlockDisable').style.display = "";} 
if (hidePriceTable){
Sys.UI.DomElement.removeCssClass($get('PriceCell_'+planIdent),'expanded');Sys.UI.DomElement.removeCssClass($get('CheckCell_'+planIdent),'expanded');}
else{
Sys.UI.DomElement.addCssClass($get('PriceCell_'+planIdent),'expanded');Sys.UI.DomElement.addCssClass($get('CheckCell_'+planIdent),'expanded');cm.createPlanOverviewTag(Plans.healthPlans[planIdent].Name);cm.createProductViewTagForPlanDetail(Plans.healthPlans[planIdent].Name);cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-Productview-_-Overview", "Productview-_-Overview");if((Sys.UI.DomElement.getBounds($get('GraphTable')).x + Sys.UI.DomElement.getBounds($get('GraphTable')).width + 330) - Sys.UI.DomElement.getBounds($get("RightPaddle")).x < 20){
$get("RightPaddleInactive").style.zIndex = 110;}
else{
$get("RightPaddleInactive").style.zIndex = 90;} 
}
} 
function deleteDoneDiv(){
if(typeof(doneDiv.parentNode)!="undefined")
doneDiv.parentNode.removeChild(doneDiv);}
function getElementsByClassName(node, classname)
{
var a = [];var re = new RegExp('\\b' + classname + '\\b');var els = node.getElementsByTagName("*");for(var i=0,j=els.length;i<j;i++)
if(re.test(els[i].className))a.push(els[i]);return a;}
function collapseAllOpenPlans(){
for (var planIdent in Plans.healthPlans)
{
var collapsiblePanel = $find("CollapsiblePanelExtender_" + planIdent);if(collapsiblePanel._collapsed == false){
collapsiblePanel._toggle();}
}
}
function collapseAllPlans(){
var isCollapsing = false;var lastPlanOpen = null;for (var planIdent in Plans.healthPlans)
{
var collapsiblePanel = $find("CollapsiblePanelExtender_" + planIdent);if(collapsiblePanel._collapsed == false){
collapsiblePanel.planIdent = planIdent;if(typeof (collapsiblePanel.collapseCompleteHandler) == "undefined" || collapsiblePanel.collapseCompleteHandler== false){
collapsiblePanel.collapseCompleteHandler = true;lastPlanOpen = collapsiblePanel;}
isCollapsing = true;}
} 
if(isCollapsing && lastPlanOpen){
lastPlanOpen.add_collapseComplete(removeHandler);for (var planIdent in Plans.healthPlans)
{
var collapsiblePanel = $find("CollapsiblePanelExtender_" + planIdent);if( collapsiblePanel.collapseCompleteHandler){
collapsiblePanel._toggle();}
}
return false;}
else{
return true;}
}
function removeHandler(obj){
compareOpen(true);}
function createCompareTable(planIdents){
if($get('compareTable')!= null)
{
var tab = $get('compareTable');$get('innerCompare').removeChild(tab);for(var i=0;i<hoverMenuIDs.length;i++){
var compareHoverMenuExtender = $find(hoverMenuIDs[i]);compareHoverMenuExtender.dispose();}
hoverMenuIDs.length = 0;}
var healthPlans = {};var healthPlanLength = 0;for(var planBar in planIdents){
if(typeof planIdents[planBar]!= "function")
healthPlans[planBar] = Plans.healthPlans[planBar];healthPlanLength++;}
if (healthPlanLength == 3) 
Sys.UI.DomElement.addCssClass($get('outerCompare'),'twoplans');else
Sys.UI.DomElement.removeCssClass($get('outerCompare'),'twoplans');if (healthPlanLength == 2) 
$get('addanother').style.visibility = 'visible';else
$get('addanother').style.visibility = 'hidden';var compareTable = document.createElement('table');compareTable.id = "compareTable";Sys.UI.DomElement.addCssClass(compareTable,"compareTable");var introductionRow = document.createElement("div");introductionRow.id = "compareTableHead";Sys.UI.DomElement.addCssClass(introductionRow,"compareTableHead");var footRow = document.createElement('div');footRow.id = "compareTableFoot";Sys.UI.DomElement.addCssClass(footRow,"compareTableFoot");var tBody = document.createElement('tbody');compareTable.appendChild(tBody);var introductionCell = document.createElement("span");Sys.UI.DomElement.addCssClass(introductionCell,"propertyName");introductionRow.appendChild(introductionCell);$get('compareTableHeadWrap').appendChild(introductionRow);var footCellEmpty = document.createElement("span");footCellEmpty.appendChild(document.createTextNode(""));Sys.UI.DomElement.addCssClass(footCellEmpty,"propertyName");footRow.appendChild(footCellEmpty);var iCtr = 0;var closeImgLeftPos = 494;if (screen.width<1024)
{
closeImgLeftPos = 369;}
for (var i in healthPlans)
{
iCtr++;var tCell = document.createElement("span");Sys.UI.DomElement.addCssClass(tCell,"head" + iCtr);tCell.innerHTML = healthPlans[i].Name;var learnMoreWrap = document.createElement("div");Sys.UI.DomElement.addCssClass(learnMoreWrap,"learnMoreWrap");var learnMoreButton = document.createElement("span");learnMoreButton.appendChild(document.createTextNode(identifiers["PP/PLAN/LEARN_MORE"].Value));Sys.UI.DomElement.addCssClass(learnMoreButton,"LearnMore");var planName = healthPlans[i].Name;var planIdent = healthPlans[i].Ident;$addHandler(learnMoreButton,"click",learnMoreClick(planName, planIdent));learnMoreWrap.appendChild(learnMoreButton);tCell.appendChild(learnMoreWrap);var closeImg = document.createElement("IMG");Sys.UI.DomElement.addCssClass(closeImg,"closePlanCompareImg");closeImg.setAttribute('src', 'img/btn_closedetailview.gif');closeImg.setAttribute('id', 'compareCloseImg' + planIdent);closeImg.setAttribute('alt', '');closeImg.style.left = closeImgLeftPos + 'px';closeImgLeftPos += 164;$addHandler(closeImg,"click",closePlanCompare(planIdent));introductionRow.appendChild(closeImg);introductionRow.appendChild(tCell);} 
var closeImg = document.createElement("IMG");Sys.UI.DomElement.addCssClass(closeImg,"compareCloseImg");closeImg.setAttribute('src', 'img/btn_compareclose.gif');closeImg.setAttribute('id', 'compareCloseImg');closeImg.setAttribute('alt', '');closeImg.onclick = compareClose;var tooltip = document.createElement("span");tooltip.className="TooltipBody";tooltip.appendChild(document.createTextNode("Close Compare View"));document.body.appendChild(tooltip);hoverMenuIDs.push('compareCloseImg');$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15,"PopupPosition":4,"id":hoverMenuIDs[hoverMenuIDs.length-1],"popupElement":tooltip}, null, null, closeImg);if ($get('compareCloseImg')) $get('outerCompare').removeChild($get('compareCloseImg'));$get('outerCompare').insertBefore(closeImg,$get('compareTableHeadWrap'));var planBenefitsRow = document.createElement("tr");planBenefitsRow.className = "comparegroupheader";var planBenefitsCell = document.createElement("td");planBenefitsCell.setAttribute('colSpan',parseInt(healthPlanLength + 1));var textnode = document.createTextNode("Plan Benefits");planBenefitsCell.appendChild(textnode);planBenefitsRow.appendChild(planBenefitsCell);tBody.appendChild(planBenefitsRow);var optionalBenefitsExist=false;for(var i=0;i<compareViewHealthPlan.PlanCharacteristicsCollection.length;i++)
{
if(compareViewHealthPlan.PlanCharacteristicsCollection[i].IsRequired){
var propertyRow = document.createElement("tr");var propertyRowCell = document.createElement("td");Sys.UI.DomElement.addCssClass(propertyRowCell,"propertyName");var textnode = document.createTextNode(compareViewHealthPlan.PlanCharacteristicsCollection[i].Name);propertyRowCell.appendChild(textnode);if(compareViewHealthPlan.PlanCharacteristicsCollection[i].ShortDescription){
var questionMark = document.createElement("span");questionMark.appendChild(document.createTextNode(" "));questionMark.className="Tooltip";propertyRowCell.appendChild(questionMark);var tooltip = document.createElement("span");tooltip.className="TooltipBody";tooltip.innerHTML = compareViewHealthPlan.PlanCharacteristicsCollection[i].ShortDescription;document.body.appendChild(tooltip);hoverMenuIDs.push("Benefit_CompareHoverMenuExtender_"+compareViewHealthPlan.PlanCharacteristicsCollection[i].Name);$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15,"PopupPosition":4,"id":hoverMenuIDs[hoverMenuIDs.length-1],"popupElement":tooltip}, null, null, questionMark);}
propertyRow.appendChild(propertyRowCell);for(var planIdent in healthPlans)
{ var presentinPlans=0;var benefitPresentInPlans = false;for(var j=0;j<healthPlans[planIdent].PlanCharacteristicsCollection.length;j++)
{
if(compareViewHealthPlan.PlanCharacteristicsCollection[i].Ident == healthPlans[planIdent].PlanCharacteristicsCollection[j].Ident && healthPlans[planIdent].PlanCharacteristicsCollection[j].IsRequired == true){
presentinPlans++;benefitPresentInPlans = true;var propertyCell = document.createElement("td");if(healthPlans[planIdent].PlanCharacteristicsCollection[j].Items[0].DisplayValue) {
propertyCell.innerHTML = healthPlans[planIdent].PlanCharacteristicsCollection[j].Items[0].DisplayValue;}else{
var text = document.createTextNode("N/A");propertyCell.appendChild(text);presentinPlans--;}
propertyRow.appendChild(propertyCell);break;}
}
if(!benefitPresentInPlans){
var propertyCell = document.createElement("td");var text = document.createTextNode("N/A");propertyCell.appendChild(text);propertyRow.appendChild(propertyCell);}
}
if(presentinPlans > 0){
tBody.appendChild(propertyRow);}
}
else optionalBenefitsExist = true;}
if(optionalBenefitsExist){
var optBenefitsRow = document.createElement("tr");optBenefitsRow.className = "comparegroupheader";var optBenefitsCell = document.createElement("td");optBenefitsCell.setAttribute('colSpan', parseInt(healthPlanLength + 1));var textnode = document.createTextNode("Optional Benefits");optBenefitsCell.appendChild(textnode);optBenefitsRow.appendChild(optBenefitsCell);tBody.appendChild(optBenefitsRow);for(var i=0;i<compareViewHealthPlan.PlanCharacteristicsCollection.length;i++)
{
if(compareViewHealthPlan.PlanCharacteristicsCollection[i].IsRequired == false){ 
var propertyRow = document.createElement("tr");var propertyRowCell = document.createElement("td");Sys.UI.DomElement.addCssClass(propertyRowCell,"propertyName");var descriptionWrap = document.createElement("div");var textnode = document.createTextNode(compareViewHealthPlan.PlanCharacteristicsCollection[i].Name);descriptionWrap.appendChild(textnode);propertyRowCell.appendChild(descriptionWrap);if(compareViewHealthPlan.PlanCharacteristicsCollection[i].ShortDescription){
var questionMark = document.createElement("IMG");questionMark.setAttribute('src', 'img/icon_tooltip.gif');questionMark.className="TooltipImg";propertyRowCell.appendChild(questionMark);var tooltip = document.createElement("span");tooltip.className="TooltipBody";tooltip.innerHTML = compareViewHealthPlan.PlanCharacteristicsCollection[i].ShortDescription;document.body.appendChild(tooltip);hoverMenuIDs.push("Optional_Benefit_CompareHoverMenuExtender_"+compareViewHealthPlan.PlanCharacteristicsCollection[i].Name);$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15,"PopupPosition":4,"id":hoverMenuIDs[hoverMenuIDs.length-1],"popupElement":tooltip}, null, null, questionMark);}
propertyRow.appendChild(propertyRowCell);var presentinAllPlans=0;for(var planIdent in healthPlans){
var benefitPresent = false;for(var j=0;j<healthPlans[planIdent].PlanCharacteristicsCollection.length;j++)
{
if(compareViewHealthPlan.PlanCharacteristicsCollection[i].Ident == healthPlans[planIdent].PlanCharacteristicsCollection[j].Ident && healthPlans[planIdent].PlanCharacteristicsCollection[j].IsRequired == false){ 
presentinAllPlans++;benefitPresent = true;var propertyCell = document.createElement("td");var checkboxHTMLArray=[];if(healthPlans[planIdent].PlanCharacteristicsCollection[j].Items[0].DisplayAmount){
if(healthPlans[planIdent].PlanCharacteristicsCollection[j].Items[0].DisplayValue){
checkboxHTMLArray.push("<div>");checkboxHTMLArray.push(healthPlans[planIdent].PlanCharacteristicsCollection[j].Items[0].DisplayValue);checkboxHTMLArray.push(" </div>");}
planIdent = healthPlans[planIdent].Ident;planCharacteristicsIdent = healthPlans[planIdent].PlanCharacteristicsCollection[j].Ident;var checkBoxId="compareOptionalBenefitCheckBox_" + planIdent + "_" + planCharacteristicsIdent;checkboxHTMLArray.push("<label for='");checkboxHTMLArray.push(checkBoxId);checkboxHTMLArray.push("'>");checkboxHTMLArray.push(healthPlans[planIdent].PlanCharacteristicsCollection[j].Items[0].DisplayAmount);checkboxHTMLArray.push("</label>");checkboxHTMLArray.push("<input type='checkbox' id='");checkboxHTMLArray.push(checkBoxId);checkboxHTMLArray.push("'");checkboxHTMLArray.push(" onclick='optionalBenefitChecked(this.checked, \"");checkboxHTMLArray.push(planIdent);checkboxHTMLArray.push("\", \"");checkboxHTMLArray.push(planCharacteristicsIdent);checkboxHTMLArray.push("\");' ");if($get("checkbox_"+planIdent+"_" +healthPlans[planIdent].PlanCharacteristicsCollection[j].Ident).checked){
checkboxHTMLArray.push("checked='true'");}
checkboxHTMLArray.push("/>");propertyCell.innerHTML = checkboxHTMLArray.join("");}
else{
var textnode = document.createTextNode("N/A");propertyCell.appendChild(textnode);presentinAllPlans--;}
propertyRow.appendChild(propertyCell);break;}
}
if(!benefitPresent){
var propertyCell = document.createElement("td");var text = document.createTextNode("N/A");propertyCell.appendChild(text);propertyRow.appendChild(propertyCell);}
}
if(presentinAllPlans > 0){
tBody.appendChild(propertyRow);}
}
}
}
for (var i in healthPlans)
{
var footCell = document.createElement("span");Sys.UI.DomElement.addCssClass(footCell,"feet");var planIdent = healthPlans[i].Ident;var optBenefitTotalCell = document.createElement("span");optBenefitTotalCell.id = "Compare_Total_"+ planIdent;optBenefitTotalCell.innerHTML = identifiers["PP/PLAN/AMOUNT_MASK"].Value.replace("${n}",Math.abs(parseFloat(Plans.healthPlans[planIdent].Total)).toFixed(2) );footCell.appendChild(optBenefitTotalCell);var applyNowButton = document.createElement("a");applyNowButton.href="#";applyNowButton.id = "applyNow_Compare_" +healthPlans[i].Ident;applyNowButton.planIdent=healthPlans[i].Ident;Sys.UI.DomElement.addCssClass(applyNowButton,"button_small");applyNowButton.planIdent=healthPlans[i].Ident;$addHandler(applyNowButton,"click",function(evt){ applyNow(this.planIdent, evt);evt.preventDefault();});applyNowButton.appendChild(document.createTextNode(identifiers["PP/PLAN/APPLY_NOW"].Value));footCell.appendChild(applyNowButton);footRow.appendChild(footCell);} 
if ($get('compareTableHead')) $get('compareTableHeadWrap').removeChild($get('compareTableHead'));$get('compareTableHeadWrap').appendChild(introductionRow);if ($get('compareTableFoot')) $get('compareTableFootWrap').removeChild($get('compareTableFoot'));$get('innerCompare').appendChild(compareTable);$get('compareTableFootWrap').appendChild(footRow);for(var i in healthPlans){
cm.createProductViewTagForPlanComparison(healthPlans[i].Name);}
cm.createComparePageViewTag();}
function closePlanCompare(planIdent)
{
return function() {
if(planIdent)
{ $get("BarCheck_" +planIdent).checked = false;compareChecked();}
}
}
function learnMoreClick(planName, planIdent){
return function(){
learnMore(planIdent);cm.createLearnMorepageViewtag(planName);cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-Compare-_-Learn More","Compare-_-Learn More");} 
}
function compareOpen(insideHistoryEvent)
{
if( isCompareOpen ) return;$get('CompareButton').disabled = true;$get("compareDisableDiv").style.display = "";$get('CompareSpinner').style.display = "";setTimeout(function(){if(collapseAllPlans()){
for (var planIdent in Plans.healthPlans)
{ 
var collapsiblePanel = $find("CollapsiblePanelExtender_"+planIdent);collapsiblePanel.collapseCompleteHandler = false;collapsiblePanel.remove_collapseComplete(removeHandler);}
Sys.Debug.trace("All panels collapsed");var planIdentsWithProductIdents = getCheckedPlanIdentsWithProductIdents();if(planIdentsWithProductIdents.getLength()==0){
compareClose();return;}
isCompareOpen=true;if(! insideHistoryEvent){
Sys.Debug.trace("making history event for compare open");var state={};state.description="compare open";state.magic = magic;state.isCompareOpen=true;Sys.Application.get_history().addHistoryPoint(state);}
Sys.Debug.trace("Plan shrinking");cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-na-_-Compare These Plans","na-_-Compare These Plans");var comp = new AjaxControlToolkit.Animation.ResizeAnimation($get(clientIDs['ComparePanel']), 0.2, Plans.fps, null, 300);comp.add_started(function(){
$get('RefinementBlock').style.display = "none";$get("ResultCount").style.display = "none";$get("QuestionPaginationWrap").style.display = "none";});comp.add_ended(function(){
$get('CompareButton').disabled = false;$get("compareDisableDiv").style.display = "none";$get('CompareSpinner').style.display = "none";});comp.play();var barcells = getElementsByClassName($get('Graph1'),'BarCell');for (var x = 0;x<barcells.length;x++) { barcells[x].style.height = '50px';}
$get('GraphTable').style.height = '116px';Plans.compressForCompareView(false);createCompareTable(planIdentsWithProductIdents);}
}, 100);}
function getCheckedPlanIdentsWithProductIdents()
{
var planIdentsWithProductIdents = {};var i=0;for (var planIdent in Plans.healthPlans)
{
$get("BarCheck_" +planIdent).disabled = false;}
for(var planIdent in Plans.healthPlans) 
{
if(i<3){
if($get("BarCheck_" +planIdent).checked)
{
planIdentsWithProductIdents[planIdent]=Plans.healthPlans[planIdent].productIdent;i++;}
}if(i==3){
for(var planIdent in Plans.healthPlans){
if($get("BarCheck_"+planIdent).checked == false){
$get("BarCheck_"+planIdent).disabled = true;}
}
break;}
}
planIdentsWithProductIdents.getLength = function(){return i;};return planIdentsWithProductIdents;}
function compareChecked()
{
var planIdentsWithProductIdents = getCheckedPlanIdentsWithProductIdents();if(planIdentsWithProductIdents.getLength()>0){
$get('CompareButton').disabled = false;$get("compareDisableDiv").style.display = "none";}else{
$get('CompareButton').disabled = true;$get("compareDisableDiv").style.display = "";compareClose();}
if(isCompareOpen){
Sys.Debug.trace(compareViewHealthPlan);createCompareTable(planIdentsWithProductIdents);}
cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-na-_-Compare Checkbox","na-_-Compare Checkbox");}
function compareClose(insideHistoryEvent)
{
if(! isCompareOpen) return;isCompareOpen=false;if(! insideHistoryEvent){
Sys.Debug.trace("making history event for compare close");var state={};state.description="compare close";state.magic=magic;state.isCompareOpen = false;Sys.Application.get_history().addHistoryPoint(state);}
Plans.compressForCompareView(true);var comp = new AjaxControlToolkit.Animation.ResizeAnimation($get(clientIDs['ComparePanel']), 0.2, Plans.fps, null, 0);comp.add_ended(function(){
$get('RefinementBlock').style.display = "";$get("ResultCount").style.display = "";$get("QuestionPaginationWrap").style.display = "";});comp.play();var barcells = getElementsByClassName($get('Graph1'),'BarCell');for (var x = 0;x<barcells.length;x++) { barcells[x].style.height = '';} 
$get('GraphTable').style.height = '';}
function goToPreviousQuestion(question,insideHistoryEvent)
{
if(! questionAreaEnabled) return;enableQuestionArea(false);$get(clientIDs["NextQuestion"]).style.display="";var previousQuestionIndex;if(question==null){
previousQuestionIndex=-1;if(identifiers["PP/PLAN/REFINE_START"]) $get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_START"].Value;}else{
if(getNextQuestion(survey,question, null)==null){
$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_LAST"].Value;}else{
$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_NEXT"].Value;}
for(var i=0;i<askedQuestions.length;i++){
if(askedQuestions[i]==question){
previousQuestionIndex=i;break;}
}
Sys.Debug.assert(typeof(previousQuestionIndex)!="undefined","The question must be found in the askedQuestions array");}
if(currentQuestionIndex==askedQuestions.length)
deleteDoneDiv();if(previousQuestionIndex!=currentQuestionIndex){
var howMuchToMove = (currentQuestionIndex - previousQuestionIndex) * getElementsByClassName(document.body,'Question')[0].clientHeight;var b = $get(clientIDs['QuestionsList']);var nextQuestionNewMove = new AjaxControlToolkit.Animation.MoveAnimation(b,0.05, Plans.fps, null, howMuchToMove , true, null )
nextQuestionNewMove.add_ended(function(){
enableQuestionArea(true);});nextQuestionNewMove.play();}else{
enableQuestionArea(true);}
currentQuestionIndex = previousQuestionIndex;cm.createPageViewTagForRefinementAnswers(currentQuestionIndex+1, null, null);cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=Refinement Steps-_-Question Number-_-" + (currentQuestionIndex+1), "Question Number-_-" + (currentQuestionIndex+1));if(! insideHistoryEvent)
makeQuestionHistoryEvent(question);}
function makeQuestionButton(question, questionIndex, enabled)
{
var questionButtonTooltip=$get("questionButtonTooltip_"+questionIndex);if(! questionButtonTooltip){
questionButtonTooltip = document.createElement('div');questionButtonTooltip.id = "questionButtonTooltip_"+questionIndex;questionButtonTooltip.style.display = "none";questionButtonTooltip.className="TooltipBody";document.body.appendChild(questionButtonTooltip);}
questionButtonTooltip.innerHTML= question.ShortText;var questionButton=$get("questionButton_"+questionIndex);if(questionButton){
Sys.UI.DomElement.removeCssClass(questionButton,'inactive');}else{
questionButton = document.createElement("a");questionButton.id = "questionButton_"+questionIndex;questionButton.appendChild(document.createTextNode(questionIndex+1));$get(clientIDs['QuestionPagination']).appendChild(questionButton);}
if ($find("questionButtonHoverMenuExtender_"+questionIndex)) {
$find("questionButtonHoverMenuExtender_"+questionIndex).dispose();}
if(enabled){
$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15,"PopupPosition":4,"id":"questionButtonHoverMenuExtender_"+questionIndex,"popupElement":questionButtonTooltip}, null, null, questionButton);}else{
Sys.UI.DomElement.addCssClass(questionButton,'inactive');}
questionButton.onclick = function(){if(questionAreaEnabled && !Sys.UI.DomElement.containsCssClass(this,'inactive')) goToPreviousQuestion(question);return(false);};}
function deleteQuestionButton(questionIndex)
{
Sys.Debug.trace("deleting question button #" + questionIndex+1);var questionButton=$get("questionButton_"+questionIndex);Sys.Debug.assert(questionButton!=null,"The question button should exist");if(questionIndex>=survey.Questions.length){
questionButton.parentNode.removeChild(questionButton);}else{
questionButton.onclick = "";Sys.UI.DomElement.addCssClass(questionButton,'inactive');}
var questionButtonTooltip=$get("questionButtonTooltip_"+questionIndex);Sys.Debug.assert(questionButtonTooltip!=null,"The question button tooltip should exist");questionButtonTooltip.parentNode.removeChild(questionButtonTooltip);var questionButtonHoverMenuExtender = $find("questionButtonHoverMenuExtender_"+questionIndex);Sys.Debug.assert(questionButtonHoverMenuExtender!=null,"The questionButtonHoverMenuExtender should exist");questionButtonHoverMenuExtender.dispose();}
function PreviousQuestionDivClick(){
if((currentQuestionIndex-1)>=0){
goToPreviousQuestion(askedQuestions[currentQuestionIndex-1]);}else{
goToPreviousQuestion(askedQuestions[0]);}
cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-na-_-Previous Question","na-_-Previous Question");}
function gotoNextQuestion()
{
Sys.UI.DomElement.addCssClass($get("SpinnerDiv"),"notext");enableQuestionArea(false);resetCoremetricsFlag();var nextQuestion;if(currentQuestionIndex==askedQuestions.length){
goToPreviousQuestion(askedQuestions[0]);return;}
if(currentQuestionIndex==-1)
{
nextQuestion=getFirstQuestion(survey);}else{
var selectedAnswer = getSelectedAnswer(askedQuestions[currentQuestionIndex]);if( (askedQuestionsAnswers[currentQuestionIndex]!="undefined") && 
(askedQuestionsAnswers[currentQuestionIndex]!=selectedAnswer)){
askedQuestionsAnswers[currentQuestionIndex]=selectedAnswer;updateBarHeights();}
cm.createPageViewTagForRefinementAnswers(currentQuestionIndex+2, askedQuestions[currentQuestionIndex].ShortText, (selectedAnswer==null?null:selectedAnswer.AnswerText));cm.createConversionEventCompleteTagForRefinementStep(currentQuestionIndex+1);cm.createConversionEventInitiationTagForRefinementStep(currentQuestionIndex+2);nextQuestion=getNextQuestion(survey,askedQuestions[currentQuestionIndex], selectedAnswer);}
currentQuestionIndex++;if(nextQuestion==null){
$get(clientIDs["NextQuestion"]).style.display="none";$get(clientIDs['QuestionsList']).appendChild(doneDiv);}else{
$get(clientIDs["NextQuestion"]).style.display="";askedQuestions[currentQuestionIndex]=nextQuestion;if(getNextQuestion(survey,askedQuestions[currentQuestionIndex], null)==null){
$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_LAST"].Value;}else{
$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_NEXT"].Value;}
if(! $get("question_" + askedQuestions[currentQuestionIndex].QuestionIdent)){
var questionDiv = makeQuestionDiv(askedQuestions[currentQuestionIndex]);$get(clientIDs['QuestionsList']).appendChild(questionDiv);createQuestionButtons();}
makeQuestionHistoryEvent(askedQuestions[currentQuestionIndex]);}
var howMuchToMove;var previousQuestionDiv;if(currentQuestionIndex > 0){
clearPlansOverlay();howMuchToMove = - (getElementsByClassName(document.body,'Question')[0].clientHeight) ;previousQuestionDiv = $get(clientIDs['QuestionsList']);var moveAnim = new AjaxControlToolkit.Animation.MoveAnimation(previousQuestionDiv, 0.5, Plans.fps, null, howMuchToMove , true, null );moveAnim.add_ended(function(){
enableQuestionArea(true);Sys.UI.DomElement.removeCssClass($get("SpinnerDiv"),"notext");});moveAnim.play();}else{
enableQuestionArea(true);Sys.UI.DomElement.removeCssClass($get("SpinnerDiv"),"notext");}
coremetricsTagForVisiblePlans();}
function updateResults()
{
if(! questionAreaEnabled) return;enableQuestionArea(false);var question=askedQuestions[currentQuestionIndex];var previousRawAnswer=rawAnswers[question.QuestionIdent];var previousAskedQuestions=askedQuestions;var currentQuestion = askedQuestions[currentQuestionIndex];var selectedAnswer=getSelectedAnswer(currentQuestion);if(getNextQuestion(survey,currentQuestion, selectedAnswer)==null){
$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_LAST"].Value;}else{
$get(clientIDs["NextQuestion"]).value = identifiers["PP/PLAN/REFINE_NEXT"].Value;}
if(previousRawAnswer != rawAnswers[question.QuestionIdent]){
askedQuestionsAnswers[currentQuestionIndex]=selectedAnswer;updateBarHeights();for( var j=previousAskedQuestions.length-1;j>currentQuestionIndex;j--)
{
deleteQuestionDiv(previousAskedQuestions[j]);deleteQuestionButton(j);}
askedQuestions.length = currentQuestionIndex+1;askedQuestionsAnswers.length = currentQuestionIndex+1;}else{
enableQuestionArea(true);}
}
function getSelectedAnswer(question)
{
var selectedAnswer;if($get("question_" + question.QuestionIdent)==null){
Sys.Debug.trace(question.QuestionIdent + " has not been asked yet");return undefined;}
var radioQuestionSelectedAnswer;if(question.AnswerType==1){
var radioButtons = document.getElementsByName("answer_" + question.QuestionIdent);for(var j=0;j<radioButtons.length;j++){
if(radioButtons[j].checked){
radioQuestionSelectedAnswer=radioButtons[j].value;break;}
}
if(typeof(radioQuestionSelectedAnswer)=="undefined"){
return null;}
}
for(var x=0;x<question.Answers.length;x++){
switch(question.AnswerType){
case 1:
if(question.Answers[x].AnswerIdent==radioQuestionSelectedAnswer){
selectedAnswer=question.Answers[x];rawAnswers[question.QuestionIdent]=selectedAnswer.AnswerIdent;}
break;case 2:
Sys.Debug.fail("Not supported");break;case 3:
if(question.Answers[x].AnswerText==$get("answer_" + question.QuestionIdent).value){
selectedAnswer=question.Answers[x];rawAnswers[question.QuestionIdent]=selectedAnswer.AnswerIdent;}
break;case 4:
var sliderAnswerValue = parseInt($get("answer_" + question.QuestionIdent).value);rawAnswers[question.QuestionIdent]=sliderAnswerValue;Sys.Debug.assert(sliderAnswerValue>=-1,"The slider's value must be -1 or greater");Sys.Debug.assert(sliderAnswerValue<numberOfSliderTicks+1,"The slider cannot be set to a value higher than there are answers");if(sliderAnswerValue==-1){
return null;}
sliderAnswerValue = roundToNearestTick(sliderAnswerValue);var sliderAnswerValue0to1 = quantize0to1(sliderAnswerValue);selectedAnswer = question.Answers[x];if(typeof(selectedAnswer)=="undefined" || selectedAnswer==null) return selectedAnswer;break;default:
Sys.Debug.fail("unknown AnswerType: " + question.AnswerType);break;}
if(typeof(selectedAnswer)!="undefined"){
break;} 
}
if(typeof(selectedAnswer)=="undefined")
Sys.Debug.fail("Could not find the answer the user selected in the list of possible answers. There is the problem with the question data. QuestionIdent: " + question.QuestionIdent);return selectedAnswer;}
function insertAfter(parentBlock, node, referenceNode) {
parentBlock.insertBefore(node, referenceNode.nextSibling);}
function makeQuestionHistoryEvent(question){
Sys.Debug.trace("making history event for question ident:" + question.QuestionIdent);var state={};state.description="question ident: " + question.QuestionIdent;state.magic=magic;state.callback = "goToPreviousQuestion(getQuestion(survey,'" + question.QuestionIdent + "'),true)";state.isCompareOpen=isCompareOpen;Sys.Application.get_history().addHistoryPoint(state);}
function deleteQuestionDiv(question)
{
var questionDiv = $get("question_" + question.QuestionIdent);Sys.Debug.assert(questionDiv!=null,"Cannot delete a question div that doesn't exist");var hoverMenuExtender = $find("questionHoverMenuExtender_" + question.QuestionIdent);if(hoverMenuExtender) hoverMenuExtender.dispose();switch(question.AnswerType){
case 4:
var questionSlider = $find("questionSlider_" + question.QuestionIdent);Sys.Debug.assert(questionSlider!=null,"The slider extender should exist");questionSlider.dispose();if(question.CustomText){
var labelsDoc = loadXml(question.CustomText);var sliderElement = labelsDoc.getElementsByTagName("Slider")[0];var labelsElement = sliderElement.getElementsByTagName("Labels")[0];var labelElements = labelsElement.getElementsByTagName("Label");for(var k=0;k<labelElements.length;k++){
if(labelElements[k].getElementsByTagName("Tooltiptext")[0].firstChild){
var hoverMenu = $find("questionHoverMenuExtender_"+question.QuestionIdent + "_" + labelElements[k].getAttribute("Location"));Sys.Debug.assert(hoverMenu!=null,"The questionHoverMenuExtender extender should exist");hoverMenu.dispose();}
}
}
break;}
questionDiv.parentNode.removeChild(questionDiv);}
function snapToNearestTick(quesIdent){
var currentvalue = $get("answer_" + quesIdent).value;var roundedvalue = roundToNearestTick(currentvalue);$find("questionSlider_" + quesIdent).set_Value(roundedvalue);}
function roundToNearestTick(value){
return Math.round(value * numberOfSliderTickMarks / numberOfSliderTicks) * numberOfSliderTicks / numberOfSliderTickMarks;}
function quantize0to1(value){
var newvalue = (value - (numberOfSliderTicks / numberOfSliderTickMarks )) * (1/( numberOfSliderTicks - 30));newvalue = newvalue < 0 ? '' : newvalue;return newvalue;}
function makeQuestionDiv(question)
{
Sys.Debug.trace("making question div for id " + question.QuestionIdent);Sys.Debug.assert($get("question_" + question.QuestionIdent)==null,"Cannot create a question div that already exists");var parentDiv = document.createElement("div");parentDiv.className="Question";parentDiv.id = "question_" + question.QuestionIdent;var questionP = document.createElement("p");questionP.className="questionQuestion";questionP.innerHTML = "<strong>"+(currentQuestionIndex + 1) + ".</strong> " + question.ShortText;parentDiv.appendChild(questionP);if(question.AdditionalInfo){
var questionMark = document.createElement("span");questionMark.appendChild(document.createTextNode(" "));questionMark.id="questionMark_" + question.QuestionIdent;questionMark.className="Tooltip";questionP.appendChild(questionMark);var tooltip = document.createElement("span");tooltip.id="tooltip_" + question.QuestionIdent;tooltip.style.display ="none";tooltip.className="TooltipBody";tooltip.innerHTML = question.AdditionalInfo;document.body.appendChild(tooltip);$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15, "PopupPosition":4,"id":"questionHoverMenuExtender_"+question.QuestionIdent,"popupElement":tooltip}, null, null, questionMark);}
var questionAnswersDiv = document.createElement("div");questionAnswersDiv.className="questionAnswers";parentDiv.appendChild(questionAnswersDiv);switch(question.AnswerType){
case 1:
for(var i=0;i<question.Answers.length;i++){
var radio;try{
radio = document.createElement('<input type="radio" name="answer_' + question.QuestionIdent + '";  />');}catch(err){
radio = document.createElement("input");radio.type="radio";}
radio.name="answer_" + question.QuestionIdent;radio.id = "answer_" + question.QuestionIdent + "_" + question.Answers[i].AnswerIdent;radio.value=question.Answers[i].AnswerIdent;if(typeof(askedQuestionsAnswers[currentQuestionIndex])=="undefined" || askedQuestionsAnswers[currentQuestionIndex]==null){
if(rawAnswers[question.QuestionIdent]==question.Answers[i].AnswerIdent){
radio.checked="checked";}
}else{
if(askedQuestionsAnswers[currentQuestionIndex]==question.Answers[i]){
radio.checked="checked";}
}
$addHandler(radio,"click",updateResults);var radioLabel = document.createElement("label");radioLabel.htmlFor = radio.id;radioLabel.innerHTML = question.Answers[i].AnswerText;questionAnswersDiv.appendChild(radio);questionAnswersDiv.appendChild(radioLabel);Sys.UI.DomElement.addCssClass(questionAnswersDiv,"radio");}
break;case 2:
Sys.Debug.fail("Not supported");break;case 3:
var textBox = document.createElement("input");textBox.type="text";textBox.id="answer_" + question.QuestionIdent;textBox.name="answer_" + question.QuestionIdent;if(typeof(rawAnswers[question.QuestionIdent])!="undefined") textBox.value=rawAnswers[question.QuestionIdent];questionAnswersDiv.appendChild(textBox);break;case 4:
var textBox = document.createElement("input");if(typeof(rawAnswers[question.QuestionIdent])=="undefined"){
rawAnswers[question.QuestionIdent]=-1;}
textBox.value=rawAnswers[question.QuestionIdent];textBox.type="text";textBox.id="answer_" + question.QuestionIdent;textBox.name="answer_" + question.QuestionIdent;var sliderWrap = document.createElement("div");Sys.UI.DomElement.addCssClass(sliderWrap,'sliderWrap');sliderWrap.appendChild(textBox);questionAnswersDiv.appendChild(sliderWrap);$addHandler(textBox,"change",updateResults);setTimeout(function(){
var s = $create(AjaxControlToolkit.SliderBehavior, {"id":("questionSlider_" + question.QuestionIdent),"Maximum":(numberOfSliderTicks-1),"Minimum":-1,"Steps":(numberOfSliderTicks+1),"Length":460,"RaiseChangeOnlyOnMouseUp":true,"EnableHandleAnimation":true}, null, null, textBox);s.add_slideStart( function(){ inadrag = true;$find("questionSlider_" + question.QuestionIdent)._handle.className = "active";});s.add_slideEnd( function() { 
$find("questionSlider_" + question.QuestionIdent)._handle.className = "";clearPlansOverlay();snapToNearestTick(question.QuestionIdent);inadrag = false;});s.add_valueChanged( function(){ 
if (inadrag)
return;clearPlansOverlay();snapToNearestTick(question.QuestionIdent);});},11);if(question.CustomText){
var labelsDoc = loadXml(question.CustomText);var sliderElement = labelsDoc.getElementsByTagName("Slider")[0];var labelsElement = sliderElement.getElementsByTagName("Labels")[0];var labelElements = labelsElement.getElementsByTagName("Label");var noAnswer = document.createElement("div");noAnswer.innerHTML = identifiers["PP/PLAN/NO_ANSWER"].Value;Sys.UI.DomElement.addCssClass(noAnswer,'noAnswer');questionAnswersDiv.appendChild(noAnswer);for(var k=0;k<labelElements.length;k++){
var labelElement=labelElements[k];var aSpan = document.createElement("span");aSpan.innerHTML = labelElement.getElementsByTagName("DisplayText")[0].firstChild ? labelElement.getElementsByTagName("DisplayText")[0].firstChild.nodeValue : "";var cssClass;switch(labelElement.getAttribute("Location")){
case "ControlLeft":
cssClass="leftSliderLabel";break;case "ControlMiddle":
cssClass="middleSliderLabel";break;case "ControlRight":
cssClass="rightSliderLabel";break;case "FooterLeft":
cssClass="bottomLeftSliderLabel";break;case "FooterMiddle":
cssClass="bottomMiddleSliderLabel";break;case "FooterRight":
cssClass="bottomRightSliderLabel";break;default:
Sys.Debug.fail("Unrecognized slider label location " + labelElement.getAttribute("Location"));break;}
Sys.UI.DomElement.addCssClass(aSpan,cssClass);if(labelElement.getElementsByTagName("Tooltiptext")[0].firstChild){
var questionMark = document.createElement("span");questionMark.appendChild(document.createTextNode(" "));questionMark.id="questionMark_" + question.QuestionIdent + "_" + labelElement.getAttribute("Location");questionMark.className="Tooltip";aSpan.appendChild(questionMark);var tooltip = document.createElement("span");tooltip.id="tooltip_" + question.QuestionIdent + "_" + labelElement.getAttribute("Location");tooltip.style.display ="none";tooltip.className="TooltipBody";tooltip.innerHTML = labelElement.getElementsByTagName("Tooltiptext")[0].firstChild.nodeValue;document.body.appendChild(tooltip);$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15, "PopupPosition":4,"id":"questionHoverMenuExtender_"+question.QuestionIdent + "_" + labelElement.getAttribute("Location"),"popupElement":tooltip}, null, null, questionMark);}
questionAnswersDiv.appendChild(aSpan);}
}
break;default:
Sys.Debug.fail("unknown AnswerType: " + question.AnswerType);break;}
return parentDiv;}
function getFirstQuestion(survey){
return survey.Questions[0];}
function getNextQuestion(survey,question,answer,excludeQuestion)
{
if(answer !=null && answer.HasChildQuestions){
if(typeof(excludeQuestion) == "undefined"){
return answer.ChildQuestions[0];}else{
var i;for(i=0;i<answer.ChildQuestions.length;i++){
if(answer.ChildQuestions[i]==excludeQuestion)
{
break;}
}
Sys.Debug.assert(i<answer.ChildQuestions.length,"the excludeQuestion must be in the answer collection, so i must be a valid index in ChildQuestions, but, it is not!");i++;if(i<answer.ChildQuestions.length){
return questionAnswerParent.answer.ChildQuestions[i];}
}
}
var questionAnswerParent = getQuestionParent(survey,question);if(questionAnswerParent!=null){
var i;for(i=0;i<questionAnswerParent.answer.ChildQuestions.length;i++){
if(questionAnswerParent.answer.ChildQuestions[i]==question)
{
break;}
}
Sys.Debug.assert(i<questionAnswerParent.answer.ChildQuestions.length,"the question must be in the answer collection, so i must be a valid index in ChildQuestions, but, it is not!");i++;if(i<questionAnswerParent.answer.ChildQuestions.length){
return questionAnswerParent.answer.ChildQuestions[i];}else{
return getNextQuestion(survey,questionAnswerParent.question,questionAnswerParent.answer,question);}
}else{
var i;for(i=0;i<survey.Questions.length;i++){
if(survey.Questions[i]==question) break;}
Sys.Debug.assert(i<survey.Questions.length,"the question must be in the Questions collection, so i must be a valid index in Questions, but, it is not!");i++;if(i<survey.Questions.length){
return survey.Questions[i];}else{
return null;}
}
}
function getQuestion(survey,questionId,currentlySearchedQuestion)
{
if(typeof(currentlySearchedQuestion)=="undefined"){
for(var i=0;i<survey.Questions.length;i++){
if(survey.Questions[i].QuestionIdent==questionId)
return survey.Questions[i];var ret = getQuestion(survey,questionId,survey.Questions[i]);if(ret!=null)
return ret;}
Sys.Debug.fail("the question must be found somewhere in the survey");}else{
for(var i=0;i<currentlySearchedQuestion.Answers.length;i++){
for(var j=0;j<currentlySearchedQuestion.Answers[i].ChildQuestions.length;j++){
if(currentlySearchedQuestion.Answers[i].ChildQuestions[j].QuestionIdent==questionId){
return currentlySearchedQuestion.Answers[i].ChildQuestions[j];}
}
}
return null;}
}
function getQuestionParent(survey, question, currentlySearchedQuestion)
{
if(typeof(currentlySearchedQuestion)=="undefined"){
for(var i=0;i<survey.Questions.length;i++){
if(question==survey.Questions[i])
return null;var ret = getQuestionParent(survey,question,survey.Questions[i]);if(ret!=null)
return ret;}
Sys.Debug.fail("the question must be found somewhere in the survey");}else{
for(var x=0;x<currentlySearchedQuestion.Answers.length;x++){
for(var y=0;y<currentlySearchedQuestion.Answers[x].ChildQuestions.length;y++){
if(currentlySearchedQuestion.Answers[x].ChildQuestions[y]==question){
var ret={};ret.question=currentlySearchedQuestion;ret.answer=currentlySearchedQuestion.Answers[x];return ret;}else{
var ret = getQuestionParent(survey,question,currentlySearchedQuestion.Answers[x].ChildQuestions[y]);if(ret!=null)
return ret;}
}
}
return null;}
}
function updateBarHeights(){
enableQuestionArea(false);var surveyAnswers=[];for(var k=0;k<askedQuestions.length;k++)
{
surveyAnswers[k]=new Humana.H1.Tems.Common.DataTransferObjects.SurveyAnswer();surveyAnswers[k].QuestionIdent=askedQuestions[k].QuestionIdent;if(askedQuestions[k].AnswerType==4){
surveyAnswers[k].AnswerText=null;var sliderAnswerValue = parseInt($get("answer_" + askedQuestions[k].QuestionIdent).value);Sys.Debug.assert(sliderAnswerValue>=-1,"The slider's value must be -1 or greater");Sys.Debug.assert(sliderAnswerValue<numberOfSliderTicks+1,"The slider cannot be set to a value higher than there are answers");if(sliderAnswerValue!=-1){
sliderAnswerValue = roundToNearestTick(sliderAnswerValue);surveyAnswers[k].AnswerText = quantize0to1(sliderAnswerValue);}
}else if(typeof(askedQuestionsAnswers[k])!="undefined" && askedQuestionsAnswers[k]!=null){
surveyAnswers[k].AnswerIdent=askedQuestionsAnswers[k].AnswerIdent;}
Sys.Debug.trace("Answer to question " + k + " (" + askedQuestions[k].QuestionIdent + ")- Text: " + surveyAnswers[k].AnswerText + " Ident: " + surveyAnswers[k].AnswerIdent);}
var planIdents = [];for(var planIdent in Plans.healthPlans)
planIdents.push(planIdent)
PageMethods.EvaluateRank(evaluateRankEngineIdentifier,surveyIdentifier,surveyAnswers,planIdents,function(planIdentifiers){
Plans.adjustBars(planIdentifiers,function(){enableQuestionArea(true);});},function(e){
enableQuestionArea(true);Ajax.Logging.ExceptionManager.getInstance().publishException(0, e);});}
function CalculateMinimumDistanceBMtoCM(bestMatchPlanName, closeMatches){
if ((bestMatchPlanName == "undefined")||(closeMatches == "undefined"))
return 0;if (closeMatches.length == 0)
return 0;var bestMatchPosition = Sys.UI.DomElement.getLocation($get("BarTitle_" + bestMatchPlanName));var minDistance = 10000;var closeMatchPosition;for(var j=0;j < closeMatches.length;j++) {
closeMatchPosition = Sys.UI.DomElement.getLocation($get("BarTitle_" + closeMatches[j]));var dist = closeMatchPosition.x - bestMatchPosition.x;if (Math.abs(dist)>=0){
if (Math.abs(dist) < Math.abs(minDistance)) {
minDistance = dist;}
}
}
if (minDistance == 10000)
return 0;else 
return minDistance;}
function bringBestMatchInView(){
if(firstTime){
firstTime = false;$get('Graph1').style.display = "";$get("PlansOverlay").innerHTML = identifiers["PP/PLAN/REFINE_INSTRUCT"].Value;$get('RefinementBlock').style.display="";$get( clientIDs['BarsLoadingSpinner']).style.display = "none";$get('QuestionPaginationWrap').style.display = "block";return;}else{
var bestMatchFound = false;var bestMatch;var greyWrap = $get('GreyWrap');var greyWrapLocation = Sys.UI.DomElement.getLocation($get('GreyWrap'));var bestMatchPosition;var leftMostPosition;var rightMostPosition;var horizontalMovement = 0;var leftPlans=0;var rightPlans=0;var closeMatches = [];var jcm = 0;var barWidth=125;for (var planBar in Plans.healthPlans){
if(Plans.healthPlans[planBar].visible){
if(! leftMostPosition) leftMostPosition = Sys.UI.DomElement.getLocation($get("BarTitle_" + planBar));if(! bestMatchFound && Plans.healthPlans[planBar].isBestMatch){
bestMatchPosition = Sys.UI.DomElement.getLocation($get("BarTitle_" + planBar));Sys.Debug.trace("Best Match is "+planBar+": "+Plans.healthPlans[planBar].Name);bestMatch = planBar;bestMatchFound = true;}else{
if(bestMatchFound)
rightPlans++;else
leftPlans++;}
rightMostPosition = Sys.UI.DomElement.getLocation($get("BarTitle_" + planBar));if (Plans.healthPlans[planBar].isCloseMatch){
closeMatches[jcm] = planBar;jcm++;}
}
}
Sys.Debug.trace("Total Number of plans:" +(rightPlans+leftPlans+1));var minDistance = CalculateMinimumDistanceBMtoCM(bestMatch, closeMatches);if(bestMatchFound){
if( (rightPlans + leftPlans + 1) * barWidth <= greyWrap.clientWidth){
Sys.Debug.trace("all the plans can fit on the screen");horizontalMovement = greyWrapLocation.x - leftMostPosition.x;}else if (leftMostPosition.x == bestMatchPosition.x) {
horizontalMovement = greyWrapLocation.x - leftMostPosition.x;}else if ( Math.abs(minDistance) < greyWrap.clientWidth ){
Sys.Debug.trace("center the middle point between bestmatch and close match");horizontalMovement = greyWrapLocation.x - bestMatchPosition.x - (minDistance/2) + ((greyWrap.clientWidth-barWidth)/2);if((leftMostPosition.x + horizontalMovement) > greyWrapLocation.x){
var leftOffset = (leftMostPosition.x + horizontalMovement) - greyWrapLocation.x;horizontalMovement = horizontalMovement - leftOffset;}
if((rightMostPosition.x + horizontalMovement) < (greyWrapLocation.x + greyWrap.clientWidth)){
var rightOffset = (greyWrapLocation.x + greyWrap.clientWidth) - (rightMostPosition.x + horizontalMovement);horizontalMovement = horizontalMovement + rightOffset - barWidth;}
}else if( (leftPlans + 1)*barWidth <= greyWrap.clientWidth ){
Sys.Debug.trace("can fit all the plans to the left of the best match");horizontalMovement = greyWrapLocation.x - leftMostPosition.x;}else if( (rightPlans + 1)*barWidth <= greyWrap.clientWidth ){
Sys.Debug.trace("can fit all the plans to the right of the best match");horizontalMovement = greyWrapLocation.x - rightMostPosition.x + greyWrap.clientWidth - barWidth;}else{
Sys.Debug.trace("just center the best match");horizontalMovement = greyWrapLocation.x - bestMatchPosition.x + (greyWrap.clientWidth/2);}
}else{
horizontalMovement = greyWrapLocation.x - leftMostPosition.x;}
var sh = new AjaxControlToolkit.Animation.MoveAnimation($get('Graph1'), Plans.horizontalScrollDuration ,Plans.fps , horizontalMovement, null, true);sh.add_ended(function(){
var planIdentsWithProductIdents = getCheckedPlanIdentsWithProductIdents();if(planIdentsWithProductIdents.getLength()>0){
$get('CompareButton').disabled = false;$get("compareDisableDiv").style.display = "none";}else{
$get('CompareButton').disabled = true;$get("compareDisableDiv").style.display = "";}
Plans.checkPaddles();coremetricsTagForVisiblePlans();});sh.play();}
}
function showDetails(planIdent){
var collapsiblePanel = $find("CollapsiblePanelExtender_"+planIdent);collapsiblePanel._toggle();}
function optionalBenefitChecked(checked,planIdent,planCharacteristicIdent)
{
var checkboxID = $get("checkbox_" + planIdent + "_" + planCharacteristicIdent);checkboxID.checked = checked;var compareCheck = $get("compareOptionalBenefitCheckBox_" + planIdent + "_" + planCharacteristicIdent);if(compareCheck) compareCheck.checked=checked;var planCharacteristic=null;for(var i=0;i<Plans.healthPlans[planIdent].PlanCharacteristicsCollection.length;i++){
var a=Plans.healthPlans[planIdent].PlanCharacteristicsCollection[i];if((a.Ident==planCharacteristicIdent) && (a.Items[0].Amount != 0)){
planCharacteristic=a;break;}
}
Sys.Debug.assert(planCharacteristic!=null,"PlanCharacteristic Ident " + planCharacteristicIdent + " not found in " + planIdent);planCharacteristic.isSelected=checked;var amount = parseFloat(planCharacteristic.Items[0].Amount);if(checked){
Plans.healthPlans[planIdent].OptionalBenefits+=amount;}else{
Plans.healthPlans[planIdent].OptionalBenefits-=amount;}
getElementsByClassName($get('LegendAndCompare'),'Legend')[0].style.display = "";Plans.healthPlans[planIdent].Total=Plans.healthPlans[planIdent].BasePremium + Plans.healthPlans[planIdent].OptionalBenefits;$get("Total_" + planIdent).innerHTML = identifiers["PP/PLAN/AMOUNT_MASK"].Value.replace("${n}",Math.abs(parseFloat(Plans.healthPlans[planIdent].Total)).toFixed(2) );$get("OptionalBenefits_" + planIdent).innerHTML = identifiers["PP/PLAN/AMOUNT_MASK"].Value.replace("${n}",Math.abs(parseFloat(Plans.healthPlans[planIdent].OptionalBenefits)).toFixed(2));if(Math.abs(Plans.healthPlans[planIdent].OptionalBenefits).toFixed(2)=="0.00")
Sys.UI.DomElement.removeCssClass($get("BasePremium_" + planIdent).parentNode.parentNode.parentNode,"PriceCellChanged");else{
$get("bh_" + planIdent).style.display = '';(new AjaxControlToolkit.Animation.FadeOutAnimation($get("bh_" + planIdent), 1.5, Plans.fps)).play();Sys.UI.DomElement.addCssClass($get("BasePremium_" + planIdent).parentNode.parentNode.parentNode,"PriceCellChanged");Sys.UI.DomElement.addCssClass($get("BasePremium_" + planIdent).parentNode.parentNode.parentNode,"Modified");}
if($get("Compare_Total_"+ planIdent)) $get("Compare_Total_"+ planIdent).innerHTML = $get("Total_" + planIdent).innerHTML;}
function pageNavigate(sender, args) {
var state = args.get_state();if(typeof(state)=="undefined" || state.magic!=magic){
Sys.Debug.trace("state is undefined or magic does not match - going back to first three questions");window.location = document.location.href.split('#')[0];}else{
Sys.Debug.trace("Navigated to state " + state.description);if(typeof(state.callback)!="undefined")
eval(state.callback);if(state.isCompareOpen)
compareOpen(true);else
compareClose(true);}
}
function applyNow(planIdent, evt, elem) {
var spinnerIMG = document.createElement('img');spinnerIMG.src = 'img/ajax-loader-sm.gif';spinnerIMG.alt = '';var spinner = document.createElement('div');spinner.appendChild(spinnerIMG);spinner.id = 'tempspinner';var target = evt == null ? elem : evt.target;var applyNow;if(!isCompareOpen){
applyNow = $get("ApplyNow_"+planIdent);target.parentNode.parentNode.appendChild(spinner);}else{
applyNow = $get("applyNow_Compare_"+planIdent);target.parentNode.appendChild(spinner);}
var optionalBenefits=[];for(var i=0;i<Plans.healthPlans[planIdent].PlanCharacteristicsCollection.length;i++){
var planCharacteristic=Plans.healthPlans[planIdent].PlanCharacteristicsCollection[i];if(planCharacteristic.isSelected){
optionalBenefits.push(planCharacteristic);}
}
cm.creatEventConversionTagOnApplyNow();var originCategoryId;if(isCompareOpen){
originCategoryId="PlanPointer Compare";cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-Compare-_-Apply Now","Compare-_-Apply Now");}else{
originCategoryId="PlanPointer Step";cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-Productview-_-Apply Now","Productview-_-Apply Now");}
cm.createApplicationTagForApplyNow(originCategoryId);cm.createPageViewTagForApplyNow(Plans.healthPlans[planIdent], optionalBenefits)
if(Plans.healthPlans[planIdent].isBestMatch == true){
cm.createEventConversionIfBestMatch();}
var awsApplicationResponse = PageMethods.ApplyNow(stateInformation,planIdent,Plans.healthPlans[planIdent].ProductIdent,Plans.healthPlans[planIdent].Name,Plans.healthPlans[planIdent].Deductible,Plans.healthPlans[planIdent].Total,Plans.healthPlans[planIdent].Description,optionalBenefits,$get("hidKeycode").value,function(awsApplicationResponse){
Sys.Debug.trace(awsApplicationResponse);Sys.Debug.trace("Tracking id: " + awsApplicationResponse);if(strPlanPointer_OCLink.indexOf("http://dev-") < 0)
strPlanPointer_OCLink = strPlanPointer_OCLink.replace("http://","https://");window.location.href = strPlanPointer_OCLink.replace("{1}",originCategoryId) + awsApplicationResponse;},function(e){
Ajax.Logging.ExceptionManager.getInstance().publishException(0, e);});}
function loadXml(text){
if (window.ActiveXObject)
{
var doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(text);return doc;}
else
{
var parser=new DOMParser();var doc=parser.parseFromString(text,"text/xml");return doc;}
}
function checkFor800px(){
var myWidth = 0, myHeight = 0;if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;myHeight = window.innerHeight;} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
myWidth = document.documentElement.clientWidth;myHeight = document.documentElement.clientHeight;} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
myWidth = document.body.clientWidth;myHeight = document.body.clientHeight;}
var styles = "css/800.css";if (myWidth >=990){
for (var i = 0;i < document.styleSheets.length;i++){
if (document.styleSheets[i].href.indexOf(styles) != -1)
document.styleSheets[i].disabled = true;}
return;}
if ($get('QuestionPaginationWrap')) $get('QuestionPaginationWrap').style.left = "";if ($get('RefinementBlock')) $get('RefinementBlock').style.width = "";if ($get('LegendAndCompare')) $get('LegendAndCompare').style.width = "";var links = document.getElementsByTagName("link");for (var i = 0;i<links.length;i++){
if (links[i].getAttribute('href') == styles) 
return;}
var newSS=document.createElement('link');newSS.setAttribute('rel','stylesheet');newSS.setAttribute('media','screen,projection');newSS.setAttribute('type','text/css');newSS.href=styles;document.getElementsByTagName("head")[0].appendChild(newSS);}
Sys.Application.add_load(checkFor800px);function removeSpouse(input){
if(input.id == yearTextBoxClientIDs[0].id){
var arguments = false;if(dayTextBoxClientIDs[0].value!="" || monthTextBoxClientIDs[0].value!="" || yearTextBoxClientIDs[0].value!=""){
var date=new Date(yearTextBoxClientIDs[0].value,monthTextBoxClientIDs[0].value-1,dayTextBoxClientIDs[0].value);if(date.getDate()==dayTextBoxClientIDs[0].value && date.getMonth()+1==monthTextBoxClientIDs[0].value && date.getFullYear()==yearTextBoxClientIDs[0].value){
arguments= true;}
}
var effDate=new Date($get(clientIDs['YearTextBox']).value,$get(clientIDs['MonthTextBox']).value-1,$get(clientIDs['DayTextBox']).value);if(arguments){
if(effDate.getDate()==$get(clientIDs['DayTextBox']).value && effDate.getMonth()+1==$get(clientIDs['MonthTextBox']).value && effDate.getFullYear()==$get(clientIDs['YearTextBox']).value){
arguments = true;}else arguments = false;}
if(arguments){
var age=new Date((parseInt(yearTextBoxClientIDs[0].value))+parseInt(identifiers["PP/WEL/VALID_AGE"].Value),monthTextBoxClientIDs[0].value-1,dayTextBoxClientIDs[0].value);var x = getElementsByClassName($get('SecondQuestion'), 'Person');if((effDate.getTime() - age.getTime()) < 0){
x[1].style.display = "none";}else{
x[1].style.display = "";}
} 
}
}
function autotab(input){
if(input.value.length== 2){
var x = input.nextSibling;while (x!=null && (x.nodeType!=1 || x.nodeName!="INPUT")) { 
x=x.nextSibling;}
if(x!= null){
try{
x.focus();}catch(e){};}
}
}
function populateStateInformation(){
stateInformation.Application.ZipCode=$get(clientIDs['ZipCode']).value;stateInformation.Application.Applicants=[];stateInformation.Application.NumberOfChildren=0;stateInformation.Application.SpouseExists=false;var effectiveDate=new Date($get(clientIDs['YearTextBox']).value,$get(clientIDs['MonthTextBox']).value-1,$get(clientIDs['DayTextBox']).value);stateInformation.Application.CoverageDate = effectiveDate;var applicantNumber =0;var today = new Date();var x = getElementsByClassName($get('SecondQuestion'), 'Person');for(var i=0;i<x.length;i++){
if(x[i].style.display == ""){
if(yearTextBoxClientIDs[i].value!="" && monthTextBoxClientIDs[i].value!="" && dayTextBoxClientIDs[i].value!=""){
var date=new Date(yearTextBoxClientIDs[i].value,monthTextBoxClientIDs[i].value-1,dayTextBoxClientIDs[i].value);stateInformation.Application.Applicants[applicantNumber] = new Humana.H1.Tems.Common.DataTransferObjects.Applicant();stateInformation.Application.Applicants[applicantNumber].BirthDate = date;if(tobaccoClientIDs[i].checked){
stateInformation.Application.Applicants[applicantNumber].Tobacco = Humana.H1.Quote.Common.DataTransferObjects.TobaccoApplicantTypes.S;}else{
stateInformation.Application.Applicants[applicantNumber].Tobacco = Humana.H1.Quote.Common.DataTransferObjects.TobaccoApplicantTypes.N;}
if(genderClientIDs[i].value == "Male"){
stateInformation.Application.Applicants[applicantNumber].Gender = Humana.H1.Quote.Common.DataTransferObjects.GenderTypes.M;}else{
stateInformation.Application.Applicants[applicantNumber].Gender = Humana.H1.Quote.Common.DataTransferObjects.GenderTypes.F;}
stateInformation.Application.Applicants[applicantNumber].Age=Math.floor((stateInformation.Application.CoverageDate.getTime()-stateInformation.Application.Applicants[applicantNumber].BirthDate.getTime())/1000/60/60/24/365);if(i==0){
stateInformation.Application.Applicants[applicantNumber].ApplicantType = Humana.H1.Quote.Common.DataTransferObjects.ApplicantTypes.PRIMARY;if(stateInformation.Application.Applicants[applicantNumber].Age<parseInt(identifiers["PP/WEL/VALID_AGE"].Value)){
stateInformation.Application.IsChildOnly=true;}else{
stateInformation.Application.IsChildOnly=false;}
}else if(i==1){
stateInformation.Application.Applicants[applicantNumber].ApplicantType = Humana.H1.Quote.Common.DataTransferObjects.ApplicantTypes.SPOUSE;stateInformation.Application.SpouseExists=true;}else{
stateInformation.Application.Applicants[applicantNumber].ApplicantType = Humana.H1.Quote.Common.DataTransferObjects.ApplicantTypes.CHILD;stateInformation.Application.NumberOfChildren++;}
applicantNumber++;}
}
}
stateInformation.CampaignType="Health";}
function toggleErrorDetails()
{
var divDetails = $get('ExceptionDetails');var text = '';if (divDetails.style.display == 'none'){
divDetails.style.display = '';text = 'Hide details';}else{
divDetails.style.display = 'none';text = 'Show details';}
if (typeof $get('ExceptionDetailsLink').innerText != 'undefined'){
$get('ExceptionDetailsLink').innerText = text;}else if (typeof $get('ExceptionDetailsLink').textContent != 'undefined'){
$get('ExceptionDetailsLink').textContent = text;}
return false;}
function CloseExceptionModalWindow(){
$find(clientIDs['ExceptionModalPopupExtender']).hide();}
function disableStartButton(){
if (disabledstart) return;var startButton = $get(clientIDs['StartButton']);Sys.UI.DomElement.addCssClass(startButton,"StartButtonDisabled");$get("StartButtonDisableDiv").style.display = "";$get(clientIDs['StartButton']).disabled=true;disabledstart=true;}
function enableStartButton(){
if (! disabledstart) return;var startButton = $get(clientIDs['StartButton']);Sys.UI.DomElement.removeCssClass(startButton,"StartButtonDisabled");$get("StartButtonDisableDiv").style.display = "none";$get(clientIDs['StartButton']).disabled=false;disabledstart=false;}
function startButtonClicked(evt){
if (disabledstart) return;$get('ApplicantsValidator').style.display="none";evt.preventDefault();if(Page_ClientValidate()){
populateStateInformation();$get("UpdateProgressSpinner").style.display="";disableStartButton();PageMethods.GetSecondPageData(stateInformation,secondPageDataRetrieved,function(e){
$get("UpdateProgressSpinner").style.display="none";enableStartButton();Ajax.Logging.ExceptionManager.getInstance().publishException(0, e);});}
setZipCodeFocus();return false;}
Sys.Application.add_load(function(sender, args){
cm.createPageViewTagForWelcomeScreen();$addHandler(window, 'resize', checkFor800px);Sys.Application.add_load(checkFor800px);$addHandler($get(clientIDs['StartButton']),"click",startButtonClicked);});Sys.Application.add_load(function(sender, args){
Ajax.Logging.ExceptionManager.getInstance().addListener(new Ajax.Logging.SysDebugTraceListener());Ajax.Logging.ExceptionManager.getInstance().addListener(new Ajax.Logging.WebServiceTraceListener());Ajax.Logging.ExceptionManager.getInstance().addListener(new Ajax.Logging.ModalPopupTraceListener('<br/>', clientIDs['ExceptionModalPopupExtender'],'ExceptionDetails'));if(! Sys.Debug.isDebug){
window.onerror = function(message, url, lineNumber) 
{ 
var e = Error.create(message, {description:message, name:'UnhandledError', lineNumber:lineNumber, url:url});Ajax.Logging.ExceptionManager.getInstance().publishException(0, e);return true;}
}
});function replaceHtml(el, html) {
var oldEl = (typeof el === "string" ? document.getElementById(el) : el);var newEl = oldEl.cloneNode(false);newEl.innerHTML = html;oldEl.parentNode.replaceChild(newEl, oldEl);return newEl;};function setHTML(el, html){
var tagName = el.tagName.toLowerCase();if(window.ActiveXObject && (tagName == 'thead'||'tbody'||'tr'||'td') ){
var div = document.createElement('div'), depth;switch (tagName) {
case 'thead':
case 'tbody': div.innerHTML = '<table><tbody>'+html+'</tbody></table>';depth = 2;break;case 'tr': div.innerHTML = '<table><tbody><tr>'+ html+'</tr></tbody></table>';depth = 3;break;case 'td': div.innerHTML = '<table><tbody><tr><td>'+html+'</td></tr></tbody></table>';depth = 4;}
for (var i = 0;i < el.childNodes.length;i++) el.removeChild(el.childNodes[i]);for (var k=0;k< depth;k++) div = div.firstChild;for (var j = 0;j < div.childNodes.length;j++) el.appendChild(div.childNodes[j]);}
else{
el.innerHTML = html;}
}
function learnMore(planIdent){
if(! arguments.callee.modal)
arguments.callee.modal=$create(AjaxControlToolkit.ModalPopupBehavior, {"BackgroundCssClass": "ModalWindowBackGround", "OkControlID":clientIDs['ModalWindowClose'],"PopupControlID":clientIDs['ModalWindow'],"id":"ModalPopupExtender_LearnMore"}, null, null, document.createElement("span"));$get("learnMoreIFrame").src= Plans.healthPlans[planIdent].LearnMoreLink;arguments.callee.modal.add_shown(function(){ document.getElementsByTagName('html')[0].style.overflowY = 'hidden' });arguments.callee.modal.add_hiding(function(){ document.getElementsByTagName('html')[0].style.overflowY = '' });arguments.callee.modal.show();$get("learnMoreIFrame").style.width="726px";$get("learnMoreIFrame").style.height="440px";}
function getCookie(name) {
var start = document.cookie.indexOf(name+"=");var len = start+name.length+1;if ((!start) && (name != document.cookie.substring(0,name.length))) return null;if (start == -1) return null;var end = document.cookie.indexOf(";",len);if (end == -1) end = document.cookie.length;return unescape(document.cookie.substring(len,end));}
function setCookie(name,value,expires,path,domain,secure) {
var cookieString = name + "=" +escape(value) +
( (expires) ? ";expires=" + expires.toGMTString() : "") +
( (path) ? ";path=" + path : "") +
( (domain) ? ";domain=" + domain : "") +
( (secure) ? ";secure" : "");document.cookie = cookieString;}
function deleteCookie(name,path,domain) {
if (getCookie(name)) document.cookie = name + "=" +
( (path) ? ";path=" + path : "") +
( (domain) ? ";domain=" + domain : "") +
";expires=Thu, 01-Jan-70 00:00:01 GMT";} 
function clearPlansOverlay(){
if ($get('PlansOverlay').style.display != 'none'){
$get('PlansOverlay').innerHTML = "";var fadeit = new AjaxControlToolkit.Animation.FadeOutAnimation($get('PlansOverlay'), 1.5, Plans.fps);fadeit.add_ended( function(){ $get('PlansOverlay').style.display = 'none';});fadeit.play();}
}
Sys.Application.add_load(function(){
var initialboxheight = $get('GreyWrap').clientHeight - $get('WelcomeText').offsetHeight - 23;var initialboxes = getElementsByClassName($get('InitialQuestions'),'InitialQuestionBox');for (var x=0;x < initialboxes.length;x++) initialboxes[x].style.height = initialboxheight + 'px';if(Sys.Debug.isDebug && typeof(shortcut)!="undefined"){
shortcut.add("Ctrl+M",function() {
cm.enabled=!cm.enabled;alert("Core metrics is " + (cm.enabled?"enabled":"disabled"));});}
});function adjustLogoLeftPos()
{
if (screen.width<=1024 && screen.width < 1152)
{
$get('imagemap_home_outer').style.left = 35;}
else if (screen.width==1152)
{
$get('imagemap_home_outer').style.left = 99;}
else if (screen.width>1152)
{
$get('imagemap_home_outer').style.left = 163;}
}
var BrowserDetect = {
init: function () {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";this.version = this.searchVersion(navigator.userAgent)
|| this.searchVersion(navigator.appVersion)
|| "an unknown version";this.OS = this.searchString(this.dataOS) || "an unknown OS";},
searchString: function (data) {
for (var i=0;i<data.length;i++) {
var dataString = data[i].string;var dataProp = data[i].prop;this.versionSearchString = data[i].versionSearch || data[i].identity;if (dataString) {
if (dataString.indexOf(data[i].subString) != -1)
return data[i].identity;}
else if (dataProp)
return data[i].identity;}
},
searchVersion: function (dataString) {
var index = dataString.indexOf(this.versionSearchString);if (index == -1) return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1));},
dataBrowser: [
{ string: navigator.userAgent,
subString: "OmniWeb",
versionSearch: "OmniWeb/",
identity: "OmniWeb"
},
{
string: navigator.vendor,
subString: "Apple",
identity: "Safari"
},
{
prop: window.opera,
identity: "Opera"
},
{
string: navigator.vendor,
subString: "iCab",
identity: "iCab"
},
{
string: navigator.vendor,
subString: "KDE",
identity: "Konqueror"
},
{
string: navigator.userAgent,
subString: "Firefox",
identity: "Firefox"
},
{
string: navigator.vendor,
subString: "Camino",
identity: "Camino"
},
{ 
string: navigator.userAgent,
subString: "Netscape",
identity: "Netscape"
},
{
string: navigator.userAgent,
subString: "MSIE",
identity: "Explorer",
versionSearch: "MSIE"
},
{
string: navigator.userAgent,
subString: "Gecko",
identity: "Mozilla",
versionSearch: "rv"
},
{ 
string: navigator.userAgent,
subString: "Mozilla",
identity: "Netscape",
versionSearch: "Mozilla"
}
],
dataOS : [
{
string: navigator.platform,
subString: "Win",
identity: "Windows"
},
{
string: navigator.platform,
subString: "Mac",
identity: "Mac"
},
{
string: navigator.platform,
subString: "Linux",
identity: "Linux"
}
]
};BrowserDetect.init();var boolFireForresterSurvey = true;function setCookieForSurvey(c_name,c_value,expiredays)
{
var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+ "=" +escape(c_value)+
((expiredays==null) ? "" : ";expires="+exdate+";path=/;domain=.humana-one.com");}
function getCookieForSurvey(c_name)
{
c_value="";if (document.cookie.length>0)
{
c_start=document.cookie.indexOf(c_name + "=");if (c_start!=-1)
{ 
c_start=c_start + c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if (c_end==-1) c_end=document.cookie.length
{
c_value = document.cookie.substring(c_start,c_end);return c_value;} 
}
}
return c_value;}
function viewPlansAvailablePage(getRedirectPageLink,objState)
{
if(objState[objState.selectedIndex].text != "in your state")
{
var exdate=new Date();var expiredays = 30;exdate.setDate(exdate.getDate()+expiredays);document.cookie="StateCookie=" +escape(objState[objState.selectedIndex].text)+
((expiredays==null) ? "" : ";expires="+exdate+";path=/;");var strURL = getRedirectPageLink + objState[objState.selectedIndex].text;window.location.href = strURL;}
}

//END Humana.H1.PlanPointer.Web.js.common.js
//START Humana.H1.PlanPointer.Web.js.plans.js
var Plans = {
fps : 16,
valueToPixels : 100, 
horizScrollPixels : 40,
horizScrollInterval: 20,
heightChangeDuration : 0.4,
compressForCompareDuration : 0.5,
squishDuration : 0.5,
compressDuration: .75,
horizontalScrollDuration: 1,
adjustWidthDuration : 0.75,
oldNewWidth : 125, 
globalAnimationFunctionArray: [],
totalPlans : function(){
var planCount = 0;for (var child in Plans.healthPlans)
planCount++;return planCount;},
visiblePlans : function(){
var visiblePlanCount = 0;for (var child in Plans.healthPlans){
if (Plans.healthPlans[child].visible)
visiblePlanCount++;}
return visiblePlanCount;},
init : function(){
},
getUpdatedBarHeight : function(relValue){
return Math.floor(relValue * Plans.valueToPixels + 19);},
shrink : function(el, unshrink){
var barObj = Plans.healthPlans[el];var compressZero = 9;var squishZero = 0;if (unshrink){
compressZero = Plans.getUpdatedBarHeight(barObj.relevanceValue);squishZero = Plans.oldNewWidth;}
barObj.newHeight = compressZero;var cell = $get("BarCell_" + barObj.Ident);if(unshrink){
$get('CompareLearnMoreTable_'+el).style.display = "";$get('PriceTable_'+el).style.display = "";$get('ShowDetailsDiv_'+el).style.display = "";$get('BarTitle_'+el).style.display="";$get('BarTitle_'+el).style.height = compressZero+"px";Sys.UI.DomElement.removeCssClass($get("BarCellSpacer_" + el),'zeroWidth');Sys.UI.DomElement.removeCssClass($get("ShowDetailsCellSpacer_" + el),'zeroWidth');Sys.UI.DomElement.removeCssClass($get("PriceCellSpacer_" + el),'zeroWidth');Sys.UI.DomElement.removeCssClass($get("CheckCellSpacer_" + el),'zeroWidth');} else{
$get('CompareLearnMoreTable_'+el).style.display = "none";$get('PriceTable_'+el).style.display = "none";$get('ShowDetailsDiv_'+el).style.display = "none";$get("BarCheck_" +el).checked = false;$get('BarTitle_'+el).style.display="none";Sys.UI.DomElement.addCssClass($get("BarCellSpacer_" + el),'zeroWidth');Sys.UI.DomElement.addCssClass($get("ShowDetailsCellSpacer_" + el),'zeroWidth');Sys.UI.DomElement.addCssClass($get("PriceCellSpacer_" + el),'zeroWidth');Sys.UI.DomElement.addCssClass($get("CheckCellSpacer_" + el),'zeroWidth');}
},
globalAnimationHandler: function (argument){
if(argument == true){
globalAnimationCounter++;}else{
globalAnimationCounter--;if(globalAnimationCounter == 0){
for(var i=0;i<Plans.globalAnimationFunctionArray.length;i++)
Plans.globalAnimationFunctionArray[i]();globalAnimationCounter = 0;}
}
},
add_GlobalAnimationHandler: function(closure){
Plans.globalAnimationFunctionArray.push(closure);},
adjustBars : function(data, functionAfterAnimations){
for(var key in Plans.healthPlans){
var barObj = Plans.healthPlans[key];barObj.relevanceValue = 0;}
var sortedValues=[];for(var i=0;i<data.length;i++){
if(typeof(Plans.healthPlans[data[i].Ident])!="undefined"){
var barObj = Plans.healthPlans[data[i].Ident];barObj.relevanceValue = data[i].Value;sortedValues.push(barObj.relevanceValue);}
}
sortedValues.sort().reverse();var bestMatchRelevancy=-1;var closeMatchRelevancy=-1;if(sortedValues[0]!=sortedValues[sortedValues.length-1]) bestMatchRelevancy=sortedValues[0];for (var j=1;j<sortedValues.length;j++){
if (sortedValues[j] != sortedValues[0]){ 
closeMatchRelevancy = sortedValues[j];break;}
}
for(var key in Plans.healthPlans){
var barObj = Plans.healthPlans[key];var MatchLabel = $get("MatchLabel_" + key);if (MatchLabel == null) continue;MatchLabel.innerHTML="";Plans.healthPlans[key].isBestMatch = false;Plans.healthPlans[key].isCloseMatch = false;if (barObj.relevanceValue == 0 && barObj.visible){ 
Plans.shrink(key);barObj.visible = false;}
}
for(var key in Plans.healthPlans){
var barObj = Plans.healthPlans[key];if ((barObj.visible != undefined) && !barObj.visible && barObj.relevanceValue>0){
Plans.shrink(key, true);barObj.visible = true;}
} 
for(var key in Plans.healthPlans){
var barObj = Plans.healthPlans[key];var MatchLabel = $get("MatchLabel_" + key);if (MatchLabel == null) continue;if((barObj.visible) && (barObj.relevanceValue>0)){
barObj.newHeight = Plans.getUpdatedBarHeight(barObj.relevanceValue);var heightChange = new AjaxControlToolkit.Animation.LengthAnimation($get("BarTitle_" + key), Plans.heightChangeDuration, Plans.fps, "style", "height", $get("BarTitle_" + key).offsetHeight, barObj.newHeight, "px");heightChange.add_started(function(){Plans.globalAnimationHandler(true);});heightChange.add_ended(function(){Plans.globalAnimationHandler(false);});heightChange.play();}
if (barObj.relevanceValue == bestMatchRelevancy){
MatchLabel.innerHTML = "<em>" + identifiers["PP/PLAN/BEST_MATCH"].Value + "</em>";barObj.isBestMatch = true;}
if(closeMatchRelevancy==barObj.relevanceValue){
MatchLabel.innerHTML = "<em>" + identifiers["PP/PLAN/CLOSE_MATCH"].Value + "</em>";barObj.isCloseMatch = true;}
};Plans.updateResultCount();},
compressForCompareView : function(uncompare){
var parallelParent = new AjaxControlToolkit.Animation.ParallelAnimation($get('Graph1'), Plans.compressForCompareDuration, Plans.fps);for(var planID in Plans.healthPlans){ 
var barObj = Plans.healthPlans[planID];if (uncompare){
if (($get('ContentPanel_' + barObj.Ident)) && ($get('ContentPanel_' + barObj.Ident).style.display != "none")){
barObj.newHeight = $get("BarTitle_" + barObj.Ident).clientHeight;Sys.Debug.trace("planbar being resized: " + barObj.Ident + " height: " + barObj.newHeight);}else{
barObj.newHeight = Plans.getUpdatedBarHeight(barObj.relevanceValue)
}
} else {
barObj.newHeight = ($get("BarTitle_" + barObj.Ident).clientHeight / 2.5);}
parallelParent.add(new AjaxControlToolkit.Animation.LengthAnimation($get("BarTitle_" + barObj.Ident), Plans.compressForCompareDuration, Plans.fps, "style", "height", $get("BarTitle_" + barObj.Ident).offsetHeight, barObj.newHeight, "px"));var showDetailsDiv = $get("ShowDetailsDiv_" + barObj.Ident);var compareWrapDiv = $get("Graph1");var hiddenHeight = 0;if (!uncompare) {
showDetailsDiv.setAttribute('oldheight',showDetailsDiv.style.height);compareWrapDiv.setAttribute('oldheight',showDetailsDiv.style.height);showDetailsDiv.style.height = 0;}
else {
showDetailsDiv.style.height = showDetailsDiv.getAttribute('oldheight');}
}
parallelParent.add_ended( function(){ $get('GraphTable').style.zoom = 1;$get('GraphTable').style.zoom = '';});parallelParent.play();},
updateResultCount : function(){
var resultCountText = identifiers["PP/PLAN/VIEWING_MASK"].Value;resultCountText = resultCountText.replace("${visible}",Plans.visiblePlans()).replace("${total}",Plans.totalPlans());$get('ResultCount').innerHTML = resultCountText;},
scrollDone: function(){
clearInterval(Plans.rightInterval);clearInterval(Plans.leftInterval);coremetricsTagForVisiblePlans();},
scrollRight: function(){
var left;if($get('Graph1').style.left=="")
left=0;else
left=parseInt($get("Graph1").style.left.substr(0,$get("Graph1").style.left.length-2));left+=Plans.horizScrollPixels;$get("Graph1").style.left=left + "px";Plans.checkPaddles();},
scrollLeft: function(){
var left;if($get('Graph1').style.left=="")
left=0;else
left=parseInt($get("Graph1").style.left.substr(0,$get("Graph1").style.left.length-2));left-=Plans.horizScrollPixels;$get("Graph1").style.left=left + "px";Plans.checkPaddles();},
checkPaddles: function(){
if((Sys.UI.DomElement.getBounds($get('GraphTable')).x) - Sys.UI.DomElement.getBounds($get("LeftPaddle")).x >= 20){
clearInterval(Plans.leftInterval);$get("LeftPaddleInactive").style.zIndex = 110;}else{
$get("LeftPaddleInactive").style.zIndex = 90;}
if((Sys.UI.DomElement.getBounds($get('GraphTable')).x + Sys.UI.DomElement.getBounds($get('GraphTable')).width + 90) - Sys.UI.DomElement.getBounds($get("RightPaddle")).x <= 20){
clearInterval(Plans.rightInterval);$get("RightPaddleInactive").style.zIndex = 110;}else{
$get("RightPaddleInactive").style.zIndex = 90;}
},
createBarContents: function(healthPlan,replacements,execAfterRender){
var tabs ={};var currentTab = null;for(var i=0;i<healthPlan.PlanCharacteristicsCollection.length;i++){
var planCharacteristic = healthPlan.PlanCharacteristicsCollection[i];if (planCharacteristic.Items[0].Value=="NA") continue;replacements["PLANCHARACTERISTIC_IDENT"]={value:planCharacteristic.Ident};replacements["PLANCHARACTERISTIC_ISREQUIRED"]={value:planCharacteristic.IsRequired};replacements["PLANCHARACTERISTIC_NAME"]={value:planCharacteristic.Name};replacements["PLANCHARACTERISTIC_DISPLAYVALUE"]={value:planCharacteristic.Items[0].DisplayValue};replacements["PLANCHARACTERISTIC_DISPLAYAMOUNT"]={value:planCharacteristic.Items[0].DisplayAmount};if(planCharacteristic.Type == Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.T)
replacements["PLANCHARACTERISTIC_SHORTDESCRIPTION"]={value:identifiers[planCharacteristic.ShortDescription.replace("{0}", healthPlan.Ident)].Value};else
replacements["PLANCHARACTERISTIC_SHORTDESCRIPTION"]={value:planCharacteristic.ShortDescription};replacements["PLANCHARACTERISTIC_LONGDESCRIPTION"]={value:planCharacteristic.LongDescription};if (planCharacteristic.Type == Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.H) 
{
currentTab = healthPlan.Ident + "_" + planCharacteristic.Ident + "_" + i;replacements["TAB_UID"]={value:currentTab}
tabs[currentTab]={};tabs[currentTab].bodiesArray = [];tabs[currentTab].labelsArray = [];tabs[currentTab].checkboxesArray = [];tabs[currentTab].body=Plans.doReplacements($get("tabBody_template").innerHTML,replacements);tabs[currentTab].header=Plans.doReplacements($get("tabHeader_template").innerHTML,replacements);}
if (currentTab != null)
{
switch (planCharacteristic.Type)
{
case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.F: 
break;case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.N: 
break;case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.P: 
break;case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.L:
case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.I: 
case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.S: 
case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlType.T: 
switch (planCharacteristic.Style)
{
case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlStyle.TEXT:
tabs[currentTab].bodiesArray.push(Plans.doReplacements($get("planCharacteristic_text_template").innerHTML,replacements));break;case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlStyle.LABEL:
if(tabs[currentTab].labelsArray.length==0){
tabs[currentTab].bodiesArray.push($get("planCharacteristic_labels_template").innerHTML);}
tabs[currentTab].labelsArray.push(Plans.doReplacements($get("planCharacteristic_label_template").innerHTML,replacements));break;case Humana.H1.PlanPointer.Common.DataTransferObjects.ControlStyle.CHECKBOX:
if(tabs[currentTab].checkboxesArray.length==0){
tabs[currentTab].bodiesArray.push($get("planCharacteristic_checkboxes_template").innerHTML);}
var f=function(){
var healthPlan=arguments.callee.healthPlan;var planCharacteristic=arguments.callee.planCharacteristic;$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15,"PopupPosition":4,"id": "hoverMenuExtender" + healthPlan.Ident + "_" + planCharacteristic.Ident + "_" + planCharacteristic.IsRequired ,"popupElement":$get("tooltip_" + healthPlan.Ident + "_" + planCharacteristic.Ident + "_" + planCharacteristic.IsRequired )}, null, null, $get("tooltipQuestionMark_" + healthPlan.Ident + "_" + planCharacteristic.Ident + "_" + planCharacteristic.IsRequired ));};f.healthPlan=healthPlan;f.planCharacteristic=planCharacteristic;execAfterRender.push(f);tabs[currentTab].checkboxesArray.push(Plans.doReplacements($get("planCharacteristic_checkbox_template").innerHTML,replacements));break;}
if(planCharacteristic.Style == Humana.H1.PlanPointer.Common.DataTransferObjects.ControlStyle.LABEL || planCharacteristic.Style == Humana.H1.PlanPointer.Common.DataTransferObjects.ControlStyle.CHECKBOX){
var f=function(){
var h=arguments.callee.healthPlan;var p=arguments.callee.planCharacteristic;var tooltipQuestionMark=$get("tooltipQuestionMark_" + h.Ident + "_" + p.Ident + "_" + p.IsRequired);var tooltip=$get("tooltip_" + healthPlan.Ident + "_" + p.Ident + "_" + p.IsRequired );var hoverMenuID="hoverMenuExtender_" + h.Ident + "_" + p.Ident + "_" + p.IsRequired;if(p.ShortDescription){
tooltip.parentNode.removeChild(tooltip);document.body.appendChild(tooltip);$create(AjaxControlToolkit.HoverMenuBehavior, {"OffsetY":15,"PopupPosition":4,"id": hoverMenuID ,"popupElement":tooltip}, null, null, tooltipQuestionMark);}else{
tooltipQuestionMark.style.display="none";}
};f.healthPlan=healthPlan;f.planCharacteristic=planCharacteristic;execAfterRender.push(f);}
break;}
}
}
var a;a = [];for(var tab in tabs){
a.push(tabs[tab].header);}
replacements["TAB_HEADERS"]={value: a.join("") };a = [];execAfterRender.push(function(){
$create(AjaxControlToolkit.TabContainer,{"activeTabIndex":0,
"clientStateField":$get("TabContainerClientState_"+healthPlan.Ident)}, null, null, $get("tabContainer_"+healthPlan.Ident));});var firstTab = true;for(var tab in tabs){
replacements["TAB_BODY"]={value: tabs[tab].bodiesArray.join("") };replacements["LABELS"]={value: tabs[tab].labelsArray.join("") };replacements["CHECKBOXES"]={value: tabs[tab].checkboxesArray.join("") };a.push(Plans.doReplacements(Plans.doReplacements(tabs[tab].body,replacements),replacements));if(firstTab){
var g = function(){
Sys.UI.DomElement.addCssClass($get("TabHeader_"+arguments.callee.tab),"ajax__tab_active");}
g.tab=tab;execAfterRender.push(g);}else{
var g = function(){
$get("TabBody_"+arguments.callee.tab).style.visibility="hidden";$get("TabBody_"+arguments.callee.tab).style.display="none";}
g.tab=tab;execAfterRender.push(g);}
var f = function(){
$create(AjaxControlToolkit.TabPanel, 
{"headerTab":$get("TabHeader_"+arguments.callee.tab)}, 
null, 
{"owner":"tabContainer_"+healthPlan.Ident}, $get("TabBody_"+arguments.callee.tab)
);};f.tab=tab;firstTab=false;execAfterRender.push(f);}
execAfterRender.push(function(){
$find("tabContainer_"+healthPlan.Ident).set_activeTabIndex(0);});execAfterRender.push(function(){ 
var trs = $get('tabContainer_'+healthPlan.Ident+'_body').getElementsByTagName('tr');for (var x = 0;x < trs.length;x++)
if (x%2 == 0) trs[x].className = 'zebra';});replacements["TAB_BODIES"]={value: a.join("") };var ret = Plans.doReplacements($get("tabContainer_template").innerHTML,replacements);return ret;},
removeHtmlComments : function(html){
if(! Plans.htmlCommentsRegex)
Plans.htmlCommentsRegex=new RegExp("\\<\\!--|--\\>","gi");return html.replace(Plans.htmlCommentsRegex,"");},
doReplacements: function(html,replacements){
if(! Plans.templateRegex)
Plans.templateRegex=new RegExp("\\$\\{(.*?)\\}","gi");html.replace('<td/>','');return html.replace(Plans.templateRegex,function(complete,param){
param = param.toUpperCase();if(replacements[param]){
return replacements[param].value;}else{
return complete;}
});},
createBar: function(healthPlan){
var execAfterRender=[];var replacements={
"PLAN_NAME": { value: healthPlan.Name },
"PLAN_IDENT": { value: healthPlan.Ident},
"PLAN_BASEPREMIUM": { value: identifiers["PP/PLAN/AMOUNT_MASK"].Value.replace("${n}", Math.abs(healthPlan.BasePremium).toFixed(2)) },
"PLAN_OPTIONALBENEFITS": { value: identifiers["PP/PLAN/AMOUNT_MASK"].Value.replace("${n}", "0.00") },
"PLAN_TOTAL": { value: identifiers["PP/PLAN/AMOUNT_MASK"].Value.replace("${n}", Math.abs(healthPlan.BasePremium).toFixed(2)) }
};var cells = {
BarRow : { template : 'BarRow_template' },
ShowDetailsRow : { template : 'ShowDetailsRow_template' },
PriceRow : { template : 'PriceRow_template' },
CheckRow : { template : 'CheckRow_template' }
};for (var x in cells){
cells[x].html=Plans.doReplacements($get(cells[x].template).innerHTML,replacements);if(x=="BarRow"){
cells[x].html=cells[x].html.replace("${CONTENTS}",Plans.createBarContents(healthPlan,replacements,execAfterRender));}
cells[x].html=Plans.removeHtmlComments(cells[x].html);}
cells.barExecAfterRender=[];cells.barExecAfterRender.push(function(){
var anim = $create(Humana.H1.PlanPointer.Web.Extenders.EnhancedCollapsiblePanelBehavior, 
{"ClientStateFieldID":"CollapsiblePanelExtender_"+ healthPlan.Ident+"_ClientState",
"CollapseControlID":"BarTitle_" + healthPlan.Ident,
"Collapsed":true,
"fps":Plans.fps,
"CollapsedHeight":0, 
"CollapsedWidth":125, 
"ExpandControlID":"BarTitle_" + healthPlan.Ident,
"ExpandDirection":1,
"ExpandedHeight":266, 
"ExpandedWidth":330,
"id":"CollapsiblePanelExtender_" + healthPlan.Ident,
"TextLabelID":"ShowDetails_"+ healthPlan.Ident, 
"ExpandedText":identifiers["PP/PLAN/HIDE_DETAIL"].Value, 
"CollapsedText":identifiers["PP/PLAN/SHOW_DETAIL"].Value}, 
null, null, $get("ContentPanel_" + healthPlan.Ident));anim.add_expandStart(function(obj){
Sys.UI.DomElement.addCssClass($get("BarTitle_"+healthPlan.Ident), 'BarTitleExpanded');var target = $get("BarTitle_"+healthPlan.Ident);var barTitleHeight = 36;var resizeAnimation = new AjaxControlToolkit.Animation.ResizeAnimation(target, 0.25, Plans.fps, 330, barTitleHeight);resizeAnimation.play();Sys.Debug.trace("resizing title on open");});anim.add_collapseStart(function(obj){
var target = $get("BarTitle_" +healthPlan.Ident);Sys.Debug.trace("resizing the Height of healthPlan " + healthPlan.Ident);var newHeight = isCompareOpen ? healthPlan.newHeight : Plans.getUpdatedBarHeight(healthPlan.relevanceValue);var newWidth = Plans.oldNewWidth;var resizeAnimation = new AjaxControlToolkit.Animation.ResizeAnimation(target, 0.25 , Plans.fps, newWidth, newHeight);resizeAnimation.play();Sys.Debug.trace("resizing title on close");Sys.UI.DomElement.removeCssClass($get("BarTitle_"+healthPlan.Ident), 'BarTitleExpanded');});});cells.contentsExecAfterRender=[];var f=function(obj){
obj.remove_expandComplete(arguments.callee);for(var i=0;i<arguments.callee.e.length;i++){
arguments.callee.e[i]();}
}
f.e=execAfterRender;cells.contentsExecAfterRender.push(function(){
$find("CollapsiblePanelExtender_" + healthPlan.Ident).add_expandComplete(f);});cells.contentsExecAfterRender.push(function(){
setupCollapsiblePanelHandlers(healthPlan);});return cells;},
createGraphTable: function(initialRanking){
var barsExecAfterRender=[];var contentsExecAfterRender=[];var bars={};for(var healthPlan in Plans.healthPlans){
Plans.healthPlans[healthPlan].visible=true;Plans.healthPlans[healthPlan].Total=Plans.healthPlans[healthPlan].BasePremium;Plans.healthPlans[healthPlan].OptionalBenefits=0;bars[healthPlan] = Plans.createBar(Plans.healthPlans[healthPlan]);barsExecAfterRender=barsExecAfterRender.concat(bars[healthPlan].barExecAfterRender);contentsExecAfterRender=contentsExecAfterRender.concat(bars[healthPlan].contentsExecAfterRender);bars[healthPlan].barExecAfterRender=null;bars[healthPlan].contentsExecAfterRender=null;}
contentsExecAfterRender.push(
function(){
Plans.adjustBars(initialRanking, true);}
);barsExecAfterRender.push(function(){
$get( clientIDs['BarsLoadingSpinner']).style.display = "none";$get('Graph1').style.visibility = "visible";$get('QuestionPaginationWrap').style.display = "block";Sys.Debug.trace("bars have been displayed");});barsExecAfterRender.push(function(){
function tdShrinkHandler(eventElement) {
if (eventElement.target.nodeName != 'TD' || Plans.healthPlans.numberOfOpenPlans == 0)
return;if (eventElement.target.parentNode.className == 'BarRow') {
collapseAllOpenPlans();$get('RefinementBlockDisable').style.display='none';}
} 
var barcellTDs = getElementsByClassName($get('GraphTable'),'BarCell');for (var x = 0;x < barcellTDs.length;x++){
$addHandler(barcellTDs[x],'click',tdShrinkHandler);}
});barsExecAfterRender=barsExecAfterRender.concat(contentsExecAfterRender);var rows = {
BarRow : { },
ShowDetailsRow : { },
PriceRow : { },
CheckRow : { }
};var graph1template=$get("Graph1_template").innerHTML;graph1template=Plans.removeHtmlComments(graph1template);for(var row in rows){
var htmlArray=[];for(var bar in bars){
htmlArray.push(bars[bar][row].html);}
graph1template=graph1template.replace("${" + row + "}",htmlArray.join(""));}
$get("Graph1").innerHTML=graph1template;graph1template=null;setTimeout(function(){
for(var i=0;i<barsExecAfterRender.length;i++){
barsExecAfterRender[i]();}
},0);}
};Plans.add_GlobalAnimationHandler(bringBestMatchInView);Plans.add_GlobalAnimationHandler(function(){enableQuestionArea(true);});
//END Humana.H1.PlanPointer.Web.js.plans.js
//START Humana.H1.PlanPointer.Web.js.coremetrics.js
var cm = {
enabled: true,
questionInitiateFlags : [] ,
questionCompleteFlags : [],
createPageViewTagForWelcomeScreen: function (){
if(!cm.enabled) return;setTimeout(function(){
cmCreatePageviewTag("PP:Welcome Screen", "210", null, null);},1);Sys.Debug.trace("Sending welcome screen coremetrics tag");},
createRegistrationTag: function(magic, age, gender, state, zipcode, numberOfApplicants, tobaccoFlag ){
if(!cm.enabled) return;setTimeout(function(){
cmCreateRegistrationTag(null, null, magic,null, state, zipcode, gender, age, null, null, tobaccoFlag, numberOfApplicants, null, null );},1);Sys.Debug.trace("Coremetrics event registration tag");},
createConversionEventTag: function (){
if(!cm.enabled) return;setTimeout(function(){
cmCreateConversionEventTag("Plan Pointer Application","1","Tool Usage","0");},1);Sys.Debug.trace("Coremetrics Create Event Conversion Tag" );},
createPageViewTagForRefinementAnswers: function(questionNumber, question, answer){
if(!cm.enabled) return;if(questionNumber <= questionCounter){
cmCreatePageviewTag("PP: Refinement Step " +questionNumber+":"+stateInformation.Application.StateAbbr , "211", null, null, false, false, false, null, null, null, null, null, null, null, question, answer);Sys.Debug.trace("Coremetrics tag for Question:" +questionNumber);}
else {
Sys.Debug.trace("Sending Coremetrics thank you");setTimeout(function(){
cmCreatePageviewTag("PP: Thank you", "210", null, null, false, false, false, null, null, null, null, null, null, null, question, answer);},1);}
},
createComparePageViewTag: function(){
if(!cm.enabled) return;setTimeout(function(){
cmCreatePageviewTag ("PP:View Comparison", "210", null, null);},1);},
createProductViewTagForPlanComparison: function(planName){
if(!cm.enabled) return;setTimeout(function(){
cmCreateProductviewTag(planName, planName, "720");},1);Sys.Debug.trace("Product view tag for comparison of" +planName);}, 
createPlanOverviewTag: function(planName){
if(!cm.enabled) return;setTimeout(function(){
cmCreatePageviewTag ("PP:Overview: " +planName, "211", null);cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-Productview-_-Overview" , "Productview-_-Overview" );},1);},
createPlanScenarioTag: function(planName, tabName){
if(!cm.enabled) return;var number;if(tabName=="Scenarios") number="212";if(tabName=="Optional Benefits") number="213";setTimeout(function(){
cmCreatePageviewTag("PP: " + tabName + ": " +planName, number, null);},1);cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-Productview-_-" + tabName, "Productview-_-" + tabName );},
leavingPlanDetailView: function(planIdent){
if(!cm.enabled) return;var optionalBenefitString = [];for (benefit in optionalBenefitSelection[planIdent]){
if (optionalBenefitSelection[planIdent][benefit] == 'true'){
optionalBenefitString+= benefit;}
}
Sys.Debug.trace(optionalBenefitString);},
createConversionEventInitiationTagForRefinementStep: function(questionNumber){
if(!cm.enabled) return;if((cm.questionInitiateFlags[questionNumber]==null) && (questionNumber<5)){
setTimeout(function(){
cmCreateConversionEventTag("Refinement Step" + questionNumber , "1", "Plan Pointer Steps", "0");},1);cm.questionInitiateFlags[questionNumber]= true;Sys.Debug.trace("Coremetrics conversion tag for Step:" +questionNumber);}
},
createConversionEventCompleteTagForRefinementStep: function(questionNumber){
if(!cm.enabled) return;if(cm.questionCompleteFlags[questionNumber]==null && (questionNumber<5)){
setTimeout(function(){
cmCreateConversionEventTag("Refinement Step" + questionNumber , "2", "Plan Pointer Steps", "10");},1);cm.questionCompleteFlags[questionNumber]= true;Sys.Debug.trace("Coremetrics conversion completion tag for Step:" +questionNumber);}
},
createPageElementTagsForPlans: function(planName){
if(!cm.enabled) return;setTimeout(function(){
cmCreatePageElementTag(planName, "PP Visible Plans");},1);},
creatEventConversionTagOnApplyNow: function(){
if(!cm.enabled) return;setTimeout(function(){
cmCreateConversionEventTag("Plan Pointer Application", "2", "Tool Usage", "100");},1);Sys.Debug.trace("Sent CM Event Conversion Tag for apply now");},
createEventConversionIfBestMatch: function(){
if(!cm.enabled) return;setTimeout(function(){
cmCreateConversionEventTag("Plan Pointer Classification", "2", "Best Match", "0");},1);}, 
createLearnMorepageViewtag: function(planName){
if(!cm.enabled) return;setTimeout(function(){
cmCreatePageviewTag("PP: Learn More:" +planName, "210.4", null);},1);Sys.Debug.trace("Learn more tag for:" +planName);cm.createManualLinkClickTag("www.humanaone.com/planpointer?cm_sp=General Pages-_-Productview-_-Learn More", "Productview-_-Learn More");},
createProductViewTagForPlanDetail: function(planName){
if(!cm.enabled) return;setTimeout(function(){
cmCreateProductviewTag(planName, planName, "710");},1);},
createApplicationTagForApplyNow: function(mode){
if(!cm.enabled) return;setTimeout(function(){
cmCreateApplicationTags("PageID", mode, "Online Consumer Application", "1", "PlanPointer Apply", null, null, null, true, false, null, "N");},1);Sys.Debug.trace("Application tag sent");}, 
createPageViewTagForApplyNow: function(planObject, optionalBenefits){
if(!cm.enabled) return;var optionalBenefitString;if(optionalBenefits.length == 0){
optionalBenefitString = null;} else{
for(var i=0;i<optionalBenefits.length;i++){
if(i==0){
optionalBenefitString= optionalBenefits[i].Name;}else{
optionalBenefitString += ", "+ optionalBenefits[i].Name;}
}
}
var matchFlag;if(planObject.isBestMatch){
matchFlag = "BM";}else if(planObject.isCloseMatch){
matchFlag = "CM";}else matchFlag = null;setTimeout(function(){
cmCreatePageviewTag("PP: Apply : " +planObject.Name, "250", false, false, false, matchFlag, optionalBenefitString);},1);Sys.Debug.trace("matchFlag: "+matchFlag+" - optional  benefits:"+optionalBenefitString);},
createManualLinkClickTag: function(pageURL, linkName){
if(!cm.enabled) return;Sys.Debug.trace(pageURL);Sys.Debug.trace(linkName);setTimeout(function(){
cmCreateManualLinkClickTag(pageURL, linkName);},1);}
};
//END Humana.H1.PlanPointer.Web.js.coremetrics.js
//START Humana.H1.PlanPointer.Web.js.cmdatatagutils.js
<!--
var cm_ClientID="90083415";var cm_TrackLink="A";var cm_TrackImpressions="RS";var cm_JSFEnabled = false;var cm_exAttr=new Array();var cmReferrer;var cmJv = "1.0";if (typeof(isNaN) == "function") { cmJv = "1.1";}
if (typeof(isFinite) == "function") { cmJv = "1.2";}
if (typeof(NaN) == "number") { cmJv = "1.3";}
if (typeof(decodeURI) == "function") { cmJv = "1.5";}
if (typeof(Array.forEach) == "function") { cmJv = "1.6";}
if (typeof(Iterator) == "object") {cmJv = "1.7";}
var cmCheckCMEMFlag = true;function cmSetProduction(){
cm_HOST="ww25.humana-one.com/eluminate?";}
function cmCreateManualImpressionTag(pageID, trackSP, trackRE) {
cmMakeTag(["tid","9","pi",pageID,"cm_sp",trackSP,"cm_re",trackRE,"st",cm_ClientTS]);}
function cmCreateManualLinkClickTag(href,name,pageID) { 
if (cmCreateLinkTag == null && cM != null) {
var cmCreateLinkTag = cM;}
if (cmCreateLinkTag != null) { 
var dt = new Date();cmLnkT3 = dt.getTime();href=cG7.normalizeURL(href,true);cmCreateLinkTag(cm_ClientTS, cmLnkT3, name, href, false, pageID);}
}
function cmCreateManualPageviewTag(pageID, categoryID,DestinationURL,ReferringURL,searchTerm) {
cmMakeTag(["tid","1","pi",pageID,"cg",categoryID,"ul",DestinationURL,"rf",ReferringURL,"se",searchTerm]);}
function cmCreatePageElementTag(elementID, elementCategory, pageID, pageCategoryID, elementLocation,attributes) {
if (attributes){
var cm_exAttr=new Array;cm_exAttr=attributes.split("-_-");}
cmMakeTag(["tid","15","eid",elementID,"ecat",elementCategory,"pflg","0","pid",pageID,"pcat",pageCategoryID,"eloc",elementLocation,"cm_exAttr",cm_exAttr]);}
function cmCreateProductElementTag(elementID, elementCategory, productID, productCategoryID, elementLocation,attributes) {
if (attributes){
cm_exAttr=attributes.split("-_-");}
cmMakeTag(["tid","15","eid",elementID,"ecat",elementCategory,"pflg","1","pid",productID,"pcat",productCategoryID,"eloc",elementLocation,"cm_exAttr",cm_exAttr]);}
function cmCreateTechPropsTag(pageID, categoryID,attributes) {
if(pageID == null || pageID == "") { pageID = getDefaultPageID();}
if (attributes){
var cm_exAttr=new Array();cm_exAttr=attributes.split("-_-");} 
cmMakeTag(["tid","6","pi",pageID,"cg",categoryID,"pc","Y","cm_exAttr",cm_exAttr]);}
function cmCreatePageviewTag(pageID, categoryID, searchString, searchResults, helpFlag, errorFlag, toolFlag, extraField1, extraField2, 
extraField3, extraField5, extraField6, extraField7, extraField8, extraField9, extraField10,extraField11, extraField12, extraField13, 
extraField14, extraField15, attributes) {
if (pageID == null || pageID == "") { pageID = getDefaultPageID();}
if (attributes){
var cm_exAttr=new Array;cm_exAttr=attributes.split("-_-");}
var extraField4 = null;if (helpFlag) { extraField4 = "HELP";}
else if (toolFlag) { extraField4 = "TOOL";}
else if (errorFlag) { extraField4 = "ERROR";}
cmMakeTag(["tid","1","pi",pageID,"cg",categoryID,"se",searchString,"sr",searchResults,"cm_exAttr",cm_exAttr,
"pv1",extraField1,"pv2",extraField2,"pv3",extraField3,"pv4",extraField4,"pv5",extraField5,"pv6",extraField6,
"pv7",extraField7,"pv8",extraField8,"pv9",extraField9,"pv10",extraField10,"pv11",extraField11,"pv12",extraField12,
"pv13",extraField13,"pv14",extraField14,"pv15",extraField15]);}
function cmCreateDefaultPageviewTag() {
cmCreatePageviewTag(getDefaultPageID(), null, null);}
function cmCreateProductviewTag(productID, productName, categoryID,attributes) {
if (attributes){
var cm_exAttr=new Array;cm_exAttr=attributes.split("-_-");}
cmMakeTag(["tid","5","pi","PRODUCT: "+productName+" ("+productID+")","pr",productID,"pm",productName,"cg",categoryID,"pc","Y","cm_vc",cmExtractParameter("cm_vc",document.location.href),"cm_exAttr",cm_exAttr]);}
function cmCreateConversionEventTag(eventID, actionType, categoryID, points,attributes) {
if (attributes){
var cm_exAttr=new Array;cm_exAttr=attributes.split("-_-");}
cmMakeTag(["tid","14","cid",eventID,"cat",actionType,"ccid",categoryID,"cpt",points,"cm_exAttr",cm_exAttr]);}
function cmCreateRegistrationTag(pageID, categoryID, 
visitorID,visitorEmail,visitorState,visitorZip,visitorGender,
visitorAge,productType,visitorIndustry,smoker,deductAmount,paymentType,priorInsurance,attributes){
if (attributes){
var cm_exAttr=new Array;cm_exAttr=attributes.split("-_-");}
cmMakeTag(["tid","2","cd",visitorID,"em",visitorEmail,"sa",visitorState,"zp",visitorZip,
"gd",visitorGender,"ag",visitorAge,"rg11", productType,"rg12",smoker,"rg13",deductAmount,
"rg14", paymentType,"rg15", priorInsurance,"rg1",visitorIndustry,"cm_exAttr",cm_exAttr]);}
function cmCreateErrorTag(pageID, categoryID) {
if(pageID == null || pageID == "") {
pageID = getDefaultPageID();}
cmMakeTag(["tid","404","pi",pageID,"cg",categoryID,"pc","Y"]);}
function cmMakeTag(__v) {
var cm = new _cm("vn2", "e4.0");var i;for (i = 0;i < __v.length;i += 2) {
var _n = __v[i];var _v = __v[i + 1];cm[_n] = _v;}
var datestamp = new Date();var stamp = (Math.floor(Math.random() * 11111111)) + datestamp.valueOf();cm.rnd = stamp;if (cm.tid == "6") {
cm.addTP();document.cookie = "cmTPSet=Y; path=/";}
if (cm.tid == "1") {
if (cI("cmTPSet") != 'Y') {
cm.tid = "6";cm.pc = "Y";cm.addTP();document.cookie = "cmTPSet=Y; path=/";}
}
if (cm.tid != "4" && typeof(cm.cm_exAttr)!="undefined"){
switch(cm.tid){
case "6":
prefix="pv";break;case "1":
prefix="pv";break;case "2":
prefix="rg";break;case "5":
prefix="pr";break;case "3":
prefix="o";break;case "14":
prefix="c";break;case "15":
prefix="e";break;default:
break;} 
var attrNum=cm.cm_exAttr.length;if (attrNum>15){
attrNum=15;}
for (i=0;i<attrNum;i++){
if (cm.tid=="2"){
Attval=prefix+(i+1);} else {
Attval=prefix+"_a"+(i+1);}
cm[Attval]=cm.cm_exAttr[i];}
cm.cm_exAttr=null;} 
if ((cm.pi == null || cm.pi == "") && (cm.pc == "Y")) {
cm.pi = getDefaultPageID();}
try{
if (parent.cm_ref != null) {
cm.rf = parent.cm_ref;if (cm.pc == "Y") {
parent.cm_ref = document.URL;}
}
if(parent.cm_set_mmc) {
cm.ul = document.location.href + 
((document.location.href.indexOf("?") < 0) ? "?" : "&") + 
parent.cm_mmc_params;if (cm.pc == "Y") {
parent.cm_ref = cm.ul;parent.cm_set_mmc = false;}
}
}
catch(err){}
if (cm.ul == null) {
cm.ul = window.location.href;}
cmSafeZero(cm,["qt","bp","tr","sg"]);if (this.manual_cm_mmc != null) {
cm.ul = cm.ul + ((cm.ul.indexOf("&") == -1) ? ((cm.ul.indexOf("?") == -1) ? "?" : "&") : "&") + "cm_mmc=" + this.manual_cm_mmc;}
cm.ul = cm.ul.replace(/cm_mmc/gi,"cm_mmc");cm.ul = cm.ul.replace(/cm_ven/gi,"cm_ven");cm.ul = cm.ul.replace(/cm_cat/gi,"cm_cat");cm.ul = cm.ul.replace(/cm_pla/gi,"cm_pla");cm.ul = cm.ul.replace(/cm_ite/gi,"cm_ite");if (cmCheckCMEMFlag){cmStartTagSet();}
cm.writeImg();if (cmCheckCMEMFlag) {
cmCheckCMEMFlag = false;cmCheckCMEM();cmSendTagSet();}
}
function cmGetDefaultPageID() { 
var pageName = window.location.pathname;var tempIndex1 = pageName.indexOf("?");if (tempIndex1 != -1) {
pageName = pageName.substr(0, tempIndex1);}
var tempIndex2 = pageName.indexOf("#");if (tempIndex2 != -1) {
pageName = pageName.substr(0, tempIndex2);}
var tempIndex3 = pageName.indexOf(";");if (tempIndex3 != -1) {
pageName = pageName.substr(0, tempIndex3);}
var slashPos = pageName.lastIndexOf("/");if (slashPos == pageName.length - 1) {
pageName = pageName + "default.asp";}
while (pageName.indexOf("/") == 0) {
pageName = pageName.substr(1,pageName.length);}
return(pageName);} 
function cmIndexOfParameter (parameter, inString) {
return inString.indexOf(parameter);}
function cmExtractParameter (parameter, inString) {
if (cmIndexOfParameter(parameter, inString) == -1) {
return null;}
var s = inString;var begin = s.indexOf(parameter);var end = s.indexOf("&", begin);if (end == -1) {
end = s.length;}
var middle = s.indexOf("=", begin);return s.substring(middle + 1, end);}
function cmRemoveParameter (parameter, inString) {
if (cmIndexOfParameter(parameter, inString) == -1) {
return inString;}
var s = inString;var begin = s.indexOf(parameter);var start = (begin - 1);var end = s.indexOf("&", begin);if (end == -1) {
end = s.length;}
if (s.substring(start, begin) == "?") { 
start = (start + 1);end = (end + 1);}
return s.substring(0, start) + s.substring(end, s.length);}
function cmCheckCMEM() {
if (cmIndexOfParameter("cm_em",document.location.href) != -1){
var emailAddress = cmExtractParameter("cm_em",document.location.href);if (emailAddress.indexOf(":")>-1){
emailAddress=emailAddress.substring(emailAddress.indexOf(":")+1);}
cmCreateRegistrationTag(emailAddress,emailAddress);}
if (cmIndexOfParameter("cm_lm",document.location.href) != -1){
var emailAddress = cmExtractParameter("cm_lm",document.location.href);if (emailAddress.indexOf(":")>-1){
emailAddress=emailAddress.substring(emailAddress.indexOf(":")+1);} 
cmCreateRegistrationTag(emailAddress,emailAddress);}
}
function cmSafeZero(cm, checkArray) {
for (var i = 0;i < checkArray.length;++i) {
if ((cm[checkArray[i]] != null) && (cm[checkArray[i]] == 0)) {
cm[checkArray[i]] = "0";}
}
}
if (defaultNormalize == null) { var defaultNormalize = null;}
function myNormalizeURL(url, isHref) {
var newURL = url;if (defaultNormalize != null) {
newURL = defaultNormalize(newURL, isHref);}
return newURL;}
if (document.cmTagCtl != null) {
var func = "" + document.cmTagCtl.normalizeURL;if (func.indexOf('myNormalizeURL') == -1) {
defaultNormalize = document.cmTagCtl.normalizeURL;document.cmTagCtl.normalizeURL = myNormalizeURL;}
}
function cm_hex_sha1(s) { return cm_rstr2hex(cm_rstr_sha1(cm_str2rstr_utf8(s)));}
function cm_rstr_sha1(s)
{
return cm_binb2rstr(cm_binb_sha1(cm_rstr2binb(s), s.length * 8));}
function cm_rstr2hex(input)
{
var hex_tab = 0 ? "0123456789ABCDEF" : "0123456789abcdef";var output = "";var x;for(var i = 0;i < input.length;i++)
{
x = input.charCodeAt(i);output += hex_tab.charAt((x >>> 4) & 0x0F)
+ hex_tab.charAt( x & 0x0F);}
return output;}
function cm_str2rstr_utf8(input)
{
var output = "";var i = -1;var x, y;while(++i < input.length)
{
x = input.charCodeAt(i);y = i + 1 < input.length ? input.charCodeAt(i + 1) : 0;if(0xD800 <= x && x <= 0xDBFF && 0xDC00 <= y && y <= 0xDFFF)
{
x = 0x10000 + ((x & 0x03FF) << 10) + (y & 0x03FF);i++;}
if(x <= 0x7F)
output += String.fromCharCode(x);else if(x <= 0x7FF)
output += String.fromCharCode(0xC0 | ((x >>> 6 ) & 0x1F),
0x80 | ( x & 0x3F));else if(x <= 0xFFFF)
output += String.fromCharCode(0xE0 | ((x >>> 12) & 0x0F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));else if(x <= 0x1FFFFF)
output += String.fromCharCode(0xF0 | ((x >>> 18) & 0x07),
0x80 | ((x >>> 12) & 0x3F),
0x80 | ((x >>> 6 ) & 0x3F),
0x80 | ( x & 0x3F));}
return output;}
function cm_rstr2binb(input)
{
var output = Array(input.length >> 2);for(var i = 0;i < output.length;i++)
output[i] = 0;for(var i = 0;i < input.length * 8;i += 8)
output[i>>5] |= (input.charCodeAt(i / 8) & 0xFF) << (24 - i % 32);return output;}
function cm_binb2rstr(input)
{
var output = "";for(var i = 0;i < input.length * 32;i += 8)
output += String.fromCharCode((input[i>>5] >>> (24 - i % 32)) & 0xFF);return output;}
function cm_binb_sha1(x, len)
{
x[len >> 5] |= 0x80 << (24 - len % 32);x[((len + 64 >> 9) << 4) + 15] = len;var w = Array(80);var a = 1732584193;var b = -271733879;var c = -1732584194;var d = 271733878;var e = -1009589776;for(var i = 0;i < x.length;i += 16)
{
var olda = a;var oldb = b;var oldc = c;var oldd = d;var olde = e;for(var j = 0;j < 80;j++)
{
if(j < 16) w[j] = x[i + j];else w[j] = cm_bit_rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1);var t = cm_safe_add(cm_safe_add(cm_bit_rol(a, 5), cm_sha1_ft(j, b, c, d)),
cm_safe_add(cm_safe_add(e, w[j]), cm_sha1_kt(j)));e = d;d = c;c = cm_bit_rol(b, 30);b = a;a = t;}
a = cm_safe_add(a, olda);b = cm_safe_add(b, oldb);c = cm_safe_add(c, oldc);d = cm_safe_add(d, oldd);e = cm_safe_add(e, olde);}
return Array(a, b, c, d, e);}
function cm_sha1_ft(t, b, c, d)
{
if(t < 20) return (b & c) | ((~b) & d);if(t < 40) return b ^ c ^ d;if(t < 60) return (b & c) | (b & d) | (c & d);return b ^ c ^ d;}
function cm_sha1_kt(t)
{
return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 :
(t < 60) ? -1894007588 : -899497514;}
function cm_safe_add(x, y)
{
var lsw = (x & 0xFFFF) + (y & 0xFFFF);var msw = (x >> 16) + (y >> 16) + (lsw >> 16);return (msw << 16) | (lsw & 0xFFFF);}
function cm_bit_rol(num, cnt)
{
return (num << cnt) | (num >>> (32 - cnt));}
function cmCreateShopAction5Tag(productID, categoryID){
var cm = new _cm("tid", "4", "vn2", "e4.0");cm.at = "5";cm.pr = productID;cm.pm = productID;cm.qt = "1";cm.bp = "1";if (categoryID) {
cm.cg = categoryID;}
cm.ul=document.URL;cm.writeImg();}
function cmCreateShopAction9Tag(productID, cust_id, orderID, categoryID) {
var cm = new _cm("tid", "4", "vn2", "e4.0");cm.at = "9";cm.pr = productID;cm.pm = productID;cm.qt = "1";cm.bp = "1";cm.cd = cust_id;cm.on = orderID;cm.tr = "1";if (categoryID) {
cm.cg = categoryID;}
cm.ul=document.URL;cm.writeImg();}
function cmCreateOrderTag(orderID, appName, customerID) {
var cm = new _cm("tid", "3", "vn2", "e4.0");cm.on = orderID;cm.tr = "1";cm.osk = '|' + appName + '|1|1|';cm.sg = "0";cm.cd = customerID;cm.ul=document.URL;cm.writeImg();}
function cmCreateApplicationTags(pageID, categoryID, appName, appStepNumber, appStepName, helpFlag, errorFlag, 
toolFlag, firstStepFlag, lastStepFlag, visitorID, transactionID,pageCount) {
if (pageCount!="N"){
var cm = new _cm("tid", "1", "vn2", "e4.0");if (pageID) {
cm.pi = pageID;} else {
cm.pi = getDefaultApplicationPageID(appName, appStepName, appStepNumber );}
if (categoryID){
cm.cg = categoryID;}
if (appName) {
appName = cmRemoveWhiteSpace(appName);cm.pv1 = appName;}
if (appStepNumber) {
cm.pv2 = appStepNumber;} 
if (appStepName) {
cm.pv3 = appStepName;}
if (helpFlag) {
cm.pv4 = "HELP";}
if (toolFlag) {
cm.pv4 = "TOOL";}
if (errorFlag) {
cm.pv4 = "ERROR";}
cm.pv15 = transactionID;if ((firstStepFlag)&&(appName)) {
cmCreateShopAction5Tag(appName, categoryID);}
if ((lastStepFlag)&&(appName)) {
cmCreateShopAction9Tag(appName, visitorID, transactionID, categoryID);cmCreateOrderTag(transactionID, appName, visitorID);}
if (parent.cm_ref != null) {
cm.rf = parent.cm_ref;parent.cm_ref = document.URL;}
cm.ul=document.URL;cm.writeImg();} else {
if ((firstStepFlag)&&(appName)) {
cmCreateShopAction5Tag(appName, categoryID);}
if ((lastStepFlag)&&(appName)) {
cmCreateShopAction9Tag(appName, visitorID, transactionID, categoryID);cmCreateOrderTag(transactionID, appName, visitorID);}
}
cmAppName = appName;cmAppStepName = appStepName;cmAppStepNumber = appStepNumber;cmSetupApplicationTextBoxTags(categoryID, firstStepFlag, lastStepFlag);}
function cmSetupApplicationTextBoxTags(category, first, last){
var dt=new Date();cmRandom = dt.getTime()%10000000;var cm = new _cm("tid", "7", "vn2", "e4.0");cm.li = 1;cm.ps1= cmAppName;cm.ps2 = cmAppStepNumber;cm.ps3 = cmAppStepName;cm.ps4 = cmRandom;cm.ps5= category;if (first){
cm.ps6="FIRST";}
if (last){
cm.ps7="LAST";}
cm.ul=document.URL;cm.writeImg();for (var i=0;i<document.forms.length;i++){
for (var j=0;j<document.forms[i].elements.length;j++)
{
if (document.forms[i].elements[j].type=="text")
{
if(document.forms[i].elements[j].value==""){
cmCheckForOnChange(document.forms[i].elements[j]);} else {
cmSendFormFieldTag(document.forms[i].elements[j].name, true);}
}
}
}
}
var cmRandom;var cmAppName;var cmAppStepName;var cmAppStepNumber;var cmOnChangeCounter = 0;var cmOnChangeTextBoxName = new Array();var cmOnChangePointer = new Array();var cmOnChangeFirst = new Array();function cmRemoveWhiteSpace(str){
while (str.substring(0,1) == ' ') str = str.substring(1);while (str.substring(str.length-1,str.length) == ' ') str = str.substring(0,str.length-1);var check = true;while (check) {
var pos = str.indexOf('  ');if (pos>-1){
str = str.substring(0,pos) + str.substring(pos,str.length);} else {
check = false;}
}
return(str);}
function getDefaultPageID() { 
if (document.title) 
{
var doctitle = document.title;if (doctitle.length >= 100)
{
doctitle = doctitle.substring(0,90);}
return doctitle;}
var pageName = window.location.pathname;var tempIndex1 = pageName.indexOf("?");if (tempIndex1 != -1) {
pageName = pageName.substr(0, tempIndex1);}
var tempIndex2 = pageName.indexOf("#");if (tempIndex2 != -1) {
pageName = pageName.substr(0, tempIndex2);}
var tempIndex3 = pageName.indexOf(";");if (tempIndex3 != -1) {
pageName = pageName.substr(0, tempIndex3);}
var slashPos = pageName.lastIndexOf("/");if (slashPos == pageName.length - 1) {
pageName = pageName + "default.asp";}
while (pageName.indexOf("/") == 0) {
pageName = pageName.substr(1,pageName.length);}
return(pageName);}
function getDefaultApplicationPageID(appName, appStepName, appStepNumber){
var cmPageID = "Application: " + appName + " Step: " + appStepNumber + " (" + appStepName + ")";return(cmPageID);}
function cmGetDefaultOrderID(){
var dt = new Date();var randomOrderID = Math.round(Math.random() * 1000 );return dt.getTime()%10000000 + '' + randomOrderID;}
function cmCheckForOnChange(textbox){
cmOnChangeTextBoxName[cmOnChangeCounter] = textbox.name;cmOnChangePointer[cmOnChangeCounter] = textbox.onchange;cmOnChangeFirst[cmOnChangeCounter] = true;textbox.onchange = new Function("cmMultipleOnChange(" + cmOnChangeCounter + ");");cmOnChangeCounter++;}
function cmSendFormFieldTag(name, write){
var cm = new _cm("tid", "7", "vn2", "e4.0");cm.li = 2;cm.ps1 = cmAppName;cm.ps2 = cmAppStepNumber;cm.ps3 = cmAppStepName;cm.ps4 = cmRandom;cm.ps5 = name;cm.ul=document.URL;if (write)
{
cm.writeImg();} else {
var image1 = new Image();image1.src = cm.getImgSrc();}
}
function cmSafeFormSubmit(id) {
CI();cO(id,"S");CA(1);CJ(1);CE();return true;}
function cmMultipleOnChange(id){
if (cmOnChangeFirst[id]){
cmSendFormFieldTag(cmOnChangeTextBoxName[id], false);cmOnChangeFirst[id] = false;}
if (cmOnChangePointer[id]!=null){
cmOnChangePointer[id]();}
}

//END Humana.H1.PlanPointer.Web.js.cmdatatagutils.js
//START Humana.H1.PlanPointer.Web.js.Ajax.Logging.ExceptionManager.js
Type.registerNamespace('Ajax.Logging');Ajax.Logging.BaseTraceListener = function(lineSeparator)
{
this._lineSeparator = '\n';if (lineSeparator)
{
this._lineSeparator = lineSeparator;}
}
Ajax.Logging.BaseTraceListener.prototype =
{
get_lineSeparator : function()
{
if (arguments.length !== 0) throw Error.parameterCount();return this._lineSeparator;},
dispose : function()
{
},
publishException : function(errorCode, exception, environmentInfo)
{
throw Error.notImplemented();},
formatException : function(errorCode, exception)
{
var lineSeparator = this.get_lineSeparator();var errorInfo = new Sys.StringBuilder();errorInfo.append('Error Code: ' + errorCode.toString() + lineSeparator);if (typeof exception.get_exceptionType != 'undefined')
{
errorInfo.append( 'Message: ' + exception.get_message() + lineSeparator +
'Type: ' + exception.get_exceptionType() + lineSeparator +
'StackTrace: ' + exception.get_stackTrace()
);}
else
{
errorInfo.append( 'Message: ' + exception.message + lineSeparator +
'Type: ' + exception.name + lineSeparator +
'Description: ' + exception.description
);if (typeof exception.httpStatusCode != 'undefined')
{
errorInfo.append(lineSeparator + 'HttpStatusCode: ' + exception.httpStatusCode);}
if (typeof exception.lineNumber != 'undefined')
{
errorInfo.append(lineSeparator + 'LineNumber: ' + exception.lineNumber);}
if (typeof exception.url != 'undefined')
{
errorInfo.append(lineSeparator + 'Url: ' + exception.url);}
}
return errorInfo.toString();}
}
Ajax.Logging.BaseTraceListener.registerClass('Ajax.Logging.BaseTraceListener', null, Sys.IDisposable);Ajax.Logging.SysDebugTraceListener = function(lineSeparator,useFail)
{
Ajax.Logging.SysDebugTraceListener.initializeBase(this, [lineSeparator]);}
Ajax.Logging.SysDebugTraceListener.prototype =
{
dispose : function()
{
Ajax.Logging.SysDebugTraceListener.callBaseMethod(this, 'dispose');},
publishException : function(errorCode, exception, environmentInfo)
{
var errorInfo = Ajax.Logging.SysDebugTraceListener.callBaseMethod(this, 'formatException', [errorCode, exception]);Sys.Debug.traceDump(errorInfo);}
}
Ajax.Logging.SysDebugTraceListener.registerClass('Ajax.Logging.SysDebugTraceListener', Ajax.Logging.BaseTraceListener);Ajax.Logging.AlertTraceListener = function(lineSeparator)
{
Ajax.Logging.AlertTraceListener.initializeBase(this, [lineSeparator]);}
Ajax.Logging.AlertTraceListener.prototype =
{
dispose : function()
{
Ajax.Logging.AlertTraceListener.callBaseMethod(this, 'dispose');},
publishException : function(errorCode, exception, environmentInfo)
{
var errorInfo = Ajax.Logging.AlertTraceListener.callBaseMethod(this, 'formatException', [errorCode, exception]);alert(errorInfo);}
}
Ajax.Logging.AlertTraceListener.registerClass('Ajax.Logging.AlertTraceListener', Ajax.Logging.BaseTraceListener);Ajax.Logging.DivTraceListener = function(lineSeparator, targetElement)
{
if (typeof targetElement == 'string')
{
this._element = $get(targetElement);}
else
{
this._element = targetElement;}
Ajax.Logging.DivTraceListener.initializeBase(this, [lineSeparator]);}
Ajax.Logging.DivTraceListener.prototype =
{
dispose : function()
{
this._element = null;Ajax.Logging.DivTraceListener.callBaseMethod(this, 'dispose');},
publishException : function(errorCode, exception, environmentInfo)
{
var errorInfo = Ajax.Logging.DivTraceListener.callBaseMethod(this, 'formatException', [errorCode, exception]);var lineSeparator = Ajax.Logging.DivTraceListener.callBaseMethod(this, 'get_lineSeparator')
if (this._element.innerHTML.length > 0)
{
this._element.innerHTML = lineSeparator + lineSeparator + this._element.innerHTML;}
this._element.innerHTML = errorInfo + this._element.innerHTML;}
}
Ajax.Logging.DivTraceListener.registerClass('Ajax.Logging.DivTraceListener', Ajax.Logging.BaseTraceListener);Ajax.Logging.WebServiceTraceListener = function(lineSeparator)
{
Ajax.Logging.WebServiceTraceListener.initializeBase(this, [lineSeparator]);}
Ajax.Logging.WebServiceTraceListener.prototype =
{
dispose : function()
{
Ajax.Logging.WebServiceTraceListener.callBaseMethod(this, 'dispose');},
publishException: function(errorCode, exception, environmentInfo)
{
var errorInfo = Ajax.Logging.WebServiceTraceListener.callBaseMethod(this, 'formatException', [errorCode, exception]);PageMethods.LogException(errorCode, errorInfo, environmentInfo.url, environmentInfo.referrer, environmentInfo.scripts, function(){Sys.Debug.trace("Error sent to web service")},function(){Sys.Debug.trace("Could not send error to web service");});}
}
Ajax.Logging.WebServiceTraceListener.registerClass('Ajax.Logging.WebServiceTraceListener', Ajax.Logging.BaseTraceListener);Ajax.Logging.ExceptionManager = function()
{
this._listeners = new Array();Ajax.Logging.ExceptionManager.initializeBase(this);}
Ajax.Logging.ExceptionManager.prototype =
{
initialize : function()
{
Ajax.Logging.ExceptionManager.callBaseMethod(this, 'initialize');},
dispose : function()
{
if (this._listeners.length > 0)
{
for(var i = 0;i < this._listeners.length;i++)
{
this._listeners[i].dispose();}
}
delete this._listeners;Ajax.Logging.ExceptionManager.callBaseMethod(this, 'dispose');},
addListener : function(listener)
{
var e = Function._validateParams(arguments, [{name: 'listener', type: Ajax.Logging.BaseTraceListener}]);if (e) throw e;Array.add(this._listeners, listener);},
removeListener : function(listener)
{
var e = Function._validateParams(arguments, [{name: 'listener', type: Ajax.Logging.BaseTraceListener}]);if (e) throw e;listener.dispose();Array.remove(this._listeners, listener);},
publishException : function(errorCode, exception)
{
var e1 = Function._validateParams(arguments, [{name: 'errorCode', type: Number}, {name: 'exception', type: Error}]);var e2 = Function._validateParams(arguments, [{name: 'errorCode', type: Number}, {name: 'exception', type: Sys.Net.WebServiceError}]);if ((e1) && (e2))
{
throw e1;}
if (this._listeners.length > 0)
{
var environmentInfo = this._getEnvironmentInfo();for(var i = 0;i < this._listeners.length;i++)
{
this._listeners[i].publishException(errorCode, exception, environmentInfo);}
}
},
_getEnvironmentInfo : function()
{
var scriptTags = document.getElementsByTagName('script');var scripts = new Array();if (scriptTags)
{
for(var i = 0;i < scriptTags.length;i++)
{
var scriptTag = scriptTags[i];if (typeof scriptTag.src != 'undefined')
{
if (scriptTag.src.length > 0)
{
Array.add(scripts, scriptTag.src + ' : ' + scriptTag.readyState);}
}
}
}
var url = window.location.href;var referrer = '';if (document.referrer)
{
if (document.referrer.length > 0)
{
referrer = document.referrer;}
}
return {url:url, referrer:referrer, scripts:scripts};}
}
Ajax.Logging.ExceptionManager.registerClass('Ajax.Logging.ExceptionManager', Sys.Component);Ajax.Logging.ExceptionManager._staticInstance = $create(Ajax.Logging.ExceptionManager, {'id':'exceptionManager'});Ajax.Logging.ExceptionManager.getInstance = function()
{
return Ajax.Logging.ExceptionManager._staticInstance;}

//END Humana.H1.PlanPointer.Web.js.Ajax.Logging.ExceptionManager.js
//START Humana.H1.PlanPointer.Web.js.Ajax.Logging.ModalPopupTraceListener.js
Type.registerNamespace('Ajax.Logging');Ajax.Logging.ModalPopupTraceListener = function(lineSeparator, targetPopup, targetElement)
{
if (typeof targetPopup == 'string')
{
this._popup = $find(targetPopup);}
else
{
this._popup = targetPopup;}
if (typeof targetElement == 'string')
{
this._element = $get(targetElement);}
else
{
this._element = targetElement;}
Ajax.Logging.ModalPopupTraceListener.initializeBase(this, [lineSeparator]);}
Ajax.Logging.ModalPopupTraceListener.prototype =
{
dispose : function()
{
this._element = null;this._popup = null;Ajax.Logging.ModalPopupTraceListener.callBaseMethod(this, 'dispose');},
publishException : function(errorCode, exception, environmentInfo)
{
this._element.innerHTML = Ajax.Logging.ModalPopupTraceListener.callBaseMethod(this, 'formatException', [errorCode, exception]);this._popup.show();}
}
Ajax.Logging.ModalPopupTraceListener.registerClass('Ajax.Logging.ModalPopupTraceListener', Ajax.Logging.BaseTraceListener);
//END Humana.H1.PlanPointer.Web.js.Ajax.Logging.ModalPopupTraceListener.js
//START Humana.H1.PlanPointer.Web.js.swfobject.js
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;
//END Humana.H1.PlanPointer.Web.js.swfobject.js
//START AjaxControlToolkit.Compat.Timer.Timer.js
/////////////////////////////////////////////////////////////////////////////
Sys.Timer = function() {
Sys.Timer.initializeBase(this);this._interval = 1000;this._enabled = false;this._timer = null;}
Sys.Timer.prototype = {
get_interval: function() {
return this._interval;},
set_interval: function(value) {
if (this._interval !== value) {
this._interval = value;this.raisePropertyChanged('interval');if (!this.get_isUpdating() && (this._timer !== null)) {
this._stopTimer();this._startTimer();}
}
},
get_enabled: function() {
return this._enabled;},
set_enabled: function(value) {
if (value !== this.get_enabled()) {
this._enabled = value;this.raisePropertyChanged('enabled');if (!this.get_isUpdating()) {
if (value) {
this._startTimer();}
else {
this._stopTimer();}
}
}
},
add_tick: function(handler) {
this.get_events().addHandler("tick", handler);},
remove_tick: function(handler) {
this.get_events().removeHandler("tick", handler);},
dispose: function() {
this.set_enabled(false);this._stopTimer();Sys.Timer.callBaseMethod(this, 'dispose');},
updated: function() {
Sys.Timer.callBaseMethod(this, 'updated');if (this._enabled) {
this._stopTimer();this._startTimer();}
},
_timerCallback: function() {
var handler = this.get_events().getHandler("tick");if (handler) {
handler(this, Sys.EventArgs.Empty);}
},
_startTimer: function() {
this._timer = window.setInterval(Function.createDelegate(this, this._timerCallback), this._interval);},
_stopTimer: function() {
window.clearInterval(this._timer);this._timer = null;}
}
Sys.Timer.descriptor = {
properties: [ {name: 'interval', type: Number},
{name: 'enabled', type: Boolean} ],
events: [ {name: 'tick'} ]
}
Sys.Timer.registerClass('Sys.Timer', Sys.Component);
//END AjaxControlToolkit.Compat.Timer.Timer.js
//START AjaxControlToolkit.Common.Common.js
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.BoxSide = function() {
}
AjaxControlToolkit.BoxSide.prototype = {
Top : 0,
Right : 1,
Bottom : 2,
Left : 3
}
AjaxControlToolkit.BoxSide.registerEnum("AjaxControlToolkit.BoxSide", false);AjaxControlToolkit._CommonToolkitScripts = function() {
}
AjaxControlToolkit._CommonToolkitScripts.prototype = {
_borderStyleNames : ["borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle"],
_borderWidthNames : ["borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth"],
_paddingWidthNames : ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
_marginWidthNames : ["marginTop", "marginRight", "marginBottom", "marginLeft"],
getCurrentStyle : function(element, attribute, defaultValue) {
var currentValue = null;if (element) {
if (element.currentStyle) {
currentValue = element.currentStyle[attribute];} else if (document.defaultView && document.defaultView.getComputedStyle) {
var style = document.defaultView.getComputedStyle(element, null);if (style) {
currentValue = style[attribute];}
}
if (!currentValue && element.style.getPropertyValue) {
currentValue = element.style.getPropertyValue(attribute);}
else if (!currentValue && element.style.getAttribute) {
currentValue = element.style.getAttribute(attribute);} 
}
if ((!currentValue || currentValue == "" || typeof(currentValue) === 'undefined')) {
if (typeof(defaultValue) != 'undefined') {
currentValue = defaultValue;}
else {
currentValue = null;}
} 
return currentValue;},
getInheritedBackgroundColor : function(element) {
if (!element) return '#FFFFFF';var background = this.getCurrentStyle(element, 'backgroundColor');try {
while (!background || background == '' || background == 'transparent' || background == 'rgba(0, 0, 0, 0)') {
element = element.parentNode;if (!element) {
background = '#FFFFFF';} else {
background = this.getCurrentStyle(element, 'backgroundColor');}
}
} catch(ex) {
background = '#FFFFFF';}
return background;},
getLocation : function(element) {
if (element === document.documentElement) {
return new Sys.UI.Point(0,0);}
if (Sys.Browser.agent == Sys.Browser.InternetExplorer && Sys.Browser.version < 7) {
if (element.window === element || element.nodeType === 9 || !element.getClientRects || !element.getBoundingClientRect) return new Sys.UI.Point(0,0);var screenRects = element.getClientRects();if (!screenRects || !screenRects.length) {
return new Sys.UI.Point(0,0);}
var first = screenRects[0];var dLeft = 0;var dTop = 0;var inFrame = false;try {
inFrame = element.ownerDocument.parentWindow.frameElement;} catch(ex) {
inFrame = true;}
if (inFrame) {
var clientRect = element.getBoundingClientRect();if (!clientRect) {
return new Sys.UI.Point(0,0);}
var minLeft = first.left;var minTop = first.top;for (var i = 1;i < screenRects.length;i++) {
var r = screenRects[i];if (r.left < minLeft) {
minLeft = r.left;}
if (r.top < minTop) {
minTop = r.top;}
}
dLeft = minLeft - clientRect.left;dTop = minTop - clientRect.top;}
var ownerDocument = element.document.documentElement;return new Sys.UI.Point(first.left - 2 - dLeft + ownerDocument.scrollLeft, first.top - 2 - dTop + ownerDocument.scrollTop);}
return Sys.UI.DomElement.getLocation(element);},
setLocation : function(element, point) {
Sys.UI.DomElement.setLocation(element, point.x, point.y);},
getContentSize : function(element) {
if (!element) {
throw Error.argumentNull('element');}
var size = this.getSize(element);var borderBox = this.getBorderBox(element);var paddingBox = this.getPaddingBox(element);return {
width : size.width - borderBox.horizontal - paddingBox.horizontal,
height : size.height - borderBox.vertical - paddingBox.vertical
}
},
getSize : function(element) {
if (!element) {
throw Error.argumentNull('element');}
return {
width: element.offsetWidth,
height: element.offsetHeight
};},
setContentSize : function(element, size) {
if (!element) {
throw Error.argumentNull('element');}
if (!size) {
throw Error.argumentNull('size');}
if(this.getCurrentStyle(element, 'MozBoxSizing') == 'border-box' || this.getCurrentStyle(element, 'BoxSizing') == 'border-box') {
var borderBox = this.getBorderBox(element);var paddingBox = this.getPaddingBox(element);size = {
width: size.width + borderBox.horizontal + paddingBox.horizontal,
height: size.height + borderBox.vertical + paddingBox.vertical
};}
element.style.width = size.width.toString() + 'px';element.style.height = size.height.toString() + 'px';},
setSize : function(element, size) {
if (!element) {
throw Error.argumentNull('element');}
if (!size) {
throw Error.argumentNull('size');}
var borderBox = this.getBorderBox(element);var paddingBox = this.getPaddingBox(element);var contentSize = {
width: size.width - borderBox.horizontal - paddingBox.horizontal,
height: size.height - borderBox.vertical - paddingBox.vertical
};this.setContentSize(element, contentSize);},
getBounds : function(element) {
var offset = $common.getLocation(element);return new Sys.UI.Bounds(offset.x, offset.y, element.offsetWidth || 0, element.offsetHeight || 0);}, 
setBounds : function(element, bounds) {
if (!element) {
throw Error.argumentNull('element');}
if (!bounds) {
throw Error.argumentNull('bounds');}
this.setSize(element, bounds);$common.setLocation(element, bounds);},
getClientBounds : function() {
var clientWidth;var clientHeight;switch(Sys.Browser.agent) {
case Sys.Browser.InternetExplorer:
clientWidth = document.documentElement.clientWidth;clientHeight = document.documentElement.clientHeight;break;case Sys.Browser.Safari:
clientWidth = window.innerWidth;clientHeight = window.innerHeight;break;case Sys.Browser.Opera:
clientWidth = Math.min(window.innerWidth, document.body.clientWidth);clientHeight = Math.min(window.innerHeight, document.body.clientHeight);break;default: 
clientWidth = Math.min(window.innerWidth, document.documentElement.clientWidth);clientHeight = Math.min(window.innerHeight, document.documentElement.clientHeight);break;}
return new Sys.UI.Bounds(0, 0, clientWidth, clientHeight);},
getMarginBox : function(element) {
if (!element) {
throw Error.argumentNull('element');}
var box = {
top: this.getMargin(element, AjaxControlToolkit.BoxSide.Top),
right: this.getMargin(element, AjaxControlToolkit.BoxSide.Right),
bottom: this.getMargin(element, AjaxControlToolkit.BoxSide.Bottom),
left: this.getMargin(element, AjaxControlToolkit.BoxSide.Left)
};box.horizontal = box.left + box.right;box.vertical = box.top + box.bottom;return box;},
getBorderBox : function(element) {
if (!element) {
throw Error.argumentNull('element');}
var box = {
top: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Top),
right: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Right),
bottom: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Bottom),
left: this.getBorderWidth(element, AjaxControlToolkit.BoxSide.Left)
};box.horizontal = box.left + box.right;box.vertical = box.top + box.bottom;return box;},
getPaddingBox : function(element) {
if (!element) {
throw Error.argumentNull('element');}
var box = {
top: this.getPadding(element, AjaxControlToolkit.BoxSide.Top),
right: this.getPadding(element, AjaxControlToolkit.BoxSide.Right),
bottom: this.getPadding(element, AjaxControlToolkit.BoxSide.Bottom),
left: this.getPadding(element, AjaxControlToolkit.BoxSide.Left)
};box.horizontal = box.left + box.right;box.vertical = box.top + box.bottom;return box;},
isBorderVisible : function(element, boxSide) {
if (!element) {
throw Error.argumentNull('element');}
if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));}
var styleName = this._borderStyleNames[boxSide];var styleValue = this.getCurrentStyle(element, styleName);return styleValue != "none";},
getMargin : function(element, boxSide) {
if (!element) {
throw Error.argumentNull('element');}
if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));}
var styleName = this._marginWidthNames[boxSide];var styleValue = this.getCurrentStyle(element, styleName);try { return this.parsePadding(styleValue);} catch(ex) { return 0;}
},
getBorderWidth : function(element, boxSide) {
if (!element) {
throw Error.argumentNull('element');}
if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));}
if(!this.isBorderVisible(element, boxSide)) {
return 0;} 
var styleName = this._borderWidthNames[boxSide];var styleValue = this.getCurrentStyle(element, styleName);return this.parseBorderWidth(styleValue);},
getPadding : function(element, boxSide) {
if (!element) {
throw Error.argumentNull('element');}
if(boxSide < AjaxControlToolkit.BoxSide.Top || boxSide > AjaxControlToolkit.BoxSide.Left) {
throw Error.argumentOutOfRange(String.format(Sys.Res.enumInvalidValue, boxSide, 'AjaxControlToolkit.BoxSide'));}
var styleName = this._paddingWidthNames[boxSide];var styleValue = this.getCurrentStyle(element, styleName);return this.parsePadding(styleValue);},
parseBorderWidth : function(borderWidth) {
if (!this._borderThicknesses) {
var borderThicknesses = { };var div0 = document.createElement('div');div0.style.visibility = 'hidden';div0.style.position = 'absolute';div0.style.fontSize = '1px';document.body.appendChild(div0)
var div1 = document.createElement('div');div1.style.height = '0px';div1.style.overflow = 'hidden';div0.appendChild(div1);var base = div0.offsetHeight;div1.style.borderTop = 'solid black';div1.style.borderTopWidth = 'thin';borderThicknesses['thin'] = div0.offsetHeight - base;div1.style.borderTopWidth = 'medium';borderThicknesses['medium'] = div0.offsetHeight - base;div1.style.borderTopWidth = 'thick';borderThicknesses['thick'] = div0.offsetHeight - base;div0.removeChild(div1);document.body.removeChild(div0);this._borderThicknesses = borderThicknesses;}
if (borderWidth) {
switch(borderWidth) {
case 'thin':
case 'medium':
case 'thick':
return this._borderThicknesses[borderWidth];case 'inherit':
return 0;}
var unit = this.parseUnit(borderWidth);Sys.Debug.assert(unit.type == 'px', String.format(AjaxControlToolkit.Resources.Common_InvalidBorderWidthUnit, unit.type));return unit.size;}
return 0;},
parsePadding : function(padding) {
if(padding) {
if(padding == 'inherit') {
return 0;}
var unit = this.parseUnit(padding);Sys.Debug.assert(unit.type == 'px', String.format(AjaxControlToolkit.Resources.Common_InvalidPaddingUnit, unit.type));return unit.size;}
return 0;},
parseUnit : function(value) {
if (!value) {
throw Error.argumentNull('value');}
value = value.trim().toLowerCase();var l = value.length;var s = -1;for(var i = 0;i < l;i++) {
var ch = value.substr(i, 1);if((ch < '0' || ch > '9') && ch != '-' && ch != '.' && ch != ',') {
break;}
s = i;}
if(s == -1) {
throw Error.create(AjaxControlToolkit.Resources.Common_UnitHasNoDigits);}
var type;var size;if(s < (l - 1)) {
type = value.substring(s + 1).trim();} else {
type = 'px';}
size = parseFloat(value.substr(0, s + 1));if(type == 'px') {
size = Math.floor(size);}
return { 
size: size,
type: type
};},
getElementOpacity : function(element) {
if (!element) {
throw Error.argumentNull('element');}
var hasOpacity = false;var opacity;if (element.filters) {
var filters = element.filters;if (filters.length !== 0) {
var alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];if (alphaFilter) {
opacity = alphaFilter.opacity / 100.0;hasOpacity = true;}
}
}
else {
opacity = this.getCurrentStyle(element, 'opacity', 1);hasOpacity = true;}
if (hasOpacity === false) {
return 1.0;}
return parseFloat(opacity);},
setElementOpacity : function(element, value) {
if (!element) {
throw Error.argumentNull('element');}
if (element.filters) {
var filters = element.filters;var createFilter = true;if (filters.length !== 0) {
var alphaFilter = filters['DXImageTransform.Microsoft.Alpha'];if (alphaFilter) {
createFilter = false;alphaFilter.opacity = value * 100;}
}
if (createFilter) {
element.style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=' + (value * 100) + ')';}
}
else {
element.style.opacity = value;}
},
getVisible : function(element) {
return (element &&
("none" != $common.getCurrentStyle(element, "display")) &&
("hidden" != $common.getCurrentStyle(element, "visibility")));},
setVisible : function(element, value) {
if (element && value != $common.getVisible(element)) {
if (value) {
if (element.style.removeAttribute) {
element.style.removeAttribute("display");} else {
element.style.removeProperty("display");}
} else {
element.style.display = 'none';}
element.style.visibility = value ? 'visible' : 'hidden';}
},
resolveFunction : function(value) {
if (value) {
if (value instanceof Function) {
return value;} else if (String.isInstanceOfType(value) && value.length > 0) {
var func;if ((func = window[value]) instanceof Function) {
return func;} else if ((func = eval(value)) instanceof Function) {
return func;}
}
}
return null;},
addCssClasses : function(element, classNames) {
for(var i = 0;i < classNames.length;i++) {
Sys.UI.DomElement.addCssClass(element, classNames[i]);}
},
removeCssClasses : function(element, classNames) {
for(var i = 0;i < classNames.length;i++) {
Sys.UI.DomElement.removeCssClass(element, classNames[i]);}
},
setStyle : function(element, style) {
$common.applyProperties(element.style, style);},
removeHandlers : function(element, events) {
for (var name in events) {
$removeHandler(element, name, events[name]);}
},
overlaps : function(r1, r2) {
return r1.x < (r2.x + r2.width)
&& r2.x < (r1.x + r1.width)
&& r1.y < (r2.y + r2.height)
&& r2.y < (r1.y + r1.height);},
containsPoint : function(rect, x, y) {
return x >= rect.x && x < (rect.x + rect.width) && y >= rect.y && y < (rect.y + rect.height);},
isKeyDigit : function(keyCode) { 
return (0x30 <= keyCode && keyCode <= 0x39);},
isKeyNavigation : function(keyCode) { 
return (Sys.UI.Key.left <= keyCode && keyCode <= Sys.UI.Key.down);},
padLeft : function(text, size, ch, truncate) { 
return $common._pad(text, size || 2, ch || ' ', 'l', truncate || false);},
padRight : function(text, size, ch, truncate) { 
return $common._pad(text, size || 2, ch || ' ', 'r', truncate || false);},
_pad : function(text, size, ch, side, truncate) {
text = text.toString();var length = text.length;var builder = new Sys.StringBuilder();if (side == 'r') {
builder.append(text);} 
while (length < size) {
builder.append(ch);length++;}
if (side == 'l') {
builder.append(text);}
var result = builder.toString();if (truncate && result.length > size) {
if (side == 'l') {
result = result.substr(result.length - size, size);} else {
result = result.substr(0, size);}
}
return result;},
__DOMEvents : {
focusin : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("focusin", true, false, window, 1);} },
focusout : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("focusout", true, false, window, 1);} },
activate : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("activate", true, true, window, 1);} },
focus : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("focus", false, false, window, 1);} },
blur : { eventGroup : "UIEvents", init : function(e, p) { e.initUIEvent("blur", false, false, window, 1);} },
click : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("click", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null);} },
dblclick : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("click", true, true, window, 2, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null);} },
mousedown : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mousedown", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null);} },
mouseup : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mouseup", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null);} },
mouseover : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mouseover", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null);} },
mousemove : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mousemove", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null);} },
mouseout : { eventGroup : "MouseEvents", init : function(e, p) { e.initMouseEvent("mousemove", true, true, window, 1, p.screenX || 0, p.screenY || 0, p.clientX || 0, p.clientY || 0, p.ctrlKey || false, p.altKey || false, p.shiftKey || false, p.metaKey || false, p.button || 0, p.relatedTarget || null);} },
load : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("load", false, false);} },
unload : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("unload", false, false);} },
select : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("select", true, false);} },
change : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("change", true, false);} },
submit : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("submit", true, true);} },
reset : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("reset", true, false);} },
resize : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("resize", true, false);} },
scroll : { eventGroup : "HTMLEvents", init : function(e, p) { e.initEvent("scroll", true, false);} }
},
tryFireRawEvent : function(element, rawEvent) {
try {
if (element.fireEvent) {
element.fireEvent("on" + rawEvent.type, rawEvent);return true;} else if (element.dispatchEvent) {
element.dispatchEvent(rawEvent);return true;}
} catch (e) {
}
return false;}, 
tryFireEvent : function(element, eventName, properties) {
try {
if (document.createEventObject) {
var e = document.createEventObject();$common.applyProperties(e, properties || {});element.fireEvent("on" + eventName, e);return true;} else if (document.createEvent) {
var def = $common.__DOMEvents[eventName];if (def) {
var e = document.createEvent(def.eventGroup);def.init(e, properties || {});element.dispatchEvent(e);return true;}
}
} catch (e) {
}
return false;},
wrapElement : function(innerElement, newOuterElement, newInnerParentElement) {
var parent = innerElement.parentNode;parent.replaceChild(newOuterElement, innerElement);(newInnerParentElement || newOuterElement).appendChild(innerElement);},
unwrapElement : function(innerElement, oldOuterElement) {
var parent = oldOuterElement.parentNode;if (parent != null) {
$common.removeElement(innerElement);parent.replaceChild(innerElement, oldOuterElement);}
},
removeElement : function(element) {
var parent = element.parentNode;if (parent != null) {
parent.removeChild(element);}
},
applyProperties : function(target, properties) {
for (var p in properties) {
var pv = properties[p];if (pv != null && Object.getType(pv)===Object) {
var tv = target[p];$common.applyProperties(tv, pv);} else {
target[p] = pv;}
}
},
createElementFromTemplate : function(template, appendToParent, nameTable) {
if (typeof(template.nameTable)!='undefined') {
var newNameTable = template.nameTable;if (String.isInstanceOfType(newNameTable)) {
newNameTable = nameTable[newNameTable];}
if (newNameTable != null) {
nameTable = newNameTable;}
}
var elementName = null;if (typeof(template.name)!=='undefined') {
elementName = template.name;}
var elt = document.createElement(template.nodeName);if (typeof(template.name)!=='undefined' && nameTable) {
nameTable[template.name] = elt;}
if (typeof(template.parent)!=='undefined' && appendToParent == null) {
var newParent = template.parent;if (String.isInstanceOfType(newParent)) {
newParent = nameTable[newParent];}
if (newParent != null) {
appendToParent = newParent;}
}
if (typeof(template.properties)!=='undefined' && template.properties != null) {
$common.applyProperties(elt, template.properties);}
if (typeof(template.cssClasses)!=='undefined' && template.cssClasses != null) {
$common.addCssClasses(elt, template.cssClasses);}
if (typeof(template.events)!=='undefined' && template.events != null) {
$addHandlers(elt, template.events);}
if (typeof(template.visible)!=='undefined' && template.visible != null) {
this.setVisible(elt, template.visible);}
if (appendToParent) {
appendToParent.appendChild(elt);}
if (typeof(template.opacity)!=='undefined' && template.opacity != null) {
$common.setElementOpacity(elt, template.opacity);}
if (typeof(template.children)!=='undefined' && template.children != null) {
for (var i = 0;i < template.children.length;i++) {
var subtemplate = template.children[i];$common.createElementFromTemplate(subtemplate, elt, nameTable);}
}
var contentPresenter = elt;if (typeof(template.contentPresenter)!=='undefined' && template.contentPresenter != null) {
contentPresenter = nameTable[contentPresenter];}
if (typeof(template.content)!=='undefined' && template.content != null) {
var content = template.content;if (String.isInstanceOfType(content)) {
content = nameTable[content];}
if (content.parentNode) {
$common.wrapElement(content, elt, contentPresenter);} else {
contentPresenter.appendChild(content);}
}
return elt;},
prepareHiddenElementForATDeviceUpdate : function () {
var objHidden = document.getElementById('hiddenInputToUpdateATBuffer_CommonToolkitScripts');if (!objHidden) {
var objHidden = document.createElement('input');objHidden.setAttribute('type', 'hidden');objHidden.setAttribute('value', '1');objHidden.setAttribute('id', 'hiddenInputToUpdateATBuffer_CommonToolkitScripts');objHidden.setAttribute('name', 'hiddenInputToUpdateATBuffer_CommonToolkitScripts');if ( document.forms[0] ) {
document.forms[0].appendChild(objHidden);}
}
},
updateFormToRefreshATDeviceBuffer : function () {
var objHidden = document.getElementById('hiddenInputToUpdateATBuffer_CommonToolkitScripts');if (objHidden) {
if (objHidden.getAttribute('value') == '1') {
objHidden.setAttribute('value', '0');} else {
objHidden.setAttribute('value', '1');}
}
}
}
var CommonToolkitScripts = AjaxControlToolkit.CommonToolkitScripts = new AjaxControlToolkit._CommonToolkitScripts();var $common = CommonToolkitScripts;Sys.UI.DomElement.getVisible = $common.getVisible;Sys.UI.DomElement.setVisible = $common.setVisible;Sys.UI.Control.overlaps = $common.overlaps;AjaxControlToolkit._DomUtility = function() {
}
AjaxControlToolkit._DomUtility.prototype = {
isDescendant : function(ancestor, descendant) {
for (var n = descendant.parentNode;n != null;n = n.parentNode) {
if (n == ancestor) return true;}
return false;},
isDescendantOrSelf : function(ancestor, descendant) {
if (ancestor === descendant) 
return true;return AjaxControlToolkit.DomUtility.isDescendant(ancestor, descendant);},
isAncestor : function(descendant, ancestor) {
return AjaxControlToolkit.DomUtility.isDescendant(ancestor, descendant);},
isAncestorOrSelf : function(descendant, ancestor) {
if (descendant === ancestor)
return true;return AjaxControlToolkit.DomUtility.isDescendant(ancestor, descendant);},
isSibling : function(self, sibling) {
var parent = self.parentNode;for (var i = 0;i < parent.childNodes.length;i++) {
if (parent.childNodes[i] == sibling) return true;}
return false;}
}
AjaxControlToolkit._DomUtility.registerClass("AjaxControlToolkit._DomUtility");AjaxControlToolkit.DomUtility = new AjaxControlToolkit._DomUtility();AjaxControlToolkit.TextBoxWrapper = function(element) {
AjaxControlToolkit.TextBoxWrapper.initializeBase(this, [element]);this._current = element.value;this._watermark = null;this._isWatermarked = false;}
AjaxControlToolkit.TextBoxWrapper.prototype = {
dispose : function() {
this.get_element().AjaxControlToolkitTextBoxWrapper = null;AjaxControlToolkit.TextBoxWrapper.callBaseMethod(this, 'dispose');},
get_Current : function() {
this._current = this.get_element().value;return this._current;},
set_Current : function(value) {
this._current = value;this._updateElement();},
get_Value : function() {
if (this.get_IsWatermarked()) {
return "";} else {
return this.get_Current();}
},
set_Value : function(text) {
this.set_Current(text);if (!text || (0 == text.length)) {
if (null != this._watermark) {
this.set_IsWatermarked(true);}
} else {
this.set_IsWatermarked(false);}
},
get_Watermark : function() {
return this._watermark;},
set_Watermark : function(value) {
this._watermark = value;this._updateElement();},
get_IsWatermarked : function() {
return this._isWatermarked;},
set_IsWatermarked : function(isWatermarked) {
if (this._isWatermarked != isWatermarked) {
this._isWatermarked = isWatermarked;this._updateElement();this._raiseWatermarkChanged();}
},
_updateElement : function() {
var element = this.get_element();if (this._isWatermarked) {
if (element.value != this._watermark) {
element.value = this._watermark;}
} else {
if (element.value != this._current) {
element.value = this._current;}
}
},
add_WatermarkChanged : function(handler) {
this.get_events().addHandler("WatermarkChanged", handler);},
remove_WatermarkChanged : function(handler) {
this.get_events().removeHandler("WatermarkChanged", handler);},
_raiseWatermarkChanged : function() {
var onWatermarkChangedHandler = this.get_events().getHandler("WatermarkChanged");if (onWatermarkChangedHandler) {
onWatermarkChangedHandler(this, Sys.EventArgs.Empty);}
}
}
AjaxControlToolkit.TextBoxWrapper.get_Wrapper = function(element) {
if (null == element.AjaxControlToolkitTextBoxWrapper) {
element.AjaxControlToolkitTextBoxWrapper = new AjaxControlToolkit.TextBoxWrapper(element);}
return element.AjaxControlToolkitTextBoxWrapper;}
AjaxControlToolkit.TextBoxWrapper.registerClass('AjaxControlToolkit.TextBoxWrapper', Sys.UI.Behavior);AjaxControlToolkit.TextBoxWrapper.validatorGetValue = function(id) {
var control = $get(id);if (control && control.AjaxControlToolkitTextBoxWrapper) {
return control.AjaxControlToolkitTextBoxWrapper.get_Value();}
return AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue(id);}
if (typeof(ValidatorGetValue) == 'function') {
AjaxControlToolkit.TextBoxWrapper._originalValidatorGetValue = ValidatorGetValue;ValidatorGetValue = AjaxControlToolkit.TextBoxWrapper.validatorGetValue;}
if (Sys.CultureInfo.prototype._getAbbrMonthIndex) {
try {
Sys.CultureInfo.prototype._getAbbrMonthIndex('');} catch(ex) {
Sys.CultureInfo.prototype._getAbbrMonthIndex = function(value) {
if (!this._upperAbbrMonths) {
this._upperAbbrMonths = this._toUpperArray(this.dateTimeFormat.AbbreviatedMonthNames);}
return Array.indexOf(this._upperAbbrMonths, this._toUpper(value));}
Sys.CultureInfo.CurrentCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex;Sys.CultureInfo.InvariantCulture._getAbbrMonthIndex = Sys.CultureInfo.prototype._getAbbrMonthIndex;}
}

//END AjaxControlToolkit.Common.Common.js
//START AjaxControlToolkit.Animation.Animations.js
Type.registerNamespace('AjaxControlToolkit.Animation');var $AA = AjaxControlToolkit.Animation;$AA.registerAnimation = function(name, type) {
if (type && ((type === $AA.Animation) || (type.inheritsFrom && type.inheritsFrom($AA.Animation)))) {
if (!$AA.__animations) {
$AA.__animations = { };}
$AA.__animations[name.toLowerCase()] = type;type.play = function() {
var animation = new type();type.apply(animation, arguments);animation.initialize();var handler = Function.createDelegate(animation,
function() {
animation.remove_ended(handler);handler = null;animation.dispose();});animation.add_ended(handler);animation.play();}
} else {
throw Error.argumentType('type', type, $AA.Animation, AjaxControlToolkit.Resources.Animation_InvalidBaseType);}
}
$AA.buildAnimation = function(json, defaultTarget) {
if (!json || json === '') {
return null;}
var obj;json = '(' + json + ')';if (! Sys.Debug.isDebug) {
try { obj = Sys.Serialization.JavaScriptSerializer.deserialize(json);} catch (ex) { } 
} else {
obj = Sys.Serialization.JavaScriptSerializer.deserialize(json);}
return $AA.createAnimation(obj, defaultTarget);}
$AA.createAnimation = function(obj, defaultTarget) {
if (!obj || !obj.AnimationName) {
throw Error.argument('obj', AjaxControlToolkit.Resources.Animation_MissingAnimationName);}
var type = $AA.__animations[obj.AnimationName.toLowerCase()];if (!type) {
throw Error.argument('type', String.format(AjaxControlToolkit.Resources.Animation_UknownAnimationName, obj.AnimationName));}
var animation = new type();if (defaultTarget) {
animation.set_target(defaultTarget);}
if (obj.AnimationChildren && obj.AnimationChildren.length) {
if ($AA.ParentAnimation.isInstanceOfType(animation)) {
for (var i = 0;i < obj.AnimationChildren.length;i++) {
var child = $AA.createAnimation(obj.AnimationChildren[i]);if (child) {
animation.add(child);}
}
} else {
throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_ChildrenNotAllowed, type.getName()));}
}
var properties = type.__animationProperties;if (!properties) {
type.__animationProperties = { };type.resolveInheritance();for (var name in type.prototype) {
if (name.startsWith('set_')) {
type.__animationProperties[name.substr(4).toLowerCase()] = name;}
}
delete type.__animationProperties['id'];properties = type.__animationProperties;}
for (var property in obj) {
var prop = property.toLowerCase();if (prop == 'animationname' || prop == 'animationchildren') {
continue;}
var value = obj[property];var setter = properties[prop];if (setter && String.isInstanceOfType(setter) && animation[setter]) {
if (! Sys.Debug.isDebug) {
try { animation[setter](value);} catch (ex) { }
} else {
animation[setter](value);}
} else {
if (prop.endsWith('script')) {
setter = properties[prop.substr(0, property.length - 6)];if (setter && String.isInstanceOfType(setter) && animation[setter]) {
animation.DynamicProperties[setter] = value;} else if ( Sys.Debug.isDebug) {
throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_NoDynamicPropertyFound, property, property.substr(0, property.length - 5)));}
} else if ( Sys.Debug.isDebug) {
throw Error.argument('obj', String.format(AjaxControlToolkit.Resources.Animation_NoPropertyFound, property));}
}
}
return animation;}
$AA.Animation = function(target, duration, fps) {
$AA.Animation.initializeBase(this);this._duration = 1;this._fps = 25;this._target = null;this._tickHandler = null;this._timer = null;this._percentComplete = 0;this._percentDelta = null;this._owner = null;this._parentAnimation = null;this.DynamicProperties = { };if (target) {
this.set_target(target);}
if (duration) {
this.set_duration(duration);}
if (fps) { 
this.set_fps(fps);}
}
$AA.Animation.prototype = {
dispose : function() {
if (this._timer) {
this._timer.dispose();this._timer = null;}
this._tickHandler = null;this._target = null;$AA.Animation.callBaseMethod(this, 'dispose');},
play : function() {
if (!this._owner) {
var resume = true;if (!this._timer) {
resume = false;if (!this._tickHandler) {
this._tickHandler = Function.createDelegate(this, this._onTimerTick);}
this._timer = new Sys.Timer();this._timer.add_tick(this._tickHandler);this.onStart();this._timer.set_interval(1000 / this._fps);this._percentDelta = 100 / (this._duration * this._fps);this._updatePercentComplete(0, true);}
this._timer.set_enabled(true);this.raisePropertyChanged('isPlaying');if (!resume) {
this.raisePropertyChanged('isActive');}
}
},
pause : function() {
if (!this._owner) {
if (this._timer) {
this._timer.set_enabled(false);this.raisePropertyChanged('isPlaying');}
}
},
stop : function(finish) {
if (!this._owner) {
var t = this._timer;this._timer = null;if (t) {
t.dispose();if (this._percentComplete !== 100) {
this._percentComplete = 100;this.raisePropertyChanged('percentComplete');if (finish || finish === undefined) {
this.onStep(100);}
}
this.onEnd();this.raisePropertyChanged('isPlaying');this.raisePropertyChanged('isActive');}
}
},
onStart : function() {
this.raiseStarted();for (var property in this.DynamicProperties) {
try {
this[property](eval(this.DynamicProperties[property]));} catch(ex) {
if ( Sys.Debug.isDebug) {
throw ex;}
}
}
},
onStep : function(percentage) {
this.setValue(this.getAnimatedValue(percentage));},
onEnd : function() {
this.raiseEnded();},
getAnimatedValue : function(percentage) {
throw Error.notImplemented();},
setValue : function(value) {
throw Error.notImplemented();},
interpolate : function(start, end, percentage) {
return start + (end - start) * (percentage / 100);},
_onTimerTick : function() {
this._updatePercentComplete(this._percentComplete + this._percentDelta, true);},
_updatePercentComplete : function(percentComplete, animate) {
if (percentComplete > 100) {
percentComplete = 100;}
this._percentComplete = percentComplete;this.raisePropertyChanged('percentComplete');if (animate) {
this.onStep(percentComplete);}
if (percentComplete === 100) {
this.stop(false);}
},
setOwner : function(owner) {
this._owner = owner;},
raiseStarted : function() {
var handlers = this.get_events().getHandler('started');if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
add_started : function(handler) {
this.get_events().addHandler("started", handler);},
remove_started : function(handler) {
this.get_events().removeHandler("started", handler);},
raiseEnded : function() {
var handlers = this.get_events().getHandler('ended');if (handlers) {
handlers(this, Sys.EventArgs.Empty);}
},
add_ended : function(handler) {
this.get_events().addHandler("ended", handler);},
remove_ended : function(handler) {
this.get_events().removeHandler("ended", handler);},
get_target : function() {
if (!this._target && this._parentAnimation) {
return this._parentAnimation.get_target();}
return this._target;},
set_target : function(value) {
if (this._target != value) {
this._target = value;this.raisePropertyChanged('target');}
},
set_animationTarget : function(id) {
var target = null;var element = $get(id);if (element) {
target = element;} else {
var ctrl = $find(id);if (ctrl) {
element = ctrl.get_element();if (element) {
target = element;}
}
}
if (target) { 
this.set_target(target);} else {
throw Error.argument('id', String.format(AjaxControlToolkit.Resources.Animation_TargetNotFound, id));}
},
get_duration : function() {
return this._duration;},
set_duration : function(value) {
value = this._getFloat(value);if (this._duration != value) {
this._duration = value;this.raisePropertyChanged('duration');}
},
get_fps : function() {
return this._fps;},
set_fps : function(value) {
value = this._getInteger(value);if (this.fps != value) {
this._fps = value;this.raisePropertyChanged('fps');}
},
get_isActive : function() {
return (this._timer !== null);},
get_isPlaying : function() {
return (this._timer !== null) && this._timer.get_enabled();},
get_percentComplete : function() {
return this._percentComplete;},
_getBoolean : function(value) {
if (String.isInstanceOfType(value)) {
return Boolean.parse(value);}
return value;},
_getInteger : function(value) {
if (String.isInstanceOfType(value)) {
return parseInt(value);}
return value;},
_getFloat : function(value) {
if (String.isInstanceOfType(value)) {
return parseFloat(value);}
return value;},
_getEnum : function(value, type) {
if (String.isInstanceOfType(value) && type && type.parse) {
return type.parse(value);}
return value;}
}
$AA.Animation.registerClass('AjaxControlToolkit.Animation.Animation', Sys.Component);$AA.registerAnimation('animation', $AA.Animation);$AA.ParentAnimation = function(target, duration, fps, animations) {
$AA.ParentAnimation.initializeBase(this, [target, duration, fps]);this._animations = [];if (animations && animations.length) {
for (var i = 0;i < animations.length;i++) {
this.add(animations[i]);}
}
}
$AA.ParentAnimation.prototype = {
initialize : function() {
$AA.ParentAnimation.callBaseMethod(this, 'initialize');if (this._animations) {
for (var i = 0;i < this._animations.length;i++) {
var animation = this._animations[i];if (animation && !animation.get_isInitialized) {
animation.initialize();}
}
}
},
dispose : function() {
this.clear();this._animations = null;$AA.ParentAnimation.callBaseMethod(this, 'dispose');},
get_animations : function() {
return this._animations;},
add : function(animation) {
if (this._animations) {
if (animation) {
animation._parentAnimation = this;}
Array.add(this._animations, animation);this.raisePropertyChanged('animations');}
},
remove : function(animation) {
if (this._animations) {
if (animation) {
animation.dispose();}
Array.remove(this._animations, animation);this.raisePropertyChanged('animations');}
},
removeAt : function(index) {
if (this._animations) {
var animation = this._animations[index];if (animation) {
animation.dispose();}
Array.removeAt(this._animations, index);this.raisePropertyChanged('animations');}
},
clear : function() {
if (this._animations) {
for (var i = this._animations.length - 1;i >= 0;i--) {
this._animations[i].dispose();this._animations[i] = null;}
Array.clear(this._animations);this._animations = [];this.raisePropertyChanged('animations');}
}
}
$AA.ParentAnimation.registerClass('AjaxControlToolkit.Animation.ParentAnimation', $AA.Animation);$AA.registerAnimation('parent', $AA.ParentAnimation);$AA.ParallelAnimation = function(target, duration, fps, animations) {
$AA.ParallelAnimation.initializeBase(this, [target, duration, fps, animations]);}
$AA.ParallelAnimation.prototype = {
add : function(animation) {
$AA.ParallelAnimation.callBaseMethod(this, 'add', [animation]);animation.setOwner(this);},
onStart : function() {
$AA.ParallelAnimation.callBaseMethod(this, 'onStart');var animations = this.get_animations();for (var i = 0;i < animations.length;i++) {
animations[i].onStart();}
},
onStep : function(percentage) {
var animations = this.get_animations();for (var i = 0;i < animations.length;i++) {
animations[i].onStep(percentage);}
},
onEnd : function() {
var animations = this.get_animations();for (var i = 0;i < animations.length;i++) {
animations[i].onEnd();}
$AA.ParallelAnimation.callBaseMethod(this, 'onEnd');}
}
$AA.ParallelAnimation.registerClass('AjaxControlToolkit.Animation.ParallelAnimation', $AA.ParentAnimation);$AA.registerAnimation('parallel', $AA.ParallelAnimation);$AA.SequenceAnimation = function(target, duration, fps, animations, iterations) {
$AA.SequenceAnimation.initializeBase(this, [target, duration, fps, animations]);this._handler = null;this._paused = false;this._playing = false;this._index = 0;this._remainingIterations = 0;this._iterations = (iterations !== undefined) ? iterations : 1;}
$AA.SequenceAnimation.prototype = {
dispose : function() {
this._handler = null;$AA.SequenceAnimation.callBaseMethod(this, 'dispose');},
stop : function() {
if (this._playing) {
var animations = this.get_animations();if (this._index < animations.length) {
animations[this._index].remove_ended(this._handler);for (var i = this._index;i < animations.length;i++) {
animations[i].stop();}
}
this._playing = false;this._paused = false;this.raisePropertyChanged('isPlaying');this.onEnd();}
},
pause : function() {
if (this.get_isPlaying()) {
var current = this.get_animations()[this._index];if (current != null) {
current.pause();}
this._paused = true;this.raisePropertyChanged('isPlaying');}
},
play : function() {
var animations = this.get_animations();if (!this._playing) {
this._playing = true;if (this._paused) {
this._paused = false;var current = animations[this._index];if (current != null) {
current.play();this.raisePropertyChanged('isPlaying');}
} else {
this.onStart();this._index = 0;var first = animations[this._index];if (first) {
first.add_ended(this._handler);first.play();this.raisePropertyChanged('isPlaying');} else {
this.stop();}
}
}
},
onStart : function() {
$AA.SequenceAnimation.callBaseMethod(this, 'onStart');this._remainingIterations = this._iterations - 1;if (!this._handler) {
this._handler = Function.createDelegate(this, this._onEndAnimation);}
},
_onEndAnimation : function() {
var animations = this.get_animations();var current = animations[this._index++];if (current) {
current.remove_ended(this._handler);}
if (this._index < animations.length) {
var next = animations[this._index];next.add_ended(this._handler);next.play();} else if (this._remainingIterations >= 1 || this._iterations <= 0) {
this._remainingIterations--;this._index = 0;var first = animations[0];first.add_ended(this._handler);first.play();} else {
this.stop();}
},
onStep : function(percentage) {
throw Error.invalidOperation(AjaxControlToolkit.Resources.Animation_CannotNestSequence);},
onEnd : function() {
this._remainingIterations = 0;$AA.SequenceAnimation.callBaseMethod(this, 'onEnd');},
get_isActive : function() {
return true;},
get_isPlaying : function() {
return this._playing && !this._paused;},
get_iterations : function() {
return this._iterations;},
set_iterations : function(value) {
value = this._getInteger(value);if (this._iterations != value) {
this._iterations = value;this.raisePropertyChanged('iterations');}
},
get_isInfinite : function() {
return this._iterations <= 0;}
}
$AA.SequenceAnimation.registerClass('AjaxControlToolkit.Animation.SequenceAnimation', $AA.ParentAnimation);$AA.registerAnimation('sequence', $AA.SequenceAnimation);$AA.SelectionAnimation = function(target, duration, fps, animations) {
$AA.SelectionAnimation.initializeBase(this, [target, duration, fps, animations]);this._selectedIndex = -1;this._selected = null;}
$AA.SelectionAnimation.prototype = { 
getSelectedIndex : function() {
throw Error.notImplemented();},
onStart : function() {
$AA.SelectionAnimation.callBaseMethod(this, 'onStart');var animations = this.get_animations();this._selectedIndex = this.getSelectedIndex();if (this._selectedIndex >= 0 && this._selectedIndex < animations.length) {
this._selected = animations[this._selectedIndex];if (this._selected) {
this._selected.setOwner(this);this._selected.onStart();}
}
},
onStep : function(percentage) {
if (this._selected) {
this._selected.onStep(percentage);}
},
onEnd : function() {
if (this._selected) {
this._selected.onEnd();this._selected.setOwner(null);}
this._selected = null;this._selectedIndex = null;$AA.SelectionAnimation.callBaseMethod(this, 'onEnd');}
}
$AA.SelectionAnimation.registerClass('AjaxControlToolkit.Animation.SelectionAnimation', $AA.ParentAnimation);$AA.registerAnimation('selection', $AA.SelectionAnimation);$AA.ConditionAnimation = function(target, duration, fps, animations, conditionScript) {
$AA.ConditionAnimation.initializeBase(this, [target, duration, fps, animations]);this._conditionScript = conditionScript;}
$AA.ConditionAnimation.prototype = { 
getSelectedIndex : function() {
var selected = -1;if (this._conditionScript && this._conditionScript.length > 0) {
try {
selected = eval(this._conditionScript) ? 0 : 1;} catch(ex) {
}
}
return selected;},
get_conditionScript : function() {
return this._conditionScript;},
set_conditionScript : function(value) {
if (this._conditionScript != value) {
this._conditionScript = value;this.raisePropertyChanged('conditionScript');}
}
}
$AA.ConditionAnimation.registerClass('AjaxControlToolkit.Animation.ConditionAnimation', $AA.SelectionAnimation);$AA.registerAnimation('condition', $AA.ConditionAnimation);$AA.CaseAnimation = function(target, duration, fps, animations, selectScript) {
$AA.CaseAnimation.initializeBase(this, [target, duration, fps, animations]);this._selectScript = selectScript;}
$AA.CaseAnimation.prototype = {
getSelectedIndex : function() {
var selected = -1;if (this._selectScript && this._selectScript.length > 0) {
try {
var result = eval(this._selectScript)
if (result !== undefined)
selected = result;} catch (ex) {
}
}
return selected;},
get_selectScript : function() {
return this._selectScript;},
set_selectScript : function(value) {
if (this._selectScript != value) {
this._selectScript = value;this.raisePropertyChanged('selectScript');}
}
}
$AA.CaseAnimation.registerClass('AjaxControlToolkit.Animation.CaseAnimation', $AA.SelectionAnimation);$AA.registerAnimation('case', $AA.CaseAnimation);$AA.FadeEffect = function() {
throw Error.invalidOperation();}
$AA.FadeEffect.prototype = {
FadeIn : 0,
FadeOut : 1
}
$AA.FadeEffect.registerEnum("AjaxControlToolkit.Animation.FadeEffect", false);$AA.FadeAnimation = function(target, duration, fps, effect, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.FadeAnimation.initializeBase(this, [target, duration, fps]);this._effect = (effect !== undefined) ? effect : $AA.FadeEffect.FadeIn;this._max = (maximumOpacity !== undefined) ? maximumOpacity : 1;this._min = (minimumOpacity !== undefined) ? minimumOpacity : 0;this._start = this._min;this._end = this._max;this._layoutCreated = false;this._forceLayoutInIE = (forceLayoutInIE === undefined || forceLayoutInIE === null) ? true : forceLayoutInIE;this._currentTarget = null;this._resetOpacities();}
$AA.FadeAnimation.prototype = {
_resetOpacities : function() {
if (this._effect == $AA.FadeEffect.FadeIn) {
this._start = this._min;this._end = this._max;} else {
this._start = this._max;this._end = this._min;}
},
_createLayout : function() {
var element = this._currentTarget;if (element) {
var originalWidth = $common.getCurrentStyle(element, 'width');var originalHeight = $common.getCurrentStyle(element, 'height');var originalBackColor = $common.getCurrentStyle(element, 'backgroundColor');if ((!originalWidth || originalWidth == '' || originalWidth == 'auto') &&
(!originalHeight || originalHeight == '' || originalHeight == 'auto')) {
element.style.width = element.offsetWidth + 'px';}
if (!originalBackColor || originalBackColor == '' || originalBackColor == 'transparent' || originalBackColor == 'rgba(0, 0, 0, 0)') {
element.style.backgroundColor = $common.getInheritedBackgroundColor(element);}
this._layoutCreated = true;}
},
onStart : function() {
$AA.FadeAnimation.callBaseMethod(this, 'onStart');this._currentTarget = this.get_target();this.setValue(this._start);if (this._forceLayoutInIE && !this._layoutCreated && Sys.Browser.agent == Sys.Browser.InternetExplorer) {
this._createLayout();}
},
getAnimatedValue : function(percentage) {
return this.interpolate(this._start, this._end, percentage);},
setValue : function(value) {
if (this._currentTarget) {
$common.setElementOpacity(this._currentTarget, value);}
},
get_effect : function() {
return this._effect;},
set_effect : function(value) {
value = this._getEnum(value, $AA.FadeEffect);if (this._effect != value) {
this._effect = value;this._resetOpacities();this.raisePropertyChanged('effect');}
},
get_minimumOpacity : function() {
return this._min;},
set_minimumOpacity : function(value) {
value = this._getFloat(value);if (this._min != value) {
this._min = value;this._resetOpacities();this.raisePropertyChanged('minimumOpacity');}
},
get_maximumOpacity : function() {
return this._max;},
set_maximumOpacity : function(value) {
value = this._getFloat(value);if (this._max != value) {
this._max = value;this._resetOpacities();this.raisePropertyChanged('maximumOpacity');}
},
get_forceLayoutInIE : function() {
return this._forceLayoutInIE;},
set_forceLayoutInIE : function(value) {
value = this._getBoolean(value);if (this._forceLayoutInIE != value) {
this._forceLayoutInIE = value;this.raisePropertyChanged('forceLayoutInIE');}
},
set_startValue : function(value) {
value = this._getFloat(value);this._start = value;}
}
$AA.FadeAnimation.registerClass('AjaxControlToolkit.Animation.FadeAnimation', $AA.Animation);$AA.registerAnimation('fade', $AA.FadeAnimation);$AA.FadeInAnimation = function(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.FadeInAnimation.initializeBase(this, [target, duration, fps, $AA.FadeEffect.FadeIn, minimumOpacity, maximumOpacity, forceLayoutInIE]);}
$AA.FadeInAnimation.prototype = {
onStart : function() {
$AA.FadeInAnimation.callBaseMethod(this, 'onStart');if (this._currentTarget) {
this.set_startValue($common.getElementOpacity(this._currentTarget));}
}
}
$AA.FadeInAnimation.registerClass('AjaxControlToolkit.Animation.FadeInAnimation', $AA.FadeAnimation);$AA.registerAnimation('fadeIn', $AA.FadeInAnimation);$AA.FadeOutAnimation = function(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.FadeOutAnimation.initializeBase(this, [target, duration, fps, $AA.FadeEffect.FadeOut, minimumOpacity, maximumOpacity, forceLayoutInIE]);}
$AA.FadeOutAnimation.prototype = {
onStart : function() {
$AA.FadeOutAnimation.callBaseMethod(this, 'onStart');if (this._currentTarget) {
this.set_startValue($common.getElementOpacity(this._currentTarget));}
}
}
$AA.FadeOutAnimation.registerClass('AjaxControlToolkit.Animation.FadeOutAnimation', $AA.FadeAnimation);$AA.registerAnimation('fadeOut', $AA.FadeOutAnimation);$AA.PulseAnimation = function(target, duration, fps, iterations, minimumOpacity, maximumOpacity, forceLayoutInIE) {
$AA.PulseAnimation.initializeBase(this, [target, duration, fps, null, ((iterations !== undefined) ? iterations : 3)]);this._out = new $AA.FadeOutAnimation(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE);this.add(this._out);this._in = new $AA.FadeInAnimation(target, duration, fps, minimumOpacity, maximumOpacity, forceLayoutInIE);this.add(this._in);}
$AA.PulseAnimation.prototype = {
get_minimumOpacity : function() {
return this._out.get_minimumOpacity();},
set_minimumOpacity : function(value) {
value = this._getFloat(value);this._out.set_minimumOpacity(value);this._in.set_minimumOpacity(value);this.raisePropertyChanged('minimumOpacity');},
get_maximumOpacity : function() {
return this._out.get_maximumOpacity();},
set_maximumOpacity : function(value) {
value = this._getFloat(value);this._out.set_maximumOpacity(value);this._in.set_maximumOpacity(value);this.raisePropertyChanged('maximumOpacity');},
get_forceLayoutInIE : function() {
return this._out.get_forceLayoutInIE();},
set_forceLayoutInIE : function(value) {
value = this._getBoolean(value);this._out.set_forceLayoutInIE(value);this._in.set_forceLayoutInIE(value);this.raisePropertyChanged('forceLayoutInIE');},
set_duration : function(value) {
value = this._getFloat(value);$AA.PulseAnimation.callBaseMethod(this, 'set_duration', [value]);this._in.set_duration(value);this._out.set_duration(value);},
set_fps : function(value) {
value = this._getInteger(value);$AA.PulseAnimation.callBaseMethod(this, 'set_fps', [value]);this._in.set_fps(value);this._out.set_fps(value);}
}
$AA.PulseAnimation.registerClass('AjaxControlToolkit.Animation.PulseAnimation', $AA.SequenceAnimation);$AA.registerAnimation('pulse', $AA.PulseAnimation);$AA.PropertyAnimation = function(target, duration, fps, property, propertyKey) {
$AA.PropertyAnimation.initializeBase(this, [target, duration, fps]);this._property = property;this._propertyKey = propertyKey;this._currentTarget = null;}
$AA.PropertyAnimation.prototype = {
onStart : function() {
$AA.PropertyAnimation.callBaseMethod(this, 'onStart');this._currentTarget = this.get_target();},
setValue : function(value) {
var element = this._currentTarget;if (element && this._property && this._property.length > 0) { 
if (this._propertyKey && this._propertyKey.length > 0 && element[this._property]) {
element[this._property][this._propertyKey] = value;} else {
element[this._property] = value;}
}
},
getValue : function() {
var element = this.get_target();if (element && this._property && this._property.length > 0) { 
var property = element[this._property];if (property) {
if (this._propertyKey && this._propertyKey.length > 0) {
return property[this._propertyKey];}
return property;}
}
return null;},
get_property : function() {
return this._property;},
set_property : function(value) {
if (this._property != value) {
this._property = value;this.raisePropertyChanged('property');}
},
get_propertyKey : function() {
return this._propertyKey;},
set_propertyKey : function(value) {
if (this._propertyKey != value) {
this._propertyKey = value;this.raisePropertyChanged('propertyKey');}
}
}
$AA.PropertyAnimation.registerClass('AjaxControlToolkit.Animation.PropertyAnimation', $AA.Animation);$AA.registerAnimation('property', $AA.PropertyAnimation);$AA.DiscreteAnimation = function(target, duration, fps, property, propertyKey, values) {
$AA.DiscreteAnimation.initializeBase(this, [target, duration, fps, property, propertyKey]);this._values = (values && values.length) ? values : [];}
$AA.DiscreteAnimation.prototype = {
getAnimatedValue : function(percentage) {
var index = Math.floor(this.interpolate(0, this._values.length - 1, percentage));return this._values[index];},
get_values : function() {
return this._values;},
set_values : function(value) {
if (this._values != value) {
this._values = value;this.raisePropertyChanged('values');}
}
}
$AA.DiscreteAnimation.registerClass('AjaxControlToolkit.Animation.DiscreteAnimation', $AA.PropertyAnimation);$AA.registerAnimation('discrete', $AA.DiscreteAnimation);$AA.InterpolatedAnimation = function(target, duration, fps, property, propertyKey, startValue, endValue) {
$AA.InterpolatedAnimation.initializeBase(this, [target, duration, fps, ((property !== undefined) ? property : 'style'), propertyKey]);this._startValue = startValue;this._endValue = endValue;}
$AA.InterpolatedAnimation.prototype = {
get_startValue : function() {
return this._startValue;},
set_startValue : function(value) {
value = this._getFloat(value);if (this._startValue != value) {
this._startValue = value;this.raisePropertyChanged('startValue');}
},
get_endValue : function() {
return this._endValue;},
set_endValue : function(value) {
value = this._getFloat(value);if (this._endValue != value) {
this._endValue = value;this.raisePropertyChanged('endValue');}
} 
}
$AA.InterpolatedAnimation.registerClass('AjaxControlToolkit.Animation.InterpolatedAnimation', $AA.PropertyAnimation);$AA.registerAnimation('interpolated', $AA.InterpolatedAnimation);$AA.ColorAnimation = function(target, duration, fps, property, propertyKey, startValue, endValue) {
$AA.ColorAnimation.initializeBase(this, [target, duration, fps, property, propertyKey, startValue, endValue]);this._start = null;this._end = null;this._interpolateRed = false;this._interpolateGreen = false;this._interpolateBlue = false;}
$AA.ColorAnimation.prototype = {
onStart : function() {
$AA.ColorAnimation.callBaseMethod(this, 'onStart');this._start = $AA.ColorAnimation.getRGB(this.get_startValue());this._end = $AA.ColorAnimation.getRGB(this.get_endValue());this._interpolateRed = (this._start.Red != this._end.Red);this._interpolateGreen = (this._start.Green != this._end.Green);this._interpolateBlue = (this._start.Blue != this._end.Blue);},
getAnimatedValue : function(percentage) {
var r = this._start.Red;var g = this._start.Green;var b = this._start.Blue;if (this._interpolateRed)
r = Math.round(this.interpolate(r, this._end.Red, percentage));if (this._interpolateGreen)
g = Math.round(this.interpolate(g, this._end.Green, percentage));if (this._interpolateBlue)
b = Math.round(this.interpolate(b, this._end.Blue, percentage));return $AA.ColorAnimation.toColor(r, g, b);},
set_startValue : function(value) {
if (this._startValue != value) {
this._startValue = value;this.raisePropertyChanged('startValue');}
},
set_endValue : function(value) {
if (this._endValue != value) {
this._endValue = value;this.raisePropertyChanged('endValue');}
} 
}
$AA.ColorAnimation.getRGB = function(color) {
if (!color || color.length != 7) {
throw String.format(AjaxControlToolkit.Resources.Animation_InvalidColor, color);}
return { 'Red': parseInt(color.substr(1,2), 16),
'Green': parseInt(color.substr(3,2), 16),
'Blue': parseInt(color.substr(5,2), 16) };}
$AA.ColorAnimation.toColor = function(red, green, blue) {
var r = red.toString(16);var g = green.toString(16);var b = blue.toString(16);if (r.length == 1) r = '0' + r;if (g.length == 1) g = '0' + g;if (b.length == 1) b = '0' + b;return '#' + r + g + b;}
$AA.ColorAnimation.registerClass('AjaxControlToolkit.Animation.ColorAnimation', $AA.InterpolatedAnimation);$AA.registerAnimation('color', $AA.ColorAnimation);$AA.LengthAnimation = function(target, duration, fps, property, propertyKey, startValue, endValue, unit) {
$AA.LengthAnimation.initializeBase(this, [target, duration, fps, property, propertyKey, startValue, endValue]);this._unit = (unit != null) ? unit : 'px';}
$AA.LengthAnimation.prototype = {
getAnimatedValue : function(percentage) {
var value = this.interpolate(this.get_startValue(), this.get_endValue(), percentage);return Math.round(value) + this._unit;},
get_unit : function() {
return this._unit;},
set_unit : function(value) {
if (this._unit != value) {
this._unit = value;this.raisePropertyChanged('unit');}
}
}
$AA.LengthAnimation.registerClass('AjaxControlToolkit.Animation.LengthAnimation', $AA.InterpolatedAnimation);$AA.registerAnimation('length', $AA.LengthAnimation);$AA.MoveAnimation = function(target, duration, fps, horizontal, vertical, relative, unit) {
$AA.MoveAnimation.initializeBase(this, [target, duration, fps, null]);this._horizontal = horizontal ? horizontal : 0;this._vertical = vertical ? vertical : 0;this._relative = (relative === undefined) ? true : relative;this._horizontalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'left', null, null, unit);this._verticalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'top', null, null, unit);this.add(this._verticalAnimation);this.add(this._horizontalAnimation);}
$AA.MoveAnimation.prototype = {
onStart : function() {
$AA.MoveAnimation.callBaseMethod(this, 'onStart');var element = this.get_target();this._horizontalAnimation.set_startValue(element.offsetLeft);this._horizontalAnimation.set_endValue(this._relative ? element.offsetLeft + this._horizontal : this._horizontal);this._verticalAnimation.set_startValue(element.offsetTop);this._verticalAnimation.set_endValue(this._relative ? element.offsetTop + this._vertical : this._vertical);},
get_horizontal : function() {
return this._horizontal;},
set_horizontal : function(value) {
value = this._getFloat(value);if (this._horizontal != value) {
this._horizontal = value;this.raisePropertyChanged('horizontal');}
},
get_vertical : function() {
return this._vertical;},
set_vertical : function(value) {
value = this._getFloat(value);if (this._vertical != value) {
this._vertical = value;this.raisePropertyChanged('vertical');}
},
get_relative : function() {
return this._relative;},
set_relative : function(value) {
value = this._getBoolean(value);if (this._relative != value) {
this._relative = value;this.raisePropertyChanged('relative');}
},
get_unit : function() {
this._horizontalAnimation.get_unit();},
set_unit : function(value) {
var unit = this._horizontalAnimation.get_unit();if (unit != value) {
this._horizontalAnimation.set_unit(value);this._verticalAnimation.set_unit(value);this.raisePropertyChanged('unit');}
}
}
$AA.MoveAnimation.registerClass('AjaxControlToolkit.Animation.MoveAnimation', $AA.ParallelAnimation);$AA.registerAnimation('move', $AA.MoveAnimation);$AA.ResizeAnimation = function(target, duration, fps, width, height, unit) {
$AA.ResizeAnimation.initializeBase(this, [target, duration, fps, null]);this._width = width;this._height = height;this._horizontalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'width', null, null, unit);this._verticalAnimation = new $AA.LengthAnimation(target, duration, fps, 'style', 'height', null, null, unit);this.add(this._horizontalAnimation);this.add(this._verticalAnimation);}
$AA.ResizeAnimation.prototype = {
onStart : function() {
$AA.ResizeAnimation.callBaseMethod(this, 'onStart');var element = this.get_target();this._horizontalAnimation.set_startValue(element.offsetWidth);this._verticalAnimation.set_startValue(element.offsetHeight);this._horizontalAnimation.set_endValue((this._width !== null && this._width !== undefined) ?
this._width : element.offsetWidth);this._verticalAnimation.set_endValue((this._height !== null && this._height !== undefined) ?
this._height : element.offsetHeight);},
get_width : function() {
return this._width;},
set_width : function(value) {
value = this._getFloat(value);if (this._width != value) {
this._width = value;this.raisePropertyChanged('width');}
},
get_height : function() {
return this._height;},
set_height : function(value) {
value = this._getFloat(value);if (this._height != value) {
this._height = value;this.raisePropertyChanged('height');}
},
get_unit : function() {
this._horizontalAnimation.get_unit();},
set_unit : function(value) {
var unit = this._horizontalAnimation.get_unit();if (unit != value) {
this._horizontalAnimation.set_unit(value);this._verticalAnimation.set_unit(value);this.raisePropertyChanged('unit');}
}
}
$AA.ResizeAnimation.registerClass('AjaxControlToolkit.Animation.ResizeAnimation', $AA.ParallelAnimation);$AA.registerAnimation('resize', $AA.ResizeAnimation);$AA.ScaleAnimation = function(target, duration, fps, scaleFactor, unit, center, scaleFont, fontUnit) {
$AA.ScaleAnimation.initializeBase(this, [target, duration, fps]);this._scaleFactor = (scaleFactor !== undefined) ? scaleFactor : 1;this._unit = (unit !== undefined) ? unit : 'px';this._center = center;this._scaleFont = scaleFont;this._fontUnit = (fontUnit !== undefined) ? fontUnit : 'pt';this._element = null;this._initialHeight = null;this._initialWidth = null;this._initialTop = null;this._initialLeft = null;this._initialFontSize = null;}
$AA.ScaleAnimation.prototype = { 
getAnimatedValue : function(percentage) {
return this.interpolate(1.0, this._scaleFactor, percentage);},
onStart : function() {
$AA.ScaleAnimation.callBaseMethod(this, 'onStart');this._element = this.get_target();if (this._element) {
this._initialHeight = this._element.offsetHeight;this._initialWidth = this._element.offsetWidth;if (this._center) {
this._initialTop = this._element.offsetTop;this._initialLeft = this._element.offsetLeft;}
if (this._scaleFont) {
this._initialFontSize = parseFloat(
$common.getCurrentStyle(this._element, 'fontSize'));}
}
},
setValue : function(scale) {
if (this._element) {
var width = Math.round(this._initialWidth * scale);var height = Math.round(this._initialHeight * scale);this._element.style.width = width + this._unit;this._element.style.height = height + this._unit;if (this._center) {
this._element.style.top = (this._initialTop +
Math.round((this._initialHeight - height) / 2)) + this._unit;this._element.style.left = (this._initialLeft +
Math.round((this._initialWidth - width) / 2)) + this._unit;}
if (this._scaleFont) {
var size = this._initialFontSize * scale;if (this._fontUnit == 'px' || this._fontUnit == 'pt') {
size = Math.round(size);}
this._element.style.fontSize = size + this._fontUnit;}
}
},
onEnd : function() {
this._element = null;this._initialHeight = null;this._initialWidth = null;this._initialTop = null;this._initialLeft = null;this._initialFontSize = null;$AA.ScaleAnimation.callBaseMethod(this, 'onEnd');},
get_scaleFactor : function() {
return this._scaleFactor;},
set_scaleFactor : function(value) {
value = this._getFloat(value);if (this._scaleFactor != value) {
this._scaleFactor = value;this.raisePropertyChanged('scaleFactor');}
},
get_unit : function() {
return this._unit;},
set_unit : function(value) {
if (this._unit != value) {
this._unit = value;this.raisePropertyChanged('unit');}
},
get_center : function() {
return this._center;},
set_center : function(value) {
value = this._getBoolean(value);if (this._center != value) {
this._center = value;this.raisePropertyChanged('center');}
},
get_scaleFont : function() {
return this._scaleFont;},
set_scaleFont : function(value) {
value = this._getBoolean(value);if (this._scaleFont != value) {
this._scaleFont = value;this.raisePropertyChanged('scaleFont');}
},
get_fontUnit : function() {
return this._fontUnit;},
set_fontUnit : function(value) {
if (this._fontUnit != value) { 
this._fontUnit = value;this.raisePropertyChanged('fontUnit');}
}
}
$AA.ScaleAnimation.registerClass('AjaxControlToolkit.Animation.ScaleAnimation', $AA.Animation);$AA.registerAnimation('scale', $AA.ScaleAnimation);$AA.Action = function(target, duration, fps) {
$AA.Action.initializeBase(this, [target, duration, fps]);if (duration === undefined) {
this.set_duration(0);}
}
$AA.Action.prototype = {
onEnd : function() {
this.doAction();$AA.Action.callBaseMethod(this, 'onEnd');},
doAction : function() {
throw Error.notImplemented();},
getAnimatedValue : function() {
},
setValue : function() {
}
}
$AA.Action.registerClass('AjaxControlToolkit.Animation.Action', $AA.Animation);$AA.registerAnimation('action', $AA.Action);$AA.EnableAction = function(target, duration, fps, enabled) {
$AA.EnableAction.initializeBase(this, [target, duration, fps]);this._enabled = (enabled !== undefined) ? enabled : true;}
$AA.EnableAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
element.disabled = !this._enabled;}
},
get_enabled : function() {
return this._enabled;},
set_enabled : function(value) {
value = this._getBoolean(value);if (this._enabled != value) {
this._enabled = value;this.raisePropertyChanged('enabled');}
}
}
$AA.EnableAction.registerClass('AjaxControlToolkit.Animation.EnableAction', $AA.Action);$AA.registerAnimation('enableAction', $AA.EnableAction);$AA.HideAction = function(target, duration, fps, visible) {
$AA.HideAction.initializeBase(this, [target, duration, fps]);this._visible = visible;}
$AA.HideAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
$common.setVisible(element, this._visible);}
},
get_visible : function() {
return this._visible;},
set_visible : function(value) {
if (this._visible != value) {
this._visible = value;this.raisePropertyChanged('visible');}
}
}
$AA.HideAction.registerClass('AjaxControlToolkit.Animation.HideAction', $AA.Action);$AA.registerAnimation('hideAction', $AA.HideAction);$AA.StyleAction = function(target, duration, fps, attribute, value) {
$AA.StyleAction.initializeBase(this, [target, duration, fps]);this._attribute = attribute;this._value = value;}
$AA.StyleAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
element.style[this._attribute] = this._value;}
},
get_attribute : function() {
return this._attribute;},
set_attribute : function(value) {
if (this._attribute != value) {
this._attribute = value;this.raisePropertyChanged('attribute');}
},
get_value : function() {
return this._value;},
set_value : function(value) {
if (this._value != value) {
this._value = value;this.raisePropertyChanged('value');}
}
}
$AA.StyleAction.registerClass('AjaxControlToolkit.Animation.StyleAction', $AA.Action);$AA.registerAnimation('styleAction', $AA.StyleAction);$AA.OpacityAction = function(target, duration, fps, opacity) {
$AA.OpacityAction.initializeBase(this, [target, duration, fps]);this._opacity = opacity;}
$AA.OpacityAction.prototype = {
doAction : function() {
var element = this.get_target();if (element) {
$common.setElementOpacity(element, this._opacity);}
},
get_opacity : function() {
return this._opacity;},
set_opacity : function(value) {
value = this._getFloat(value);if (this._opacity != value) {
this._opacity = value;this.raisePropertyChanged('opacity');}
}
}
$AA.OpacityAction.registerClass('AjaxControlToolkit.Animation.OpacityAction', $AA.Action);$AA.registerAnimation('opacityAction', $AA.OpacityAction);$AA.ScriptAction = function(target, duration, fps, script) {
$AA.ScriptAction.initializeBase(this, [target, duration, fps]);this._script = script;}
$AA.ScriptAction.prototype = {
doAction : function() {
try {
eval(this._script);} catch (ex) {
}
},
get_script : function() {
return this._script;},
set_script : function(value) {
if (this._script != value) {
this._script = value;this.raisePropertyChanged('script');}
}
}
$AA.ScriptAction.registerClass('AjaxControlToolkit.Animation.ScriptAction', $AA.Action);$AA.registerAnimation('scriptAction', $AA.ScriptAction);
//END AjaxControlToolkit.Animation.Animations.js
//START AjaxControlToolkit.Compat.DragDrop.DragDropScripts.js
/////////////////////////////////////////////////////////////////////////////
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.IDragSource = function() {
}
AjaxControlToolkit.IDragSource.prototype = {
get_dragDataType: function() { throw Error.notImplemented();},
getDragData: function() { throw Error.notImplemented();},
get_dragMode: function() { throw Error.notImplemented();},
onDragStart: function() { throw Error.notImplemented();},
onDrag: function() { throw Error.notImplemented();},
onDragEnd: function() { throw Error.notImplemented();}
}
AjaxControlToolkit.IDragSource.registerInterface('AjaxControlToolkit.IDragSource');/////////////////////////////////////////////////////////////////////////////
AjaxControlToolkit.IDropTarget = function() {
}
AjaxControlToolkit.IDropTarget.prototype = {
get_dropTargetElement: function() { throw Error.notImplemented();},
canDrop: function() { throw Error.notImplemented();},
drop: function() { throw Error.notImplemented();},
onDragEnterTarget: function() { throw Error.notImplemented();},
onDragLeaveTarget: function() { throw Error.notImplemented();},
onDragInTarget: function() { throw Error.notImplemented();}
}
AjaxControlToolkit.IDropTarget.registerInterface('AjaxControlToolkit.IDropTarget');/////////////////////////////////////////////
AjaxControlToolkit.DragMode = function() {
throw Error.invalidOperation();}
AjaxControlToolkit.DragMode.prototype = {
Copy: 0,
Move: 1
}
AjaxControlToolkit.DragMode.registerEnum('AjaxControlToolkit.DragMode');//////////////////////////////////////////////////////////////////
AjaxControlToolkit.DragDropEventArgs = function(dragMode, dragDataType, dragData) {
this._dragMode = dragMode;this._dataType = dragDataType;this._data = dragData;}
AjaxControlToolkit.DragDropEventArgs.prototype = {
get_dragMode: function() {
return this._dragMode || null;},
get_dragDataType: function() {
return this._dataType || null;},
get_dragData: function() {
return this._data || null;}
}
AjaxControlToolkit.DragDropEventArgs.registerClass('AjaxControlToolkit.DragDropEventArgs');AjaxControlToolkit._DragDropManager = function() {
this._instance = null;this._events = null;}
AjaxControlToolkit._DragDropManager.prototype = {
add_dragStart: function(handler) {
this.get_events().addHandler('dragStart', handler);},
remove_dragStart: function(handler) {
this.get_events().removeHandler('dragStart', handler);},
get_events: function() {
if (!this._events) {
this._events = new Sys.EventHandlerList();}
return this._events;},
add_dragStop: function(handler) {
this.get_events().addHandler('dragStop', handler);},
remove_dragStop: function(handler) {
this.get_events().removeHandler('dragStop', handler);},
_getInstance: function() {
if (!this._instance) {
if (Sys.Browser.agent === Sys.Browser.InternetExplorer) {
this._instance = new AjaxControlToolkit.IEDragDropManager();}
else {
this._instance = new AjaxControlToolkit.GenericDragDropManager();}
this._instance.initialize();this._instance.add_dragStart(Function.createDelegate(this, this._raiseDragStart));this._instance.add_dragStop(Function.createDelegate(this, this._raiseDragStop));}
return this._instance;},
startDragDrop: function(dragSource, dragVisual, context) {
this._getInstance().startDragDrop(dragSource, dragVisual, context);},
registerDropTarget: function(target) {
this._getInstance().registerDropTarget(target);},
unregisterDropTarget: function(target) {
this._getInstance().unregisterDropTarget(target);},
dispose: function() {
delete this._events;Sys.Application.unregisterDisposableObject(this);Sys.Application.removeComponent(this);},
_raiseDragStart: function(sender, eventArgs) {
var handler = this.get_events().getHandler('dragStart');if(handler) {
handler(this, eventArgs);}
},
_raiseDragStop: function(sender, eventArgs) {
var handler = this.get_events().getHandler('dragStop');if(handler) {
handler(this, eventArgs);}
}
}
AjaxControlToolkit._DragDropManager.registerClass('AjaxControlToolkit._DragDropManager');AjaxControlToolkit.DragDropManager = new AjaxControlToolkit._DragDropManager();AjaxControlToolkit.IEDragDropManager = function() {
AjaxControlToolkit.IEDragDropManager.initializeBase(this);this._dropTargets = null;this._radius = 10;this._activeDragVisual = null;this._activeContext = null;this._activeDragSource = null;this._underlyingTarget = null;this._oldOffset = null;this._potentialTarget = null;this._isDragging = false;this._mouseUpHandler = null;this._documentMouseMoveHandler = null;this._documentDragOverHandler = null;this._dragStartHandler = null;this._mouseMoveHandler = null;this._dragEnterHandler = null;this._dragLeaveHandler = null;this._dragOverHandler = null;this._dropHandler = null;}
AjaxControlToolkit.IEDragDropManager.prototype = {
add_dragStart : function(handler) {
this.get_events().addHandler("dragStart", handler);},
remove_dragStart : function(handler) {
this.get_events().removeHandler("dragStart", handler);},
add_dragStop : function(handler) {
this.get_events().addHandler("dragStop", handler);},
remove_dragStop : function(handler) {
this.get_events().removeHandler("dragStop", handler);},
initialize : function() {
AjaxControlToolkit.IEDragDropManager.callBaseMethod(this, 'initialize');this._mouseUpHandler = Function.createDelegate(this, this._onMouseUp);this._documentMouseMoveHandler = Function.createDelegate(this, this._onDocumentMouseMove);this._documentDragOverHandler = Function.createDelegate(this, this._onDocumentDragOver);this._dragStartHandler = Function.createDelegate(this, this._onDragStart);this._mouseMoveHandler = Function.createDelegate(this, this._onMouseMove);this._dragEnterHandler = Function.createDelegate(this, this._onDragEnter);this._dragLeaveHandler = Function.createDelegate(this, this._onDragLeave);this._dragOverHandler = Function.createDelegate(this, this._onDragOver);this._dropHandler = Function.createDelegate(this, this._onDrop);},
dispose : function() {
if(this._dropTargets) {
for (var i = 0;i < this._dropTargets;i++) {
this.unregisterDropTarget(this._dropTargets[i]);}
this._dropTargets = null;}
AjaxControlToolkit.IEDragDropManager.callBaseMethod(this, 'dispose');},
startDragDrop : function(dragSource, dragVisual, context) {
var ev = window._event;if (this._isDragging) {
return;}
this._underlyingTarget = null;this._activeDragSource = dragSource;this._activeDragVisual = dragVisual;this._activeContext = context;var mousePosition = { x: ev.clientX, y: ev.clientY };dragVisual.originalPosition = dragVisual.style.position;dragVisual.style.position = "absolute";document._lastPosition = mousePosition;dragVisual.startingPoint = mousePosition;var scrollOffset = this.getScrollOffset(dragVisual,  true);dragVisual.startingPoint = this.addPoints(dragVisual.startingPoint, scrollOffset);if (dragVisual.style.position == "absolute") {
dragVisual.startingPoint = this.subtractPoints(dragVisual.startingPoint, $common.getLocation(dragVisual));}
else {
var left = parseInt(dragVisual.style.left);var top = parseInt(dragVisual.style.top);if (isNaN(left)) left = "0";if (isNaN(top)) top = "0";dragVisual.startingPoint = this.subtractPoints(dragVisual.startingPoint, { x: left, y: top });}
this._prepareForDomChanges();dragSource.onDragStart();var eventArgs = new AjaxControlToolkit.DragDropEventArgs(
dragSource.get_dragMode(),
dragSource.get_dragDataType(),
dragSource.getDragData(context));var handler = this.get_events().getHandler('dragStart');if(handler) handler(this,eventArgs);this._recoverFromDomChanges();this._wireEvents();this._drag( true);},
_stopDragDrop : function(cancelled) {
var ev = window._event;if (this._activeDragSource != null) {
this._unwireEvents();if (!cancelled) {
cancelled = (this._underlyingTarget == null);}
if (!cancelled && this._underlyingTarget != null) {
this._underlyingTarget.drop(this._activeDragSource.get_dragMode(), this._activeDragSource.get_dragDataType(),
this._activeDragSource.getDragData(this._activeContext));}
this._activeDragSource.onDragEnd(cancelled);var handler = this.get_events().getHandler('dragStop');if(handler) handler(this,Sys.EventArgs.Empty);this._activeDragVisual.style.position = this._activeDragVisual.originalPosition;this._activeDragSource = null;this._activeContext = null;this._activeDragVisual = null;this._isDragging = false;this._potentialTarget = null;ev.preventDefault();}
},
_drag : function(isInitialDrag) {
var ev = window._event;var mousePosition = { x: ev.clientX, y: ev.clientY };document._lastPosition = mousePosition;var scrollOffset = this.getScrollOffset(this._activeDragVisual,  true);var position = this.addPoints(this.subtractPoints(mousePosition, this._activeDragVisual.startingPoint), scrollOffset);if (!isInitialDrag && parseInt(this._activeDragVisual.style.left) == position.x && parseInt(this._activeDragVisual.style.top) == position.y) {
return;}
$common.setLocation(this._activeDragVisual, position);this._prepareForDomChanges();this._activeDragSource.onDrag();this._recoverFromDomChanges();this._potentialTarget = this._findPotentialTarget(this._activeDragSource, this._activeDragVisual);var movedToOtherTarget = (this._potentialTarget != this._underlyingTarget || this._potentialTarget == null);if (movedToOtherTarget && this._underlyingTarget != null) {
this._leaveTarget(this._activeDragSource, this._underlyingTarget);}
if (this._potentialTarget != null) {
if (movedToOtherTarget) {
this._underlyingTarget = this._potentialTarget;this._enterTarget(this._activeDragSource, this._underlyingTarget);}
else {
this._moveInTarget(this._activeDragSource, this._underlyingTarget);}
}
else {
this._underlyingTarget = null;}
},
_wireEvents : function() {
$addHandler(document, "mouseup", this._mouseUpHandler);$addHandler(document, "mousemove", this._documentMouseMoveHandler);$addHandler(document.body, "dragover", this._documentDragOverHandler);$addHandler(this._activeDragVisual, "dragstart", this._dragStartHandler);$addHandler(this._activeDragVisual, "dragend", this._mouseUpHandler);$addHandler(this._activeDragVisual, "drag", this._mouseMoveHandler);},
_unwireEvents : function() {
$removeHandler(this._activeDragVisual, "drag", this._mouseMoveHandler);$removeHandler(this._activeDragVisual, "dragend", this._mouseUpHandler);$removeHandler(this._activeDragVisual, "dragstart", this._dragStartHandler);$removeHandler(document.body, "dragover", this._documentDragOverHandler);$removeHandler(document, "mousemove", this._documentMouseMoveHandler);$removeHandler(document, "mouseup", this._mouseUpHandler);},
registerDropTarget : function(dropTarget) {
if (this._dropTargets == null) {
this._dropTargets = [];}
Array.add(this._dropTargets, dropTarget);this._wireDropTargetEvents(dropTarget);},
unregisterDropTarget : function(dropTarget) {
this._unwireDropTargetEvents(dropTarget);if (this._dropTargets) {
Array.remove(this._dropTargets, dropTarget);}
},
_wireDropTargetEvents : function(dropTarget) {
var associatedElement = dropTarget.get_dropTargetElement();associatedElement._dropTarget = dropTarget;$addHandler(associatedElement, "dragenter", this._dragEnterHandler);$addHandler(associatedElement, "dragleave", this._dragLeaveHandler);$addHandler(associatedElement, "dragover", this._dragOverHandler);$addHandler(associatedElement, "drop", this._dropHandler);},
_unwireDropTargetEvents : function(dropTarget) {
var associatedElement = dropTarget.get_dropTargetElement();if(associatedElement._dropTarget)
{
associatedElement._dropTarget = null;$removeHandler(associatedElement, "dragenter", this._dragEnterHandler);$removeHandler(associatedElement, "dragleave", this._dragLeaveHandler);$removeHandler(associatedElement, "dragover", this._dragOverHandler);$removeHandler(associatedElement, "drop", this._dropHandler);}
},
_onDragStart : function(ev) {
window._event = ev;document.selection.empty();var dt = ev.dataTransfer;if(!dt && ev.rawEvent) dt = ev.rawEvent.dataTransfer;var dataType = this._activeDragSource.get_dragDataType().toLowerCase();var data = this._activeDragSource.getDragData(this._activeContext);if (data) {
if (dataType != "text" && dataType != "url") {
dataType = "text";if (data.innerHTML != null) {
data = data.innerHTML;}
}
dt.effectAllowed = "move";dt.setData(dataType, data.toString());}
},
_onMouseUp : function(ev) {
window._event = ev;this._stopDragDrop(false);},
_onDocumentMouseMove : function(ev) {
window._event = ev;this._dragDrop();},
_onDocumentDragOver : function(ev) {
window._event = ev;if(this._potentialTarget) ev.preventDefault();},
_onMouseMove : function(ev) {
window._event = ev;this._drag();},
_onDragEnter : function(ev) {
window._event = ev;if (this._isDragging) {
ev.preventDefault();}
else {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.onDragEnterTarget(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
},
_onDragLeave : function(ev) {
window._event = ev;if (this._isDragging) {
ev.preventDefault();}
else {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.onDragLeaveTarget(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
},
_onDragOver : function(ev) {
window._event = ev;if (this._isDragging) {
ev.preventDefault();}
else {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.onDragInTarget(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
},
_onDrop : function(ev) {
window._event = ev;if (!this._isDragging) {
var dataObjects = AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget(this._getDropTarget(ev.target));for (var i = 0;i < dataObjects.length;i++) {
this._dropTarget.drop(AjaxControlToolkit.DragMode.Copy, dataObjects[i].type, dataObjects[i].value);}
}
ev.preventDefault();},
_getDropTarget : function(element) {
while (element) {
if (element._dropTarget != null) {
return element._dropTarget;}
element = element.parentNode;}
return null;},
_dragDrop : function() {
if (this._isDragging) {
return;}
this._isDragging = true;this._activeDragVisual.dragDrop();document.selection.empty();},
_moveInTarget : function(dragSource, dropTarget) {
this._prepareForDomChanges();dropTarget.onDragInTarget(dragSource.get_dragMode(), dragSource.get_dragDataType(), dragSource.getDragData(this._activeContext));this._recoverFromDomChanges();},
_enterTarget : function(dragSource, dropTarget) {
this._prepareForDomChanges();dropTarget.onDragEnterTarget(dragSource.get_dragMode(), dragSource.get_dragDataType(), dragSource.getDragData(this._activeContext));this._recoverFromDomChanges();},
_leaveTarget : function(dragSource, dropTarget) {
this._prepareForDomChanges();dropTarget.onDragLeaveTarget(dragSource.get_dragMode(), dragSource.get_dragDataType(), dragSource.getDragData(this._activeContext));this._recoverFromDomChanges();},
_findPotentialTarget : function(dragSource, dragVisual) {
var ev = window._event;if (this._dropTargets == null) {
return null;}
var type = dragSource.get_dragDataType();var mode = dragSource.get_dragMode();var data = dragSource.getDragData(this._activeContext);var scrollOffset = this.getScrollOffset(document.body,  true);var x = ev.clientX + scrollOffset.x;var y = ev.clientY + scrollOffset.y;var cursorRect = { x: x - this._radius, y: y - this._radius, width: this._radius * 2, height: this._radius * 2 };var targetRect;for (var i = 0;i < this._dropTargets.length;i++) {
targetRect = $common.getBounds(this._dropTargets[i].get_dropTargetElement());if ($common.overlaps(cursorRect, targetRect) && this._dropTargets[i].canDrop(mode, type, data)) {
return this._dropTargets[i];}
}
return null;},
_prepareForDomChanges : function() {
this._oldOffset = $common.getLocation(this._activeDragVisual);},
_recoverFromDomChanges : function() {
var newOffset = $common.getLocation(this._activeDragVisual);if (this._oldOffset.x != newOffset.x || this._oldOffset.y != newOffset.y) {
this._activeDragVisual.startingPoint = this.subtractPoints(this._activeDragVisual.startingPoint, this.subtractPoints(this._oldOffset, newOffset));scrollOffset = this.getScrollOffset(this._activeDragVisual,  true);var position = this.addPoints(this.subtractPoints(document._lastPosition, this._activeDragVisual.startingPoint), scrollOffset);$common.setLocation(this._activeDragVisual, position);}
},
addPoints : function(p1, p2) {
return { x: p1.x + p2.x, y: p1.y + p2.y };},
subtractPoints : function(p1, p2) {
return { x: p1.x - p2.x, y: p1.y - p2.y };},
getScrollOffset : function(element, recursive) {
var left = element.scrollLeft;var top = element.scrollTop;if (recursive) {
var parent = element.parentNode;while (parent != null && parent.scrollLeft != null) {
left += parent.scrollLeft;top += parent.scrollTop;if (parent == document.body && (left != 0 && top != 0))
break;parent = parent.parentNode;}
}
return { x: left, y: top };},
getBrowserRectangle : function() {
var width = window.innerWidth;var height = window.innerHeight;if (width == null) {
width = document.body.clientWidth;}
if (height == null) {
height = document.body.clientHeight;}
return { x: 0, y: 0, width: width, height: height };},
getNextSibling : function(item) {
for (item = item.nextSibling;item != null;item = item.nextSibling) {
if (item.innerHTML != null) {
return item;}
}
return null;},
hasParent : function(element) {
return (element.parentNode != null && element.parentNode.tagName != null);}
}
AjaxControlToolkit.IEDragDropManager.registerClass('AjaxControlToolkit.IEDragDropManager', Sys.Component);AjaxControlToolkit.IEDragDropManager._getDataObjectsForDropTarget = function(dropTarget) {
if (dropTarget == null) {
return [];}
var ev = window._event;var dataObjects = [];var dataTypes = [ "URL", "Text" ];var data;for (var i = 0;i < dataTypes.length;i++) {
var dt = ev.dataTransfer;if(!dt && ev.rawEvent) dt = ev.rawEvent.dataTransfer;data = dt.getData(dataTypes[i]);if (dropTarget.canDrop(AjaxControlToolkit.DragMode.Copy, dataTypes[i], data)) {
if (data) {
Array.add(dataObjects, { type : dataTypes[i], value : data });}
}
}
return dataObjects;}
AjaxControlToolkit.GenericDragDropManager = function() {
AjaxControlToolkit.GenericDragDropManager.initializeBase(this);this._dropTargets = null;this._scrollEdgeConst = 40;this._scrollByConst = 10;this._scroller = null;this._scrollDeltaX = 0;this._scrollDeltaY = 0;this._activeDragVisual = null;this._activeContext = null;this._activeDragSource = null;this._oldOffset = null;this._potentialTarget = null;this._mouseUpHandler = null;this._mouseMoveHandler = null;this._keyPressHandler = null;this._scrollerTickHandler = null;}
AjaxControlToolkit.GenericDragDropManager.prototype = {
initialize : function() {
AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "initialize");this._mouseUpHandler = Function.createDelegate(this, this._onMouseUp);this._mouseMoveHandler = Function.createDelegate(this, this._onMouseMove);this._keyPressHandler = Function.createDelegate(this, this._onKeyPress);this._scrollerTickHandler = Function.createDelegate(this, this._onScrollerTick);if (Sys.Browser.agent === Sys.Browser.Safari) {
AjaxControlToolkit.GenericDragDropManager.__loadSafariCompatLayer(this);}
this._scroller = new Sys.Timer();this._scroller.set_interval(10);this._scroller.add_tick(this._scrollerTickHandler);},
startDragDrop : function(dragSource, dragVisual, context) {
this._activeDragSource = dragSource;this._activeDragVisual = dragVisual;this._activeContext = context;AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "startDragDrop", [dragSource, dragVisual, context]);},
_stopDragDrop : function(cancelled) {
this._scroller.set_enabled(false);AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "_stopDragDrop", [cancelled]);},
_drag : function(isInitialDrag) {
AjaxControlToolkit.GenericDragDropManager.callBaseMethod(this, "_drag", [isInitialDrag]);this._autoScroll();},
_wireEvents : function() {
$addHandler(document, "mouseup", this._mouseUpHandler);$addHandler(document, "mousemove", this._mouseMoveHandler);$addHandler(document, "keypress", this._keyPressHandler);},
_unwireEvents : function() {
$removeHandler(document, "keypress", this._keyPressHandler);$removeHandler(document, "mousemove", this._mouseMoveHandler);$removeHandler(document, "mouseup", this._mouseUpHandler);},
_wireDropTargetEvents : function(dropTarget) {
},
_unwireDropTargetEvents : function(dropTarget) {
},
_onMouseUp : function(e) {
window._event = e;this._stopDragDrop(false);},
_onMouseMove : function(e) {
window._event = e;this._drag();},
_onKeyPress : function(e) {
window._event = e;var k = e.keyCode ? e.keyCode : e.rawEvent.keyCode;if (k == 27) {
this._stopDragDrop( true);}
},
_autoScroll : function() {
var ev = window._event;var browserRect = this.getBrowserRectangle();if (browserRect.width > 0) {
this._scrollDeltaX = this._scrollDeltaY = 0;if (ev.clientX < browserRect.x + this._scrollEdgeConst) this._scrollDeltaX = -this._scrollByConst;else if (ev.clientX > browserRect.width - this._scrollEdgeConst) this._scrollDeltaX = this._scrollByConst;if (ev.clientY < browserRect.y + this._scrollEdgeConst) this._scrollDeltaY = -this._scrollByConst;else if (ev.clientY > browserRect.height - this._scrollEdgeConst) this._scrollDeltaY = this._scrollByConst;if (this._scrollDeltaX != 0 || this._scrollDeltaY != 0) {
this._scroller.set_enabled(true);}
else {
this._scroller.set_enabled(false);}
}
},
_onScrollerTick : function() {
var oldLeft = document.body.scrollLeft;var oldTop = document.body.scrollTop;window.scrollBy(this._scrollDeltaX, this._scrollDeltaY);var newLeft = document.body.scrollLeft;var newTop = document.body.scrollTop;var dragVisual = this._activeDragVisual;var position = { x: parseInt(dragVisual.style.left) + (newLeft - oldLeft), y: parseInt(dragVisual.style.top) + (newTop - oldTop) };$common.setLocation(dragVisual, position);}
}
AjaxControlToolkit.GenericDragDropManager.registerClass('AjaxControlToolkit.GenericDragDropManager', AjaxControlToolkit.IEDragDropManager);if (Sys.Browser.agent === Sys.Browser.Safari) {
AjaxControlToolkit.GenericDragDropManager.__loadSafariCompatLayer = function(ddm) {
ddm._getScrollOffset = ddm.getScrollOffset;ddm.getScrollOffset = function(element, recursive) {
return { x: 0, y: 0 };}
ddm._getBrowserRectangle = ddm.getBrowserRectangle;ddm.getBrowserRectangle = function() {
var browserRect = ddm._getBrowserRectangle();var offset = ddm._getScrollOffset(document.body, true);return { x: browserRect.x + offset.x, y: browserRect.y + offset.y,
width: browserRect.width + offset.x, height: browserRect.height + offset.y };}
}
}

//END AjaxControlToolkit.Compat.DragDrop.DragDropScripts.js
//START AjaxControlToolkit.ExtenderBase.BaseScripts.js
Type.registerNamespace('AjaxControlToolkit');AjaxControlToolkit.BehaviorBase = function(element) {
AjaxControlToolkit.BehaviorBase.initializeBase(this,[element]);this._clientStateFieldID = null;this._pageRequestManager = null;this._partialUpdateBeginRequestHandler = null;this._partialUpdateEndRequestHandler = null;}
AjaxControlToolkit.BehaviorBase.prototype = {
initialize : function() {
AjaxControlToolkit.BehaviorBase.callBaseMethod(this, 'initialize');},
dispose : function() {
AjaxControlToolkit.BehaviorBase.callBaseMethod(this, 'dispose');if (this._pageRequestManager) {
if (this._partialUpdateBeginRequestHandler) {
this._pageRequestManager.remove_beginRequest(this._partialUpdateBeginRequestHandler);this._partialUpdateBeginRequestHandler = null;}
if (this._partialUpdateEndRequestHandler) {
this._pageRequestManager.remove_endRequest(this._partialUpdateEndRequestHandler);this._partialUpdateEndRequestHandler = null;}
this._pageRequestManager = null;}
},
get_ClientStateFieldID : function() {
return this._clientStateFieldID;},
set_ClientStateFieldID : function(value) {
if (this._clientStateFieldID != value) {
this._clientStateFieldID = value;this.raisePropertyChanged('ClientStateFieldID');}
},
get_ClientState : function() {
if (this._clientStateFieldID) {
var input = document.getElementById(this._clientStateFieldID);if (input) {
return input.value;}
}
return null;},
set_ClientState : function(value) {
if (this._clientStateFieldID) {
var input = document.getElementById(this._clientStateFieldID);if (input) {
input.value = value;}
}
},
registerPartialUpdateEvents : function() {
if (Sys && Sys.WebForms && Sys.WebForms.PageRequestManager){
this._pageRequestManager = Sys.WebForms.PageRequestManager.getInstance();if (this._pageRequestManager) {
this._partialUpdateBeginRequestHandler = Function.createDelegate(this, this._partialUpdateBeginRequest);this._pageRequestManager.add_beginRequest(this._partialUpdateBeginRequestHandler);this._partialUpdateEndRequestHandler = Function.createDelegate(this, this._partialUpdateEndRequest);this._pageRequestManager.add_endRequest(this._partialUpdateEndRequestHandler);}
}
},
_partialUpdateBeginRequest : function(sender, beginRequestEventArgs) {
},
_partialUpdateEndRequest : function(sender, endRequestEventArgs) {
}
}
AjaxControlToolkit.BehaviorBase.registerClass('AjaxControlToolkit.BehaviorBase', Sys.UI.Behavior);AjaxControlToolkit.DynamicPopulateBehaviorBase = function(element) {
AjaxControlToolkit.DynamicPopulateBehaviorBase.initializeBase(this, [element]);this._DynamicControlID = null;this._DynamicContextKey = null;this._DynamicServicePath = null;this._DynamicServiceMethod = null;this._cacheDynamicResults = false;this._dynamicPopulateBehavior = null;this._populatingHandler = null;this._populatedHandler = null;}
AjaxControlToolkit.DynamicPopulateBehaviorBase.prototype = {
initialize : function() {
AjaxControlToolkit.DynamicPopulateBehaviorBase.callBaseMethod(this, 'initialize');this._populatingHandler = Function.createDelegate(this, this._onPopulating);this._populatedHandler = Function.createDelegate(this, this._onPopulated);},
dispose : function() {
if (this._populatedHandler) {
if (this._dynamicPopulateBehavior) {
this._dynamicPopulateBehavior.remove_populated(this._populatedHandler);}
this._populatedHandler = null;}
if (this._populatingHandler) {
if (this._dynamicPopulateBehavior) {
this._dynamicPopulateBehavior.remove_populating(this._populatingHandler);}
this._populatingHandler = null;}
if (this._dynamicPopulateBehavior) {
this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior = null;}
AjaxControlToolkit.DynamicPopulateBehaviorBase.callBaseMethod(this, 'dispose');},
populate : function(contextKeyOverride) {
if (this._dynamicPopulateBehavior && (this._dynamicPopulateBehavior.get_element() != $get(this._DynamicControlID))) {
this._dynamicPopulateBehavior.dispose();this._dynamicPopulateBehavior = null;}
if (!this._dynamicPopulateBehavior && this._DynamicControlID && this._DynamicServiceMethod) {
this._dynamicPopulateBehavior = $create(AjaxControlToolkit.DynamicPopulateBehavior,
{
"id" : this.get_id() + "_DynamicPopulateBehavior",
"ContextKey" : this._DynamicContextKey,
"ServicePath" : this._DynamicServicePath,
"ServiceMethod" : this._DynamicServiceMethod,
"cacheDynamicResults" : this._cacheDynamicResults
}, null, null, $get(this._DynamicControlID));this._dynamicPopulateBehavior.add_populating(this._populatingHandler);this._dynamicPopulateBehavior.add_populated(this._populatedHandler);}
if (this._dynamicPopulateBehavior) {
this._dynamicPopulateBehavior.populate(contextKeyOverride ? contextKeyOverride : this._DynamicContextKey);}
},
_onPopulating : function(sender, eventArgs) {
this.raisePopulating(eventArgs);},
_onPopulated : function(sender, eventArgs) {
this.raisePopulated(eventArgs);},
get_dynamicControlID : function() {
return this._DynamicControlID;},
get_DynamicControlID : this.get_dynamicControlID,
set_dynamicControlID : function(value) {
if (this._DynamicControlID != value) {
this._DynamicControlID = value;this.raisePropertyChanged('dynamicControlID');this.raisePropertyChanged('DynamicControlID');}
},
set_DynamicControlID : this.set_dynamicControlID,
get_dynamicContextKey : function() {
return this._DynamicContextKey;},
get_DynamicContextKey : this.get_dynamicContextKey,
set_dynamicContextKey : function(value) {
if (this._DynamicContextKey != value) {
this._DynamicContextKey = value;this.raisePropertyChanged('dynamicContextKey');this.raisePropertyChanged('DynamicContextKey');}
},
set_DynamicContextKey : this.set_dynamicContextKey,
get_dynamicServicePath : function() {
return this._DynamicServicePath;},
get_DynamicServicePath : this.get_dynamicServicePath,
set_dynamicServicePath : function(value) {
if (this._DynamicServicePath != value) {
this._DynamicServicePath = value;this.raisePropertyChanged('dynamicServicePath');this.raisePropertyChanged('DynamicServicePath');}
},
set_DynamicServicePath : this.set_dynamicServicePath,
get_dynamicServiceMethod : function() {
return this._DynamicServiceMethod;},
get_DynamicServiceMethod : this.get_dynamicServiceMethod,
set_dynamicServiceMethod : function(value) {
if (this._DynamicServiceMethod != value) {
this._DynamicServiceMethod = value;this.raisePropertyChanged('dynamicServiceMethod');this.raisePropertyChanged('DynamicServiceMethod');}
},
set_DynamicServiceMethod : this.set_dynamicServiceMethod,
get_cacheDynamicResults : function() {
return this._cacheDynamicResults;},
set_cacheDynamicResults : function(value) {
if (this._cacheDynamicResults != value) {
this._cacheDynamicResults = value;this.raisePropertyChanged('cacheDynamicResults');}
},
add_populated : function(handler) {
this.get_events().addHandler("populated", handler);},
remove_populated : function(handler) {
this.get_events().removeHandler("populated", handler);},
raisePopulated : function(arg) {
var handler = this.get_events().getHandler("populated");if (handler) handler(this, arg);},
add_populating : function(handler) {
this.get_events().addHandler('populating', handler);},
remove_populating : function(handler) {
this.get_events().removeHandler('populating', handler);},
raisePopulating : function(eventArgs) {
var handler = this.get_events().getHandler('populating');if (handler) {
handler(this, eventArgs);}
}
}
AjaxControlToolkit.DynamicPopulateBehaviorBase.registerClass('AjaxControlToolkit.DynamicPopulateBehaviorBase', AjaxControlToolkit.BehaviorBase);AjaxControlToolkit.ControlBase = function(element) {
AjaxControlToolkit.ControlBase.initializeBase(this, [element]);this._clientStateField = null;this._callbackTarget = null;this._onsubmit$delegate = Function.createDelegate(this, this._onsubmit);this._oncomplete$delegate = Function.createDelegate(this, this._oncomplete);this._onerror$delegate = Function.createDelegate(this, this._onerror);}
AjaxControlToolkit.ControlBase.prototype = {
initialize : function() {
AjaxControlToolkit.ControlBase.callBaseMethod(this, "initialize");if (this._clientStateField) {
this.loadClientState(this._clientStateField.value);}
if (typeof(Sys.WebForms)!=="undefined" && typeof(Sys.WebForms.PageRequestManager)!=="undefined") {
Array.add(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, this._onsubmit$delegate);} else {
$addHandler(document.forms[0], "submit", this._onsubmit$delegate);}
},
dispose : function() {
if (typeof(Sys.WebForms)!=="undefined" && typeof(Sys.WebForms.PageRequestManager)!=="undefined") {
Array.remove(Sys.WebForms.PageRequestManager.getInstance()._onSubmitStatements, this._onsubmit$delegate);} else {
$removeHandler(document.forms[0], "submit", this._onsubmit$delegate);}
AjaxControlToolkit.ControlBase.callBaseMethod(this, "dispose");},
findElement : function(id) {
return $get(this.get_id() + '_' + id.split(':').join('_'));},
get_clientStateField : function() {
return this._clientStateField;},
set_clientStateField : function(value) {
if (this.get_isInitialized()) throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_CannotSetClientStateField);if (this._clientStateField != value) {
this._clientStateField = value;this.raisePropertyChanged('clientStateField');}
},
loadClientState : function(value) {
},
saveClientState : function() {
return null;},
_invoke : function(name, args, cb) {
if (!this._callbackTarget) {
throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_ControlNotRegisteredForCallbacks);}
if (typeof(WebForm_DoCallback)==="undefined") {
throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_PageNotRegisteredForCallbacks);}
var ar = [];for (var i = 0;i < args.length;i++) 
ar[i] = args[i];var clientState = this.saveClientState();if (clientState != null && !String.isInstanceOfType(clientState)) {
throw Error.invalidOperation(AjaxControlToolkit.Resources.ExtenderBase_InvalidClientStateType);}
var payload = Sys.Serialization.JavaScriptSerializer.serialize({name:name,args:ar,state:this.saveClientState()});WebForm_DoCallback(this._callbackTarget, payload, this._oncomplete$delegate, cb, this._onerror$delegate, true);},
_oncomplete : function(result, context) {
result = Sys.Serialization.JavaScriptSerializer.deserialize(result);if (result.error) {
throw Error.create(result.error);}
this.loadClientState(result.state);context(result.result);},
_onerror : function(message, context) {
throw Error.create(message);},
_onsubmit : function() {
if (this._clientStateField) {
this._clientStateField.value = this.saveClientState();}
return true;} 
}
AjaxControlToolkit.ControlBase.registerClass("AjaxControlToolkit.ControlBase", Sys.UI.Control);
AjaxControlToolkit.Resources={
"PasswordStrength_InvalidWeightingRatios":"Strength Weighting ratios must have 4 elements","Animation_ChildrenNotAllowed":"AjaxControlToolkit.Animation.createAnimation cannot add child animations to type \"{0}\" that does not derive from AjaxControlToolkit.Animation.ParentAnimation","PasswordStrength_RemainingSymbols":"{0} symbol characters","ExtenderBase_CannotSetClientStateField":"clientStateField can only be set before initialization","RTE_PreviewHTML":"Preview HTML","RTE_JustifyCenter":"Justify Center","PasswordStrength_RemainingUpperCase":"{0} more upper case characters","Animation_TargetNotFound":"AjaxControlToolkit.Animation.Animation.set_animationTarget requires the ID of a Sys.UI.DomElement or Sys.UI.Control.  No element or control could be found corresponding to \"{0}\"","RTE_FontColor":"Font Color","RTE_LabelColor":"Label Color","Common_InvalidBorderWidthUnit":"A unit type of \"{0}\"\u0027 is invalid for parseBorderWidth","RTE_Heading":"Heading","Tabs_PropertySetBeforeInitialization":"{0} cannot be changed before initialization","RTE_OrderedList":"Ordered List","ReorderList_DropWatcherBehavior_NoChild":"Could not find child of list with id \"{0}\"","CascadingDropDown_MethodTimeout":"[Method timeout]","RTE_Columns":"Columns","RTE_InsertImage":"Insert Image","RTE_InsertTable":"Insert Table","RTE_Values":"Values","RTE_OK":"OK","ExtenderBase_PageNotRegisteredForCallbacks":"This Page has not been registered for callbacks","Animation_NoDynamicPropertyFound":"AjaxControlToolkit.Animation.createAnimation found no property corresponding to \"{0}\" or \"{1}\"","Animation_InvalidBaseType":"AjaxControlToolkit.Animation.registerAnimation can only register types that inherit from AjaxControlToolkit.Animation.Animation","RTE_UnorderedList":"Unordered List","ResizableControlBehavior_InvalidHandler":"{0} handler not a function, function name, or function text","Animation_InvalidColor":"Color must be a 7-character hex representation (e.g. #246ACF), not \"{0}\"","RTE_CellColor":"Cell Color","PasswordStrength_RemainingMixedCase":"Mixed case characters","RTE_Italic":"Italic","CascadingDropDown_NoParentElement":"Failed to find parent element \"{0}\"","ValidatorCallout_DefaultErrorMessage":"This control is invalid","RTE_Indent":"Indent","ReorderList_DropWatcherBehavior_CallbackError":"Reorder failed, see details below.\\r\\n\\r\\n{0}","PopupControl_NoDefaultProperty":"No default property supported for control \"{0}\" of type \"{1}\"","RTE_Normal":"Normal","PopupExtender_NoParentElement":"Couldn\u0027t find parent element \"{0}\"","RTE_ViewValues":"View Values","RTE_Legend":"Legend","RTE_Labels":"Labels","RTE_CellSpacing":"Cell Spacing","PasswordStrength_RemainingNumbers":"{0} more numbers","RTE_Border":"Border","RTE_Create":"Create","RTE_BackgroundColor":"Background Color","RTE_Cancel":"Cancel","RTE_JustifyFull":"Justify Full","RTE_JustifyLeft":"Justify Left","RTE_Cut":"Cut","ResizableControlBehavior_CannotChangeProperty":"Changes to {0} not supported","RTE_ViewSource":"View Source","Common_InvalidPaddingUnit":"A unit type of \"{0}\" is invalid for parsePadding","RTE_Paste":"Paste","ExtenderBase_ControlNotRegisteredForCallbacks":"This Control has not been registered for callbacks","Calendar_Today":"Today: {0}","Common_DateTime_InvalidFormat":"Invalid format","ListSearch_DefaultPrompt":"Type to search","CollapsiblePanel_NoControlID":"Failed to find element \"{0}\"","RTE_ViewEditor":"View Editor","RTE_BarColor":"Bar Color","PasswordStrength_DefaultStrengthDescriptions":"NonExistent;Very Weak;Weak;Poor;Almost OK;Barely Acceptable;Average;Good;Strong;Excellent;Unbreakable!","RTE_Inserttexthere":"Insert text here","Animation_UknownAnimationName":"AjaxControlToolkit.Animation.createAnimation could not find an Animation corresponding to the name \"{0}\"","ExtenderBase_InvalidClientStateType":"saveClientState must return a value of type String","Rating_CallbackError":"An unhandled exception has occurred:\\r\\n{0}","Tabs_OwnerExpected":"owner must be set before initialize","DynamicPopulate_WebServiceTimeout":"Web service call timed out","PasswordStrength_RemainingLowerCase":"{0} more lower case characters","Animation_MissingAnimationName":"AjaxControlToolkit.Animation.createAnimation requires an object with an AnimationName property","RTE_JustifyRight":"Justify Right","Tabs_ActiveTabArgumentOutOfRange":"Argument is not a member of the tabs collection","RTE_CellPadding":"Cell Padding","RTE_ClearFormatting":"Clear Formatting","AlwaysVisible_ElementRequired":"AjaxControlToolkit.AlwaysVisibleControlBehavior must have an element","Slider_NoSizeProvided":"Please set valid values for the height and width attributes in the slider\u0027s CSS classes","DynamicPopulate_WebServiceError":"Web Service call failed: {0}","PasswordStrength_StrengthPrompt":"Strength: ","PasswordStrength_RemainingCharacters":"{0} more characters","PasswordStrength_Satisfied":"Nothing more required","RTE_Hyperlink":"Hyperlink","Animation_NoPropertyFound":"AjaxControlToolkit.Animation.createAnimation found no property corresponding to \"{0}\"","PasswordStrength_InvalidStrengthDescriptionStyles":"Text Strength description style classes must match the number of text descriptions.","PasswordStrength_GetHelpRequirements":"Get help on password requirements","PasswordStrength_InvalidStrengthDescriptions":"Invalid number of text strength descriptions specified","RTE_Underline":"Underline","Tabs_PropertySetAfterInitialization":"{0} cannot be changed after initialization","RTE_Rows":"Rows","RTE_Redo":"Redo","RTE_Size":"Size","RTE_Undo":"Undo","RTE_Bold":"Bold","RTE_Copy":"Copy","RTE_Font":"Font","CascadingDropDown_MethodError":"[Method error {0}]","RTE_BorderColor":"Border Color","RTE_Paragraph":"Paragraph","RTE_InsertHorizontalRule":"Insert Horizontal Rule","Common_UnitHasNoDigits":"No digits","RTE_Outdent":"Outdent","Common_DateTime_InvalidTimeSpan":"\"{0}\" is not a valid TimeSpan format","Animation_CannotNestSequence":"AjaxControlToolkit.Animation.SequenceAnimation cannot be nested inside AjaxControlToolkit.Animation.ParallelAnimation","Shared_BrowserSecurityPreventsPaste":"Your browser security settings don\u0027t permit the automatic execution of paste operations. Please use the keyboard shortcut Ctrl+V instead."};
//END AjaxControlToolkit.ExtenderBase.BaseScripts.js
if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();
(function() {var fn = function() {$get('ScriptManager1_HiddenField').value += ';;Humana.H1.PlanPointer.Web:en-US:01a87879-b10c-4f99-bf58-ff5b03d6a94b:b8fc231b:74e3b8a:5d9679d9:d54f087b:4feee9e9:98e5730e:6990d015;AjaxControlToolkit, Version=1.0.20229.20821, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e:en-US:c5c982cc-4942-4683-9b48-c2c58277700f:9ea3f0e2:e2e86ef9:9e8e87e9:c7c04611:1df13a87';Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();
