window.dhtmlHistory={addListener:function(A){this.listener=A;},getCurrentLocation:function(){return this.removeHash(window.location.hash);},currentLocation:null,listener:null,create:function(A){var B=this.removeHash(window.location.hash);this.currentLocation=B;
var E=escape(B);if(this.isInternetExplorer()){if(A){document.write("<iframe style='border: 0px; width: 500px; "+"height: 100px; position: absolute; bottom: 0px; "+"right: 0px; visibility: visible;' "+"name='DhtmlHistoryFrame' id='DhtmlHistoryFrame' "+"src='/cws/js/blank.html?"+E+"'>"+"</iframe>");
}else{document.write("<iframe style='border: 0px; width: 1px; "+"height: 1px; position: absolute; bottom: 0px; "+"right: 0px; visibility: hidden;' "+"name='DhtmlHistoryFrame' id='DhtmlHistoryFrame' "+"src='/cws/js/blank.html?"+E+"'>"+"</iframe>");}}var D=this;
var C=function(){D.checkLocation();};setInterval(C,100);},fireHistoryEvent:function(A){var B=null;if(this.listener){this.listener.call(null,A,B);}},checkLocation:function(){var A=this.getCurrentLocation();if(A==this.currentLocation){return ;}this.currentLocation=A;
this.fireHistoryEvent(A);},removeHash:function(A){if(A==null||A==undefined){return null;}else{if(A==""){return"";}else{if(A.length==1&&A.charAt(0)=="#"){return"";}else{if(A.length>=2&&A.charAt(0)=="#"){return A.substring(1);}else{return A;}}}}},iframeLoaded:function(A){var C=A.indexOf("?");
var B="";if((C!=-1)&&(A.length>C+1)){B=A.substring(C+1);}if(B==this.currentLocation){return ;}this.currentLocation=B;window.location.href="#"+B;this.fireHistoryEvent(B);},isInternetExplorer:function(){var A=navigator.userAgent.toLowerCase();if(document.all&&A.indexOf("msie")!=-1){return true;
}else{return false;}}};window.dhtmlHistory.create(false);var selected_nav_img_id="";var selected_a_id="";var change=false;var from_trash=false;var gbPageName="";var pageLoaded=false;var pageTitle_translation="";var currentView=null;var syncwizardtitle=null;
var pageEntry=true;function setCookie(F,E,A,D,B,C){D="/";document.cookie=escape(F)+"="+escape(E)+(A?"; EXPIRES="+A.toGMTString():"")+"; PATH=/"+(B?"; DOMAIN="+B:"")+(C?"; SECURE":"");}function clearCookie(F,E,D,B,C){var A=new Date(2000,1,1);setCookie(F,E,A,D,B,C);
}var css_browser_selector=function(){var B=navigator.userAgent.toLowerCase(),D=function(G){return B.indexOf(G)!=-1;},C=document.getElementsByTagName("html")[0],A=(!(/opera|webtv/i.test(B))&&/msie (\d)/.test(B))?("ie ie"+RegExp.$1):D("gecko/")?"gecko":D("opera/9")?"opera opera9":/opera (\d)/.test(B)?"opera opera"+RegExp.$1:D("konqueror")?"konqueror":D("applewebkit/")?"webkit safari":D("mozilla/")?"gecko":"",E=(D("x11")||D("linux"))?" linux":D("mac")?" mac":D("win")?" win":"";
var F=A+E+" js";C.className+=C.className?" "+F:F;}();function enablePngImages(A){A=A||"auto";if($.browser.msie){if(parseInt($.browser.version,10)<7){$("img").each(function(){if(isPng(this.src)){$(this).css({"filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.src+"', sizingMethod='"+A+"')"});
this.src="/cws/images/cws/see_the_phone_spacer.gif";}});}}}String.prototype.contains=function(A){return this.indexOf(A)!=-1;};function isCufonAble(){var C=getParam("lc");var B=["he","zh","th","el","ar","vi","fa"];for(var A in B){if(C.toLowerCase()==B[A]){return false;
}}return true;}function getParam(E){var C=document.location.href;var B=C.indexOf("#");if(B!=-1){C=C.substr(0,B);}var A="";var F=new Array();if(C.contains("?")){A=C.split("?");A=A[1];}if(A.contains("&")){F=A.split("&");}else{if(A.contains("=")){F.push(A);}}for(var D=0;
D<F.length;D++){param=F[D].split("=");if(param[0]==E){return param[1];}}return"";}function setTitle(A){var B=window.document.title;B=B.substring(0,16)+""+A;window.document.title=B;return ;}function enableSwitching(A){if(A!="provisioning"&&currentView!="gwt-contacts-trash"&&currentView!="migration"){$("#trash-can").css({"display":"inline-block"});
}else{$("#trash-can").css({"display":"none"});}var B=document.getElementById("tactel_iframe");if(B.contentWindow.switchView){document.getElementById("tactel_iframe").contentWindow.switchView(A);}else{setTimeout(function(){enableSwitching(A);},500);}twikDivs();
}function getImageAttributeValue(B,C){var A=B.attributes;for(i=0;i<A.length;i++){if(A[i].name==C){return A[i].value;}}}function callTrash(C){var B="gwt-calendar-trash";var A="img_Main";if(selected_a_id=="a_Calendar"){B="gwt-appointments-trash";A="img_Calendar";
}else{if(selected_a_id=="a_Bookmarks"){B="gwt-bookmarks-trash";A="Bookmarks";}else{if(selected_a_id=="a_Notes"){B="gwt-notes-trash";A="img_Notes";}else{if(selected_a_id=="a_Contacts"){B="gwt-contacts-trash";A="img_Contacts";}}}}changeView(B,A,selected_a_id,C,true);
}function twikDivs(){$("#uss_iframe_wrapper").css({"height":"0","visibility":"hidden","position":"absolute"});$("#uss-body").css({"height":"auto","visibility":"visible","position":"relative","top":"0px","left":"0px"});$("div#uss-body div").each(function(){$(this).attr("style","overflow: hidden; position: relative;");
$(this).css({"height":"0"});if($(this).attr("id")=="tactel-hidden-ifram-wrapper"){$(this).removeAttr("style");$(this).css({"height":"auto","display":"block"});}});}function navChangeView(A,C,B,F,E,D){currentView=A;setIframeView(A);setNavigationIcon(F,B);$("#account-header").css({"display":"block"});
$("#uss-loading").css({"display":"none"});$("#uss-navigation").css({"height":"auto"});if($("#uss-nav-nomain")){$("#uss-nav-nomain").css({"height":"auto","visibility":"visible","display":"block"});}gbPageName=A;clearCookie("TACTEL-VIEW",null,"/");if(pageLoaded){changeView(C,B,F,E,pageLoaded,D);
}twikDivs();return true;}function changeView(E,D,H,G,B,F){if(G.id==="trash-can"){change=true;from_trash=true;setFastView(B,E);return ;}var C=$(G).parents("ul");$("li",C).each(function(I,J){$("a",J).removeClass("current");});if(G.id===H){$(G).addClass("current");
}if(D==selected_nav_img_id){if(!change){return ;}if(from_trash){from_trash=false;change=false;setFastView(B,E);return ;}selected_nav_img_id="img_Main";}selected_nav_img_id=D;selected_a_id=H;var A=setTimeout(function(){setTitle(F);},500);setFastView(B,E);}function setFastView(A,B){enableSwitching(B);
}function changeImg(A,B){A.src=B;}function redirectToPage(E,C,D){var B=["contacts","calendar","bookmarks","notes","syncwizard"];pageTitle_translation=D;currentView=C;setNavigationIcon("a_"+C,"img_"+C);setIframeView(C);$("#account-header").css({"display":"block"});
$("#uss-loading").css({"display":"none"});for(var A in B){if(C.toLowerCase()==B[A]){$("#uss-navigation").css({"height":"auto"});if($("#uss-nav-nomain")){$("#uss-nav-nomain").css({"height":"auto","visibility":"visible","display":"block"});}gbPageName=C;if(pageLoaded){loadChangeView(gbPageName,pageTitle_translation);
}twikDivs();return ;}}clearCookie("TACTEL-VIEW",null,"/");window.top.location=E;return ;}function getTactelView(A){var B={"contacts":"contacts-view","calendar":"calendar-view","bookmarks":"bookmarks-view","notes":"notes-thumbs-view","syncwizard":"provisioning"};
return B[A];}$(window).load(function(){if(gbPageName!=""){var B=getTactelView(gbPageName.toLowerCase());if(B==="provisioning"){var A=setTimeout(function(){setTitle("Syncwizard");},500);enableSwitching(B);pageLoaded=true;return true;}loadChangeView(gbPageName,pageTitle_translation);
}$("ul.dashBoardNav > li").each(function(C,D){$(this).find("a").not(".hasClick").bind("click",function(){var E=$(this).attr("rel");var F=$(this).attr("link");loadChangeView(gbPageName,pageTitle_translation);});});pageLoaded=true;});function loadChangeView(D,C){var B=getTactelView(D.toLowerCase());
var A="img_"+D;var F="a_"+D;var E=document.getElementById("a_"+D);changeView(B,A,F,E,false,C);pageLoaded=true;return true;}function redirectToSync(C,E){pageTitle_translation=E;syncwizardtitle=E;currentView=C;setNavigationIcon("a_Main","img_Main");setIframeView(C);
$("#account-header").css({"display":"block"});$("#uss-loading").css({"display":"none"});var B=["contacts","calendar","bookmarks","notes","syncwizard"];for(var A in B){if(C.toLowerCase()==B[A]){$("#uss-navigation").css({"height":"auto"});if($("#uss-nav-nomain")){$("#uss-nav-nomain").css({"height":"auto","visibility":"visible","display":"block"});
}gbPageName=C;if(pageLoaded){var D=setTimeout(function(){setTitle(pageTitle_translation);},500);enableSwitching("provisioning");}twikDivs();return ;}}return ;}function goToTrashcan(A){currentView=A;setNavigationIcon("a_Main","img_Main");setIframeView(A);$("#account-header").css({"display":"block"});
$("#uss-loading").css({"display":"none"});$("#uss-navigation").css({"height":"auto"});if($("#uss-nav-nomain")){$("#uss-nav-nomain").css({"height":"auto","visibility":"visible","display":"block"});}enableSwitching(A);$("#trash-can").css({"display":"none"});twikDivs();
return ;}function goToUSSPage(F,A,E){$("#uss_iframe").css({"visibility":"hidden","height":500});clearCookie("TACTEL-VIEW",null,"/");$("#uss-body").css({"visibility":"hidden","position":"absolute","top":"-9999px","left":"-9999px"});$("#account-header").css({"display":"block"});
$("#uss-loading").css({"display":"none"});if(A!="Main"){$("#uss-navigation").css({"height":"auto"});if($("#uss-nav-nomain")){$("#uss-nav-nomain").css({"height":"auto","visibility":"visible","display":"block"});}}else{$("#uss-navigation").css({"height":"0"});
if($("#uss-nav-nomain")){$("#uss-nav-nomain").css({"display":"none"});}}$("#trash-can").css({"display":"none"});if(A=="More"){F=F.replace("applications","applications-view");}else{if(A=="FAQ"){F=F.replace("faq","faq-view");E=A;}else{if(A=="Settings"){F=F.replace("profile","profile-view");
}else{if(A=="Main"){F=F.replace("main","main-view");var C=getParam("tzone");if(C){if(F.lastIndexOf("?")>0){F=F+"&tzone="+C;}else{F=F+"?tzone="+C;}}}}}}var D="img_"+A;var G="a_"+A;setNavigationIcon(G,D);selected_nav_img_id=D;selected_a_id=G;var B=setTimeout(function(){setTitle(E);
},500);document.getElementById("uss_iframe").contentWindow.location.replace(F);$("#uss_iframe_wrapper").css({"height":"auto","visibility":"visible","position":"relative"});pageLoaded=true;currentView=A;}pngFixForDashBoard=function(A,E){E=E||"image";if(isIE5or6()){var D=document.getElementById(A);
var B=D.getElementsByTagName("img");for(var C=0;C<B.length;C++){B[C].style.filter=setIeImgStyleFilter(B[C].src,E);B[C].src="/cws/images/spacer.gif";}}};resizeIframe=function(C){var A=document.getElementById(C);try{A.style.height=A.contentWindow.document.body.clientHeight+"px";
}catch(B){}};resizeParentUSSIframe=function(){try{parent.resizeIframe("uss_iframe");}catch(A){}};function settingsToMain(A){clearCookie("TACTEL-VIEW",null,"/");window.top.location.href=A;}function goToIframeUSSPage(C,B,A){window.parent.goToUSSPage(C,B,A);}function goToIframeTrashcan(A){window.parent.goToTrashcan(A);
}function redirectToIframePage(C,B,A){window.parent.redirectToPage(C,B,A);}function redirectToIframeSync(B,A){window.parent.redirectToSync(B,A);}function showUSSIframe(){setIframeView();$("#uss_iframe").css({"visibility":"visible"});}hash=function(){var C=window.location.hash.substring(1).split(";");
var B=new Array();for(var A=0;A<C.length;A++){B[C[A].split("=")[0]]=C[A].split("=")[1];}return B;};setNavigationIcon=function(C,A){$("#ul li a").each(function(){$(this).removeClass("current");var D=$(this).find("img").attr("inactive_img");$(this).find("img").attr("src",D);
});$("#"+C).addClass("current");var B=$("#"+A).attr("active_img");$("#"+A).attr("src",B);};setIframeView=function(){if(currentView==null&&hash().view==undefined){if(document.location.href.indexOf("/uss/faq")!=-1){currentView="FAQ";}else{if(document.location.href.indexOf("/uss/applications")!=-1){currentView="More";
}else{if(document.location.href.indexOf("/uss/profile")!=-1){currentView="Settings";}else{if(document.location.href.indexOf("/uss/contacts")!=-1){currentView="Contacts";}else{if(document.location.href.indexOf("/uss/calendar")!=-1){currentView="Calendar";}else{if(document.location.href.indexOf("/uss/bookmarks")!=-1){currentView="Bookmarks";
}else{if(document.location.href.indexOf("/uss/notes")!=-1){currentView="Notes";}else{currentView="Main";}}}}}}}}if(currentView==null&&hash().view!=undefined){currentView=hash().view;}if(currentView==hash().view&&!pageEntry){return false;}var B=window.location.href.split("#")[0];
if(pageEntry){if($.browser.msie){if(parseInt($.browser.version,10)==8){var A=setTimeout(function(){document.getElementById("DhtmlHistoryFrame").contentWindow.location.replace("/cws/js/blank.html?view="+currentView);},500);}else{document.getElementById("DhtmlHistoryFrame").contentWindow.location.replace("/cws/js/blank.html?view="+currentView);
window.location.replace(B+"#view="+currentView);}}else{window.location.replace(B+"#view="+currentView);}pageEntry=false;setIframeContent(currentView);}else{if($.browser.msie){if(parseInt($.browser.version,10)==8){var A=setTimeout(function(){document.getElementById("DhtmlHistoryFrame").contentWindow.location.replace("/cws/js/blank.html?view="+currentView);
},500);}else{document.getElementById("DhtmlHistoryFrame").contentWindow.location.href="/cws/js/blank.html?view="+currentView;window.location.href=B+"#view="+currentView;}}else{window.location.href=B+"#view="+currentView;}}};setIframeContent=function(A){if(A==undefined){var B=hash().view;
}else{var B=A;}if(B=="syncwizard"){redirectToSync("syncwizard",syncwizardtitle);return ;}if(B=="gwt-contacts-trash"){goToTrashcan("gwt-contacts-trash");return ;}if(B=="migration"){goToTrashcan("migration");return ;}$("#ul li a").each(function(){if("a_"+B==$(this).attr("id")){$(this).click();
}});};iframeHistoryChange=function(){if(currentView!=hash().view){setIframeContent();}};$().ready(function(){dhtmlHistory.addListener(iframeHistoryChange);var B=window.location.hash;hashStrtext=B.toString();var A=/Setting/ig;if(hashStrtext.match(A)){$("#uss-body").css({"visibility":"hidden","position":"absolute","top":"-9999px","left":"-9999px"});
}});
