function getParameterByName(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))}var occe={},get_action,$ocGuided,ocpubStep,FireStepEvent,imgSwap,igwNewScreen,awasaClient,subjects,pnv,sendCallPV,client,channelServicesSettings;if(occe.sendWedcsPv=function(n,t){var i=window.location.host.toLowerCase();((i.indexOf("office.com")!==-1||i.indexOf("live.com")!==-1||i.indexOf("microsoft.com")!==-1)&&i.indexOf("edog.")===-1&&i.indexOf("corp.")===-1&&i.indexOf("int.")===-1?occe.setMetaTag("ms.env","prod"):occe.setMetaTag("ms.env","dev"),typeof n!="undefined"&&n!==null&&$.each(n,function(n,t){occe.setMetaTag(n,t)}),typeof MscomSendPageView!="undefined"&&MscomSendPageView(),t!==!1)&&typeof n!="undefined"&&n!==null&&$.each(n,function(n){occe.removeMetaTag(n)})},occe.SendWedcsCustom=function(n){var t=[];typeof n!="undefined"&&n!==null&&$.each(n,function(n,i){t.push(n),t.push(i)}),typeof MscomCustomEvent!="undefined"&&MscomCustomEvent.apply(window,t)},occe.getMetaTagValue=function(n){var t=$("meta[name='"+n+"']");return t.length===0?null:t.attr("content")},occe.setMetaTag=function(n,t){var i=$("meta[name='"+n+"']");i.length===0&&$('<meta name="'+n+'" content="'+t+'"/>').appendTo("head"),i.attr("content",t)},occe.removeMetaTag=function(n){var t=$("meta[name='"+n+"']");t.length>0&&t.remove()},occe.GetQueryStringParam=function(n){n=n.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var i=new RegExp("[\\?&]"+n+"=([^&#]*)","i"),t=i.exec(location.search);return t==null?"":decodeURIComponent(t[1].replace(/\+/g," "))},occe.EncodeText=function(n){return $("<div/>").text(n).html()},occe.DecodeText=function(n){return $("<div/>").html(n).text()},occe.GetCookie=function(n){var t=document.cookie,i,r;return n+="=",t.length>0&&(i=t.indexOf(n),i!==-1)?(i+=n.length,r=t.indexOf(";",i),r===-1&&(r=t.length),decodeURIComponent(t.substring(i,r))):void 0},occe.ProcessMessage=function(n){if(OOGlobal!==null&&OOGlobal.BaseDomain!==null&&n.origin.toLowerCase()===OOGlobal.BaseDomain.toLowerCase())try{var t=n.data.func;window[t](n.data.funcData)}catch(i){return}},window.addEventListener?window.addEventListener("message",occe.ProcessMessage,!1):window.attachEvent("onmessage",occe.ProcessMessage),get_action=function(n){var t=$(".ocSearchBox").val(),i,r;t=t.replace(/<\w|<\?|<\!|<\//g,function(n){return n.replace("<","< ")}),i=encodeURIComponent(t),r="search",location.href.toLowerCase().indexOf(OOGlobal.BaseDomain.toLowerCase()+"/client")!==-1&&(r="client"),i!==""&&(n.action=OOGlobal.BaseDomain+"/"+OOGlobal.Culture+"/"+r+"/results.aspx?query="+i+"&lcid="+OOGlobal.LCID)},occe.WedcsSearchEvent=function(n,t){var i="ms.interactiontype";typeof MscomCustomEvent!="undefined"&&($("meta[name='ms.pagetype']").attr("content").toLowerCase()==="serp"?MscomCustomEvent("ms.searchpg",occe.pageParam,"ms.searchquery",t,"ms.searchtype","searchbox",i,n):MscomCustomEvent("ms.searchquery",t,"ms.searchtype","searchbox",i,n))},occe.pageParam=encodeURIComponent(occe.GetQueryStringParam("p")),occe.searchQuery=encodeURIComponent(occe.GetQueryStringParam("query")),$ocGuided="#ocGuided",$($ocGuided).is($ocGuided)){$("#ocIGWMac").attr("href","#ocGuidedMacPer"),$("#ocGuidedMacPer").removeClass("ocIGWHide"),ocpubStep="ms.ocpub.step",FireStepEvent=function(n){var t={};t["ms.interactiontype"]="4",t[ocpubStep]=n,$("#ocForum,#ocChat,#ocCall").attr(ocpubStep,n),occe.SendWedcsCustom(t)},$("#ocForum,#ocChat,#ocCall").attr(ocpubStep,"Landing Page"),imgSwap=function(n,t){var i="";$(n).hover(function(){i=$(this).find("img").attr("src"),$(this).find("img").attr("src",t)},function(){$(this).find("img").attr("src",i)})},$(".ocHelpHide").before("<div class='ocSpacer'><\/div>");function ocAutoHeight(n){var t=window.innerHeight,i=n;return t-i-140+"px"}function elemPush(n){return n}igwNewScreen=function(n,t,i,r){$(r).hide(),$(n).fadeIn(function(){var i=$(n).height();$(".ocSpacer").css("height",ocAutoHeight(i)),$("html, body").animate({scrollTop:elemPush(t)},"slow")}),$(".ocHelpHide").fadeIn(),FireStepEvent(i)},imgSwap("#ocIGWWin","https://support.content.office.net/en-US/media/522cab37-0a34-48c0-8fa3-f5826aa1f573.png"),imgSwap("#ocIGWMac","https://support.content.office.net/en-US/media/e42af494-9cf9-40ed-9721-02b372ff0419.png"),imgSwap("#ocIGWMobile","https://support.content.office.net/en-US/media/41a53d29-c51d-40b8-9ec4-7cee8d284c8a.png"),imgSwap("#ocIGWAndroid","https://support.content.office.net/en-US/media/ca53833e-b216-46e2-8260-ee250567a0d3.png"),imgSwap("#ocIGWIphone","https://support.content.office.net/en-US/media/a44bd5eb-fcee-4c43-b152-cff296a5f25a.png"),imgSwap("#ocIGWTablet","https://support.content.office.net/en-US/media/6d92e2bd-2dd0-4ce9-8249-366bc12a010f.png"),imgSwap("#ocIGWIpad","https://support.content.office.net/en-US/media/60a136cd-cc95-410d-9d42-7893bc637db2.png"),$("#ocIGWHome").click(function(n){n.preventDefault(),igwNewScreen("#ocGuidedSecond",600,"Where Install",".ocIGWHide, #ocGuidedMacPer, #ocGuidedMobile")}),$("#ocIGWMobile").click(function(n){n.preventDefault(),igwNewScreen("#ocGuidedMobile",1200,"Choose Device",".ocIGWHide, #ocGuidedMacPer")}),$("#ocIGWAndroid").click(function(n){n.preventDefault(),igwNewScreen("#ocGuidedAndroid",1620,"Android Phone Install",".ocIGWHide")}),$("#ocIGWIphone").click(function(n){n.preventDefault(),igwNewScreen("#ocGuidedIphone",1620,"iPhone Install",".ocIGWHide")}),$("#ocIGWIpad").click(function(n){n.preventDefault(),igwNewScreen("#ocGuidedIpad",1620,"iPad Install",".ocIGWHide")}),$("#ocIGWMac").click(function(n){n.preventDefault(),igwNewScreen("#ocGuidedMacPer",900,"Which Office for Mac",".ocIGWHide, #ocGuidedMobile")}),$("#ocIGWMac2011").click(function(n){n.preventDefault(),igwNewScreen("#ocGuidedMacPK",2e3,"Mac Product Key Prep",".ocIGWHide")})}if($(function(){var n=$(".ocSearchBox"),w=$("#ocSearchDefaultText"),h=w.val(),b=function(){var t={},i="ms.ocpub.ea_exists",n="";return($("a#ocChat").length>0&&!(!$("a#ocChat").is(":visible")&&$("a#ocChat").is(":hidden"))&&(n+="CHT,"),$("a#ocForum").length>0&&!(!$("a#ocForum").is(":visible")&&$("a#ocForum").is(":hidden"))&&(n+="FRM,"),$("#ocCall").length>0&&!(!$("a#ocCall").is(":visible")&&$("a#ocCall").is(":hidden"))&&(n+="PHN,"),n==="")?null:(n=n.substring(0,n.length-1),t[i]=n,t)},u=function(n){var i="bicmp-",u=n.closest("[class^='"+i+"'],[class*=' "+i+"']"),r,t;if(u.length>0){for(r=u.attr("class").toString().split(" "),t=0;t<r.length;t++)if(r[t].indexOf(i)!==-1){n.attr("ms.cmpgrp",r[t].replace(i,""));break}}else n.attr("ms.cmpgrp","content")},k=function(){var n,t,i;$("a,img").each(function(){var n=$(this),t=n.attr("id"),r=n.attr("href"),i;typeof t!="undefined"&&t!==null?t.toLowerCase()==="occhat"?n.attr("ms.cmpgrp","CSSControl").attr("ms.ea_action","Goto").attr("ms.ea_offer","CHT"):t.toLowerCase()==="ocforum"?n.attr("ms.cmpgrp","CSSControl").attr("ms.ea_action","Goto").attr("ms.ea_offer","FRM"):t.toLowerCase()==="occall"?n.attr("ms.cmpgrp","CSSControl").attr("ms.ea_action","Goto").attr("ms.ea_offer","PHN"):u(n):typeof r!="undefined"&&r!==null?r.toLowerCase().indexOf("#odh_")!==-1?n.attr("ms.cmpgrp","ODH"):u(n):u(n),n.closest(".headBar").length>0?n.attr("ms.pgarea","Header"):n.closest(".swBar").length>0?n.attr("ms.pgarea","AppDropdown"):n.closest(".footerContainer").length>0?n.attr("ms.pgarea","Footer"):n.attr("ms.pgarea","Body"),i=n.attr("href"),typeof i!="undefined"&&i.length>1&&i.indexOf(".")===-1&&i.indexOf("#")!==-1&&typeof n.attr("ms.interactiontype")=="undefined"&&n.attr("ms.interactiontype","11"),n.prop("tagName").toLowerCase()==="img"&&n.closest("a").length===0&&typeof n.attr("ms.interactiontype")=="undefined"&&n.attr("ms.interactiontype","500")}),n=$("meta[name='ms.pagetype']").attr("content"),t=$("meta[name='ms.ocpub.assetID']").attr("content"),typeof n!="undefined"&&n!==null&&n.toLowerCase()!=="serp"&&typeof t!="undefined"&&t!==null&&t.toLowerCase()!=="s.hp.phone"&&(i=b(),occe.sendWedcsPv(i,!1),occe.removeMetaTag("ms.ocpub.step")),$(".ocFBRadioBtn").each(function(){var t=$(this),i=t.parent(),n={};n["ms.cmpgrp"]="FeedbackControl",n["ms.interactiontype"]="22",n["ms.ea_action"]="FeedbackControlRate",n["ms.ea_offer"]="article",n["ms.svi"]="1",n["ms.svq"]="1",n["ms.sva"]=typeof t.children("input").first().attr("id")!="undefined"&&t.children("input").first().attr("id").toLowerCase()==="ocfbradioyes"?"100":"0",$.each(n,function(n,t){i.attr(n,t)})})},c,l,v,f,p,s;$("#supHome").find("#ocSearchButton").attr("src",OOGlobal.BaseDomain+"/Images/Search_icon_red.gif").show(),n.focus(function(){n.val()===h&&n.val("")}),n.focusout(function(){$.trim(n.val())===""&&n.val(h)}),$("#contactUs").find("#ocSearchButton").attr("src",OOGlobal.BaseDomain+"/Images/ocSearchButton.png");$(".ocFBSubmit").on("keypress click",function(n){var t={},i;t["ms.cmpgrp"]="FeedbackControl",t["ms.pgarea"]="body",t["ms.ea_offer"]="article",t["ms.svi"]="1",t["ms.interactiontype"]="2",t["ms.ea_action"]="Comment",t["ms.svq"]="2",t["ms.svv"]=occe.EncodeText($("#FeedbackText").val()),n.type==="keypress"?(i=n.keyCode?n.keyCode:n.which,i===13&&occe.SendWedcsCustom(t)):occe.SendWedcsCustom(t)});if(window.countDown=function(n,t,i){var u=n.value.length,f=n.value,r=document.getElementById(i);r.style.display="",r.innerHTML=t-u,u>=t-10?(r.style.color="red",u>t&&(n.innerHTML=f.substring(0,t),r.innerHTML=t-n.value.length)):r.style.color=""},$(".ocFBRadioBtn").click(function(n){n.preventDefault(),$("#ocFBReply").show(),$(".ocFBRadioBtn").removeClass("selected"),$(this).addClass("selected"),$(".ocFBRadio").attr("checked",!1),$(this).find("input:radio").attr("checked",!0)}),$("#ocFBYes").click(function(){$(".ocFBRadioYes").click()}),$("#ocFBNo").click(function(){$(".ocFBRadioNo").click()}),$(".ocFBSubmit").click(function(){$("#ocFBReply").add("#ocFBBegin").remove(),$("#ocFBFinal").show()}),c=$("meta[name='ShowContactUs']").attr("content"),c=="true"){l=location.pathname;function a(n){var t=$(n).attr("href"),i=function(n){return n!==undefined?OOGlobal.GUID:location.pathname};$(n).attr("href",function(){return t+"?ocChatBack="+(OOGlobal.BaseDomain+l+"&guid="+i(OOGlobal.GUID))})}a("#ocChat"),a("#ocCall")}$("#ocRtrnBtn").is("#ocRtrnBtn")&&document.referrer!=""&&(v=getParameterByName("ocChatBack"),$("#ocRtrnBtn").attr("href",v));var t="ocpVideo",d=$("."+t).is("."+t),y=function(){var i=$("meta[name='ms.ocpub.assetID']"),r=i.length>0?i.attr("content"):"0",n=$("."+t).attr("data-llcc").toLowerCase(),u="mpl_"+n+"_MOD_OfficeCom__pl_"+n+"_",f="ux-cms-"+n.toLowerCase()+"-msoffice";$("."+t).each(function(n){var i,e,o,s;$(this).attr("id",t+n),i=$(this).attr("data-videoid"),e=/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}/,i=i.match(e),o=$(this).attr("data-player"),s=$(this).width(),MsnVideoUx.render("ocVideo",t+n,{"ocVideo.Width":s,"ocVideo.Height":"","ocVideo.DefaultVideo":"videobyuuids.aspx?uuids="+i,"ocVideo.PlayerChannel":o,"ocVideo.PlayerLocation":u+r},{csid:f})})};if(d&&y(),f="ocpCarousel",p=$("."+f).is("."+f),p){$("ul.ocpCarousel").wrap("<div id='trainingCont'><div id='ocpCarousel'>"),$("#trainingCont").prepend($(".ocpVideo")),$("#ocpCarousel").before('<div class="ocPrev inactive"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAYCAYAAAAlBadpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NDkxMSwgMjAxMy8xMC8yOS0xMTo0NzoxNiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Qzg4QjM2MjZEQ0FCMTFFMzgxMTlDM0QwREE5OTRGRUEiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Qzg4QjM2MjVEQ0FCMTFFMzgxMTlDM0QwREE5OTRGRUEiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkQ2Rjk4MUU2RDdBMDExRTNBOTU1RTBBNUVFMkQ4RjIwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkQ2Rjk4MUU3RDdBMDExRTNBOTU1RTBBNUVFMkQ4RjIwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Dh8V7gAAAHxJREFUeNqc1FEOgCAMA1C3Q+3+N8NIlBhlW1s/kJi8CmzBIuIgnnG/7RpcgGvuAlzfXIRz6a7CbtklrHALMwzBHYbhF1PwjWn4YAmy7bnFRpbr92cpwIE9DnTPVIATpzzQ04YCqlK1AV2dywCkSdIAtMNMuYaygDk/BRgAhrkX0msddGUAAAAASUVORK5CYII="/><\/div>'),$("#ocpCarousel").after('<div class="ocNext"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAYCAYAAAAlBadpAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NDkxMSwgMjAxMy8xMC8yOS0xMTo0NzoxNiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RDZGOTgxRTdEN0EwMTFFM0E5NTVFMEE1RUUyRDhGMjAiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RDZGOTgxRTZEN0EwMTFFM0E5NTVFMEE1RUUyRDhGMjAiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChXaW5kb3dzKSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjNFRDYwQTE1RDYxQzExRTNCOEQwRTVCQkQxNTkxQjZEIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjNFRDYwQTE2RDYxQzExRTNCOEQwRTVCQkQxNTkxQjZEIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+qI5H7wAAAIJJREFUeNqklEsKwDAIROMcyvvfzFLIooif0bqJCb6JqCiqeq7ZPeWQBgd6v4WjYGPhLE1j014J4OOPBeDuIwEEb7QAkkBKAEU9WgE03SgFQMxCKoDzwxg467NgC3Y/W1cDbMEMNrbq2IIetmGfwzVEgdUaohZhtoZkMmEyBV97BBgAOsgX0k3i2LcAAAAASUVORK5CYII="/><\/div>'),$("ul.ocpCarousel > li:first-child").addClass("selected"),$("ul.ocpCarousel > li").each(function(n){$(this).find("ul").find("li:first-child").after("<li class='ocpCarouselN'>"+(n+1)+"<\/li>");var t=$(this).find("a").attr("href");$(this).click(function(n){n.preventDefault(),$("ul.ocpCarousel > li").removeClass("selected"),$(this).addClass("selected"),$(".ocpVideo").attr("data-videoid",t),y()})});var g=$("ul.ocpCarousel > li").width(),i=g+11,e=$("ul.ocpCarousel > li").length,o=!1,r=!1;e<=4&&($(".ocNext").addClass("inactive"),r=!0),$(".ocNext").click(function(){var n=$("ul.ocpCarousel").css("right").replace(/[px]/g,"");(n<(e-4)*i||n=="auto")&&!r?(r=!0,$(".ocPrev").removeClass("inactive"),$("ul.ocpCarousel").animate({right:"+="+i+"px"},function(){r=!1}),n<=(e-5)*i&&$(this).addClass("inactive")):$(this).addClass("inactive")}),$(".ocPrev").click(function(){var n=$("ul.ocpCarousel").css("right").replace(/[px]/g,"");n>0&&!o&&(o=!0,$(".ocNext").removeClass("inactive"),$("ul.ocpCarousel").animate({right:"-="+i+"px"},function(){o=!1}),$(this).removeClass("inactive")),n-i==0&&$(this).addClass("inactive")})}s=!1;$("#ocSearchForm").on("keypress click","#ocSearchButton, #ocSearchBox",function(t){var i=$(this),r;t.type==="keypress"?(r=t.keyCode?t.keyCode:t.which,r===13&&(i.attr("id")==="ocSearchBox"||i.attr("id")==="ocSearchButton")&&(s=!0,occe.WedcsSearchEvent(2,encodeURIComponent(n.val())))):i.attr("id")!=="ocSearchButton"||s||occe.WedcsSearchEvent(2,encodeURIComponent(n.val()))});k()}),$("#ocClicktoCall").is("#ocClicktoCall")){awasaClient=function(){},subjects=[];function ocCallError1(){$("#ocCallErrorMsg").find("h1").text(callErr1),$("#ocCallErrorMsg").find("p").html(callErr1DPre+"<br/><br/>"+callErr1DMid+"<br/><br/>"+callErr1DPost+" <a href='"+OOGlobal.BaseDomain+"/home/chat' title='"+callErr3DChat+"'>"+callErr3DChat+"<\/a> "+callErr3DMid+" <a href='http://go.microsoft.com/fwlink/?LinkId=400427' title='"+callErr3DCom+"'>"+callErr3DCom),$("#ocClicktoCall, #ocCallForm").hide(function(){$("#ocCallErrorMsg").show()})}function ocCallError2(){$("#ocCallErrorMsg").find("h1").text(callErr2),$("#ocCallErrorMsg").find("p").html(callErr2DPre+" "+pnv+" "+callErr2DPost),$("#ocClicktoCall, #ocCallForm").hide(function(){$("#ocCallErrorMsg").show()})}function ocCallError3(){$("#ocCallErrorMsg").find("h1").text(callErr3),$("#ocCallErrorMsg").find("p").html(callErr3DPre+" <a href='"+OOGlobal.BaseDomain+"/home/chat' title='"+callErr3DChat+"'>"+callErr3DChat+"<\/a> "+callErr3DMid+" <a href='http://go.microsoft.com/fwlink/?LinkId=400427' title='"+callErr3DCom+"'>"+callErr3DCom),$("#ocClicktoCall, #ocCallForm").hide(function(){$("#ocCallErrorMsg").show()})}function ocFailureMsg(n){var t={};t["ms.interactiontype"]="4",t["ms.statuscode"]=n.errorCode,occe.SendWedcsCustom(t);switch(n.errorCode){case"CHANNEL_CONTACTSCHEDULED":ocCallError2();break;default:ocCallError3()}}function ocSuccessMsg(){}sendCallPV=function(n,t){var r="ms.agentwaittime",i={};i["ms.optioncollectionid"]=t,n==="-1"?(i[r]="n/a",i["ms.errorcode"]="AgentsNotAvailable"):i[r]=n,occe.sendWedcsPv(i,!1)},awasaClient.prototype.callback=function(n,t){var i,o;switch(t.type){case"loaded":i=t.instance,o=i.getVisitId();try{subjects=i.getSubjects();var s=subjects[0].Channels[0],p=s.IsAvailable,w=s.Subject,b=s.Type,l=Math.round(s.AverageWaitTime/60);i.setToken(ocToken),i.setValidationKey("",ocToken),p?($(".ocWaitTime").text(l),$("#ocClicktoCall, #ocCallForm").show(),sendCallPV(l,o)):(ocCallError1(subjects),sendCallPV(subjects,o));var u=!1,f=!1,e=!1,h,c;function a(n,t,i,e){var o=$(n).val(),s=o.replace(/^[ \t]+|[ \t]+$/,"");if(s==""){r(t,i);switch(e){case"fn":u=!1;break;case"ln":f=!1}}else{switch(e){case"fn":u=!0,h=$(n+":text").val();break;case"ln":f=!0,c=$(n+":text").val()}v(i),f&&u&&y("name",h+" "+c)}}$("#firstName").blur(function(){a("#firstName",callErrFN,"#ocFNErr","fn")}),$("#lastName").blur(function(){a("#lastName",callErrLN,"#ocLNErr","ln")}),$("#telephone").blur(function(){if($(this).val()){var n=i.validate("callback",$(this).val()),t=n.isValid;t?($(this).val(n.formattedContact),e=!0,pnv=n.formattedContact,y("CallbackNumber",pnv),v("#ocPNErr")):t||(e=!1,r(callErrPN,"#ocPNErr"))}else e=!1,r(callErrPN,"#ocPNErr")});function r(n,t){$(t).show(function(){$(this).text(n)})}function v(n){$(n).hide(function(){$(this).text("")})}function k(){$("#ocCallErrorMsg").hide(function(){$("#ocCallSubmitMsg").show(function(){$("#nm").text(h+" "+c),$("#pn").text(pnv)})});var t={};t["ms.ea_action"]="RequestCall",t["ms.ea_offer"]="PHN",t["ms.interactiontype"]="4",t["ms.statuscode"]="success",occe.SendWedcsCustom(t)}function y(n,t){var r=OOGlobal.BaseDomain+"/api/Encryption?name="+n+"&value="+t+"&visitId="+o;$.ajax({async:"true",type:"get",url:r}).success(function(t){i.set(n,t,!0,ocSuccessMsg,ocFailureMsg)})}$("#ocCallSubmit").click(function(){(u||f)&&e?$("#ocClicktoCall").hide(function(){$("#ocCallErrorMsg").show(),i.enqueue(b,w,{},k,ocFailureMsg)}):(f||r(callErrLN,"#ocLNErr"),u||r(callErrFN,"#ocFNErr"),e||r(callErrPN,"#ocPNErr"))})}catch(d){ocCallError3()}}},client=new awasaClient,channelServicesSettings=channelServicesSettings||{},channelServicesSettings.serverPath=ocAwasaServerPath,channelServicesSettings.partnerId=ocAwasaPartner,channelServicesSettings.language=OOGlobal.Parent,channelServicesSettings.country=ocHelpCC,channelServicesSettings.callback=client.callback,channelServicesSettings.token=ocToken,channelServicesSettings.reset=!0;function boot(){var n=document.createElement("script");n.setAttribute("type","text/javascript"),n.setAttribute("charset","UTF-8"),n.setAttribute("src",location.protocol+"//"+channelServicesSettings.serverPath+"/Script?type=Client&partnerid="+channelServicesSettings.partnerId),document.getElementsByTagName("head").item(0).appendChild(n)}document.readyState==="complete"?boot():window.attachEvent?window.attachEvent("onload",boot):window.addEventListener("load",boot,!1)}$(function(){Modernizr.input.placeholder||($(this).find("input[placeholder]").each(function(){$(this).val()==""&&$(this).val($(this).attr("placeholder"))}),$("input[placeholder]").focus(function(){$(this).val()==$(this).attr("placeholder")&&$(this).val("")}),$("input[placeholder]").blur(function(){($(this).val()==""||$(this).val()==$(this).attr("placeholder"))&&$(this).val($(this).attr("placeholder"))}))})