/* ***************************************************************** */
/* Copyright IBM Corp. 2001, 2009  All Rights Reserved.              */
/* ***************************************************************** */
dojo.provide("lconn.blogs");
if(!dojo._hasResource["lconn.blogs.utils"]){
dojo._hasResource["lconn.blogs.utils"]=true;
dojo.provide("lconn.blogs.utils");
dojo.declare("lconn.blogs._utils",null,{toggleControl:function(_1){
var _2=dojo.byId(_1);
var _3=dojo.byId("i"+_1);
if(_2.style.display=="none"){
_2.style.display="";
if(_3){
_3.innerHTML="-";
}
}else{
_2.style.display="none";
if(_3){
_3.innerHTML="+";
}
}
},toggleSubs:function(_4,_5){
var el=dojo.byId(_4);
var _7=dojo.byId(_5);
if(el.style.display!="none"){
new dojo.fx.Toggler({node:_4,showDuration:500,showFunc:dojo.fx.wipeOut}).show();
_7.className="lotusSprite lotusArrow lotusTwistyClosed";
}else{
new dojo.fx.Toggler({node:_4,showDuration:500,showFunc:dojo.fx.wipeIn}).show();
_7.className="lotusSprite lotusArrow lotusTwistyOpen";
}
},toggleSection:function(_8){
var el=dojo.byId("section_"+_8.id);
if(el.style.display!="none"){
new dojo.fx.Toggler({node:el,showDuration:500,showFunc:dojo.fx.wipeOut}).show();
_8.className="lotusSprite lotusArrow lotusTwistyClosed";
}else{
new dojo.fx.Toggler({node:el,showDuration:500,showFunc:dojo.fx.wipeIn}).show();
_8.className="lotusSprite lotusArrow lotusTwistyOpen";
}
},isblank:function(s){
for(var i=0;i<s.length;s++){
var c=s.charAt(i);
if((c!=" ")&&(c!="\n")&&(c!="")){
return false;
}
}
return true;
},escapeHTML:function(s){
s=s.replace(/&/g,"&amp;");
s=s.replace(/</g,"&lt;");
s=s.replace(/>/g,"&gt;");
s=s.replace(/\"/g,"&quot;");
return s;
}});
lconn.blogs.utils=new lconn.blogs._utils();
if(dojo.isIE&&typeof lconn.blogs.utils.applyDojoOnLoads=="undefined"){
lconn.blogs.utils.dojoOnLoads=[];
var origDojoOnLoads=dojo._loaders;
dojo._loaders=[];
var origAddOnLoad;
lconn.blogs.utils.applyDojoOnLoads=function(){
if(!lconn.blogs.utils.dojoOnLoads){
return;
}
var t=lconn.blogs.utils.dojoOnLoads;
dojo._loaders=origDojoOnLoads;
dojo.addOnLoad=origAddOnLoad;
for(var i=0;i<t.length;i++){
var _10=t[i];
if(_10){
dojo.addOnLoad.apply(dojo,_10);
}
}
dojo.addOnLoad(function(){
});
lconn.blogs.utils.dojoOnLoads=null;
};
origAddOnLoad=dojo.addOnLoad;
dojo.addOnLoad=function(){
var _11=arguments;
lconn.blogs.utils.dojoOnLoads.push(_11);
};
var orgiWindowOnLoad=window.onload;
window.onload=function(){
if(orgiWindowOnLoad){
orgiWindowOnLoad();
}
lconn.blogs.utils.applyDojoOnLoads();
};
}
function activateFooterLinks(){
var _12=dojo.byId("lotusFooterULTools");
if(_12!=null){
var _13=_12.getElementsByTagName("LI");
var len=_13.length;
for(var i=1;i<len;i++){
var li=_13[i];
var a=li.getElementsByTagName("a");
var _18=a[0].className;
var idx=_18.indexOf("lotusHidden");
if(idx!=-1){
a[0].className=_18.substring(0,idx)+_18.substring(idx+11);
}
}
}
};
function showDialog(_1a){
var div=document.createElement("div");
div.className="lotusDialogWrapper";
div.id="dialog";
var _1c="";
_1c+="<div class=\"dijitDialogTitleBar\" dojoattachpoint=\"titleBar\">";
_1c+="<span class=\"closeText\" title=\"Cancel\" dojoattachpoint=\"closeText\">x</span>";
_1c+="</span>";
_1c+="</div>";
_1c+="<div class=\"dijitDialogPaneContent\" dojoattachpoint=\"containerNode\">";
_1c+="<div class=\"lotusDialogBorder\" style=\"width: 300px;\">";
_1c+="<form class=\"lotusDialog lotusForm\">";
_1c+="<h1 style=\"padding-right:12px;padding-left:12px\">";
_1c+="<a class=\"lotusRight lotusClose lotusBtnImg\" href=\"javascript:dijit.byId("+"'dialog'"+").onCancel();\" title=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\">";
_1c+="<img alt=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).closeDialog+"\"  src=\""+BlogsBaseUrl+"/nav/common/styles/images/blank.gif\"/>";
_1c+="<span class=\"lotusAltText\">X</span></a>";
_1c+=dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).title;
_1c+="</h1>";
_1c+="<div>";
_1c+="<div class=\"lotusDialogContent\" id=\"dialogContent\">";
_1c+=_1a;
_1c+="</div>";
_1c+="</div>";
_1c+="<div class=\"lotusDialogFooter\">";
_1c+="<input class=\"lotusFormButton\" type=\"button\" value=\""+dojo.i18n.getLocalization("lconn.blogs","strings",dojo.locale).ok+"\" onclick=\"dijit.byId("+"'dialog'"+").onCancel()\"/>";
_1c+="</div>";
_1c+="</form>";
_1c+="</div>";
_1c+="</div>";
div.innerHTML=_1c;
document.body.appendChild(div);
var _1d=new dijit.Dialog(null,div);
_1d.onCancel=function(){
this.hide();
this.destroy();
};
_1d.show();
};
dojo.addOnLoad(function(){
var _1e=document.getElementsByTagName("body")[0].className.split(" ");
for(var i in _1e){
if("dijit_a11y"==_1e[i]){
document.getElementsByTagName("body")[0].className+=" lotusImagesOff";
}
}
});
}
if(!dojo._hasResource["lconn.core.HTMLUtil"]){
dojo._hasResource["lconn.core.HTMLUtil"]=true;
dojo.provide("lconn.core.HTMLUtil");
lconn.core.HTMLUtil.setInnerTextNode=function(_20,_21){
_20.innerHTML="";
_20.appendChild(document.createTextNode(_21));
};
lconn.core.HTMLUtil.escapeInlineText=function(_22){
return lconn.core.HTMLUtil.escapeText(_22,true);
};
lconn.core.HTMLUtil.escapeText=function(_23,_24){
var _25=document.getElementById("escapeBufferDiv");
if(!_25){
var tmp=document.createElement("div");
tmp.id="escapeBufferDiv";
document.body.appendChild(tmp);
_25=tmp;
}
_25.appendChild(document.createTextNode(_23));
var _27=_25.innerHTML;
_25.innerHTML="";
if(_24){
_27=lconn.core.HTMLUtil.escape_q(_27);
}
return _27;
};
lconn.core.HTMLUtil.escape_q=function(s){
var t="";
for(var i=0;i<s.length;i++){
var c=s.charAt(i);
if(c=="\""){
t+="&#34;";
}else{
if(c=="'"){
t+="&#39;";
}else{
if(c=="\\"){
t+="&#92;&#92;";
}else{
t+=c;
}
}
}
}
return t;
};
}
if(!dojo._hasResource["lconn.blogs._Templated"]){
dojo._hasResource["lconn.blogs._Templated"]=true;
dojo.provide("lconn.blogs._Templated");
dojo.declare("lconn.blogs._Templated",dijit._Templated,{escapeText:function(_2c){
return lconn.core.HTMLUtil.escapeText(_2c,false);
},escapeInlineText:function(_2d){
return lconn.core.HTMLUtil.escapeInlineText(_2d);
},destroy_AP:dojo.isIE<7?function(){
for(var ap in this){
if(ap.indexOf("_AP")>0){
delete this[ap];
}
}
}:function(){
}});
}
if(!dojo._hasResource["lconn.blogs.Res"]){
dojo._hasResource["lconn.blogs.Res"]=true;
dojo.provide("lconn.blogs.Res");
dojo.declare("lconn.blogs.Res",[],{bundleFor:"lconn.blogs",resBundle:null,loadDefaultBundle:function(){
this.resBundle=dojo.i18n.getLocalization(this.bundleFor,"strings");
},loadBundle:function(pkg){
this.resBundle=dojo.i18n.getLocalization(pkg,"strings");
},getDefaultBundle:function(){
return dojo.i18n.getLocalization(this.bundleFor,"strings");
},getBundle:function(pkg){
return dojo.i18n.getLocalization(pkg,"strings");
},getStringFrom:function(pkg,key,_33){
var _34=dojo.i18n.getLocalization(pkg,"strings")[key];
if(_33==undefined){
return _34;
}else{
return dojo.string.substitute(_34,_33);
}
},getString:function(key,_36){
var _37=dojo.i18n.getLocalization(this.bundleFor,"strings")[key];
if(_36==undefined){
return _37;
}else{
return dojo.string.substitute(_37,_36);
}
}});
}
if(!dojo._hasResource["lconn.blogs.SearchBar"]){
dojo._hasResource["lconn.blogs.SearchBar"]=true;
dojo.provide("lconn.blogs.SearchBar");
var w={};
w.templateString="<div\r\n><a style=\"display:inline-block\" href=\"#\" onclick=\"if(typeof this.menuInited == 'undefined'){this.menuInited=1;dojo.publish('p_dashboard');} menuUtility.openMenu(event, 'BlogSearchMenu');\"><img src=\"${cPath}/nav/common/styles/images/scopeDropDown.gif\" alt=\"${rs_searchDash}\" title=\"${rs_searchDash}\"/></a\r\n><input dojoAttachPoint=\"searchField_AP\" dojoAttachEvent=\"onfocus:focusField\" name=\"q\" class=\"lotusText lotusInactive\" type=\"text\" title=\"${rs_searchDash}\" value=\"${rs_searchDash}\" ></input\r\n><input class=\"lotusSearchButton\" type=\"image\" src=\"${cPath}/nav/common/styles/images/search.gif\" alt=\"${rs_searchSubmit}\" title=\"${rs_searchSubmit}\" ></input\r\n><input dojoAttachPoint=\"target_AP\" name=\"t\" type=\"hidden\" value=\"${cTarget}\"/\r\n><input dojoAttachPoint=\"searchScope_AP\" name=\"f\" type=\"hidden\" value=\"${searchScope}\"/\r\n></div>\r\n";
w.rs_searchAlt="rs_searchAlt";
w.rs_searchSubmit="rs_searchSubmit";
w.rs_searchNoInput="rs_searchNoInput";
w.rs_searchDash="rs_searchDash";
w.rs_searchAllEntries="rs_searchAllEntries";
w.rs_searchAuthor="rs_searchAuthor";
w.rs_searchComment="rs_searchComment";
w.rs_searchContent="rs_searchContent";
w.rs_searchTag="rs_searchTag";
w.rs_searchTitle="rs_searchTitle";
w.rs_searchDesc="rs_searchDesc";
w.rs_searchAllBlogs="rs_searchAllBlogs";
w.searchScope=null;
w.context=null;
w.currOption=null;
w.cPath=null;
w.cTarget=null;
w.searchMenu_W=null;
w.postMixInProperties=function(){
this.cPath=cPath;
this.cTarget=cTarget;
this.searchScope=cField;
var res=new lconn.blogs.Res();
res.loadDefaultBundle();
var b=res.resBundle;
this.rs_searchAlt=b[this.rs_searchAlt];
this.rs_searchSubmit=b[this.rs_searchSubmit];
this.rs_searchNoInput=b[this.rs_searchNoInput];
this.rs_searchDash=rs_searchDash;
this.rs_searchAuthor=rs_searchAuthor;
this.rs_searchTag=rs_searchTag;
this.rs_searchTitle=rs_searchTitle;
if(this.cTarget=="entry"){
this.rs_searchAllEntries=rs_searchAllEntries;
this.rs_searchComment=rs_searchComment;
this.rs_searchContent=rs_searchContent;
}
if(this.cTarget=="blog"){
this.rs_searchAllBlogs=rs_searchAllBlogs;
this.rs_searchDesc=rs_searchDesc;
}
};
w.postCreate=function(){
dojo.subscribe("p_dashboard",this,"switchDashboard");
};
w.setSearchPrompt=function(str){
this.searchField_AP.value=str;
this.searchField_AP.title=str;
dojo.addClass(this.searchField_AP,"lotusInactive");
};
w.switchDashboard=function(_3b){
this.prepMenu();
};
w.prepMenu=function(){
dojo.addClass(this.searchField_AP,"lotusInactive");
this.searchScope_AP.value=this.searchScope;
if(this.searchMenu_W!=null){
this.searchMenu_W.destroy();
this.searchMenu_W=null;
}
this.searchMenu_W=new dijit.Menu({id:"BlogSearchMenu",onItemClick:dojo.hitch(this,"selectOption")});
var _3c=this.searchMenu_W;
if(!this.cTarget){
this.cTarget=="entry";
}
var _3d="prepMenu_"+this.cTarget;
this[_3d](_3c,this.searchScope);
};
w.selectOption=function(_3e){
if(_3e.disabled){
return false;
}
if(_3e.popup){
if(!this.searchMenu_W.is_open){
this.searchMenu_W._openPopup();
}
}else{
this.searchMenu_W.onExecute();
if(this.currOption){
dojo.removeClass(this.currOption.iconNode,"dijitMenuItemIcon lotusCheckmark");
}
dojo.addClass(_3e.iconNode,"dijitMenuItemIcon lotusCheckmark");
this.currOption=_3e;
this.setSearchPrompt(_3e.label);
this.searchScope=this.currOption.value;
this.searchScope_AP.value=this.searchScope;
}
dijit.popup.close(this.searchMenu_W);
};
w.prepMenu_entry=function(_3f,_40){
var _41=new dijit.MenuItem({label:this.rs_searchAllEntries,value:"all",parentMenu:_3f});
var _42=new dijit.MenuItem({label:this.rs_searchAuthor,value:"author",parentMenu:_3f});
var _43=new dijit.MenuItem({label:this.rs_searchComment,value:"comment",parentMenu:_3f});
var _44=new dijit.MenuItem({label:this.rs_searchContent,value:"content",parentMenu:_3f});
var _45=new dijit.MenuItem({label:this.rs_searchTag,value:"tag",parentMenu:_3f});
var _46=new dijit.MenuItem({label:this.rs_searchTitle,value:"title",parentMenu:_3f});
_3f.addChild(_41);
_3f.addChild(_42);
_3f.addChild(_43);
_3f.addChild(_44);
_3f.addChild(_45);
_3f.addChild(_46);
var _47=_3f.getChildren();
for(var i=0;i<_47.length;i++){
var _49=_47[i];
if(dojo.string.trim(_49.value)==dojo.trim(_40)){
this.currOption=_49;
this.setSearchPrompt(_49.label);
dojo.addClass(this.currOption.iconNode,"dijitMenuItemIcon lotusCheckmark");
break;
}
}
};
w.prepMenu_blog=function(_4a,_4b){
var _4c=new dijit.MenuItem({label:this.rs_searchAllBlogs,value:"all",parentMenu:_4a});
var _4d=new dijit.MenuItem({label:this.rs_searchAuthor,value:"author",parentMenu:_4a});
var _4e=new dijit.MenuItem({label:this.rs_searchDesc,value:"description",parentMenu:_4a});
var _4f=new dijit.MenuItem({label:this.rs_searchTag,value:"tag",parentMenu:_4a});
var _50=new dijit.MenuItem({label:this.rs_searchTitle,value:"title",parentMenu:_4a});
_4a.addChild(_4c);
_4a.addChild(_4d);
_4a.addChild(_4e);
_4a.addChild(_4f);
_4a.addChild(_50);
var _51=_4a.getChildren();
for(var i=0;i<_51.length;i++){
var _53=_51[i];
if(dojo.string.trim(_53.value)==dojo.trim(_4b)){
this.currOption=_53;
this.setSearchPrompt(_53.label);
dojo.addClass(this.currOption.iconNode,"dijitMenuItemIcon lotusCheckmark");
break;
}
}
};
w.focusField=function(){
this.searchField_AP.value="";
dojo.removeClass(this.searchField_AP,"lotusInactive");
};
w.processSearch=function(_54){
if(dojo.hasClass(this.searchField_AP,"lotusInactive")){
this.focusField();
}
};
dojo.declare("lconn.blogs.SearchBar",[dijit._Widget,lconn.blogs._Templated,lconn.blogs.Res],w);
}
if(!dojo._hasResource["lconn.core.TypeAhead"]){
dojo._hasResource["lconn.core.TypeAhead"]=true;
dojo.provide("lconn.core.TypeAhead");
dojo.declare("lconn.core.TypeAhead",[dijit.form.ComboBox],{formatItem:function(_55,_56){
if(!_56){
return _55;
}else{
return _55=_55.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
}
},minChars:1,hasDownArrow:false,multipleValues:true,token:"",autoComplete:false,submitFormOnKey:false,_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var _59=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(key);
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_59=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _5c;
if(this._isShowingNow&&(_5c=pw.getHighlightedOption())){
if(_5c==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_5c==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}
}
}else{
this._setDisplayedValueAttr(this.attr("displayedValue"),true);
}
if(!this.submitFormOnKey){
evt.preventDefault();
}
case dk.TAB:
var _5d=this.attr("displayedValue");
if(pw&&(_5d==pw._messages["previousMessage"]||_5d==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.attr("value",{target:pw.getHighlightedOption()});
}
this._lastQuery=null;
this._hideResultList();
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_59=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
_59=typeof key=="string"||key==229;
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_59){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_numTokensPreceding:function(str,pos){
var i=-1,_61=0;
while(i<pos){
i=str.indexOf(this.token,i+1);
if(i==-1){
i=str.length;
}else{
if(i<pos){
_61++;
}
}
}
return _61;
},_autoCompleteText:function(_62){
var fn=this.focusNode;
var _64=this._getCaretPos(fn);
dijit.selectInputText(fn,fn.value.length);
var _65;
if(this.multipleValues){
_65=fn.value.split(this.token);
}else{
_65=[fn.value];
}
var _66=0;
if(this.multipleValues){
_66=this._numTokensPreceding(fn.value,_64);
}
if(this.multipleValues&&this.token!=" "&&_66>0){
_62=" "+_62;
}
var _67=this.ignoreCase?"toLowerCase":"substr";
if(dojo.string.trim(_62[_67](0)).indexOf(dojo.string.trim(_65[_66][_67](0)))==0){
if(_64+1>fn.value.length||fn.value.charAt(_64)==this.token){
var end=_64+_62.length-_65[_66].length;
_65[_66]=_62;
fn.value=_65.join(this.token);
dijit.selectInputText(fn,_64,end);
}
}else{
_65[_66]=_62;
fn.value=_65.join(this.token);
var _69=0;
for(var i=0;i<_66;i++){
_69+=_65[i].length;
}
_69+=this.token.length*_66;
dijit.selectInputText(fn,_69,_69+_62.length);
}
},_openResultList:function(_6b,_6c){
if(this.disabled||this.readOnly||(_6c.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(!_6b.length){
this._hideResultList();
return;
}
var _6d=new String(this.formatItem(_6b[0]));
if(_6d&&this.autoComplete&&!this._prev_key_backspace&&(_6c.query!="")){
this._autoCompleteText(_6d);
}
_6c._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_6b,_6c,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_6c.direction){
if(1==_6c.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_6c.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_announceOption:function(_6e){
if(_6e==null){
return;
}
var _6f;
if(_6e==this._popupWidget.nextButton||_6e==this._popupWidget.previousButton||_6e==this._popupWidget.searchButton){
_6f=_6e.innerHTML;
}else{
_6f=this.formatItem(_6e.item);
}
if(this.multipleValues){
var _70=this._getCaretPos(this.focusNode);
var _71=this.focusNode.value.split(this.token);
var _72=this._numTokensPreceding(this.focusNode.value,_70);
var q=this._lastQuery;
if(this.multipleValues&&this.token!=" "&&_72>0){
q=" "+q;
}
_71[_72]=q;
this.focusNode.value=_71.join(this.token);
}else{
this.focusNode.value=this.focusNode.value.substring(0,this._getCaretPos(this.focusNode));
}
this._setCaretPos(this.focusNode,_70);
dijit.setWaiState(this.focusNode,"activedescendant",dojo.attr(_6e,"id"));
this._autoCompleteText(_6f);
},_doSelect:function(tgt){
var _75=this.formatItem(tgt.item);
if(this.multipleValues){
var _76=this.keyArr[this.keyIdx];
this.keyArr[this.keyIdx]=(this.keyIdx!=0&&this.token!=" "?" ":"")+_75;
_75=this.keyArr.join(this.token);
var _77=this.token+(this.token!=" "?" ":"");
if(_75.length>=_77.length&&_75.substring(_75.length-_77.length)!=_77){
_75+=_77;
}
}else{
this.item=tgt.item;
}
this.attr("value",_75);
this._setCaretPos(this.focusNode,_75.length);
},_startSearchFromInput:function(){
var _78=this.focusNode.value;
var _79=_78;
if(this.multipleValues){
this.keyArr=_78.split(this.token);
this.caretPos=this._getCaretPos(this.focusNode);
this.keyIdx=this._numTokensPreceding(_78,this.caretPos);
_79=this.keyArr[this.keyIdx];
}
_79=dojo.string.trim(_79);
if(_79.length>=this.minChars){
this._startSearch(_79);
}else{
this._hideResultList();
}
},_startSearch:function(key){
if(!this._popupWidget){
var _7b=this.id+"_popup";
this._popupWidget=new dijit.form._ComboBoxMenu({onChange:dojo.hitch(this,this._selectOption),id:_7b});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_7b);
}
this.item=null;
var _7c=dojo.clone(this.query);
this._lastInput=key;
this._lastQuery=_7c=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_7d,_7e){
var _7f={queryOptions:{ignoreCase:this.ignoreCase,deep:true},query:_7d,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_80){
console.error("dijit.form.ComboBox: "+_80);
dojo.hitch(_7e,"_hideResultList")();
},start:0,count:this.pageSize};
dojo.mixin(_7f,_7e.fetchProperties);
var _81=_7e.store.fetch(_7f);
var _82=function(_83,_84){
_83.start+=_83.count*_84;
_83.direction=_84;
this.store.fetch(_83);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_82,_81);
},_7c,this),this.searchDelay);
},getAttribute:function(_85){
if(this.item&&this.item[_85]){
return this.item[_85];
}else{
return "";
}
},getTextBoxValue:function(){
return this.focusNode.value;
},_getMenuLabelFromItem:function(_86){
var _87=this.formatItem(_86,true);
var key="";
if(this.multipleValues){
key=dojo.string.trim(this.keyArr[this.keyIdx]);
}else{
key=dojo.string.trim(this.focusNode.value);
}
key=key.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;");
var _89=_87.toLowerCase();
var _8a=key.toLowerCase();
var _8b=0;
var _8c=null;
while(key&&-1<(_8c=_89.indexOf(_8a,_8b))){
_87=_87.substr(0,_8c)+"<b>"+_87.substring(_8c,_8c+key.length)+"</b>"+_87.substring(_8c+key.length);
_8b=_8c+key.length+7;
_89=_87.toLowerCase();
}
return {html:true,label:_87};
}});
}
if(!dojo._hasResource["lconn.core.NameUtil"]){
dojo._hasResource["lconn.core.NameUtil"]=true;
dojo.provide("lconn.core.NameUtil");
lconn.core.NameUtil={getHTML:function(_8d,_8e,_8f,id,_91){
var _92;
var _93=lconn.core.HTMLUtil.escapeText(_8f);
if(_8e){
var _94=lconn.core.HTMLUtil.escapeText(_8e);
if(_8d){
_92=(_91?_8d:lconn.core.HTMLUtil.escapeText(_8d));
}else{
_92=_94;
}
return "<span"+(id?" id=\""+id+"\"":"")+"><span class=\"vcard\"><span class=\"fn person lotusPerson\">"+_92+"</span><span class=\"email\" style=\"display: none;\">"+_94+"</span><span class=\"x-lconn-userid\" style=\"display: none;\">"+_93+"</span></span></span>";
}else{
var _92;
var _95=lconn.core.HTMLUtil.escapeInlineText(_8f);
if(_8d){
_92=(_91?_8d:lconn.core.HTMLUtil.escapeText(_8d));
}else{
_92=_93;
}
return "<span"+(id?" id=\""+id+"\"":"")+"><span class=\"vcard\"><span class=\"fn person lotusPerson\">"+_92+"</span><span class=\"x-lconn-userid\" style=\"display: none;\">"+_93+"</span></span></span>";
}
}};
}
if(!dojo._hasResource["lconn.core.Res"]){
dojo._hasResource["lconn.core.Res"]=true;
dojo.provide("lconn.core.Res");
dojo.declare("lconn.core.Res",[],{bundleFor:"lconn.core",resBundle:null,loadDefaultBundle:function(){
this.resBundle=dojo.i18n.getLocalization(this.bundleFor,"strings");
},loadBundle:function(pkg){
this.resBundle=dojo.i18n.getLocalization(pkg,"strings");
},getDefaultBundle:function(){
return dojo.i18n.getLocalization(this.bundleFor,"strings");
},getBundle:function(pkg){
return dojo.i18n.getLocalization(pkg,"strings");
},getStringFrom:function(pkg,key,_9a){
var _9b=dojo.i18n.getLocalization(pkg,"strings")[key];
if(_9a==undefined){
return _9b;
}else{
return dojo.string.substitute(_9b,_9a);
}
},getString:function(key,_9d){
var _9e=dojo.i18n.getLocalization(this.bundleFor,"strings")[key];
if(_9d==undefined){
return _9e;
}else{
return dojo.string.substitute(_9e,_9d);
}
}});
}
if(!dojo._hasResource["lconn.core.PeopleTypeAhead"]){
dojo._hasResource["lconn.core.PeopleTypeAhead"]=true;
dojo.provide("lconn.core.PeopleTypeAhead");
dojo.declare("lconn.core.PeopleTypeAhead",[lconn.core.TypeAhead],{getItem:function(){
return (this.item?this.item:null);
},formatItem:function(_9f,_a0){
var str="";
if(_9f.name.indexOf(",")!=-1&&_9f.name.length>1&&_9f.name[0]!="\""&&_9f.name[_9f.name.length-1]!="\""){
if(_a0){
str+="&quot;"+_9f.name.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")+"&quot;";
}else{
str+="\""+_9f.name+"\"";
}
}else{
str+=_9f.name;
}
if(_9f.member){
if(_a0){
str+=" &lt;"+_9f.member.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;")+"&gt;&lrm;";
}else{
str+=" <"+_9f.member+">‎";
}
}
return str;
},_onKeyPress:function(evt){
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var _a4=false;
var pw=this._popupWidget;
var dk=dojo.keys;
if(this._isShowingNow){
pw.handleKey(key);
}
switch(key){
case dk.PAGE_DOWN:
case dk.DOWN_ARROW:
if(!this._isShowingNow||this._prev_key_esc){
this._arrowPressed();
_a4=true;
}else{
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.PAGE_UP:
case dk.UP_ARROW:
if(this._isShowingNow){
this._announceOption(pw.getHighlightedOption());
}
dojo.stopEvent(evt);
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
case dk.ENTER:
var _a7;
if(this._isShowingNow&&(_a7=pw.getHighlightedOption())){
if(_a7==pw.nextButton){
this._nextSearch(1);
dojo.stopEvent(evt);
break;
}else{
if(_a7==pw.previousButton){
this._nextSearch(-1);
dojo.stopEvent(evt);
break;
}else{
if(_a7==pw.searchButton){
pw.searchDirectory();
dojo.stopEvent(evt);
return;
}else{
if(_a7.item&&parseInt(_a7.item.type)<0){
dojo.stopEvent(evt);
break;
}
}
}
}
}else{
this._setDisplayedValueAttr(this.attr("displayedValue"),true);
}
evt.preventDefault();
case dk.TAB:
var _a8=this.attr("displayedValue");
if(pw&&(_a8==pw._messages["previousMessage"]||_a8==pw._messages["nextMessage"])){
break;
}
if(this._isShowingNow){
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(pw.getHighlightedOption()){
pw.attr("value",{target:pw.getHighlightedOption()});
}
this._lastQuery=null;
this._hideResultList();
}
break;
case " ":
this._prev_key_backspace=false;
this._prev_key_esc=false;
if(this._isShowingNow&&pw.getHighlightedOption()){
dojo.stopEvent(evt);
this._selectOption();
this._hideResultList();
}else{
_a4=true;
}
break;
case dk.ESCAPE:
this._prev_key_backspace=false;
this._prev_key_esc=true;
if(this._isShowingNow){
dojo.stopEvent(evt);
this._hideResultList();
}
break;
case dk.DELETE:
case dk.BACKSPACE:
this._prev_key_esc=false;
this._prev_key_backspace=true;
_a4=true;
break;
case dk.RIGHT_ARROW:
case dk.LEFT_ARROW:
this._prev_key_backspace=false;
this._prev_key_esc=false;
break;
default:
this._prev_key_backspace=false;
this._prev_key_esc=false;
_a4=typeof key=="string"||key==229;
}
if(this.searchTimer){
clearTimeout(this.searchTimer);
}
if(_a4){
setTimeout(dojo.hitch(this,"_startSearchFromInput"),1);
}
},_openResultList:function(_a9,_aa){
if(this.disabled||this.readOnly||(_aa.query!=this._lastQuery)){
return;
}
this._popupWidget.clearResultList();
if(_a9.length){
var _ab=new String(this.formatItem(_a9[0]));
if(_ab&&this.autoComplete&&!this._prev_key_backspace&&(_aa.query!="")){
this._autoCompleteText(_ab);
}
}
_aa._maxOptions=this._maxOptions;
this._popupWidget.createOptions(_a9,_aa,dojo.hitch(this,"_getMenuLabelFromItem"));
this._showResultList();
if(_aa.direction){
if(1==_aa.direction){
this._popupWidget.highlightFirstOption();
}else{
if(-1==_aa.direction){
this._popupWidget.highlightLastOption();
}
}
this._announceOption(this._popupWidget.getHighlightedOption());
}
},_startSearchFromInput:function(_ac,_ad){
var _ae=this.focusNode.value;
var _af=_ae;
if(this.multipleValues){
this.keyArr=_ae.split(this.token);
this.caretPos=this._getCaretPos(this.focusNode);
this.keyIdx=this._numTokensPreceding(_ae,this.caretPos);
_af=this.keyArr[this.keyIdx];
}
_af=dojo.string.trim(_af);
if(_af.length>=this.minChars){
this._startSearch(_af,_ad);
}else{
this._hideResultList();
}
},_startSearch:function(key,_b1){
if(!this._popupWidget){
var _b2=this.id+"_popup";
this._popupWidget=new lconn.act.PeopleTypeAheadMenu({onChange:dojo.hitch(this,this._selectOption),id:_b2});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_b2);
}
if(_b1==undefined){
_b1=false;
}
this.item=null;
var _b3=dojo.clone(this.query);
this._lastInput=key;
this._lastQuery=_b3=key;
this.searchTimer=setTimeout(dojo.hitch(this,function(_b4,_b5){
var _b6={queryOptions:{ignoreCase:this.ignoreCase,deep:true},searchDirectory:_b1,query:_b4,onComplete:dojo.hitch(this,"_openResultList"),onError:function(_b7){
console.error("dijit.form.ComboBox: "+_b7);
dojo.hitch(_b5,"_hideResultList")();
},start:0,count:this.pageSize};
dojo.mixin(_b6,_b5.fetchProperties);
var _b8=_b5.store.fetch(_b6);
var _b9=function(_ba,_bb){
_ba.start+=_ba.count*_bb;
_ba.direction=_bb;
this.store.fetch(_ba);
};
this._nextSearch=this._popupWidget.onPage=dojo.hitch(this,_b9,_b8);
this._popupWidget.searchDirectory=dojo.hitch(this,dojo.hitch(this,function(){
this._startSearch(key,true);
}));
},_b3,this),this.searchDelay);
}});
dojo.declare("lconn.act.PeopleTypeAheadMenu",[dijit.form._ComboBoxMenu,lconn.core.Res],{rs_searchDirectory:"",templateString:"<ul class='dijitReset dijitMenu' dojoAttachEvent='onmousedown:_onMouseDown,onmouseup:_onMouseUp,onmouseover:_onMouseOver,onmouseout:_onMouseOut' waiRole='alert' role='waiRole:alert' tabIndex='-1' style='overflow:\"auto\";'>"+"<li class='dijitMenuItem dijitMenuPreviousButton' dojoAttachPoint='previousButton'></li>"+"<li class='dijitMenuItem searchDirectory' dojoAttachPoint='searchButton'>${rs_searchDirectory}</li>"+"<li class='dijitMenuItem dijitMenuNextButton' dojoAttachPoint='nextButton'></li>"+"</ul>",_messages:null,tooltipAroundNode:null,tooltipTimeout:null,tooltipDelay:600,tooltipId:0,popupClosed:true,postMixInProperties:function(){
this.loadDefaultBundle();
this.rs_searchDirectory=this.resBundle.rs_searchDirectory;
this.inherited("postMixInProperties",arguments);
},searchDirectory:function(){
},_setValueAttr:function(_bc){
if(_bc.target.item&&parseInt(_bc.target.item.type)>=0){
this.value=_bc;
this.onChange(_bc);
}
},_createOption:function(_bd,_be){
var _bf=_be(_bd);
var _c0=document.createElement("li");
dijit.setWaiRole(_c0,"option");
if(_bd.userid){
dojo.attr(_c0,"exid",_bd.userid);
}
if(_bf.html){
_c0.innerHTML=_bf.label;
}else{
_c0.appendChild(document.createTextNode(_bf.label));
}
if(_c0.innerHTML==""){
_c0.innerHTML="&nbsp;";
}
_c0.item=_bd;
return _c0;
},createOptions:function(_c1,_c2,_c3){
this.previousButton.style.display=(_c2.start==0)?"none":"";
dojo.attr(this.previousButton,"id",this.id+"_prev");
dojo.forEach(_c1,function(_c4,i){
var _c6=this._createOption(_c4,_c3);
_c6.className="dijitMenuItem";
dojo.attr(_c6,"id",this.id+i);
this.domNode.insertBefore(_c6,this.searchButton);
},this);
var _c7=false;
if(_c2._maxOptions&&_c2._maxOptions!=-1){
if((_c2.start+_c2.count)<_c2._maxOptions){
_c7=true;
}else{
if((_c2.start+_c2.count)>(_c2._maxOptions-1)){
if(_c2.count==_c1.length){
_c7=true;
}
}
}
}else{
if(_c2.count==_c1.length){
_c7=true;
}
}
this.nextButton.style.display=_c7?"":"none";
dojo.attr(this.nextButton,"id",this.id+"_next");
this.searchButton.style.display=(_c2.searchDirectory?"none":"");
},_onMouseUp:function(evt){
if(evt.target==this.searchButton){
this.searchDirectory();
}else{
this.inherited("_onMouseUp",arguments);
}
},_onMouseOver:function(evt){
if(evt.target===this.domNode){
return;
}
var tgt=evt.target;
if(!(tgt==this.previousButton||tgt==this.nextButton||tgt==this.searchButton)){
while(!tgt.item){
tgt=tgt.parentNode;
}
}
this._focusOptionNode(tgt);
},_focusOptionNode:function(_cb){
if(this._highlighted_option!=_cb){
var _cc=dojo.attr(_cb,"exid");
this.closeTooltip();
this.tooltipId++;
this.popupClosed=false;
if(_cc&&window.lconn&&lconn.profiles&&lconn.profiles.bizCard.bizCard.renderMiniBizCard){
this.tooltipTimeout=setTimeout(dojo.hitch(this,"renderBizCard",_cc,dojo.hitch(this,"showTooltip",this.tooltipId,_cb)),this.tooltipDelay);
}
}
this.inherited("_focusOptionNode",arguments);
},renderBizCard:function(_cd,fn){
if(window.lconn&&lconn.profiles&&lconn.profiles.bizCard.bizCard.renderMiniBizCard){
lconn.profiles.bizCard.bizCard.renderMiniBizCard(_cd,fn);
}
},showTooltip:function(id,_d0,_d1){
if(id==this.tooltipId&&!this.popupClosed){
this.tooltipAroundNode=_d0;
dijit.showTooltip(_d1,_d0,["after","before"]);
}
},closeTooltip:function(){
if(this.tooltipAroundNode){
dijit.hideTooltip(this.tooltipAroundNode);
this.tooltipAroundNode=null;
}
if(this.tooltipTimeout){
clearTimeout(this.tooltipTimeout);
this.tooltipTimeout=null;
}
},onClose:function(){
this.popupClosed=true;
this.closeTooltip();
this._blurOptionNode();
},clearResultList:function(){
while(this.domNode.childNodes.length>3){
this.domNode.removeChild(this.domNode.childNodes[this.domNode.childNodes.length-3]);
}
},getListLength:function(){
return this.domNode.childNodes.length-3;
}});
}
if(!dojo._hasResource["lconn.blogs.PeopleTypeAhead"]){
dojo._hasResource["lconn.blogs.PeopleTypeAhead"]=true;
dojo.provide("lconn.blogs.PeopleTypeAhead");
dojo.declare("lconn.blogs.PeopleTypeAhead",[lconn.core.PeopleTypeAhead],{isDirectorySearchEnabled:true,postCreate:function(){
this.inherited("postCreate",arguments);
var _d2=this.id+"_popup";
this._popupWidget=new lconn.blogs.PeopleTypeAheadMenu({id:_d2,onChange:dojo.hitch(this,this._selectOption),isDirectorySearchEnabled:this.isDirectorySearchEnabled});
dijit.removeWaiState(this.focusNode,"activedescendant");
dijit.setWaiState(this.textbox,"owns",_d2);
}});
dojo.declare("lconn.blogs.PeopleTypeAheadMenu",[lconn.act.PeopleTypeAheadMenu],{isDirectorySearchEnabled:true,createOptions:function(_d3,_d4,_d5){
this.inherited("createOptions",arguments);
if(!this.isDirectorySearchEnabled){
this.searchButton.style.display="none";
}
}});
}
if(!dojo._hasResource["lconn.core.PeopleDataStore"]){
dojo._hasResource["lconn.core.PeopleDataStore"]=true;
dojo.provide("lconn.core.PeopleDataStore");
dojo.declare("lconn.core.PeopleDataStore",null,{constructor:function(_d6,_d7){
this.queryParam=(_d6.queryParam?_d6.queryParam:_d7.getAttribute("queryParam"));
this.url=(_d6.url?_d6.url:_d7.getAttribute("url"));
},queryParam:"",searchDirectory:false,cache:[],dirCache:[],fetch:function(_d8){
var _d9={};
var _da;
this.searchDirectory=(_d8.searchDirectory?true:false);
if(this.searchDirectory){
_da=this.dirCache;
}else{
_da=this.cache;
}
if(typeof _da[_d8.query.toLowerCase()]=="object"){
_d8.onComplete(_da[_d8.query.toLowerCase()],_d8);
return _d8;
}
if(this.queryParam){
_d9[this.queryParam]=_d8.query;
}
if(this.searchDirectory){
_d9.usedirectory="yes";
}
dojo.xhrPost({url:this.url,content:_d9,handleAs:"json-comment-optional",timeout:5000,contentType:"application/x-www-form-urlencoded;charset=UTF-8",load:dojo.hitch(this,function(_db){
var _dc;
if(this.searchDirectory){
_dc=this.dirCache;
}else{
_dc=this.cache;
}
_dc[_d8.query.toLowerCase()]=_db.items;
if(_d8.onComplete){
_d8.onComplete(_db.items,_d8);
}
}),error:function(){
console.log("There was an error");
}});
return _d8;
},getValue:function(_dd,_de,_df){
if(_dd[_de]){
return _dd[_de];
}else{
return _df;
}
}});
}
if(!dojo._hasResource["lconn.blogs.AddMembers"]){
dojo._hasResource["lconn.blogs.AddMembers"]=true;
dojo.provide("lconn.blogs.AddMembers");
var w={};
w.templateString="<div class=\"AddMembers\">\r\n    <input type=\"hidden\" name=\"owners\" dojoAttachPoint=\"owners_P_AP\" />\r\n    <input type=\"hidden\" name=\"authors\" dojoAttachPoint=\"authors_P_AP\" />\r\n    <input type=\"hidden\" name=\"draft\" dojoAttachPoint=\"draft_P_AP\" />\r\n\r\n    <label>${rs_addMemberDescription}</label>\r\n    <div class=\"field\">\r\n        <div dojoAttachPoint=\"memberList_AP\" class=\"memberList\"></div>\r\n    </div>\r\n    <div class=\"field\">\r\n        <select dojoAttachPoint=\"aclLevel_AP\">\r\n            <option dojoAttachPoint=\"owners_AP\" value=\"owners\">${rs_owner}</option>\r\n            <option value=\"authors\" selected=\"selected\">${rs_author}</option>\r\n            <option value=\"draft\">${rs_draft}</option>\r\n        </select>\r\n        <input dojoAttachPoint=\"membersCombo_AP\" ></input>\r\n        <button title=\"${rs_addMember_title}\" class=\"fieldAdd\" dojoAttachEvent=\"onclick: newMember\"> </button>\r\n        <span title=\"${rs_addMember_title}\" class=\"fieldAddText\" dojoAttachEvent=\"onclick: newMember\">+</span>\r\n    </div>\r\n    <!--  div class=\"tundra\"><input type=\"checkbox\" dojoAttachPoint=\"notifyCheck_AP\" />${rs_notification}</div -->\r\n</div>\r\n";
w.rs_addMemberDescription="rs_addMemberDescription";
w.rs_notification="rs_notification";
w.rs_author="rs_author";
w.rs_draft="rs_draft";
w.rs_owner="rs_owner";
w.rs_addMember="rs_addMember";
w.rs_authorLower="rs_authorLower";
w.rs_ownerLower="rs_ownerLower";
w.rs_draftLower="rs_draftLower";
w.rs_addMember_title="rs_addMember_title";
w.rs_removeMember_title="rs_removeMember_title";
w.lowerLabels={};
w.memberStore=null;
w.typeAhead_W=null;
w.members={};
w.scrollThreshold=4;
w.postMixInProperties=function(){
this.rs_addMemberDescription=rs_addMemberDescription;
this.rs_author=rs_author;
this.rs_owner=rs_owner;
this.rs_draft=rs_draft;
this.rs_authorLower=rs_authorLower;
this.rs_ownerLower=rs_ownerLower;
this.rs_draftLower=rs_draftLower;
this.rs_addMember_title=rs_addMember_title;
this.rs_removeMember_title=rs_removeMember_title;
this.lowerLabels={owners:this.rs_ownerLower,authors:this.rs_authorLower,draft:this.rs_draftLower};
};
w.postCreate=function(){
this.members={P:{owners:[],authors:[],draft:[]}};
var url=blogsContext+"/roller-services/json/typeaheadpeople";
this.memberStore=new lconn.core.PeopleDataStore({url:url,queryParam:"name"},this.memberStore_AP);
var _e1={minChars:2,searchDelay:600,multipleValues:false,store:this.memberStore,"class":"typeAhead"};
this.typeAhead_W=new lconn.core.PeopleTypeAhead(_e1,this.membersCombo_AP);
dojo.connect(this.typeAhead_W,"_doSelect",this,"newMember");
this.memberList_AP.style.height="";
this.memberList_AP.className="memberList";
};
w.uninitialize=function(){
this.members=null;
};
w.reset=function(){
this.members={P:{owners:[],authors:[],draft:[]}};
this.aclLevel_AP.value="authors";
this.typeAhead_W.setValue("");
this.owners_P_AP.value=this.authors_P_AP.value=this.draft_P_AP.value="";
this.memberList_AP.innerHTML="";
this.memberList_AP.style.height="";
this.memberList_AP.className="memberList";
this.memberList_AP.style.visibility="";
};
w.newMember=function(){
var _e2=null;
var _e3="";
var _e4=[];
var _e5=false;
_e2=this.typeAhead_W.getItem();
_e3=this.aclLevel_AP.value;
var _e6,_e7;
if(_e2){
switch(parseInt(_e2.type)){
case 0:
_e6="P";
break;
default:
_e6="P";
}
_e7=_e2.userid;
}else{
_e6="P";
_e7=this.typeAhead_W.getTextBoxValue();
if(!_e7.match(/.*@.*\..*/)){
return;
}
}
if(_e7){
this.members[_e6][_e3].push(_e7);
var _e8=document.createElement("div");
dojo.addClass(_e8,"member");
_e8.innerHTML="<div class=\""+(_e6!=undefined?_e6:"P")+"\">&nbsp;</div>";
var _e9=document.createElement("div");
dojo.addClass(_e9,"nameContent");
var _ea;
if(_e2){
var _eb=_e2.name+(_e2.member?"<"+_e2.member+">":"");
_ea=lconn.core.NameUtil.getHTML(_eb,null,_e2.userid,null,true);
}else{
_ea=lconn.core.NameUtil.getHTML(_e7,_e7,null,null,true);
}
_ea=_ea.replace(/&lt;/g,"&lrm;&lt;").replace(/&gt;/g,"&gt;&lrm;");
_e9.innerHTML+=_ea+" <span class=\"type\">("+this.lowerLabels[_e3]+")</span>";
var _ec=document.createElement("input");
_ec.className="fieldDel";
_ec.type="button";
_ec.title=this.rs_removeMember_title;
this.connect(_ec,"ondijitclick",dojo.hitch(this,"removeMember",_e7,_e6,_e3,_e8));
var _ed=document.createElement("span");
_ed.className="fieldDelText";
_ed.title=this.rs_removeMember_title;
_ed.innerHTML="X";
this.connect(_ed,"ondijitclick",dojo.hitch(this,"removeMember",_e7,_e6,_e3,_e8));
_e9.appendChild(_ec);
_e9.appendChild(_ed);
_e8.appendChild(_e9);
if(this.memberList_AP.firstChild){
this.memberList_AP.insertBefore(_e8,this.memberList_AP.firstChild);
}else{
this.memberList_AP.appendChild(_e8);
}
this.memberList_AP.style.visibility="visible";
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,_e8);
}
if(this.howManyMembers()>=this.scrollThreshold){
this.memberList_AP.style.height=this.memberList_AP.offsetHeight+"px";
dojo.addClass(this.memberList_AP,"scroll");
}
this.typeAhead_W.reset();
}
};
w.howManyMembers=function(){
var _ee=0;
for(type in this.members){
for(level in this.members[type]){
_ee+=this.members[type][level].length;
}
}
return _ee;
};
w.removeMember=function(_ef,_f0,_f1,_f2,evt){
if(_f2){
this.memberList_AP.removeChild(_f2);
}
var i=0;
while(i<this.members[_f0][_f1].length&&this.members[_f0][_f1][i]!=_ef){
i++;
}
if(i<this.members[_f0][_f1].length){
this.members[_f0][_f1].splice(i,1);
}
var _f5=this.howManyMembers();
if(_f5==0){
this.memberList_AP.style.visibility="hidden";
}else{
if(_f5<this.scrollThreshold){
dojo.removeClass(this.memberList_AP,"scroll");
this.memberList_AP.style.height="";
}
}
};
w.setHiddenFields=function(){
var _f6={};
var len=0;
for(type in this.members){
_f6[type]={};
for(level in this.members[type]){
_f6[type][level]=this.members[type][level].join(",");
}
}
this.owners_P_AP.value=_f6.P.owners;
this.authors_P_AP.value=_f6.P.authors;
this.draft_P_AP.value=_f6.P.draft;
};
dojo.declare("lconn.blogs.AddMembers",[lconn.blogs.Res,dijit._Widget,dijit._Templated],w);
}
if(!dojo._hasResource["lconn.blogs.localDate"]){
dojo._hasResource["lconn.blogs.localDate"]=true;
dojo.provide("lconn.blogs.localDate");
dojo.declare("lconn.blogs._localDate",null,{now:new Date(),MILLS_IN_DAY:86400000,init:false,tempDate:new Date(),localize:function(_f8,_f9){
if(!this.init){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
this.days=[this.messages.Sunday,this.messages.Monday,this.messages.Tuesday,this.messages.Wednesday,this.messages.Thursday,this.messages.Friday,this.messages.Saturday];
this.months=[this.messages.Jan,this.messages.Feb,this.messages.Mar,this.messages.Apr,this.messages.May,this.messages.June,this.messages.July,this.messages.Aug,this.messages.Sep,this.messages.Oct,this.messages.Nov,this.messages.Dec];
var t=new Date();
t.setHours(0);
t.setMinutes(0);
t.setSeconds(0);
t.setMilliseconds(0);
this.todayMidnight=t.getTime();
this.timeline=[this.todayMidnight-this.MILLS_IN_DAY-this.MILLS_IN_DAY,this.todayMidnight-this.MILLS_IN_DAY,this.todayMidnight+this.MILLS_IN_DAY,this.todayMidnight+this.MILLS_IN_DAY+this.MILLS_IN_DAY,this.todayMidnight+this.MILLS_IN_DAY+this.MILLS_IN_DAY+this.MILLS_IN_DAY];
this.init=true;
}
this.tempDate.setTime(_f8);
var _fb=this.tempDate;
var d=_fb.getDay();
var _fd="";
if(_f8>=this.todayMidnight&&_f8<this.timeline[2]){
if(_f9===undefined){
_fd=this.messages.Today+" "+this.getLocalizedTime(_fb);
}else{
_fd=this.messages.Today;
}
}else{
if(_f8<this.todayMidnight&&_f8>=this.timeline[1]){
if(_f9===undefined){
_fd=this.messages.Yesterday+" "+this.getLocalizedTime(_fb);
}else{
_fd=this.messages.Yesterday;
}
}else{
if(_f8<this.timeline[1]&&_f8>=this.timeline[0]){
if(_f9===undefined){
_fd=this.days[d]+" "+this.getLocalizedTime(_fb);
}else{
_fd=this.days[d];
}
}else{
if(_f8<this.timeline[3]&&_f8>=this.timeline[2]){
_fd=this.messages.Tomorrow;
}else{
if(_f8<this.timeline[4]&&_f8>=this.timeline[3]){
_fd=this.days[d];
}else{
if(this.now.getFullYear()==_fb.getFullYear()){
if(typeof (this.isEnglishLocale)=="undefined"){
var _fe=dojo.locale.substring(0,2).toLowerCase();
var _ff="";
if(dojo.locale.length>2){
_ff=dojo.locale.substring(3,5).toLowerCase();
}
this.isEnglishLocale=(_fe=="en"&&(_ff==""||_ff=="us"));
}
if(this.isEnglishLocale){
_fd=this.months[_fb.getMonth()]+" "+_fb.getDate();
}else{
_fd=this.getLocalizedDate(_fb);
}
}else{
if(typeof (this.isEnglishLocale)=="undefined"){
var _fe=dojo.locale.substring(0,2).toLowerCase();
var _ff="";
if(dojo.locale.length>2){
_ff=dojo.locale.substring(3,5).toLowerCase();
}
this.isEnglishLocale=(_fe=="en"&&(_ff==""||_ff=="us"));
}
if(this.isEnglishLocale){
_fd=this.months[_fb.getMonth()]+" "+_fb.getDate()+" "+_fb.getFullYear();
}else{
_fd=this.getLocalizedDate(_fb);
}
}
}
}
}
}
}
return "<span title=\""+_fd+"\">"+_fd+"</span>";
},getLocalizedTime:function(date){
return dojo.date.locale.format(date,{formatLength:"short",selector:"time",locale:dojo.locale});
},getLocalizedDate:function(date){
return dojo.date.locale.format(date,{formatLength:"medium",selector:"date",locale:dojo.locale});
}});
lconn.blogs.localDate=new lconn.blogs._localDate();
if(typeof blogsDate=="undefined"){
blogsDate={};
}
if(typeof blogsDate.date=="undefined"){
blogsDate.date=lconn.blogs.localDate;
}
}
if(!dojo._hasResource["lconn.blogs.tags"]){
dojo._hasResource["lconn.blogs.tags"]=true;
dojo.provide("lconn.blogs.tags");
dojo.declare("lconn.blogs._tags",null,{pivotBrowseTag:function(){
var e=dojo.byId("taginput");
var s=e.value;
e.value="";
if(s!=""){
var a=dojo.byId("actualtagform").action;
if(a.indexOf("?")==-1){
document.location.href=dojo.byId("actualtagform").action+encodeURIComponent(s)+"?lang="+langParaValue;
}else{
document.location.href=dojo.byId("actualtagform").action+encodeURIComponent(s)+"&lang="+langParaValue;
}
}
},minVisThreshold:0,showTagVis:function(){
var e=dojo.byId("tagbin");
if(!e){
return;
}
var as=e.getElementsByTagName("span");
for(var i=0;i<as.length;i++){
var a=as[i];
var m=a.className.match(/^f\d+-(\d+)/);
if(m){
a.style.display=(m[1]>=this.minVisThreshold)?"inline":"none";
}
}
},updateTagVis:function(t){
this.minVisThreshold=t;
dojo.cookie("sliderVis_value",t,{path:"/"});
this.showTagVis();
},createSlider:function(name){
var t;
t=dojo.cookie("sliderVis_value");
this.minVisThreshold=(typeof t=="undefined"?0:Math.max(Math.min(parseFloat(t),100),0));
var s=["<div dojoType=\"dijit.form.HorizontalSlider\" id=\"",name,"\" value=\"",this.minVisThreshold,"\"","maximum=\"100\" minimum=\"0\" pageIncrement=\"1\" showButtons=\"false\" intermediateChanges=\"true\"","style=\"height: 17px; float: left; padding-top: 5px\" onChange=\"lconn.blogs.tags.updateTagVis(arguments[0]);\"></div>"].join("");
document.write(s);
dojo.addOnLoad(function(){
dijit.byId(name).sliderBarContainer.style.width="100%";
});
}});
lconn.blogs.tags=new lconn.blogs._tags();
}
if(!dojo._hasResource["lconn.blogs.rating"]){
dojo._hasResource["lconn.blogs.rating"]=true;
dojo.provide("lconn.blogs.rating");
dojo.declare("lconn.blogs._rating",null,{displayRecommendeeList:function(_10e,type,id,edit,obj){
if(typeof MenuPopup=="undefined"){
return;
}
if(dojo.isIE){
if(typeof this.__last!="undefined"&&this.__last&&typeof this.__last[id]!="undefined"&&this.__last[id]){
var n=new Date().getTime();
if(n-this.__last[id]<=Popup.Effect.DURATION*2){
return;
}
}
this.__last={};
this.__last[id]=new Date().getTime();
}
if(!this.messages){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
}
var _114=dojo.byId("popup_recommendeelist");
if(!_114){
_114=document.createElement("div");
_114.className="ratingPopup popup";
_114.setAttribute("id","popup_recommendeelist");
document.body.appendChild(_114);
}
var info="<h3 class=\"lotusAlignLeft\">";
var _116=eval("ratings['"+type+"_"+id+"_recommentees']");
if(edit==1){
if(!currentLogin.auth){
info=info+"<a href=\""+BlogsBaseUrl+"/roller-ui/login-redirect.jsp?redirect="+escape(window.location)+"\">"+(type=="entry"?this.messages.RatingLoginToRate:this.messages.RatingCommentLoginToRate)+"</a>";
}else{
if(typeof _116!="undefined"&&_116.size>0&&_116[currentLogin.uid]){
info=info+(type=="entry"?this.messages.RatingEntryRated:this.messages.RatingCommentRated);
}else{
info=info+(type=="entry"?this.messages.RatingClickToRateEntry:this.messages.RatingClickToRateComment);
}
}
}
if(typeof _116!="undefined"&&_116.size>0){
if(edit==1){
info=info+"<br>";
}
info=info+this.messages.RatingRecommentedBy;
info=info+"</h3>";
if(!_116["_"]){
var s="";
for(uid in _116){
if(uid=="size"){
continue;
}
if(uid=="_"){
continue;
}
if(s!=""){
s+=", ";
}
s+=_116[uid];
}
_116["_"]=s;
}
info=info+"<textarea readonly=\"readonly\" style=\"border: 1px solid gray; background-color: rgb(255, 255, 255);\">"+lconn.blogs.utils.escapeHTML(_116["_"])+"</textarea>";
}
_114.innerHTML=info;
MenuPopup.showMenu("popup_recommendeelist",_10e,{focus:obj});
},hideRecommendeeList:function(_118,type,id,edit,obj){
if(dojo.isIE){
MenuPopup.returnFocusElement=false;
}
MenuPopup.hideMenu();
},recommend:function(type,uri,id){
if(!currentLogin.auth){
return;
}
var _120=eval("ratings['"+type+"_"+id+"_recommentees']");
if(typeof _120!="undefined"&&_120.size>0&&_120[currentLogin.uid]){
return;
}
if(!this.messages){
this.messages=dojo.i18n.getLocalization("lconn.blogs","strings");
}
dojo.xhrPost({url:uri,handleAs:"json",content:type=="entry"?{version:250,rating:5,dangerousurlnonce:window.__security_nonce}:{version:250,rating:5,dangerousurlnonce:window.__security_nonce,commentid:id},load:function(data){
if(data.success){
var _122=eval("ratings['"+type+"_"+id+"_recommentees']");
if(typeof _122=="undefined"){
eval("ratings['"+type+"_"+id+"_recommentees']={'size':0, '_':''}");
_122=eval("ratings['"+type+"_"+id+"_recommentees']");
}
if(_122.size>0&&_122[currentLogin.uid]){
return;
}
_122[currentLogin.uid]=window.currentLogin.name;
_122.size++;
_122["_"]=null;
var e=dojo.byId(type+"_rating_"+id);
var x=dojo.query("[name=\"rating_btn\"]",e);
if(x&&x.length==1){
x[0].style.display="none";
}
var r=Math.min(Math.floor(_122.size/10)+1,8);
x=dojo.query("[name=\"rating_icon\"]",e);
if(x&&x.length==1){
x[0].innerHTML="";
var img=document.createElement("img");
img.border="0";
if(r==1){
img.src=BlogsBaseUrl+"/nav/lconn/styles/images/iconRating16_on.png";
}else{
if(r==2){
img.src=BlogsBaseUrl+"/nav/lconn/styles/images/iconRating2-16.png";
}else{
if(r==3){
img.src=BlogsBaseUrl+"/nav/lconn/styles/images/iconRating3-16.png";
}else{
img.src=BlogsBaseUrl+"/nav/common/styles/images/iconRating"+r+".gif";
}
}
}
img.alt=lconn.blogs.rating.messages.RatingsAltRatings;
x[0].appendChild(img);
}
x=dojo.query("[name=\"rating_count\"]",e);
if(x&&x.length==1){
x[0].innerHTML=_122.size;
}
}else{
if(data.error){
showDialog(data.error);
}
}
}});
}});
lconn.blogs.rating=new lconn.blogs._rating();
}
if(!dojo._hasResource["lconn.blogs.MemberList"]){
dojo._hasResource["lconn.blogs.MemberList"]=true;
dojo.provide("lconn.blogs.MemberList");
var _memberList={};
_memberList.members=[];
_memberList.scrollThreshold=4;
_memberList.memberElementHeight=28;
_memberList.init=function(_127,_128){
_memberList.typeAhead_W=_127;
if(_memberList.holderElement){
_memberList.holderElement.innerHTML="";
_memberList.holderElement.style.display="none";
}
this.holderElement=null;
this.widgetParent=_128;
this.members=[];
this.repaint();
dojo.connect(this.typeAhead_W,"_doSelect",this,"add");
};
_memberList.add=function(){
var pObj=null;
if(this.typeAhead_W.getItem()){
pObj=this.typeAhead_W.getItem();
}else{
var val=this.typeAhead_W.getTextBoxValue();
if(!val.match(/.*@.*\..*/)){
return;
}
pObj={};
pObj.name=val;
pObj.userid=val;
}
for(var i=0;i<this.members.length;i++){
if(this.members[i].userid==pObj.userid){
this.typeAhead_W.reset();
return;
}
}
this.members.push(pObj);
this.repaint();
this.typeAhead_W.reset();
};
_memberList.removeMember=function(user){
var _12d=false;
for(var i=0;i<this.members.length;i++){
if(this.members[i].userid==user.userid){
_12d=true;
this.members.splice(i,1);
break;
}
}
if(!_12d){
return;
}
this.repaint();
};
_memberList.repaint=function(){
var _12f=dojo.i18n.getLocalization("lconn.blogs","strings");
if(this.holderElement){
this.holderElement.innerHTML="";
this.holderElement.style.display="";
this.holderElement.style.height="auto";
}else{
var _130=document.createElement("div");
_130.className="memberList scroll";
this.holderElement=_130;
this.widgetParent.parentNode.insertBefore(this.holderElement,this.widgetParent);
}
if(this.members.length==0){
this.holderElement.style.display="none";
this.holderElement.innerHTML="<input type='hidden' id=\"receivers\" name=\"receivers\" value=\"\">";
return;
}
var html="";
var _132="";
for(var i=0;i<this.members.length;i++){
var _134=this.members[i].name+(this.members[i].member?"<"+this.members[i].member+">":"");
var _135=lconn.core.NameUtil.getHTML(_134,null,this.members[i].userid,null,true);
html+="<div class='member'><nobr><span class='picon'>&nbsp;&nbsp;</span>&nbsp;"+"<span class='nameContent'>"+_135+"<input type='button' class='fieldDel' title=\""+_12f.rs_removeMember_title+"\" onclick='_memberList.removeMember(_memberList.members["+i+"])'>"+"<a href='#' class='lotusAltText' title=\""+_12f.rs_removeMember_title+"\" onclick='_memberList.removeMember(_memberList.members["+i+"])'> X</a>"+"</span></nobr></div>";
_132+="<"+this.members[i].userid+">, ";
}
html+="<input type='hidden' id=\"receivers\" name=\"receivers\" value=\""+_132+"\">";
this.holderElement.innerHTML=html;
if(this.members.length>this.scrollThreshold){
this.holderElement.style.overflow="auto";
this.holderElement.style.height=this.memberElementHeight*this.scrollThreshold+"px";
this.holderElement.scrollTop=(this.members.length-this.scrollThreshold)*this.memberElementHeight;
}
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.holderElement);
}
};
}
if(!dojo._hasResource["lconn.blogs.TimezonePicker"]){
dojo._hasResource["lconn.blogs.TimezonePicker"]=true;
dojo.provide("lconn.blogs.TimezonePicker");
getClientBrowserTimezone=function(){
var _136=function(_137){
var _138;
_137=Math.abs(_137);
var a=Math.floor(_137);
var b=(_137-a)*60;
if(_137<10){
_138="0"+a+(b==0?"00":b);
}else{
_138=""+a+(b==0?"00":b);
}
return _138;
};
timeZoneMapping={"n1200":"Etc/GMT+12","n1100":"Pacific/Pago_Pago","n1000":"Pacific/Honolulu","n0900":"America/Anchorage","n0800":"America/Los_Angeles","n0700":"America/Phoenix","n0600":"America/Guatemala","n0500":"America/Lima","n0400":"America/Halifax","n0330":"America/St_Johns","n0300":"America/Sao_Paulo","n0200":"Atlantic/South_Georgia","n0100":"Atlantic/Azores","_00":"Africa/Casablanca","p0100":"Europe/Amsterdam","p0200":"Asia/Amman","p0300":"Asia/Baghdad","p0330":"Asia/Tehran","p0400":"Asia/Muscat","p0430":"Asia/Kabul","p0500":"Asia/Yekaterinburg","p0530":"Asia/Calcutta","p0545":"Asia/Katmandu","p0600":"Asia/Almaty","p0630":"Asia/Rangoon","p0700":"Asia/Bangkok","p0800":"Asia/Hong_Kong","p0900":"Asia/Tokyo","p0930":"Australia/Adelaide","p1000":"Australia/Brisbane","p1100":"Pacific/Noumea","p1200":"Pacific/Auckland","p1300":"Pacific/Tongatapu"};
var date=new Date();
var _13c=date.toString();
_13c=_13c.substring(_13c.length-8);
if(_13c==dojo.byId("serverDefaultTimezoneOffset")&&dojo.byId("serverDefaultTimezoneID")!=""){
return dojo.byId("serverDefaultTimezoneID");
}
var _13d=date.getTimezoneOffset()/60;
var _13e;
if(_13d<0){
_13e="p"+_136(_13d);
}else{
if(_13d>0){
_13e="n"+_136(_13d);
}else{
_13e="_00";
}
}
var _13f=eval("timeZoneMapping."+_13e);
return _13f;
};
}
if(!dojo._hasResource["lconn.blogs.TabContainer"]){
dojo._hasResource["lconn.blogs.TabContainer"]=true;
dojo.provide("lconn.blogs.TabContainer");
dojo.declare("lconn.blogs.TabContainer",[dijit._Widget,dijit._Templated,dijit._Container],{selected:"",templateString:"<DIV>"+"<DIV class=\"lotusTabContainer\">"+"<UL class=\"lotusTabs\" dojoAttachPoint=\"tabsNode\"></UL>"+"</DIV>"+"<DIV dojoAttachPoint=\"containerNode\" style=\"height:auto !important\"></DIV>"+"</DIV>",startup:function(){
if(this._started){
return;
}
dojo.forEach(this.getChildren(),function(item){
this.addTab(item);
},this);
this.inherited(arguments);
},addTab:function(_141){
var li=document.createElement("LI");
li.name=_141.name;
dojo.addClass(li,"lotusTab");
this.tabsNode.appendChild(li);
var div=document.createElement("DIV");
li.appendChild(div);
var link=document.createElement("A");
link.title=_141.title;
link.href="#";
link.onclick=dojo.hitch(this,"selectTab",_141.name);
link.innerHTML=_141.title;
div.appendChild(link);
if(_141.name==this.selected){
dojo.addClass(li,"lotusSelected");
li.style.fontWeight="bold";
_141.domNode.style.display="";
}
},selectTab:function(name,_146){
if(!_146&&this.selected==name){
return false;
}
this.selected=name;
dojo.forEach(dojo.query(".lotusTab",this.tabsNode),function(item){
if(item.name==name){
dojo.addClass(item,"lotusSelected");
item.style.fontWeight="bold";
}else{
dojo.removeClass(item,"lotusSelected");
item.style.fontWeight="";
}
});
dojo.forEach(dojo.query(".lotusTabContent",this.containerNode),function(item){
item.style.display=(dojo.attr(item,"name")==name)?"":"none";
});
return false;
}});
dojo.declare("lconn.blogs.TabContent",[dijit._Widget,dijit._Templated,dijit._Contained],{name:"",title:"",templateString:"<DIV dojoAttachPoint=\"containerNode\" name=\"${name}\" class=\"lotusTabContent\" style=\"display:none;\"></DIV>"});
}
if(!dojo._hasResource["lconn.blogs.notification.receivers"]){
dojo._hasResource["lconn.blogs.notification.receivers"]=true;
dojo.provide("lconn.blogs.notification.receivers");
dojo.declare("lconn.blogs.notification.receivers",[dijit._Widget,dijit._Templated],{templateString:"<DIV>"+"<DIV class=\"lotusFilters\" dojoAttachPoint=\"receiverList_AP\"></DIV>"+"<INPUT type=\"hidden\" name=\"receivers\" dojoAttachPoint=\"receivers_AP\" value=\"\">"+"</DIV>",receivers:[],startup:function(){
this.receivers_AP.clear=dojo.hitch(this,"clear");
},form:function(){
return this.receivers_AP.form;
},onChange:null,add:function(_149,_14a){
var t=[];
for(var i=0;i<this.receivers.length;i++){
if(this.receivers[i].extid!=_149){
t.push(this.receivers[i]);
}
}
t.push({"extid":_149,"fullname":_14a});
this.receivers=t;
if(this.onChange){
this.onChange({"extid":_149,"fullname":_14a},"add");
}
this.repaint();
},remove:function(_14d){
var t=[];
for(var i=0;i<this.receivers.length;i++){
if(this.receivers[i].extid!=_14d){
t.push(this.receivers[i]);
}
}
this.receivers=t;
if(this.onChange){
this.onChange({"extid":_14d},"remove");
}
this.repaint();
},clear:function(){
this.receivers=[];
if(this.onChange){
this.onChange(this.receivers);
}
this.repaint();
},repaint:function(){
var _150=dojo.i18n.getLocalization("lconn.blogs","strings");
var s="";
for(var i=0;i<this.receivers.length;i++){
if(s.length>0){
s=s+", ";
}
s=s+"<"+this.receivers[i].extid+">";
}
this.receivers_AP.value=s;
this.receiverList_AP.innerHTML="";
for(var i=0;i<this.receivers.length;i++){
var t=document.createElement("span");
dojo.addClass(t,"vcard");
var link=document.createElement("a");
link.href="javascript:;";
dojo.attr(link,"extid",this.receivers[i].extid);
dojo.addClass(link,"lotusFilter");
link.style.marginBottom="2px";
dojo.connect(link,"onkeydown",this,function(e){
if(e.keyCode==dojo.keys.DELETE){
this.remove(dojo.attr(link,"extid"));
}
});
t.appendChild(link);
var nobr=document.createElement("nobr");
link.appendChild(nobr);
var _157=document.createElement("span");
dojo.addClass(_157,"lotusPerson");
dojo.addClass(_157,"fn");
dojo.addClass(_157,"person");
_157.innerHTML=this.receivers[i].fullname;
nobr.appendChild(_157);
var _158=document.createElement("span");
_158.title=_150.rs_removeMember_title;
_158.innerHTML="X";
dojo.addClass(_158,"lotusClose");
_158.onclick=dojo.hitch(this,"remove",this.receivers[i].extid);
nobr.appendChild(_158);
var _159=document.createElement("span");
_159.style.display="none";
dojo.addClass(_159,"x-lconn-userid");
_159.innerHTML=this.receivers[i].extid;
t.appendChild(_159);
if(i>0){
this.receiverList_AP.appendChild(document.createTextNode(" "));
}
this.receiverList_AP.appendChild(t);
}
if(window.SemTagSvc&&SemTagSvc.parseDom){
SemTagSvc.parseDom(0,this.receiverList_AP);
}
}});
}
if(!dojo._hasResource["lconn.blogs.Menu"]){
dojo._hasResource["lconn.blogs.Menu"]=true;
dojo.provide("lconn.blogs.Menu");
dojo.declare("lconn.blogs.PopupClass",null,{open:{},returnFocusElement:false,numOpenPopups:0,passedState:{},toggler:null,CONTAINER:"oa-popup-container",BACKGROUND:"oa-popup-iframe",constructor:function(){
},show:function(id,_15b,_15c){
_15c=_15c||{};
if(this.isOpen(id)){
this.hide(id);
}else{
if(_15c.focus){
this.returnFocusElement=_15c.focus;
}
_15b=dojo.fixEvent(_15b);
var _15d=_15b.target;
var _15e=dojo.byId(id);
var _15f={element:_15e,state:_15c.state||{},placement:_15c.placement||"",callFunction:_15c.closeFunction||""};
var _160=this.getPopupContainer();
_160.appendChild(_15e);
var _161=this.getPopupBackground();
this.open[id]=_15f;
this.numOpenPopups++;
this.sizeBackground(_15e,_161,_15d,_15b);
var _162=this.calculatePosition(_15e,_15d,_15b,_15f.placement);
new Popup.Effect.Appear(id,_162.left,_162.top);
new Popup.Effect.Appear(this.BACKGROUND,_162.left,_162.top);
dojo.stopEvent(_15b);
}
},hide:function(id,_164){
var _165=dojo.byId(id);
dojo.byId(this.BACKGROUND).style.display="none";
new Popup.Effect.Fade(_165);
var _166=this.open[id];
this.numOpenPopups--;
if(this.numOpenPopups==0&&this.returnFocusElement){
dojo.byId(this.returnFocusElement).focus();
this.returnFocusElement=false;
}
this.open[id]=false;
if(dojo.isString(_166.callFunction)){
eval(_166.callFunction);
}else{
if(dojo.isFunction(_166.callFunction)){
_166.callFunction();
}
}
},isOpen:function(id){
var _168=this.open[id];
return _168!=false&&_168!==null&&_168!==undefined;
},getState:function(id){
return this.open[id].state;
},getReturnFocus:function(){
return this.returnFocusElement;
},clearReturnFocus:function(){
var _16a=this.returnFocusElement;
this.returnFocusElement=false;
return _16a;
},getPopupBackground:function(){
var _16b=dojo.byId(this.BACKGROUND);
if(_16b==null){
var _16b=dojo.doc.createElement("iframe");
_16b.setAttribute("id",this.BACKGROUND);
_16b.setAttribute("frameBorder","no");
_16b.setAttribute("tabindex","-1");
_16b.src="javascript:\"\"";
document.body.appendChild(_16b);
_16b=dojo.byId(this.BACKGROUND);
_16b.style.position="absolute";
_16b.style.left="0";
_16b.style.top="0";
_16b.style.zIndex="899";
}else{
_16b.style.display="block";
}
return _16b;
},getPopupContainer:function(){
var _16c=dojo.byId(this.CONTAINER);
if(_16c==null){
var _16c=document.createElement("div");
_16c.setAttribute("id",this.CONTAINER);
document.body.appendChild(_16c);
popupBackground=dojo.byId(this.CONTAINER);
popupBackground.style.position="absolute";
popupBackground.style.left="0";
popupBackground.style.top="0";
popupBackground.style.zIndex="1100";
}
return _16c;
},menuGetOffsetTop:function(_16d,_16e){
var _16f=0;
var _170=_16d;
while(_170){
_16f+=_170.offsetTop;
_170=_170.offsetParent;
if(_170){
_16f-=_170.scrollTop;
}
}
return _16f;
},menuGetOffsetLeft:function(_171,_172){
var _173=0;
var _174=_171;
while(_174){
_173+=_174.offsetLeft;
_174=_174.offsetParent;
if(_174){
_173-=_174.scrollLeft;
}
}
return _173;
},calculatePosition:function(_175,_176,_177,_178){
var _179;
if(_178==""){
if(typeof (bidir)!="undefined"&&bidir!=null&&bidir=="rtl"){
_179=(_175.offsetWidth>0)?_175.offsetWidth:175;
_179=24-_179;
}else{
_179=_176.offsetWidth-24;
}
var _17a=(this.menuGetOffsetTop(_176,0)+_176.offsetHeight-10);
var _17b=(this.menuGetOffsetLeft(_176,0)+_179);
}else{
_179=0;
var _17c=_178.split(",");
switch(_17c[0]){
case "left":
_17b=this.menuGetOffsetLeft(_176,0);
break;
case "right":
_17b=this.menuGetOffsetLeft(_176,0)+_176.offsetWidth;
break;
default:
_17b=parseInt(_17c[0]);
}
switch(_17c[1]){
case "above":
_17a=this.menuGetOffsetTop(_176,0)-_175.offsetHeight;
break;
case "top":
_17a=this.menuGetOffsetTop(_176,0);
break;
case "bottom":
_17a=this.menuGetOffsetTop(_176,0)+_176.offsetHeight;
break;
default:
_17a=parseInt(_17c[1]);
}
}
var body=document.documentElement?document.documentElement:document.body;
var _17e=window.innerHeight?window.innerHeight:body.clientHeight;
var _17f=window.innerWidth?window.innerWidth:body.clientWidth;
var _180=document.all?document.body.scrollLeft:window.pageXOffset;
var _181=document.all?document.body.scrollTop:window.pageYOffset;
if((_17a+_175.offsetHeight)>(_17e+_181)){
_17a-=_175.offsetHeight;
}
if((_17b+_175.offsetWidth)>(_17f+_180)){
_17b-=_175.offsetWidth;
}
if(_17a<_181){
_17a=_181;
}
if(_17b<_180){
_17b=_180;
}
if(dojo.isSafari){
_17b+=_180;
_17a+=_181;
}
return {left:_17b+"px",top:_17a+"px"};
},sizeBackground:function(_182,_183,_184,_185){
dojo.style(_182,"display","inline");
_183.width=_182.offsetWidth;
_183.height=_182.offsetHeight;
}});
dojo.declare("lconn.blogs.MenuPopupClass",lconn.blogs.PopupClass,{currentMenu:false,hideMenu:function(_186){
if(this.currentMenu){
this.hide(this.currentMenu);
this.currentMenu=false;
}
},showMenu:function(id,_188,_189){
var _18a=this.currentMenu;
this.hideMenu();
if(id!=_18a){
this.currentMenu=id;
this.show(id,_188,_189);
}
},hideOnKeypress:function(_18b){
if(typeof (_18b)!="undefined"&&_18b!==null&&_18b.keyCode==Event.KEY_ESC){
MenuPopup.hideMenu();
}
},isMenuOpen:function(){
if(this.currentMenu){
return true;
}
return false;
},getState:function(){
if(this.currentMenu){
return this.open[this.currentMenu].state;
}
}});
Popup=new lconn.blogs.PopupClass();
MenuPopup=new lconn.blogs.MenuPopupClass();
Popup.Effect={};
Popup.Effect.DURATION=250;
Popup.Effect.Fade=function(_18c){
_18c=dojo.byId(_18c);
var _18d=dojo.style(_18c,"opacity");
var anim=dojo.fadeOut({node:_18c,duration:Popup.Effect.DURATION});
dojo.connect(anim,"onEnd",function(){
dojo.style(_18c,"opacity",_18d);
dojo.style(_18c,"left","-9999px");
dojo.style(_18c,"display","none");
});
anim.play();
};
Popup.Effect.Appear=function(_18f,x,y){
_18f=dojo.byId(_18f);
dojo.style(_18f,"opacity",0);
dojo.style(_18f,"left",x);
dojo.style(_18f,"top",y);
dojo.style(_18f,"display","inline");
dojo.fadeIn({node:_18f,duration:Popup.Effect.DURATION}).play();
};
}
if(!dojo._hasResource["lconn.blogs.TypeAhead"]){
dojo._hasResource["lconn.blogs.TypeAhead"]=true;
dojo.provide("lconn.blogs.TypeAhead");
dojo.declare("lconn.blogs.TypeAhead",[lconn.core.TypeAhead],{onsubmit:"",_onKeyPress:function(evt){
var _193=this._isShowingNow;
this.inherited("_onKeyPress",arguments);
var key=evt.charOrCode;
if(evt.altKey||(evt.ctrlKey&&(key!="x"&&key!="v"))||evt.key==dojo.keys.SHIFT){
return;
}
var pw=this._popupWidget;
var dk=dojo.keys;
switch(key){
case dk.ENTER:
if(!_193&&this.onsubmit!=""){
eval(this.onsubmit);
}
}
}});
}
if(!dojo._hasResource["lconn.core.TypeAheadDataStore"]){
dojo._hasResource["lconn.core.TypeAheadDataStore"]=true;
dojo.provide("lconn.core.TypeAheadDataStore");
dojo.declare("lconn.core.TypeAheadDataStore",null,{constructor:function(_197,node){
this.queryParam=(_197.queryParam?_197.queryParam:node.getAttribute("queryParam"));
this.url=(_197.url?_197.url:node.getAttribute("url"));
},queryParam:"",cache:[],fetch:function(_199){
var _19a={};
this.searchDirectory=(_199.searchDirectory?true:false);
if(typeof this.cache[_199.query.toLowerCase()]=="object"){
_199.onComplete(this.cache[_199.query.toLowerCase()],_199);
return _199;
}
if(this.queryParam){
_19a[this.queryParam]=_199.query;
}
dojo.xhrPost({url:this.url,content:_19a,handleAs:"json-comment-optional",timeout:5000,contentType:"application/x-www-form-urlencoded;charset=UTF-8",load:dojo.hitch(this,function(data){
this.cache[_199.query.toLowerCase()]=data;
if(_199.onComplete){
_199.onComplete(data,_199);
}
}),error:function(){
console.log("There was an error");
}});
return _199;
},getValue:function(item,_19d,_19e){
return item;
}});
}
if(!dojo._hasResource["lconn.core.FilteringCheckbox"]){
dojo._hasResource["lconn.core.FilteringCheckbox"]=true;
dojo.provide("lconn.core.FilteringCheckbox");
var w={};
w.templateString="<div class=\"notifyList lotusHidden\">    \r\n    <fieldset>\r\n        <legend dojoAttachPoint=\"notifyControlsLegend_AP\" style=\"display:none;\"></legend>\r\n        <div class=\"lotusSearch\">\r\n        <label for=\"${id}FilterTextbox\" style=\"display:none;\">${rs_filterListPrompt}</label>\r\n        <input class=\"lotusInactive\" type=\"text\" id=\"${id}FilterTextbox\"\r\n            dojoAttachPoint=\"filterTextbox_AP\" value=\"${rs_filterListPrompt}\"\r\n            dojoAttachEvent=\"onfocus:readySearch, onkeypress:timedFilter, onchange:timedFilter\"></input>\r\n        </div>\r\n        <div class=\"peopleList\"  dojoAttachPoint=\"notifyList_AP\" tabindex=\"-1\"></div>\r\n        <div dojoAttachPoint=\"notifyPaging_AP\" class=\"lotusTiny lotusHidden\"></div>    \r\n    </fieldset>\r\n</div>\r\n";
w.rs_filterListPrompt="rs_filterListPrompt";
w.rs_navPrevLabel="rs_navPrevLabel";
w.rs_navNextLabel="rs_navNextLabel";
w.rs_pagepos="rs_pagepos";
w.rs_loading="rs_loading";
w.gotList=false;
w.oldTextValue="";
w.dirty=false;
w.currPage=1;
w.peopleSelected=null;
w.peopleList=null;
w.filterTimer=null;
w.autoFiltertime=200;
w.controlsLegend="";
w.feedFunction=null;
w.isSingleSelect=false;
w.defaultSelectText=null;
w.defaultSelectValue=null;
w.lastPersonSelected=null;
w.domNode=null;
w.notifyList_AP=null;
w.notifyPaging_AP=null;
w.filterTextbox_AP=null;
w.notifyControlsLegend_AP=null;
w.postMixInProperties=function postMixInProperties(){
this.loadDefaultBundle();
var b=this.resBundle;
this.rs_filterListPrompt=b[this.rs_filterListPrompt];
this.rs_navPrevLabel=b[this.rs_navPrevLabel];
this.rs_navNextLabel=b[this.rs_navNextLabel];
this.rs_pagepos=b[this.rs_pagepos];
this.rs_loading=b[this.rs_loading];
};
w.postCreate=function postCreate(){
this.notifyControlsLegend_AP.innerHTML=this.controlsLegend;
this.reset();
};
w.getList=function getList(){
if(!this.gotList){
this.gotList=true;
this.notifyList_AP.innerHTML=this.rs_loading;
this.feedFunction(this.currPage,dojo.hitch(this,"parsePeople"));
}
dojo.removeClass(this.domNode,"lotusHidden");
};
w.setFocus=function setFocus(){
dijit.focus(this.filterTextbox_AP);
};
w.isDirty=function isDirty(){
return this.dirty;
};
w.setDisabled=function setDisabled(_1a0){
var _1a1=document.getElementsByName(this.id+"notifyPerson");
var _1a2=document.getElementById(this.id+"pagingButtons");
if(_1a0){
if(_1a2){
dojo.addClass(_1a2,"lotusHidden");
}
}else{
if(_1a2){
dojo.removeClass(_1a2,"lotusHidden");
}
}
this.filterTextbox_AP[(_1a0?"setAttribute":"removeAttribute")]("disabled",true);
for(var i=0;i<_1a1.length;i++){
_1a1[i][(_1a0?"setAttribute":"removeAttribute")]("disabled",true);
var _1a4=document.getElementById(_1a1[i].id+"Label");
if(_1a4){
_1a4[(_1a0?"setAttribute":"removeAttribute")]("disabled",true);
}
if(_1a0){
_1a1[i].checked=false;
}else{
_1a1[i].checked=!!this.peopleSelected[_1a1[i].value];
}
}
};
w.reset=function reset(){
this.currPage=1;
this.gotList=false;
this.peopleList=null;
this.peopleSelected=new Object();
this.filterTextbox_AP.value=this.rs_filterListPrompt;
dojo.addClass(this.filterTextbox_AP,"lotusInactive");
this.oldTextValue="";
if(this.filterTimer){
window.clearTimeout(this.filterTimer);
}
if(this.isSingleSelect){
if(!this.lastPersonSelected||!this.lastPersonSelected.uuid){
this.lastPersonSelected={uuid:this.defaultSelectValue,name:this.defaultSelectText};
}
this.peopleSelected[this.lastPersonSelected.uuid]=this.lastPersonSelected.name;
}
};
w.readySearch=function readySearch(_1a5){
if(dojo.hasClass(this.filterTextbox_AP,"lotusInactive")){
dojo.removeClass(this.filterTextbox_AP,"lotusInactive");
window.setTimeout(dojo.hitch(this,function(){
this.filterTextbox_AP.select();
}),0);
}
};
w.timedFilter=function timedFilter(_1a6){
if(this.filterTimer){
window.clearTimeout(this.filterTimer);
this.filterTimer=null;
}
this.filterTimer=window.setTimeout(dojo.hitch(this,"filterNames"),this.autoFiltertime);
};
w.filterNames=function filterNames(_1a7){
if(this.peopleList&&this.filterTextbox_AP.value!=this.oldTextValue&&this.filterTextbox_AP.value!=this.rs_filterListPrompt){
this.oldTextValue=this.filterTextbox_AP.value;
this.showList(this.peopleList);
}
};
w.parsePeople=function parsePeople(feed){
this.peopleList=feed;
this.showList(feed);
};
w.showList=function showList(feed){
this.notifyList_AP.innerHTML="";
var _1aa,node,opt,_1ad,_1ae,_1af;
if(!dojo.hasClass(this.filterTextbox_AP,"lotusInactive")){
_1af=this.filterTextbox_AP.value;
}
if(_1af){
_1af=dojo.regexp.escapeString(_1af);
var _1b0=_1af.replace(/\s+/g," ").split(" ");
_1af="(?=.*"+_1b0.join(")(?=.*")+")";
_1ae=new RegExp(_1af,"i");
}
if(this.isSingleSelect&&this.currPage==1&&!_1ae){
this.createOption("X",this.defaultSelectText,this.defaultSelectValue);
}
for(var i=0;i<feed.names.length;i++){
if(_1ae){
var eml=feed.names[i].email;
if(eml){
eml=eml.substring(0,eml.indexOf("@"));
}
if(!_1ae.test(feed.names[i].name)&&!_1ae.test(eml)){
continue;
}
}
this.createOption(i,feed.names[i].name,feed.names[i].userid);
}
if(feed.hasNext||feed.hasPrev){
this.notifyPaging_AP.innerHTML="";
var _1b3="";
if(feed.startIndex&&feed.totalResults){
var _1b4=feed.startIndex;
var _1b5=_1b4+feed.names.length-1;
_1b3=dojo.string.substitute(this.rs_pagepos,[_1b4,_1b5,feed.totalResults]);
}
var _1b6=document.createTextNode(_1b3);
var _1b7=document.createElement("ul");
_1b7.id=this.id+"pagingButtons";
_1b7.className="lotusRight lotusInlinelist";
var link=document.createElement("a");
link.innerHTML=this.rs_navNextLabel;
link.href="javascript:void(0)";
link.onclick=dojo.hitch(this,"notifyNext");
var next=document.createElement("li");
next.appendChild(link);
link=document.createElement("a");
link.innerHTML=this.rs_navPrevLabel;
link.href="javascript:void(0)";
link.onclick=dojo.hitch(this,"notifyPrev");
var prev=document.createElement("li");
prev.appendChild(link);
if(feed.hasPrev){
_1b7.appendChild(prev);
dojo.addClass(prev,"lotusFirst");
}
if(feed.hasNext){
_1b7.appendChild(next);
if(!feed.hasPrev){
dojo.addClass(next,"lotusFirst");
}
}
this.notifyPaging_AP.appendChild(_1b7);
this.notifyPaging_AP.appendChild(_1b6);
dojo.removeClass(this.notifyPaging_AP,"lotusHidden");
}
};
w.createOption=function createOption(id,_1bc,_1bd){
var node,opt,_1c0;
node=document.createElement("div");
if(this.isSingleSelect){
if(dojo.isIE){
opt=document.createElement("<input type=\"radio\" name=\"assignToGroup\" />");
}else{
opt=document.createElement("input");
}
opt.type="radio";
opt.name="assignToGroup";
}else{
node.className="notifyPerson lotusLeft";
if(dojo.isIE){
opt=document.createElement("<input name='"+this.id+"notifyPerson'>");
}else{
opt=document.createElement("input");
opt.setAttribute("name",this.id+"notifyPerson");
}
opt.className="lotusLeft";
opt.type="checkbox";
}
opt.id=this.id+"notifyCheckbox"+id;
opt.value=_1bd;
this.connect(opt,"onclick","setValue");
this.connect(opt,"onclick","setDirty");
_1c0=document.createElement("label");
_1c0.innerHTML=lconn.core.HTMLUtil.escapeText(_1bc);
_1c0.htmlFor=opt.id;
_1c0.id=opt.id+"Label";
if(!this.isSingleSelect){
_1c0.className="lotusLeft";
}
node.appendChild(opt);
node.appendChild(_1c0);
this.notifyList_AP.appendChild(node);
if(this.peopleSelected[_1bd]){
opt.checked=true;
}
};
w.setDirty=function setDirty(){
this.dirty=true;
};
w.setValue=function setValue(_1c1){
var _1c2={uuid:_1c1.target.value,name:document.getElementById(_1c1.target.id+"Label").innerHTML};
if(this.isSingleSelect){
delete this.peopleSelected[this.lastPersonSelected.uuid];
this.lastPersonSelected=_1c2;
this.peopleSelected[_1c2.uuid]=_1c2.name;
}else{
if(_1c1.target.checked){
this.peopleSelected[_1c2.uuid]=_1c2.name;
}else{
delete this.peopleSelected[_1c2.uuid];
}
}
this.personSelected(_1c2,_1c1.target.checked);
};
w.personSelected=function personSelected(_1c3,_1c4){
};
w.clearSearch=function clearSearch(){
dojo.addClass(this.filterTextbox_AP,"lotusInactive");
this.filterTextbox_AP.value=this.rs_filterListPrompt;
};
w.notifyNext=function(){
this.clearSearch();
this.notifyList_AP.innerHTML="";
++this.currPage;
this.gotList=false;
this.getList();
};
w.notifyPrev=function(){
this.clearSearch();
this.notifyList_AP.innerHTML="";
if(this.currPage>1){
--this.currPage;
}
this.gotList=false;
this.getList();
};
dojo.declare("lconn.core.FilteringCheckbox",[lconn.core.Res,dijit._Widget,dijit._Templated],w);
}
if(!dojo._hasResource["lconn.core.MenuUtility"]){
dojo._hasResource["lconn.core.MenuUtility"]=true;
dojo.provide("lconn.core.MenuUtility");
dojo.declare("lconn.core.MenuUtility",null,{openedBy:null,openMenu:function(evt,_1c6){
var menu=dijit.byId(_1c6);
evt=dojo.fixEvent(evt);
var _1c8=evt.target;
function closeAndRestoreFocus(){
try{
dijit.focus(_1c8);
}
catch(exception){
}
dijit.popup.close(menu);
};
dijit.popup.open({popup:menu,around:evt.target,orient:dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"},onExecute:closeAndRestoreFocus,onCancel:closeAndRestoreFocus});
menu.focus();
dojo.connect(menu,"_onBlur",function(){
dijit.popup.close(menu);
});
dojo.stopEvent(evt);
},openMenuA11y:function(evt,_1ca){
if(evt.keyCode==dojo.keys.ENTER){
this.openMenu(evt,_1ca);
}
}});
menuUtility=new lconn.core.MenuUtility();
lconn.core.MenuUtility.open=function(_1cb,e){
menuUtility.openMenu(e,_1cb);
};
}
if(!dojo._hasResource["lconn.core.LanguageSelector"]){
dojo._hasResource["lconn.core.LanguageSelector"]=true;
dojo.provide("lconn.core.LanguageSelector");
dojo.declare("lconn.core.LanguageSelector",null,{_jsonString:null,_selectorNode:null,_menu:null,_cookieProperties:null,COOKIE_NAME:null,constructor:function(_1cd,_1ce,_1cf,_1d0){
this._selectorNode=_1cd;
this._jsonString=_1ce;
this._cookieProperties=_1d0;
this.COOKIE_NAME=_1cf;
this._setSelectorLabel();
dojo.connect(this._selectorNode,"onclick",dojo.hitch(this,"_openMenu"));
},_openMenu:function(evt){
try{
this._buildLanguageMenu();
menuUtility.openMenu(evt,this._menu.id);
dojo.stopEvent(evt);
}
catch(e){
console.log(e);
}
},_setSelectorLabel:function(){
var _1d2=dojo.cookie(this.COOKIE_NAME);
var res=new lconn.core.Res();
res.loadDefaultBundle();
this.strBundle=res.resBundle;
if(_1d2!=null){
for(var key in this._jsonString){
if(this._isCodeEqual(key,_1d2)){
this._selectorNode.innerHTML=this._jsonString[key]+" &#9660;";
break;
}
}
if(!this._isCodeEqual(key,_1d2)){
this._selectorNode.innerHTML=this.strBundle.rs_customLangaugeLinkLabel+" &#9660;";
}
}else{
this._selectorNode.innerHTML=this.strBundle.rs_customLangaugeLinkLabel+" &#9660;";
}
},_buildLanguageMenu:function(){
if(this._menu==null){
this._menu=new dijit.Menu();
for(var key in this._jsonString){
this._menu.addChild(this._buildMenuItem(this._jsonString[key],key));
}
var res=new lconn.core.Res();
res.loadDefaultBundle();
this.strBundle=res.resBundle;
this._menu.addChild(this._buildMenuItem(this.strBundle.rs_browser_setting,"BD"));
this._menu.domNode.style.display="none";
dojo.body().appendChild(this._menu.domNode);
var that=this;
dojo.connect(this._menu,"onItemClick",function(item){
if((item!=null)&&(typeof item.language!="undefined")){
dojo.cookie(that.COOKIE_NAME,item.language,that._cookieProperties);
var _1d9=null;
var _1da=document.getElementById("REFRESH_URL");
if(_1da!=null){
_1d9=_1da.getAttribute("href");
}else{
_1d9=window.location.href;
}
if(_1d9.indexOf("lang=")>0){
var _1db=/([\&\?])(lang=)([^\&\#]*)/g;
var _1dc=null;
if(item.language&&item.language!=="BD"){
_1dc=_1d9.replace(_1db,function(){
var _1dd=arguments[1]+arguments[2]+item.language;
return _1dd;
});
}else{
_1dc=_1d9.replace(_1db,function(){
var _1de=arguments[1];
return _1de;
});
}
window.location=_1dc;
if(_1dc.indexOf("#")!==-1){
window.location.reload(false);
}
}else{
window.location=_1d9;
if(_1d9.indexOf("#")!==-1){
window.location.reload(false);
}
}
}
});
}
},_buildMenuItem:function(_1df,_1e0){
var item=new dijit.MenuItem({label:_1df});
item.language=_1e0;
return item;
},_isCodeEqual:function(_1e2,_1e3){
var str1=_1e2.toLowerCase().replace(/-/,"_");
var str2=_1e3.toLowerCase().replace(/-/,"_");
return str1===str2;
}});
}
if(!dojo._hasResource["com.ibm.ajax.auth"]){
dojo._hasResource["com.ibm.ajax.auth"]=true;
dojo.provide("com.ibm.ajax.auth");
com.ibm.ajax.auth={prepareSecure:function(args,_1e7,_1e8){
if(args["com.ibm.ajax.auth.prepareSecureCalled"]){
return args;
}else{
args["com.ibm.ajax.auth.prepareSecureCalled"]=true;
}
args._handle=args.handle;
args.handle=dojo.partial(this.testAuthenticationHandler,this,_1e7,_1e8);
return args;
},setAuthenticationHandler:function(_1e9){
this.authenticationHandler=_1e9;
},setTestAuthenticationHandler:function(_1ea){
this.testAuthenticationHandler=_1ea;
},setDefaultAuthenticationTests:function(_1eb,_1ec,_1ed){
this.checkFromCaller=_1eb;
this.checkByContentType=_1ec;
this.checkByStatusCode=_1ed;
},addAuthenticationCheck:function(_1ee){
if(_1ee){
this.authenticationChecks.push(_1ee);
}
},isAuthenticationRequired:function(_1ef,_1f0){
if(_1f0.xhr&&(!_1ef||dojo.indexOf(["cancel","timeout"],_1ef.dojoType)==-1)){
var _1f1;
try{
_1f1=_1f0.xhr.status;
}
catch(e){
}
var _1f2=_1f0.args.expectedContentType;
if(!_1f2){
_1f2=_1f0.args.handleAs;
}
var _1f3=dojo.indexOf(["xml","json","json-comment-optional"],_1f2)!=-1;
if(window.debugMode!=null){
console.log("auth::isAuthenticationRequired DEBUG expectedContentType: "+_1f2+" restContentExpected: "+_1f3+" for "+_1f0.args.url);
}
if(this.checkByContentType&&_1f3&&/^text\/html/.exec(_1f0.xhr.getResponseHeader("Content-Type"))&&_1f1>=200&&_1f1<300){
console.log("auth::isAuthenticationRequired DEBUG content type does not match request, assume logged out");
return true;
}
if(this.checkByStatusCode&&_1f3){
if(_1f1==302){
console.log("auth::isAuthenticationRequired DEBUG redirect received, assume login request");
return true;
}
if(_1f1==401){
console.log("auth::isAuthenticationRequired DEBUG 401 Unauthorized, assume login required");
return true;
}
if(dojo.isIE&&(_1f1==0||_1f1=="unknown")){
console.log("auth::isAuthenticationRequired DEBUG status code was 0 or 'unknown' in IE, assume login request");
return true;
}
}
}
for(var i=0;i<this.authenticationChecks.length;i++){
if(this.authenticationChecks[i](this,_1ef,_1f0)){
return true;
}
}
return false;
},testAuthenticationHandler:function(auth,_1f6,_1f7,_1f8,_1f9){
var args=dojo._toArray(arguments).slice(3);
var _1fb=false;
if(!_1f8||dojo.indexOf(["cancel","timeout"],_1f8.dojoType)==-1){
if(auth.checkFromCaller&&typeof _1f6=="function"&&_1f6(_1f8,_1f9)){
console.log("auth::_testAuthentication DEBUG caller provided detection logic that indicated form login, assume logged out");
_1fb=true;
}else{
_1fb=auth.isAuthenticationRequired(_1f8,_1f9,_1f6);
}
}
if(_1fb){
var path=auth._parseUri(_1f9.args.url).path;
dojo.cookie("WASPostParam",null,{expires:-1,path:path});
dojo.cookie("WASReqURL",null,{expires:-1,path:"/"});
auth.authenticationHandler(_1f8,_1f9,_1f7);
args[0]=new Error("xhr unauthenticated");
args[0].dojoType="unauthenticated";
}
if(_1f9.args._handle){
return _1f9.args._handle.apply(this,args);
}else{
return (_1f8);
}
},_parseUri:function(uri){
if(!uri){
return null;
}
uri=new dojo._Url(uri);
var _1fe=this._splitQuery(uri.query);
uri.queryParameters=_1fe;
return uri;
},_splitQuery:function(_1ff){
var _200={};
if(!_1ff){
return _200;
}
if(_1ff.charAt(0)=="?"){
_1ff=_1ff.substring(1);
}
var args=_1ff.split("&");
for(var i=0;i<args.length;i++){
if(args[i].length>0){
var _203=args[i].indexOf("=");
if(_203==-1){
var key=decodeURIComponent(args[i]);
var _205=_200[key];
if(dojo.isArray(_205)){
_205.push("");
}else{
if(_205){
_200[key]=[_205,""];
}else{
_200[key]="";
}
}
}else{
if(_203>0){
var key=decodeURIComponent(args[i].substring(0,_203));
var _206=decodeURIComponent(args[i].substring(_203+1));
var _205=_200[key];
if(dojo.isArray(_205)){
_205.push(_206);
}else{
if(_205){
_200[key]=[_205,_206];
}else{
_200[key]=_206;
}
}
}
}
}
}
return _200;
},checkFromCaller:true,checkByContentType:true,checkByStatusCode:true,authenticationChecks:[],authenticationHandler:function(){
console.log("auth::authenticationHandler DEBUG authentication was required");
}};
}
dojo.declare("lconn.MenuUtility",null,{openedBy:null,openMenu:function(evt,_208){
var menu=dijit.byId(_208);
evt=dojo.fixEvent(evt);
this.openedBy=evt.target;
dijit.popup.open({popup:menu,around:evt.target,orient:{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"},onExecute:function(){
},onCancel:function(){
dijit.popup.close(menu);
},onClose:function(){
try{
evt.target.focus();
}
catch(exception){
setTimeout(function(){
try{
evt.target.focus();
}
catch(exception2){
}
},1000);
}
}});
menu.focus();
dojo.connect(menu,"_onBlur",function(){
dijit.popup.close(menu);
});
dojo.stopEvent(evt);
},openMenuA11y:function(evt,_20b){
if(evt.keyCode==dojo.keys.ENTER){
this.openMenu(evt,_20b);
}
}});
menuUtility=new lconn.MenuUtility();
if(!dojo._hasResource["com.ibm.mm.livetext.serviceImpl"]){
dojo._hasResource["com.ibm.mm.livetext.serviceImpl"]=true;
dojo.provide("com.ibm.mm.livetext.serviceImpl");
dojo.declare("com.ibm.mm.livetext.serviceImpl",null,{_tagTypes:null,tagChanged:"/com/ibm/mashups/livetext/livetextchanged",tagStatusChange:"/com/ibm/mashups/livetext/livetextchanged",tagContentChanged:"/com/ibm/mashups/livetext/livetextcontentchanged",entryAdded:"/com/ibm/mashups/livetext/configentryadded",entryRemoved:"/com/ibm/mashups/livetext/configentryremoved",init:function(){
this._loadTags();
dojo.subscribe(this.tagChanged,this,"onTagChanged");
dojo.subscribe(this.tagContentChanged,this,"onTagContentChanged");
dojo.subscribe(this.entryAdded,this,"onAddConfigEntry");
dojo.subscribe(this.entryRemoved,this,"onRemoveConfigEntry");
dojo.publish(this.tagContentChanged,[document,true]);
},_getNodes:function(node,_20d){
if(_20d.processEnclosedTags){
return dojo.query(_20d.match,node);
}else{
var a=dojo.query(_20d.match+" "+_20d.match,node);
var b=dojo.query(_20d.match,node);
var _210,_211;
while(a.length>0){
_210=a[0];
_211=0;
while(_211<b.length){
if(_210==b[_211]){
a.splice(0,1);
b.splice(_211,1);
break;
}else{
_211++;
}
}
}
return b;
}
},onTagChanged:function(node,_213,_214,_215){
var tag=null,_217=null,tags=null;
for(var _219=0;_219<this._tagTypes.length;_219++){
tag=this._tagTypes[_219];
this._processTypeTag(node,tag,_213,_214,_215,true);
}
},onTagContentChanged:function(node,_21b,_21c,_21d){
var tag=null,_21f=null,tags=null;
for(var _221=0;_221<this._tagTypes.length;_221++){
tag=this._tagTypes[_221];
this._processTypeTag(node,tag,_21b,_21c,_21d,false);
}
},_processTypeTag:function(node,tag,_224,_225,_226,_227){
var tags=[];
if(_227&&this._checkRoot(node,tag)){
tags[0]=node;
}
tags=tags.concat(this._getNodes(node,tag));
var _229=[];
_229=_229.concat(tags);
if(_229.length>0){
if(tag.loaded==null){
this._loadTagHandler(tag);
}
var _22a=[];
if(dojo.isFunction(_225)){
try{
_225(node,_229);
}
catch(error){
console.debug(error);
}
}
for(var _22b=0;_22b<tags.length;_22b++){
try{
tag.tagHandler.processTag(tags[_22b]);
}
catch(error){
_22a[_22a.length]=error;
if(_224){
break;
}
}
}
if(dojo.isFunction(_226)){
try{
_226(node,_229,_22a);
}
catch(error){
console.debug(error);
}
}
}
},_checkRoot:function(node,tag){
var _22e=false;
if(node!=null&&node.nodeType){
var _22f=node.cloneNode(false);
var _230=document.createElement("div");
_230.appendChild(_22f);
var _231=this._getNodes(_230,tag);
if(_231!=null&&_231.length>0){
_22e=true;
}
delete _22f;
delete _230;
delete _231;
}
return _22e;
},_loadTags:function(){
if(this._tagTypes==null){
var _232=this;
if(typeof livetextCfg!="undefined"){
this._tagTypes=livetextCfg;
}else{
dojo.xhrGet({url:dojo.moduleUrl("com.ibm.mm.livetext","tagservice.entries.cfg"),handleAs:"text",sync:true,load:function(_233){
_232._tagTypes=dojo.fromJson(_233);
},error:function(data){
console.dir(data);
}});
}
}
},onAddConfigEntry:function(_235){
},onRemoveConfigEntry:function(_236){
},parseDom:function(_237,node){
dojo.publish(this.tagChanged,[node]);
},_loadTagHandler:function(tag){
dojo.registerModulePath(tag.module,tag.path);
dojo.eval("dojo.r"+"equire('"+tag.baseClass+"')");
var _23a="{create:function(){return new "+tag.baseClass+"()}}";
var _23b=dojo.fromJson(_23a);
tag.tagHandler=_23b.create();
tag.loaded=true;
}});
}
if(!dojo._hasResource["lconn.core.url"]){
dojo._hasResource["lconn.core.url"]=true;
dojo.provide("lconn.core.url");
dojo.provide("lconn.core.url.UrlStruct");
dojo.provide("lconn.core.url.ProxyUrlHelper");
lconn.core.url._const={regex:/(^[a-zA-Z]+)\:\/\/([a-zA-Z\d][\a-z\A-Z\d\-\.]*)(:\d{1,5})?([\/\?\#].*)?/,protocolPorts:{"http":80,"https":443}};
dojo.declare("lconn.core.url.UrlStruct",null,{isInvalidUrl:false,url:"",protocol:"",host:"",port:"",hasPort:false,urlRemainder:"",constructor:function(url){
if(url!=null&&url.match(lconn.core.url._const.regex)){
var t=lconn.core.url._const.regex.exec(url);
this.url=t[0];
this.protocol=t[1];
this.host=t[2];
this.port=this._parsePort(t[3]);
this.urlRemainder=t[4];
}else{
this.isInvalidUrl=true;
}
},_parsePort:function(_23e){
if(_23e==null||_23e==""){
return "";
}
this.hasPort=true;
return _23e.substr(_23e.indexOf(":")+1);
},normalizedPort:function(){
var pp=lconn.core.url._const.protocolPorts;
if(this.hasPort){
return this.port;
}else{
if(typeof (pp[this.protocol])=="undefined"){
return "";
}else{
return pp[this.protocol];
}
}
}});
dojo.declare("lconn.core.url.ProxyUrlHelper",null,{proxyURL:"",_proxyStruct:null,constructor:function(_240){
if(_240.length>1&&_240.lastIndexOf("/")==_240.length-1){
_240=_240.substr(0,_240.length-1);
}
this.proxyURL=_240;
this._proxyStruct=new lconn.core.url.UrlStruct(this.proxyURL);
},getProxifiedURL:function(url){
var surl=new lconn.core.url.UrlStruct(url);
var _243=this._proxyStruct;
if(this._matchUrlBase(surl)){
return surl.protocol+"://"+surl.host+(_243.hasPort?":"+_243.port:"")+surl.urlRemainder;
}
return this.proxyURL+"/"+surl.protocol+"/"+surl.host+(surl.hasPort?"%3A"+surl.port:"")+surl.urlRemainder;
},_matchUrlBase:function(surl){
var ps=this._proxyStruct;
return (ps.protocol==surl.protocol&&ps.host==surl.host&&this._matchPort(surl));
},_matchPort:function(surl){
var np=this._proxyStruct.normalizedPort();
return np==surl.normalizedPort();
}});
}
if(!dojo._hasResource["lconn.core.bizCard.bizCardUtils"]){
dojo._hasResource["lconn.core.bizCard.bizCardUtils"]=true;
dojo.provide("lconn.core.bizCard.bizCardUtils");
lconn.core.bizCard.bizCardUtils={isDebug:false,scriptResourceName:"semanticTagService.js",version:"2.5.0.1",scripts:new Array(),css:new Array(),initiated:false,_haveProxy:false,_proxyHelper:null,appChksum:null,init:function(_248){
if(this.initiated==false){
this.baseUrl=lconn.core.bizCard.bizCardUtils.initBaseUrl();
this._initProxyHelper();
this._initAppCksum();
if(window.semtagrs==null){
lconn.core.bizCard.bizCardUtils.loadScript(this.baseUrl+"/resourceStrings.do?t=1");
}
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.debug==true){
lconn.core.bizCard.bizCardUtils.isDebug=true;
}
if(window.SemTagPersonConfig_noCss==null){
if(window.SemTagSvcConfig!=null){
if(SemTagSvcConfig.loadCssFiles==true){
lconn.core.bizCard.bizCardUtils.loadCssIfNeeded();
}
}else{
lconn.core.bizCard.bizCardUtils.loadCssIfNeeded();
}
}
this.initiated=true;
}
},initBaseUrl:function(){
var _249="";
if(window.SemTagSvc_baseUrl!=null){
_249=SemTagSvc_baseUrl;
}else{
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.baseUrl!=null){
_249=SemTagSvcConfig.baseUrl;
}else{
_249=this.getURL(this.scriptResourceName,"script",SemTagSvc.baseUrl,"src").baseUrl;
}
}
return _249;
},_initProxyHelper:function(){
if(window.SemTagSvcConfig!=null&&typeof (window.SemTagSvcConfig.proxyURL)!="undefined"&&window.SemTagSvcConfig.proxyURL.length>0){
this._haveProxy=true;
this._proxyHelper=new lconn.core.url.ProxyUrlHelper(window.SemTagSvcConfig.proxyURL);
}
},_initAppCksum:function(){
this.appChksum=this._getConfigValue("appChksum","UNDEFINED");
},_getConfigValue:function(_24a,_24b){
if(window.SemTagSvcConfig!=null&&typeof (window.SemTagSvcConfig[_24a])!="undefined"){
return window.SemTagSvcConfig[_24a];
}
return _24b;
},appendAppChkSum:function(url){
if(url==null||url.indexOf("acs=")>=0){
return url;
}
var c=null;
if(url.indexOf("?")<0){
c="?";
}else{
c="&";
}
return url+c+"acs="+this.appChksum;
},getService:function(_24e){
for(i=0;i<livetextCfg.length;i++){
var _24f=livetextCfg[i];
if(_24f.id==_24e){
return _24f;
}
}
return null;
},processUntilAvailable:function(_250,test,_252){
var _253="";
_253=window.setInterval(function(){
if(eval(test)){
if(_252!=null){
_250(_252);
}else{
_250();
}
window.clearInterval(_253);
}
},300);
},getBaseURL:function(_254){
var _255=lconn.core.bizCard.bizCardUtils.getService(_254);
if(_255!=null&&_255.baseURL!=null){
return _255.baseURL;
}else{
return this.baseUrl;
}
},buildBaseURL:function(_256){
var _257=_256.indexOf("//")+2;
var _258=_256.substring(0,_257);
var _259=_256.substring(_257,_256.length);
_257=_259.indexOf("/")+1;
var _25a=_259.substring(0,_257);
_259=_259.substring(_257,_259.length);
_257=_259.indexOf("/");
var _25b=_259.substring(0,_257);
_259=_259.substring(_257,_259.length);
var _25c=_258+_25a+_25b;
return _25c;
},getURL:function(_25d,_25e,_25f,_260){
var temp={};
var _262=location.protocol+"//"+location.host;
var s=document.getElementsByTagName(_25e);
var _264="";
var _265=null;
for(var i=0;i<s.length;i++){
var src=s[i].getAttribute(_260);
if(src&&src.indexOf(_25d)!=-1){
_265=src;
_264=src.substring(0,src.indexOf(_25f));
if(_25f==null){
_264=this.buildBaseURL(src);
temp.baseUrl=_264;
}
temp.resourceFound=true;
break;
}
}
if(temp.baseUrl=="undefined"){
temp.baseUrl=(_264==_262)?_25f:_264+_25f;
}
return temp;
},getUrlParam:function(_268){
var _269=unescape(window.location);
if(_269.indexOf(_268)==-1){
return null;
}else{
var _26a=_269.substring(_269.indexOf(_268+"=")+_268.length+1);
var _26b=_26a.indexOf("&");
if(_26b!=-1){
_26a=_26a.substring(0,_26b);
}
return _26a;
}
},getProxifiedURL:function(url,_26d,_26e){
for(var key in _26d){
var _270=new RegExp("@@@"+key+"@@@");
var val=_26d[key];
url=url.replace(_270,val);
}
url=this.appendAppChkSum(url);
if(this._haveProxy){
return this._proxyHelper.getProxifiedURL(url);
}
return url+"&callback="+_26e;
},_timeout:10000,getBizCardData:function(url,_273,_274,_275,_276,_277,_278){
var url=this.getProxifiedURL(url,_273,_274);
if(this._haveProxy){
var _279=function(_27a){
var data=dojo.fromJson(_27a.replace(/^\s*while\(1\);/,""));
_276(true,data,_277);
};
var _27c=function(_27d){
_276(false,data,_277);
};
dojo.xhrGet({url:url,timeout:this._timeout,load:_279,error:_27c});
}else{
_275.request(url,this._timeout,_276,_277,_278);
}
},out:function(){
this.buffer="";
this.write=function(str){
this.buffer+=str;
};
},loadCssIfNeeded:function(){
var _27f=this.getURL("standaloneVcard.css","link",this.baseUrl+"/nav/common/styles/base/standaloneVcard.css","href");
if(_27f.resourceFound==null){
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.isBidiRTL){
this.loadCss(this.baseUrl+"/nav/common/styles/base/standaloneVcardRTL.css");
}else{
this.loadCss(this.baseUrl+"/nav/common/styles/base/standaloneVcard.css");
}
}
var _280=this.getURL("semanticTagStyles.css","link",this.baseUrl+"/nav/common/styles/base/semanticTagStyles.css","href");
if(_280.resourceFound==null){
this.loadCss(this.baseUrl+"/nav/common/styles/base/semanticTagStyles.css");
}
this.standaloneCSSloaded=true;
},getSinglePropertyValue:function(prop){
if(!prop){
return false;
}
var _282=prop.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
return _282;
},sortByOrder:function(a,b){
if(a.order>b.order){
return 1;
}else{
if(a.order<b.order){
return -1;
}else{
return 0;
}
}
},getElementsByClassName:function(_285,_286,_287,_288){
if(!_286){
_286=document.body;
}
if(!_287){
limit=0;
}
if(!_288){
_288=["*"];
}
var _289=new RegExp("(^|\\s)"+_285+"(\\s|$)");
if(_286&&_286.className&&_286.className.match(_289)){
return new Array(_286);
}
var _28a=new Array();
for(var t=0;t<_288.length;t++){
var _28c=_286.getElementsByTagName(_288[t]);
for(var i=0;i<_28c.length;i++){
var _28e=_28c[i];
if(_28e.className.match(_289)){
_28a.push(_28e);
}
if(0<_287&&_287==_28a.length){
break;
}
}
}
return _28a;
},getParentByClassName:function(_28f,_290){
if(!_290){
return null;
}
var _291=new RegExp("(^|\\s)"+_28f+"(\\s|$)");
if(_290.className&&_290.className.match(_291)){
return _290;
}
while(_290.parentNode){
_290=_290.parentNode;
if(_290.className&&_290.className.match(_291)){
return _290;
}
}
},addHover:function(elem,_293,_294,_295){
while(typeof SemTagMenu==undefined){
alert("waiting...");
}
var _296=elem.getAttribute(this.refcntAttr);
if(_296){
elem.setAttribute(this.refcntAttr,parseInt(Number(_296)+1));
if(SemTagMenu.staticHover){
var img=SemTagMenu.findHoverFromLiveElement(elem);
if(img){
dojo.connect(img,"onclick",_294);
img.setAttribute("href","javascript:a11y()");
}else{
alert("couldn't find the hover for this element!");
}
}else{
var _298=dojo.isFF?elem.getAttribute("class"):elem.className;
if(_298.indexOf("hasHover")==-1){
dojo.connect(elem,"onmouseover",_293);
dojo.connect(elem,"onfocus",_293);
}else{
if(this.isDebug){
console.log("attempting to connect repeated events to element: "+elem);
}
}
}
}else{
elem.setAttribute(this.refcntAttr,"1");
if(SemTagMenu.staticHover){
var img=this.createHoverImage();
dojo.connect(img,"onclick",_294);
img.setAttribute("href","javascript:a11y()");
var _299=elem.nextSibling;
if(_299){
_299.parentNode.insertBefore(img,_299);
}else{
elem.parentNode.appendChild(img);
}
elem.setAttribute(this.hoverIdPrefix+"idx",parseInt(this.hoverIdx));
elem.id=this.liveElemPrefix+this.hoverIdx;
}else{
var _298=dojo.isFF?elem.getAttribute("class"):elem.className;
if(_298&&0<_298.length){
_298+=" hasHover";
}else{
_298="hasHover";
}
if(dojo.isFF){
elem.setAttribute("class",_298);
}else{
elem.className=_298;
}
dojo.connect(elem,"onmouseover",_293);
dojo.connect(elem,"onfocus",_293);
}
if(_295!=null){
dojo.connect(elem,"onkeydown",_295);
}
}
},createHoverImage:function(){
var img=document.createElement("img");
this.hoverIdx++;
img.id=this.hoverIdPrefix+this.hoverIdx;
img.className=SemTagMenu.iconName;
img.setAttribute("src",this.baseUrl+"/images/menu_selected_hover.gif");
img.setAttribute("border","0");
var link=document.createElement("a");
dojo.connect(link,"onfocus",SemTagMenu.activateHover);
dojo.connect(link,"onmouseover",SemTagMenu.activateHover);
dojo.connect(link,"onmouseout",SemTagMenu.deactivateHover);
link.appendChild(img);
return link;
},showHover:function(_29c,_29d){
try{
SemTagMenu.showHover(_29c,_29d);
}
catch(e){
console.log("Error in lconn.core.bizCard.bizCardUtils.showHover");
console.log(e);
}
},setMenuData:function(_29e,_29f,_2a0,_2a1,_2a2){
SemTagMenu.setMenuData(_29e,_29f,_2a0,_2a1,_2a2);
},getMenuItemJson:function(_2a3,href,_2a5,icon){
var o=_2a5?_2a5:0;
var i=icon?icon:"";
return {"label":_2a3,"href":href,"order":o,"icon":i};
},getMenuHeaderJson:function(_2a9,_2aa){
return {"markup":_2a9,"order":_2aa};
},getMenuFooterJson:function(_2ab,_2ac){
return {"markup":_2ab,"order":_2ac};
},getElementFromEvent:function(_2ad){
return _2ad.target?_2ad.target:_2ad.srcElement;
},getLiveElementFromEvent:function(_2ae){
return SemTagMenu.findLiveElementFromEventSource(this.getElementFromEvent(_2ae));
},getEventAbsoluteX:function(e){
var x=0;
if(e.pageX){
x=e.pageX;
}else{
if(e.clientX){
x=e.clientX+document.body.scrollLeft;
}
}
return x;
},getEventAbsoluteY:function(e){
var y=0;
if(e.pageY){
y=e.pageY;
}else{
if(e.clientY){
y=e.clientY+document.body.scrollTop;
}
}
return y;
},findPosition:function(obj){
var _2b4=0,posX=0,posY=0;
var _2b7=1400*1;
if(obj.offsetParent){
if(obj.currentStyle){
posY+=obj.offsetHeight-parseInt(this.getStyle(obj,"paddingBottom"));
}else{
if(window.getComputedStyle){
posY+=obj.offsetHeight-parseInt(this.getStyle(obj,"padding-bottom"));
}
}
while(obj!=null){
if(obj.offsetLeft>=_2b7&&SemTagSvcConfig.isBidiRTL){
posX+=obj.offsetLeft-250;
}else{
posX+=obj.offsetLeft;
}
posY+=obj.offsetTop;
obj=obj.offsetParent;
_2b4++;
}
return [posX,posY];
}else{
return [obj.x,obj.y];
}
},getStyle:function(node,_2b9){
var _2ba;
if(window.getComputedStyle){
_2ba=document.defaultView.getComputedStyle(node,null).getPropertyValue(_2b9);
}else{
if(node.currentStyle){
_2ba=node.currentStyle[_2b9];
}
}
return _2ba;
},createGroupJson:function(ctx,exts){
return {"context":ctx,"extenders":exts};
},createActionJson:function(id,ctx,_2bf,desc,url,_2c2){
var o=parseInt(_2c2);
return {"id":id,"context":ctx,"label":_2bf,"description":desc,"url":url,"order":o};
},parseOrder:function(_2c4){
if(_2c4==null||_2c4.length==0){
return 0;
}
if(_2c4.charAt(0)=="-"){
return parseInt(_2c4.substr(1))*-1;
}else{
return parseInt(_2c4);
}
},_langParamValue:"",getLangParam:function(){
if(this._langParamValue==""){
if(window.djConfig!=null&&djConfig.locale!=null){
this._langParamValue=djConfig.locale;
return this._langParamValue;
}
var _2c5="lcLang";
if(typeof (profilesData)!="undefined"&&typeof (profilesData.config)!="undefined"&&typeof (profilesData.config.langCookieName)!="undefined"){
_2c5=profilesData.config.langCookieName;
}
var _2c6=dojo.cookie(_2c5);
if(_2c6==null||_2c6==""){
_2c6=this.getUrlParam("lang");
}
if(_2c6==null||_2c6==""){
if(typeof (navigator.language)!="undefined"){
_2c6=navigator.language;
}else{
if(typeof (navigator.browserLanguage)!="undefined"){
_2c6=navigator.browserLanguage;
}
}
}
var _2c7=/(\w\w){1}([\-_]\w\w){0,2}/i;
if(_2c6!=null&&!_2c6.match(_2c7)){
_2c6=null;
}
if(_2c6==null||_2c6==""){
_2c6="en";
}
_2c6=_2c6.replace(/\-/g,"_");
_2c6=_2c6.toLowerCase();
this._langParamValue=_2c6;
}
return this._langParamValue;
},getTextValue:function(elem){
if(!elem){
return "";
}
return elem.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
},getTypedValue:function(elem,_2ca){
if(!_2ca){
_2ca="def";
}
var _2cb=new Array();
var _2cc=this.getElementsByClassName("type",elem);
var _2cd=this.getElementsByClassName("value",elem);
var _2ce="";
if(_2cd.length<1){
_2ce=this.getTextValue(elem);
}
for(i=0;i<_2cd.length;i++){
_2ce+=this.getTextValue(_2cd[i]);
}
if(_2cc.length<1){
_2cb[_2ca]=_2ce;
}else{
for(j=0;j<_2cc.length;j++){
var _2cf=_2cc[j];
var type=_2cf.tagName.match(/^abbr$/i)?_2cf.getAttribute("title"):this.getTextValue(_2cf);
_2cb[type.toLowerCase()]=_2ce;
}
}
return _2cb;
},findNameElementInHcard:function(elem){
if(elem.className!="vcard"){
elem=this.getParentByClassName("vcard",elem);
}
var _2d2=this.getElementsByClassName("fn",elem)[0];
if(!_2d2){
_2d2=this.getElementsByClassName("n",elem)[0];
}
return _2d2;
},findElementByNameInHcard:function(elem,name){
if(elem.className!="vcard"){
elem=this.getParentByClassName("vcard",elem);
}
return this.getElementsByClassName(name,elem)[0];
},loadScript:function(_2d5){
var _2d6=this.getLangParam();
if(_2d5.indexOf("lang=")!=-1&&_2d6!=null){
_2d5=_2d5.substring(0,_2d5.indexOf("lang"))+"lang="+_2d6;
}else{
if(_2d5.indexOf("resourcebundle")!=-1&&_2d6!=null){
_2d5=_2d5+"&lang="+_2d6;
}
if(_2d5.indexOf("resourceStrings")!=-1&&_2d6!=null){
_2d5=_2d5+"&lang="+_2d6;
}
if(_2d5.indexOf("js-resources.js")!=-1&&_2d6!=null){
_2d5=_2d5+((_2d5.indexOf("?")!=-1)?"&":"?")+"lang="+_2d6;
}
}
_2d5=this.appendAppChkSum(_2d5);
if(!this.scripts[_2d5]){
this.scripts[_2d5]=true;
var _2d7=document.createElement("script");
_2d7.src=_2d5;
document.body.insertBefore(_2d7,document.body.firstChild);
}
},loadCss:function(css){
css=this.appendAppChkSum(css);
if(!this.css[css]){
var head=document.getElementsByTagName("head");
if(head[0]){
this.css[css]=true;
var _2da=document.createElement("link");
_2da.rel="stylesheet";
_2da.href=css;
_2da.type="text/css";
_2da.media="screen";
head[0].appendChild(_2da);
}
}
},toggleInlineCard:function(pDiv){
var _2dc=document.getElementById(pDiv+"_Pivot");
var _2dd=document.getElementById(pDiv+"_Details");
if(_2dc!=null&&_2dd!=null){
if(_2dc.className.indexOf("lotusPivotNavOpen")!=-1){
_2dc.className="lotusPivotNav";
_2dd.style.display="none";
}else{
_2dc.className="lotusPivotNav lotusPivotNavOpen";
_2dd.style.display="block";
}
}
}};
window.SemTagMenu={isDebug:false,staticHover:false,id:"semtagmenu",hideDelay:3000,showDelay:500,timeouts:new Array(),iconName:"menu_drop_icon",showing:false,currentElem:null,refCount:-1,tabOrderByDomNodeOrder:0,tabOrderByTabIndex:0,elemOrigTabIdx:null,elemTempTabIdx:1000,elemNext:null,svcHandlers:new Array(),items:new Array(),headers:new Array(),footers:new Array(),hoverIdRE:null,iconNameRE:new RegExp("(^|\\s)menu_drop_icon(\\s|$)"),initited:false,init:function(){
if(this.initited==false){
SemTagMenu.hoverIdRE=new RegExp(lconn.core.bizCard.bizCardUtils.hoverIdPrefix);
dojo.connect(document,"onclick",SemTagMenu.click);
dojo.connect(document,"onkeydown",SemTagMenu.catchEscape);
this.initited=true;
}
},activateFocus:function(_2de){
lconn.core.bizCard.bizCardUtils.activateHover(_2de);
},activateHover:function(_2df){
var _2e0=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_2df);
if(_2e0){
_2e0.src=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/menu_selected_hover.gif";
}
SemTagMenu.setCurrentElement(SemTagMenu.findLiveElementFromEventSource(_2e0));
},deactivateHover:function(_2e1){
var _2e2=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_2e1);
if(_2e2){
_2e2.src=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/menu_selected_hover.gif";
}
SemTagMenu.setCurrentElement(null);
},showHover:function(_2e3,_2e4){
try{
if(SemTagMenu.staticHover){
return;
}
var elem=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_2e3);
SemTagMenu.elemOrigTabIdx=elem.getAttribute("tabIndex");
if(SemTagMenu.tabOrderByTabIndex&&!SemTagMenu.elemOrigTabIdx){
SemTagMenu.elemNext=elem.nextSibling;
elem.setAttribute("tabIndex",parseInt(Number(SemTagMenu.elemTempTabIdx)));
}
var tag=SemTagMenu.getMenuTag(elem);
var _2e7=0;
if(elem&&elem!=SemTagMenu.currentElem){
SemTagMenu.clearAllSvcHandlers(tag);
_2e7=elem.getAttribute(lconn.core.bizCard.bizCardUtils.refcntAttr);
if(_2e7){
SemTagMenu.setCurrentElement(elem);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagMenu.showHover called for a DOM element with no refcnt attribute!");
}
SemTagMenu.setCurrentElement(null);
return;
}
}
SemTagMenu.addSvcHandler(tag,_2e4);
SemTagMenu.setRefCount(_2e7);
if(SemTagMenu.showing&&tag.style.display!="none"){
return;
}
SemTagMenu.showing=false;
var out=new lconn.core.bizCard.bizCardUtils.out();
SemTagMenu.writeHover(out,"ltr");
tag.innerHTML=out.buffer;
var pos=SemTagMenu.currentElemPosition;
SemTagMenu.show(SemTagMenu.id,_2e3,pos[0]+SemTagMenu.hoverOffset[0],pos[1]+SemTagMenu.hoverOffset[1],SemTagMenu.hoverDimension[0],SemTagMenu.hoverDimension[1]);
}
catch(e){
console.log("Error in SemTagMenu.showHover");
console.log(e);
}
},addSvcHandler:function(tag,_2eb){
SemTagMenu.svcHandlers.push(dojo.connect(tag,"onclick",_2eb));
},clearAllSvcHandlers:function(tag){
while(0<SemTagMenu.svcHandlers.length){
var _2ed=SemTagMenu.svcHandlers.pop();
if(_2ed){
dojo.disconnect(_2ed);
}
}
},setCurrentElement:function(elem){
if(elem!=null){
SemTagMenu.currentElem=elem;
SemTagMenu.currentElemPosition=lconn.core.bizCard.bizCardUtils.findPosition(elem);
SemTagMenu.setRefCount(elem?Number(elem.getAttribute(lconn.core.bizCard.bizCardUtils.refcntAttr)):0);
while(0<SemTagMenu.headers.length){
SemTagMenu.headers.pop();
}
while(0<SemTagMenu.items.length){
SemTagMenu.items.pop();
}
while(0<SemTagMenu.footers.length){
SemTagMenu.footers.pop();
}
}
},setRefCount:function(cnt){
SemTagMenu.refCount=cnt;
},setMenuData:function(_2f0,_2f1,_2f2,_2f3,_2f4){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Menu.setMenuData: items.length="+_2f1.length);
}
if(!SemTagMenu.staticHover&&SemTagMenu.refCount<0){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("setMenuData called when refCount="+SemTagMenu.refCount);
}
return;
}
var elem=SemTagMenu.findLiveElementFromEventSource(lconn.core.bizCard.bizCardUtils.getElementFromEvent(_2f0));
if(!elem){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("setMenuData called on a null live element");
}
return;
}
if(SemTagMenu.staticHover&&(elem!=SemTagMenu.currentElem||SemTagMenu.showing)){
SemTagMenu.setCurrentElement(elem);
}
for(var i=0;i<_2f1.length;i++){
SemTagMenu.items.push(_2f1[i]);
}
if(_2f2){
SemTagMenu.currentMenuCss=_2f2;
}
if(_2f3){
SemTagMenu.headers.push(_2f3);
}
if(_2f4){
SemTagMenu.footers.push(_2f4);
}
SemTagMenu.stopEvent(_2f0);
SemTagMenu.showMenu();
},getCurrentElement:function(){
return SemTagMenu.currentElem;
},showMenu:function(){
SemTagMenu.items.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
if(1<SemTagMenu.headers.length){
SemTagMenu.headers.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
}
if(1<SemTagMenu.footers.length){
SemTagMenu.footers.sort(lconn.core.bizCard.bizCardUtils.sortByOrder);
}
var out=new lconn.core.bizCard.bizCardUtils.out();
SemTagMenu.startMenu(out,"ltr");
if(0<SemTagMenu.headers.length){
SemTagMenu.writeHeader(out,SemTagMenu.headers[0],"ltr");
}
SemTagMenu.startActionSection(out,"ltr",SemTagMenu.currentMenuCss);
for(var i=0;i<SemTagMenu.items.length;i++){
SemTagMenu.writeMenuItem(out,SemTagMenu.items[i],"ltr");
}
SemTagMenu.endActionSection(out,"ltr");
if(0<SemTagMenu.footers.length){
SemTagMenu.writeFooter(out,SemTagMenu.footers[0],"ltr");
}
SemTagMenu.endMenu(out,"ltr");
var tag=SemTagMenu.getMenuTag();
SemTagMenu.clearAllSvcHandlers(tag);
SemTagMenu.offScreen(tag);
tag.innerHTML=out.buffer;
SemTagMenu.showing=true;
SemTagMenu.defaultCursor();
if(SemTagMenu.staticHover&&dojo.isFF){
var _2fa=tag.getElementsByTagName("a");
if(0<_2fa.length){
_2fa[0].focus();
}
}
var _2fb={"target":SemTagMenu.currentElem};
var pos=SemTagMenu.currentElemPosition;
SemTagMenu.show(SemTagMenu.id,_2fb,pos[0]+SemTagMenu.menuOffset[0],pos[1]+SemTagMenu.menuOffset[1],tag.offsetWidth,tag.offsetHeight);
},getMenuTag:function(elem){
var tag=document.getElementById(SemTagMenu.id);
if(!tag){
tag=document.createElement((SemTagMenu.tabOrderByDomNodeOrder?"div":"span"));
tag.setAttribute("id",SemTagMenu.id);
tag.style.position=(SemTagMenu.tabOrderByDomNodeOrder?"fixed":"absolute");
tag.style.display="none";
if(SemTagMenu.tabOrderByTabIndex&&typeof (elem)!="undefined"&&elem!=null){
var _2ff=elem.getAttribute("tabIndex");
if(SemTagMenu.tabOrderByTabIndex&&_2ff){
tag.setAttribute("tabIndex",parseInt(Number(_2ff)+1));
}
}
dojo.connect(tag,"onmouseout",SemTagMenu.mouseout);
dojo.connect(tag,"onmouseover",SemTagMenu.mouseover);
dojo.connect(tag,"onfocus",SemTagMenu.focus);
if(SemTagMenu.tabOrderByTabIndex){
dojo.connect(tag,"keydown",SemTagMenu.keydown);
}
if(SemTagMenu.tabOrderByDomNodeOrder){
if(elem){
elem.parentNode.appendChild(tag);
}else{
document.body.insertBefore(tag,document.body.firstChild);
}
}else{
document.body.insertBefore(tag,document.body.firstChild);
}
}else{
if(SemTagMenu.tabOrderByTabIndex&&typeof (elem)!="undefined"&&elem!=null){
var _2ff=elem.getAttribute("tabIndex");
if(_2ff){
tag.setAttribute("tabIndex",parseInt(Number(_2ff)+1));
}
}else{
if(SemTagMenu.tabOrderByDomNodeOrder){
if(elem){
elem.parentNode.appendChild(tag);
}
}
}
}
return tag;
},show:function(_300,e,xpos,ypos,_304,_305){
SemTagMenu.clearTimeouts();
var _306=document.getElementById(_300);
if(_304==null){
_304=0;
}
if(_305==null){
_305=0;
}
var top,left;
if(xpos!=null&&ypos!=null){
var top=ypos;
var left=xpos;
}else{
var top=lconn.core.bizCard.bizCardUtils.getEventAbsoluteY(e);
var left=lconn.core.bizCard.bizCardUtils.getEventAbsoluteX(e);
}
var vSrc=(e.target)?e.target:e.srcElement;
var _30a,_30b,d=document;
if(typeof window.innerWidth!="undefined"){
_30a=window.innerWidth;
_30b=window.innerHeight;
}else{
if(d.documentElement&&typeof d.documentElement.clientWidth!="undefined"&&d.documentElement.clientWidth!=0){
_30a=d.documentElement.clientWidth;
_30b=d.documentElement.clientHeight;
}else{
if(d.body&&typeof d.body.clientWidth!="undefined"){
_30a=d.body.clientWidth;
_30b=d.body.clientHeight;
}
}
}
var _30d=(document.body.scrollLeft>document.documentElement.scrollLeft)?document.body.scrollLeft:document.documentElement.scrollLeft;
if((left+_304)>(_30a+_30d)){
var _30e=(left+_304)-_30a-_30d;
left-=_30e;
}
var _30f=(document.body.scrollTop>document.documentElement.scrollTop)?document.body.scrollTop:document.documentElement.scrollTop;
if((top+_305)>(_30b+_30f)){
var _30e=(top+_305)-_30b-_30f;
top-=_30e;
}
_306.style.top=top+"px";
_306.style.left=left+"px";
_306.style.display="block";
var _310=document.getElementById("tempIframe");
if(_310==null){
_310=document.createElement("iframe");
_310.setAttribute("id","tempIframe");
_310.setAttribute("frameBorder","no");
_310.setAttribute("scrolling","no");
_310.setAttribute("src",lconn.core.bizCard.bizCardUtils.baseUrl+"/nav/blankIE.html");
_310.style.position="absolute";
_310.style.left=left+"px";
_310.style.top=top+"px";
_310.width=(_306.offsetWidth).toString()+"px";
_310.height=(_306.offsetHeight).toString()+"px";
_310.style.display="block";
_310.style.zIndex="899";
document.body.appendChild(_310);
}else{
_310.style.left=left+"px";
_310.style.top=top+"px";
_310.width=(_306.offsetWidth).toString()+"px";
_310.height=(_306.offsetHeight).toString()+"px";
_310.style.display="block";
}
var _311=document.getElementById("A11Yblank");
if(_311){
_311.focus();
}else{
if(typeof (SemTagMenu.startHideTimer)!="undefined"){
SemTagMenu.startHideTimer(_300);
}
}
},hide:function(_312,e){
var tag=SemTagMenu.getMenuTag();
if(!tag){
return false;
}
tag.style.display="none";
SemTagMenu.showing=false;
SemTagMenu.setCurrentElement(null);
SemTagMenu.clearAllSvcHandlers(tag);
SemTagMenu.defaultCursor();
var elem=SemTagMenu.getCurrentElement();
if(SemTagMenu.tabOrderByTabIndex&&elem&&elem.getAttribute("tabIndex")){
tag.setAttribute("tabIndex",null);
elem.setAttribute("tabIndex",SemTagMenu.elemOrigTabIdx);
}
var _316=document.getElementById("tempIframe");
if(_316!=null){
_316.style.display="none";
}
return true;
},offScreen:function(_317){
_317.style.top="-1000px";
_317.style.left="-1000px";
_317.style.display="block";
},findLiveElementFromEventSource:function(_318){
if(SemTagMenu.staticHover){
var id=_318.id;
if(!id.match(SemTagMenu.hoverIdRE)){
var _31a=_318.getElementsByTagName("img");
for(var i=0;i<_31a.length;i++){
if(_31a[i].id&&_31a[i].id.match(SemTagMenu.hoverIdRE)){
id=_31a[i].id;
break;
}
}
}
var idx=id.substr(lconn.core.bizCard.bizCardUtils.hoverIdPrefix.length);
return document.getElementById(lconn.core.bizCard.bizCardUtils.liveElemPrefix+idx);
}else{
var _31d=SemTagMenu.getCurrentElement();
return _31d?_31d:_318;
}
},findHoverFromLiveElement:function(_31e){
var idx=_31e.getAttribute(lconn.core.bizCard.bizCardUtils.hoverIdPrefix+"idx");
return document.getElementById(lconn.core.bizCard.bizCardUtils.hoverIdPrefix+idx);
},inMenu:function(_320,_321,_322,_323){
if(!_320){
return false;
}
if(!SemTagMenu.showing){
return false;
}
if(!_322){
_322=0;
}
if(!_323){
_323=0;
}
var _324=lconn.core.bizCard.bizCardUtils.getEventAbsoluteX(_321);
var _325=lconn.core.bizCard.bizCardUtils.getEventAbsoluteY(_321);
var _326=_320.style.left.replace(/px$/,"");
var _327=_320.style.top.replace(/px$/,"");
var sumX=parseInt(_326)+parseInt(_320.clientWidth);
var sumY=parseInt(_327)+parseInt(_320.clientHeight);
if((_324-1<=(_326-_322))||(_325-1<=(_327-_323))||(_324>=(sumX+_322))||(_325>=(sumY+_323))){
return false;
}else{
return true;
}
},mouseout:function(_32a){
var _32b=SemTagMenu.id;
menuElem=document.getElementById(_32b);
if(SemTagMenu.inMenu(menuElem,_32a)){
}else{
if(typeof (SemTagMenu.startHideTimer)!="undefined"){
SemTagMenu.startHideTimer(_32b);
}
}
},mouseover:function(_32c){
SemTagMenu.clearTimeouts();
},focus:function(_32d){
SemTagMenu.mouseover(_32d);
},unfocus:function(_32e){
SemTagMenu.mouseout(_32e);
},click:function(_32f){
if(!_32f){
return;
}
var _330=lconn.core.bizCard.bizCardUtils.getElementFromEvent(_32f);
if(_330.className!="javlinHover"){
menuElem=document.getElementById(SemTagMenu.id);
if(!SemTagMenu.inMenu(menuElem,_32f)){
SemTagMenu.hide(SemTagMenu.id);
}
}
},keydown:function(_331){
SemTagMenu.catchEscape(_331);
SemTagMenu.catchTab(_331);
},catchEscape:function(_332){
if(_332.keyCode==27){
SemTagMenu.hide(SemTagMenu.id);
}
},catchTab:function(_333){
if(_333.keyCode==9){
if(SemTagMenu.elemNext&&typeof (SemTagMenu.elemNext.focus)!="undefined"){
SemTagMenu.elemNext.focus();
}
SemTagMenu.hide(SemTagMenu.id);
}
},simulateClick:function(_334){
if(_334.ctrlKey&&_334.keyCode==13){
if(_334.preventDefault){
_334.preventDefault();
}
var evt=null;
if(document.createEvent){
evt=document.createEvent("MouseEvents");
}
if(evt&&evt.initMouseEvent){
evt.initMouseEvent("click",true,true,document.defaultView,1,0,0,0,0,false,false,false,false,0,null);
}
var _336=document.getElementById(SemTagMenu.id);
if(_336.dispatchEvent){
_336.dispatchEvent(evt);
}else{
if(_336.fireEvent){
_336.fireEvent("onclick");
}
}
}
},stopEvent:function(_337){
if(!_337){
return;
}
if(dojo.isFF){
if(_337.preventDefault==null){
_337=_337.original;
}
_337.preventDefault();
_337.stopPropagation();
}else{
try{
if(_337.returnValue==null){
_337=_337.original;
}
_337.returnValue=false;
_337.cancelBubble=true;
}
catch(e){
}
}
},startHideTimer:function(_338){
if(0<SemTagMenu.hideDelay){
SemTagMenu.timeouts.push(window.setTimeout("SemTagMenu.endHideTimer(\""+_338+"\")",SemTagMenu.hideDelay));
}
},endHideTimer:function(_339){
menuElem=document.getElementById(_339);
SemTagMenu.hide(_339);
},clearTimeouts:function(){
for(i=0;i<SemTagMenu.timeouts.length;i++){
window.clearTimeout(SemTagMenu.timeouts[i]);
}
},defaultCursor:function(){
document.body.style.cursor="default";
},waitCursor:function(){
document.body.style.cursor="wait";
},clickCursor:function(){
document.body.style.cursor="pointer";
}};
SemTagMenu.defaultLoaded=true;
SemTagMenu.hoverDimension=[14,14];
SemTagMenu.hoverOffset=[15,3];
SemTagMenu.menuOffset=[15,0];
SemTagMenu.writeHover=function(out,bidi){
if(window.semtagrs!=null){
var _33c="z-index: 900; opacity: 1;";
if(window.SemTagSvcConfig!=null&&SemTagSvcConfig.isBidiRTL){
_33c+="padding:2px 25px 2px 3px; background-position:96% center;";
}
out.write("<div class='javlinHover' "+" onmouseover='javascript:SemTagMenu.clickCursor();'"+" onmouseout='javascript:SemTagMenu.defaultCursor();'"+" style='"+_33c+"' "+" title='"+semtagrs["label.semtag.hover"]+"' "+">"+semtagrs["label.semtag.hover"]+"</div>");
}else{
console.log("SemTagMenu.writeHover: semtagrs is null. Need for strings");
}
};
SemTagMenu.startMenu=function(out,bidi){
out.write("<div class='popupPersonCard' style='z-index: 900;'>");
};
SemTagMenu.writeHeader=function(out,_340,bidi){
out.write(_340.markup);
};
SemTagMenu.startActionSection=function(out,bidi,_344){
out.write("<a href='javascript:a11y()'><a>");
if(!_344){
_344="personMenuActions";
}
out.write("<div class='"+_344+"'>");
out.write("<ul>");
};
SemTagMenu.writeMenuItem=function(out,item,bidi){
out.write("<li><a href='"+item.href+"'>"+item.label+"</a></li>");
};
SemTagMenu.endActionSection=function(out,bidi){
out.write("</ul>");
out.write("</div>");
};
SemTagMenu.writeFooter=function(out,_34b,bidi){
out.write(_34b.markup);
};
SemTagMenu.endMenu=function(out,bidi){
out.write("</div>");
};
window.SemTagUtil={crossDomainRequest:function(){
var _34f=new Array();
var _350=new Array();
var _351=new Array();
var self=this;
createTimeoutFunction=function(_353){
return function(){
self.cancelRequest(_353);
};
};
this.getScriptId=function(id){
return "_JVLN_"+id;
};
this.getScriptObject=function(id){
return document.getElementById(this.getScriptId(id));
};
this.cloneObject=function(obj){
var _357=new Object();
for(i in obj){
_357[i]=obj[i];
}
return _357;
};
this.request=function(url,_359,_35a,_35b,_35c){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: started");
}
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: connectionId "+_35c);
}
_35c=_35c.toLowerCase();
var _35d=this.getScriptId(_35c);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: objId "+_35d);
}
if(_35a!=null){
_34f[_35c]=_35a;
}
if(_35b!=null){
if(!dojo.isFF){
_350[_35c]=this.cloneObject(_35b);
}else{
_350[_35c]=_35b;
}
}
var _35e=document.createElement("script");
_35e.id=_35d;
_35e.type="text/javascript";
_35e.defer=true;
try{
_35e.src=url;
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: url: "+url);
}
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error:",e);
}
return false;
}
try{
var body=document.getElementsByTagName("body");
if(body[0]){
body[0].appendChild(_35e);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error getting body element to insert script:"+_35e.id);
}
return false;
}
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: error:",e);
}
return false;
}
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.request: added script: "+_35e.id);
}
if(_359){
var self=this;
_351[_35c]=window.setTimeout(createTimeoutFunction(_35c),_359);
}
};
this.cancelRequest=function(id){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest:  Request ["+id+"] took too long.  Cancelling request for id: "+_351[id]);
}
var _362=_34f[id];
_34f[id]=null;
var _363=_350[id];
_350[id]=null;
if(_362!=null){
try{
if(_362){
_362(false,null,_363);
}
this.removeScript(id);
}
catch(e){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest: Exception Caught: "+e);
}
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.cancelRequest: no callback for : "+id);
}
}
};
this.removeScript=function(id){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: removing script element for: "+id);
}
if(id){
var _365=this.getScriptObject(id);
if(_365!=null){
var body=document.getElementsByTagName("body");
body[0].removeChild(_365);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: removed script for id: "+id);
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: script is null for id: "+id);
}
}
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.removeScript: id is null");
}
}
};
this.dispatch=function(id,data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.dispatch: id: "+id);
}
if(id!=null){
id=id.toLowerCase();
}
try{
if(id!=null&&typeof (_351[id])!="undefined"&&_351[id]!=null){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("request dispatched. removing timeout for id ["+id+"]  timeout id: "+_351[id]);
}
window.clearTimeout(_351[id]);
}
var _369=_34f[id];
var _36a=_350[id];
_350[id]=null;
if(_369!=null){
_34f[id]=null;
_369(true,data,_36a);
window.setTimeout(function(){
self.removeScript(id);
},1000);
}else{
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("SemTagUtil.dispatch: callback is null for id: "+id);
}
}
}
catch(e){
console.log("SemTagUtil.dispatch: Exception Caught: ");
console.log(e);
}
};
}};
}
if(!dojo._hasResource["lconn.communities.bizCard.bizCard"]){
dojo._hasResource["lconn.communities.bizCard.bizCard"]=true;
dojo.provide("lconn.communities.bizCard.bizCard");
lconn.communities.bizCard.bizCard={servletUrl:null,requestor:null,initited:false,init:function(){
this.servletUrl=lconn.core.bizCard.bizCardUtils.getBaseURL("hgroup")+"/service/json/communityview?communityUuid=@@@UUID@@@";
if(this.initited==false){
this.requestor=new SemTagUtil.crossDomainRequest();
this.initited=true;
}
},getIdMethod:function(_36b){
return _36b.uuid?_36b.uuid:null;
},convMethod:function(_36c){
return _36c;
},customTrim:function(_36d){
return _36d.replace(/^\s+/,"").replace(/\s+$/,"");
},processTag:function(_36e){
try{
if(!this.initited){
lconn.core.bizCard.bizCardUtils.init();
SemTagMenu.init();
this.init();
}
if(window.lc_default==null){
lconn.core.bizCard.bizCardUtils.loadScript(lconn.core.bizCard.bizCardUtils.getBaseURL("hgroup")+"/resourceStrings.do?p=1");
lconn.core.utilities.processUntilAvailable(dojo.hitch(this,this.processHcard),"window.lc_default != null",_36e);
}else{
this.processHcard(_36e);
}
}
catch(e){
console.log(e);
}
},processHcard:function(_36f){
var _370=this.getNameElement(_36f);
if(!_370){
return;
}
if(this.isInline(_36f)){
var _371={"target":_370};
this.getTagFromServer(_371);
}else{
lconn.core.bizCard.bizCardUtils.addHover(_370,lconn.communities.bizCard.bizCard.showHover,lconn.communities.bizCard.bizCard.showMenu);
}
},isInline:function(_372){
return this.getHcardAttributeValue("X-community-display-inline",_372);
},loadHcardCommunity:function(_373){
var _374=new Object();
var _375=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_373);
var _376=_375.getElementsByTagName("*");
for(i=0;i<_376.length;i++){
var _377=_376[i];
if(_377.className){
var _378=_377.className.split(" ");
for(j=0;j<_378.length;j++){
var c=_378[j];
var attr=this.getHcardAttributeValue(c,_375);
if(attr){
_374[c]=attr;
}
}
}
}
return _374;
},getHcardAttributeValue:function(_37b,_37c){
switch(_37b){
case ("name"):
return this.getHcardTypedAttribute(_37c,_37b,"name");
case ("uuid"):
return this.getHcardTypedAttribute(_37c,_37b,"uuid");
case ("selectedWidgetId"):
return this.getHcardTypedAttribute(_37c,_37b,"selectedWidgetId");
}
var _37d=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_37c);
var _37e=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_37b,_37d,1);
if(_37e.length>0&&_37e[0].tagName.match(/^abbr$/i)){
return _37e[0].getAttribute("title");
}
switch(_37b){
case ("uuid"):
var uuid=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_37e[0]);
if(uuid){
return uuid;
}else{
return this.getHcardAttributeValue("name",_37c);
}
break;
case ("name"):
var name=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_37e[0]);
if(name){
return name;
}
break;
case ("selectedWidgetId"):
var _381=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_37e[0]);
if(_381){
return _381;
}
break;
case ("X-community-display-inline"):
if(_37e.length>0){
return true;
}else{
return false;
}
default:
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_37e[0]);
break;
}
},getHcardTypedAttribute:function(_382,_383,_384){
var _385=new Object();
var _386=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_382);
var _387=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_383,_386);
for(i=0;i<_387.length;i++){
var _388=_387[i];
_385=lconn.core.bizCard.bizCardUtils.getTypedValue(_388,_384);
}
return _385;
},showHover:function(_389){
try{
lconn.core.bizCard.bizCardUtils.showHover(_389,lconn.communities.bizCard.bizCard.showMenu);
}
catch(e){
console.log("Error in lconn.communities.bizCard.bizCard.showHover");
console.log(e);
}
},showMenu:function(_38a){
SemTagMenu.waitCursor();
lconn.communities.bizCard.bizCard.getTagFromServer(_38a);
},getTagFromServer:function(_38b){
var _38c=null;
var _38d=null;
if(_38b!=null&&_38b.target!=null&&_38b.target.className=="name"){
_38c=_38b.target;
_38d=_38b;
SemTagMenu.currentElem=_38c;
}else{
_38c=SemTagMenu.currentElem;
_38d={target:_38c,original:_38b};
if(_38c==null&&_38b!=null){
_38d=_38b;
_38c=_38b.target;
}
}
var _38e=this.customTrim(this.getElementUuid(_38c));
var _38f={"UUID":_38e};
var _390="lconn.communities.bizCard.bizCard.dispatch";
var _391=_38e;
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.getTagFromServer sending request for: "+_38e+")";
}
lconn.core.bizCard.bizCardUtils.getBizCardData(this.servletUrl+"&preventCache="+new Date().getTime(),_38f,_390,this.requestor,this.requestReturn,_38d,_391);
},requestReturn:function(_392,_393,_394){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.requestReturn: success="+_392;
}
var _395=_392?lconn.communities.bizCard.bizCard.convMethod(_393):{};
var _396=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_394);
lconn.communities.bizCard.bizCard.fillCommunityJsonMoreFromDom(_395,_396);
lconn.communities.bizCard.bizCard.update(_395,_396,_394);
},fillCommunityJsonMoreFromDom:function(_397,_398){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.fillCommunityJsonMoreFromDom";
}
if(!_397.name){
var _399=lconn.core.bizCard.bizCardUtils.findNameElementInHcard(_398);
if(_399){
_397.name=lconn.core.bizCard.bizCardUtils.getTextValue(_399);
}
}
if(!_397.uuid){
var uuid=this.getElementUuid(_398);
_397.uuid=uuid;
}
},update:function(_39b,_39c,_39d){
if(lconn.core.bizCard.bizCardUtils.isDebug){
window.status="Community.update";
}
this.currentCommunity=_39b;
var _39e=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",_39c);
if(this.isInline(_39e)){
var out=new lconn.core.bizCard.bizCardUtils.out();
var _3a0=this.getHcardAttributeValue("selectedWidgetId",_39e).selectedWidgetId;
lconn.communities.bizCard.bizCardUI.getInlineMarkup(_39b,"ltr",out,_3a0);
var prev=lconn.core.bizCard.bizCardUtils.getElementsByClassName("personinlinemenu",_39e,1);
if(prev.length>0){
prev[0].innerHTML=out.buffer;
}else{
var span=document.createElement("span");
span.className="personinlinemenu";
span.innerHTML=out.buffer;
_39e.appendChild(span);
}
}else{
var _3a3=new Array();
var _3a4="personMenuActions";
var _3a5=new lconn.core.bizCard.bizCardUtils.out();
var _3a6=new lconn.core.bizCard.bizCardUtils.out();
lconn.communities.bizCard.bizCardUI.getMenuData(_39b,"ltr",_3a3,_3a4,_3a5,_3a6);
lconn.core.bizCard.bizCardUtils.setMenuData(_39d,_3a3,_3a4,lconn.core.bizCard.bizCardUtils.getMenuHeaderJson(_3a5.buffer,-100));
}
},dispatch:function(data){
var _3a8=this.getIdMethod(data);
this.requestor.dispatch(_3a8,data);
},getElementUuid:function(elem){
var uuid;
var _3ab=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",elem);
if(_3ab!=null){
uuid=this.getHcardAttributeValue("uuid",_3ab);
uuid=uuid.uuid;
}
return uuid;
},getNameElement:function(elem){
if(elem.className!="vcomm"){
elem=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcomm",elem);
}
var _3ad=lconn.core.bizCard.bizCardUtils.getElementsByClassName("name",elem,1)[0];
return _3ad;
}};
}
if(!dojo._hasResource["lconn.communities.bizCard.bizCardUI"]){
dojo._hasResource["lconn.communities.bizCard.bizCardUI"]=true;
var showLinks=(dojo.cookie("community.inline.card.links")==1);
dojo.provide("lconn.communities.bizCard.bizCardUI");
lconn.communities.bizCard.bizCardUI={getMenuData:function(_3ae,bidi,_3b0,_3b1,_3b2,_3b3){
var _3b4=dojo.i18n.getLocalization("lc_default")["label.overview"];
if(_3b4==null){
_3b4=dojo.i18n.getLocalization("lc_default")["label.navigation.overview.heading"];
}
var _3b5="";
if(lconn.core.bizCard.bizCardUtils.standaloneCSSloaded){
_3b5=" lotusui";
}
_3b2.write("<div id='container' "+_3b5+" style='width: 32em; height:12em;border: 1px solid #e0e0e0; -moz-border-radius:7px;background-color:#F5F8FF;padding:10px 0px 8px 10px;'>");
_3b2.write("  <div id='navigationLinks' style='clear:left; border-bottom:1px solid #e0e0e0;padding: 0px 0pt 5px 0px;margin:0;'>");
_3b2.write("      <a href='"+_3ae.homeUrl+"' title=\""+_3b4+"\" class='action'>"+_3b4+"</a>");
this.writeLinksforPopupCard(_3b2,_3ae);
_3b2.write("  </div><br/>");
if(_3ae.imageUrl!=null&&_3ae.imageUrl!=""){
_3b2.write("  <img src='"+_3ae.imageUrl+"' alt=\""+_3ae.name+"\" title=\""+_3ae.name+"\" height='95' width='95' style='float:left;margin: 0px 10px 10px 10px; padding:2px !important; border:1px solid #c2c2c2;background-color:#fff;'/>");
}
_3b2.write("  <div  style='height:9em;overflow:hidden;'>");
_3b2.write("  <h2 style='font-size:1.1em;margin:0;margin-right:20px;padding:0;'>"+_3ae.name+"<span id='membersCount' style='font-size:.9em;color:#999;font-weight:normal;'> ("+_3ae.membercount+" "+dojo.i18n.getLocalization("lc_default")["label.members.lowercase"]+")</span></h2>");
if(_3ae.tags!=null&&_3ae.tags!=""){
_3b2.write("  <div style='font-size:.9em;color:#999;padding:0;margin:0;'>"+dojo.i18n.getLocalization("lc_default")["label.tags"]+" "+_3ae.tags+"</div>");
}
if(_3ae.description!=null&&_3ae.description!=""){
_3b2.write("  <p id='communityDescription' style='font-size:.9em;padding:3px 5px 0 0;margin:0;'>");
_3b2.write("      "+_3ae.description);
_3b2.write("  </p>                        ");
}
_3b2.write("  </div>                      ");
_3b2.write("</div><!-- end container -->");
},getInlineMarkup:function(comm,bidi,_3b8,_3b9){
var _3ba=_3b8;
var _3bb=(dojo.cookie("community.inline.card.links")!=0);
var _3bc="lotusTwistyOpen";
if(_3bb){
_3bc="lotusTwistyOpen";
}else{
_3bc="lotusTwistyClosed";
}
var _3bd="";
if(lconn.core.bizCard.bizCardUtils.standaloneCSSloaded){
_3bd="lotusui";
}
_3ba.write("<div class=\"lotusMenu "+_3bd+"\">");
_3ba.write("<div class=\"lotusBottomCorner  lotusInlineMenu\">");
_3ba.write("<div class=\"lotusInner\">");
_3ba.write("<div class=\" lotusCenter lotusInlinePhoto\"><a href=\""+comm.homeUrl+"\"><img src=\""+comm.imageUrl+"\" width=\"155\" height=\"155\" alt=\""+comm.name+"\" /></a></div>");
_3ba.write("<div class=\"lotusLeft\"><a id=\""+comm.uuid+"_twisty\" class=\"lotusSprite lotusArrow "+_3bc+"\" href=\"javascript:lconn.communities.bizCard.bizCardUI.toggleSection('"+comm.uuid+"');\"></a></div>");
_3ba.write("<h2><a href=\""+comm.homeUrl+"\">"+comm.name+"</a></h2>");
_3ba.write("<div class=\"lotusMenuSeparator\"></div>");
this.writeLinks(_3ba,comm,_3b9,_3bb);
_3ba.write("</div>");
_3ba.write("</div>");
_3ba.write("</div>");
},writeLinksforPopupCard:function(_3be,_3bf){
for(var i=0;_3bf.links!=null&&i<_3bf.links.length;i++){
_3be.write("&nbsp;&nbsp;|&nbsp;<a href='"+_3bf.links[i].url+"' title='"+_3bf.links[i].label+"' class='action'>"+_3bf.links[i].label+"</a>");
}
},toggleSection:function(_3c1){
var _3c2=dojo.byId(_3c1+"_twisty");
var _3c3=dojo.byId(_3c1+"_comm_appLinks");
if(_3c3.style.display=="none"){
dojo.fx.wipeIn({node:_3c3,duration:300}).play();
dojo.removeClass(_3c2,"lotusTwistyClosed");
dojo.addClass(_3c2,"lotusTwistyOpen");
dojo.cookie("community.inline.card.links",1);
}else{
dojo.fx.wipeOut({node:_3c3,duration:300}).play();
dojo.removeClass(_3c2,"lotusTwistyOpen");
dojo.addClass(_3c2,"lotusTwistyClosed");
dojo.cookie("community.inline.card.links",0);
}
},writeLinks:function(_3c4,_3c5,_3c6,_3c7){
var _3c8=dojo.i18n.getLocalization("lc_default")["label.overview"];
if(_3c8==null){
_3c8=dojo.i18n.getLocalization("lc_default")["label.navigation.overview.heading"];
}
if(_3c7){
_3c4.write("<ul id=\""+_3c5.uuid+"_comm_appLinks\">");
}else{
_3c4.write("<ul id=\""+_3c5.uuid+"_comm_appLinks\" style=\"display: none\">");
}
_3c4.write("<li>"+"<a href='"+_3c5.homeUrl+"' title=\""+_3c8+"\" class='action'>"+_3c8+"</a>"+"</li>");
for(var i=0;_3c5.links!=null&&i<_3c5.links.length;i++){
_3c4.write("<li id=\""+_3c5.links[i].id+"navItem\"");
if(_3c6==_3c5.links[i].id){
_3c4.write(" class=\"lotusSelected\" ");
}
_3c4.write("><a href=\""+_3c5.links[i].url+"\" title=\""+_3c5.links[i].label+"\" class=\"action\">"+_3c5.links[i].label+"</a></li>");
}
_3c4.write("</ul>");
return;
}};
}
if(!dojo._hasResource["lconn.core.i18nOverrider"]){
dojo._hasResource["lconn.core.i18nOverrider"]=true;
dojo.provide("lconn.core.i18nOverrider");
if(lconn.core.i18nOverrider.originalFunction==null){
lconn.core.i18nOverrider.originalFunction=dojo.i18n.getLocalization;
}
dojo.i18n.getLocalization=function(_3ca,_3cb,_3cc){
if(_3ca=="dijit"||_3ca=="dojo"){
return lconn.core.i18nOverrider.originalFunction(_3ca,_3cb,_3cc);
}
var _3cd=_3cb;
if(window[_3ca]!=null){
var _3ce=window[_3ca];
if(_3ce!=null&&_3ce!="undefined"){
return _3ce;
}else{
return lconn.core.i18nOverrider.originalFunction(_3ca,_3cb,_3cc);
}
}else{
return lconn.core.i18nOverrider.originalFunction(_3ca,_3cb,_3cc);
}
};
lconn.core.i18nOverrider.getResourceString=function(_3cf){
return dojo.i18n.getLocalization("lc_default",_3cf);
};
lconn.core.i18nOverrider.loadResourceStringsInParams=function(_3d0,_3d1){
if(_3d0==null){
_3d0=new Array;
}
for(var i=0;_3d1!=null&&i<_3d1.length;i++){
var _3d3=dojo.i18n.getLocalization("default",_3d1[i]);
var _3d4=_3d3.replace(/\'\'/g,"'");
if(_3d4==null||_3d4==""){
_3d0.push([_3d1[i],_3d1[i]+" resourceKey not found"]);
}else{
_3d0.push([_3d1[i],_3d4]);
}
}
return _3d0;
};
lconn.core.i18nOverrider.replaceParams=function(_3d5,_3d6){
var _3d7=_3d5.indexOf("{");
if(_3d7!=-1){
var _3d8=_3d5.indexOf("}");
if(_3d8==-1){
return _3d5;
}
var _3d9=_3d5.substring(_3d7+1,_3d8);
var _3da=_3d6[_3d9];
return _3d5.substring(0,_3d7)+_3da+lconn.core.i18nOverrider.replaceParams(_3d5.substring(_3d8+1),_3d6);
}else{
return _3d5;
}
};
}
if(!dojo._hasResource["lconn.core.utilities"]){
dojo._hasResource["lconn.core.utilities"]=true;
dojo.provide("lconn.core.utilities");
lconn.core.utilities.getURLParam=function(_3db){
var _3dc=decodeURIComponent(window.location);
if(_3dc.indexOf(_3db)==-1){
return null;
}else{
var _3dd=_3dc.substring(_3dc.indexOf(_3db+"=")+_3db.length+1);
var _3de=_3dd.indexOf("&");
if(_3de!=-1){
_3dd=_3dd.substring(0,_3de);
}
return _3dd;
}
};
lconn.core.utilities.replacePlaceHolders=function(_3df,_3e0){
var _3e1=new Object();
for(var i=0;_3e0!=null&&i<_3e0.length;i++){
_3e1["{"+i+"}"]=_3e0[i];
}
return lconn.core.i18nOverrider.replaceParams(_3df,_3e1);
};
lconn.core.utilities.processUntilElementIsFound=function(_3e3,_3e4,_3e5,_3e6){
var _3e7="";
var _3e8=0;
_3e7=window.setInterval(function(){
var _3e9=null;
if(_3e5!=null){
_3e9=_3e5.getElementById(_3e3);
}else{
_3e9=dojo.byId(_3e3);
}
_3e8++;
if(_3e9!=null){
window.clearInterval(_3e7);
_3e4(_3e9,_3e6);
}else{
if(_3e8==20){
window.clearInterval(_3e7);
}
}
},500);
};
lconn.core.utilities.processUntilAvailable=function(_3ea,test,_3ec){
var _3ed="";
var _3ee=0;
_3ed=window.setInterval(function(){
_3ee++;
if(eval(test)){
window.clearInterval(_3ed);
if(_3ec!=null){
_3ea(_3ec);
}else{
_3ea();
}
}else{
if(_3ee==20){
window.clearInterval(_3ed);
}
}
},500);
};
lconn.core.utilities.gotoURL=function(url,_3f0){
if(_3f0==null){
if(url.indexOf("?")!=-1){
url+="&ver="+profilesData.config.buildNumber+"&lastMod="+profilesData.config.profileLastMod;
}else{
url+="?ver="+profilesData.config.buildNumber+"&lastMod="+profilesData.config.profileLastMod;
}
}
if(dojo.isIE){
var _3f1=url;
setTimeout("window.location.href = SideBar_RedirectUrl",0);
}else{
window.location.assign(url);
}
};
lconn.core.utilities.toggleVisibility=function(_3f2,_3f3){
var _3f4=null;
if((typeof _3f2)=="string"){
_3f4=dojo.byId(_3f2);
}else{
_3f4=_3f2;
}
if(_3f4){
if(_3f4.style.visibility=="hidden"){
lconn.core.utilities.show(_3f4,_3f3);
}else{
lconn.core.utilities.hide(_3f4,_3f3);
}
}
return false;
};
lconn.core.utilities.hide=function(_3f5,_3f6,nofx,_3f8){
var _3f9=null;
if((typeof _3f5)=="string"){
_3f9=dojo.byId(_3f5);
}else{
_3f9=_3f5;
}
if(_3f9!=null){
var _3fa=function(){
_3f9.style.visibility="hidden";
if(!_3f6){
_3f9.style.display="none";
}
if(_3f8!=null){
_3f8();
}
};
if(nofx==null||nofx==false){
var _3fb=dojo.fx.wipeOut({node:_3f9,duration:300,onEnd:_3fa});
_3fb.play();
}else{
_3fa();
}
}
return false;
};
lconn.core.utilities.show=function(_3fc,_3fd,_3fe,nofx,_400){
var _401=0;
var _402=null;
if((typeof _3fc)=="string"){
_402=dojo.byId(_3fc);
}else{
_402=_3fc;
}
if(_3fe&&_402==null){
var _403="";
_403=window.setInterval(function(){
_401++;
if((typeof _3fc)=="string"){
_402=dojo.byId(_3fc);
}else{
_402=_3fc;
}
if(_402!=null){
window.clearInterval(_403);
lconn.core.utilities.show(_402,_3fd,false,nofx,_400);
}else{
if(_401==20){
window.clearInterval(_403);
}
}
},300);
}else{
if(_402!=null){
var _404=function(){
_402.style.visibility="visible";
if(!_3fd){
_402.style.display="block";
}
if(_400!=null){
_400();
}
};
if(nofx==null||nofx==false){
var _405=dojo.fx.wipeIn({node:_402,duration:300});
_405.play();
}else{
_404();
}
}
}
return false;
};
}
if(!dojo._hasResource["lconn.profiles.sametime.sametimeAwareness"]){
dojo._hasResource["lconn.profiles.sametime.sametimeAwareness"]=true;
dojo.provide("lconn.profiles.sametime.sametimeAwareness");
lconn.profiles.sametime.sametimeAwareness={elementId:null,sametimeServiceRootURL:"http://localhost:59449/stwebapi/",isInited:false,profileSametimeAwarenessSet:false,bizCardSametimeAwarenessSet:false,inputType:"email",initIMService:function(_406){
if(_406.secureUse&&_406.secureURL&&_406.secureURL!=""){
this.sametimeServiceRootURL=_406.secureURL;
}else{
if(_406.unsecureUse&&_406.unsecureUrl&&_406.unsecureUrl!=""){
this.sametimeServiceRootURL=_406.unsecureUrl;
}
}
if(_406.inputType!=null){
this.inputType=_406.inputType;
}
this.isInited=true;
if(typeof (Status)=="undefined"){
lconn.core.bizCard.bizCardUtils.loadScript(this.sametimeServiceRootURL+"getStatusNonDojo.js");
lconn.core.bizCard.bizCardUtils.loadCss(this.sametimeServiceRootURL+"main.css");
}
},initBizCardIMService:function(_407){
if(_407.X_bizCardSecureSTAwareness&&_407.X_bizCardLocation&&_407.X_bizCardLocation.secure&&_407.X_bizCardLocation.secure!=""){
this.sametimeServiceRootURL=_407.X_bizCardLocation.secure;
}else{
if(_407.X_bizCardSTAwareness&&_407.X_bizCardLocation&&_407.X_bizCardLocation.unsecure&&_407.X_bizCardLocation.unsecure!=""){
this.sametimeServiceRootURL=_407.X_bizCardLocation.unsecure;
}
}
if(_407.X_bizCardSTInputType!=null){
this.inputType=_407.X_bizCardSTInputType;
}
this.isInited=true;
if(typeof (Status)=="undefined"){
lconn.core.bizCard.bizCardUtils.loadScript(this.sametimeServiceRootURL+"getStatusNonDojo.js");
lconn.core.bizCard.bizCardUtils.loadCss(this.sametimeServiceRootURL+"main.css");
}
},loadProfilesIMStatus:function(_408,_409){
this.elementId=_409.loadAwarenessInto;
var _40a="";
if(lconn.profiles.sametime.sametimeAwareness.inputType=="uid"){
_40a=_409.uid;
}else{
_40a=_409.email;
}
var url=lconn.profiles.sametime.sametimeAwareness.sametimeServiceRootURL+"getstatus/";
url+=_40a+"?jsonp=lconn.profiles.sametime.sametimeAwareness.setSametimeStatus&time="+new Date().getTime();
var _40c=function(){
lconn.core.bizCard.bizCardUtils.loadScript(url);
lconn.profiles.sametime.sametimeAwareness.pollSametimeStatus(url,"window.lconn.profiles.sametime.sametimeAwareness.profileSametimeAwarenessSet == true");
};
var _40d=function(){
var _40e=document.getElementById(lconn.profiles.sametime.sametimeAwareness.elementId);
if(typeof (Status)=="undefined"||_40e.innerHTML.indexOf(generalrs.loadingSTStatus)!=-1){
_40e.innerHTML=generalrs.noStatuAvailable;
_40e.className="awareness offline";
if(typeof (getStatusImgUrl)!="undefined"){
_40e.style.backgroundImage="url("+getStatusImgUrl("offline")+")";
}
}
};
setTimeout(_40d,6000);
setTimeout(_40c,3000);
},pollSametimeStatus:function(_40f,test){
var _411="";
var _412=0;
_411=window.setInterval(function(){
_412++;
if(eval(test)){
window.clearInterval(_411);
}else{
if(_412==4){
window.clearInterval(_411);
}else{
if(_40f){
lconn.core.bizCard.bizCardUtils.loadScript(_40f);
}
}
}
},500);
},setSametimeStatus:function(_413){
var _414=document.getElementById(this.elementId);
if(_413.error!=null||_413.statusMessage==null||_413.statusMessage==""){
_414.innerHTML=generalrs.noStatuAvailable;
_414.className="awareness offline";
if(typeof (getStatusImgUrl)!="undefined"){
_414.style.backgroundImage="url("+getStatusImgUrl("offline")+")";
}
}else{
this.profileSametimeAwarenessSet=true;
if(_414.getAttribute("className")!=null){
if(typeof (getStatusImgUrl)!="undefined"){
_414.style.backgroundImage="url("+getStatusImgUrl(_413.status)+")";
}
_414.className="awareness "+Status.getStyleForStatus(_413.status);
_414.onclick=function(){
sametime_invoke("chat",_413.username);
};
if(_413.statusMessage!=null&&_413.statusMessage!=""){
_414.title=_413.statusMessage;
_414.innerHTML="&nbsp;"+_413.statusMessage;
}else{
if(_413.status!=null&&_413.status>0){
_414.title="";
_414.innerHTML="&nbsp;";
}else{
_414.title=generalrs.noStatuAvailable;
_414.innerHTML=generalrs.noStatuAvailable;
}
}
}else{
if(typeof (getStatusImgUrl)!="undefined"){
_414.style.backgroundImage="url("+getStatusImgUrl(_413.status)+")";
}
_414.setAttribute("class","awareness "+Status.getStyleForStatus(_413.status));
_414.setAttribute("onclick","sametime_invoke('chat', '"+_413.username+"');");
if(_413.statusMessage!=null&&_413.statusMessage!=""){
_414.innerHTML="&nbsp;"+_413.statusMessage;
_414.setAttribute("title",_413.statusMessage);
}else{
if(_413.status!=null&&_413.status>0){
_414.innerHTML="&nbsp;";
_414.setAttribute("title","");
}else{
_414.innerHTML=generalrs.noStatuAvailable;
_414.setAttribute("title",generalrs.noStatuAvailable);
}
}
}
}
},loadBizCardStatus:function(_415){
if(_415.error!=null||_415.statusMessage==null||_415.statusMessage==""){
}else{
var _416=document.getElementById(_415.username+"vcardNameElem");
this.bizCardSametimeAwarenessSet=true;
if(_416!=null){
_416.className=" awareness "+Status.getStyleForStatus(_415.status);
_416.setAttribute("userId",_415.username);
if(typeof (getStatusImgUrl)!="undefined"){
_416.style.backgroundImage="url("+getStatusImgUrl(_415.status)+")";
}
_416.onclick=function(){
var _417=this.getAttribute("userId");
sametime_invoke("chat",_417);
};
}
if(dojo.byId(_415.username+"ChatAction")!=null){
dojo.byId(_415.username+"ChatAction").style.display="inline";
}
if(dojo.byId(_415.username+"ChatActionMore")!=null){
dojo.byId(_415.username+"ChatActionMore").style.display="inline";
}
if(dojo.byId(_415.username+"CallActionMore")){
dojo.byId(_415.username+"CallActionMore").style.display="inline";
}
if(dojo.byId(_415.username+"vcardCommentElem")!=null){
dojo.byId(_415.username+"vcardCommentElem").style.display="block";
dojo.byId(_415.username+"vcardStStatusElem").innerHTML="&nbsp;"+_415.statusMessage;
}
}
}};
}
if(!dojo._hasResource["lconn.profiles.bizCard.bizCard"]){
dojo._hasResource["lconn.profiles.bizCard.bizCard"]=true;
dojo.provide("lconn.profiles.bizCard.bizCard");
if(!window.SemTagPerson){
window.SemTagPerson={services:[]};
}
lconn.profiles.bizCard.bizCard={applicationContext:null,servletUrlByUserId:null,servletUrlByEmail:null,requestor:null,services:[],initited:false,init:function(){
if(this.initited==false){
this.applicationContext=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
this.servletUrlByUserId2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?userid=@@@USERID@@@&lang=@@@LANG@@@";
this.servletUrlByEmail2=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?email=@@@EMAIL@@@&lang=@@@LANG@@@";
this.servletUrlByUserId=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?userid=@@@USERID@@@&callback=lconn.profiles.bizCard.bizCard.dispatchByUserId&lang=@@@LANG@@@";
this.servletUrlByEmail=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/json/profile.do?email=@@@EMAIL@@@&callback=lconn.profiles.bizCard.bizCard.dispatchByEmail&lang=@@@LANG@@@";
this.requestor=new SemTagUtil.crossDomainRequest();
if(window.generalrs==null){
lconn.core.bizCard.bizCardUtils.loadScript(lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/resources/js-resources.js");
}
this.initited=true;
}
},getIdMethod:function(_418){
return (_418.email&&_418.email.internet)?_418.email.internet:null;
},convMethod:function(_419){
return _419;
},dispatchByEmail:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByEmail: data: "+data);
}
var _41b=(data.email&&data.email.internet)?data.email.internet:null;
this.dispatch(_41b,data);
},dispatchByUserId:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByUserId: data: "+data);
}
var _41d=data.X_lconn_userid?data.X_lconn_userid:null;
this.dispatch(_41d,data);
},dispatchByConfig:function(data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatchByConfig: data: "+data);
}
this.dispatch("configDataId",data);
},dispatch:function(id,data){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("lconn.profiles.bizCard.bizCard.dispatch: id:"+id+"  data: "+data);
}
this.requestor.dispatch(id,data);
},processTag:function(_421){
try{
if(!this.initited){
lconn.core.bizCard.bizCardUtils.init();
SemTagMenu.init();
this.init();
}
if(window.generalrs==null){
lconn.core.bizCard.bizCardUtils.loadScript(lconn.core.bizCard.bizCardUtils.getBaseURL("hcard")+"/resources/js-resources.js");
lconn.core.utilities.processUntilAvailable(dojo.hitch(this,this.processHcard),"window.generalrs != null",_421);
}else{
this.processHcard(_421);
}
}
catch(e){
console.log(e);
}
},processHcard:function(_422){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Processing at lconn.profiles.bizCard.bizCard.processHcard for "+(dojo.isIE?_422.innerText:_422.textContent));
}
var _423=this.getNameElement(_422);
if(!_423){
return;
}
if(this.isInline(_422)){
var _424={"target":_423};
this.getTagFromServer(_424);
}else{
lconn.core.bizCard.bizCardUtils.addHover(_423,this.showHover,this.showMenu,this.keystrokeHandler);
}
},isInline:function(_425){
return this.getHcardAttributeValue("X-person-display-inline",_425);
},loadHcardPerson:function(_426){
var _427=new Object();
var _428=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_426);
var _429=_428.getElementsByTagName("*");
for(var i=0;i<_429.length;i++){
var _42b=_429[i];
if(_42b.className){
var _42c=_42b.className.split(" ");
for(var j=0;j<_42c.length;j++){
var c=_42c[j];
var attr=this.getHcardAttributeValue(c,_428);
if(attr){
_427[c]=attr;
}
}
}
}
return _427;
},getHcardAttributeValue:function(_430,_431){
switch(_430){
case ("email"):
return this.getHcardTypedAttribute(_431,_430,"internet");
case ("tel"):
return this.getHcardTypedAttribute(_431,_430,"voice");
case ("adr"):
return this.getHcardTypedAttribute(_431,_430,"intl");
}
var _432=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_431);
var _433=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_430,_432,1);
if(_433.length>0&&_433[0].tagName.match(/^abbr$/i)){
return _433[0].getAttribute("title");
}
switch(_430){
case ("fn"):
var fn=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_433[0]);
if(fn){
return fn;
}else{
return this.getHcardAttributeValue("n",_431);
}
break;
case ("n"):
if(_433.length>0){
var _435=_433[0];
var _436="";
var _437=["honorific-prefix","given-name","additional-name","family-name","honorific-suffix"];
for(var i=0;i<5;i++){
var n=lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(lconn.core.bizCard.bizCardUtils.getElementsByClassName(_437[i],_435,1)[0]);
if(n){
_436+=n+" ";
}
}
return _436;
}
return "";
break;
case ("photo"):
var _43a=_433[0];
if(_43a){
return _43a.getAttribute("src");
}else{
return;
}
break;
case ("X-sametime-status"):
var _43b=_433[0];
if(!_43b){
return "";
}
var _43c=_43b.getAttribute("value");
if(_43c){
return _43c;
}else{
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_43b);
}
break;
case ("X-person-display-inline"):
if(_433.length>0){
return true;
}else{
return false;
}
case ("street-address"):
case ("post-office-box"):
case ("extended-address"):
case ("locality"):
case ("region"):
case ("postal-code"):
case ("country-name"):
case ("title"):
case ("role"):
case ("org"):
default:
return lconn.core.bizCard.bizCardUtils.getSinglePropertyValue(_433[0]);
break;
}
},getHcardTypedAttribute:function(_43d,_43e,_43f){
var _440=new Object();
var _441=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_43d);
var _442=lconn.core.bizCard.bizCardUtils.getElementsByClassName(_43e,_441);
for(var i=0;i<_442.length;i++){
var _444=_442[i];
if(_43e=="email"&&_444.nodeName.toLowerCase()=="a"&&_444.href.match(/^mailto:/)){
var _445=_444.href.indexOf("?");
if(_445>-1){
_440[_43f]=_444.href.slice(7,_445);
}else{
_440[_43f]=_444.href.slice(7);
}
continue;
}
_440=lconn.core.bizCard.bizCardUtils.getTypedValue(_444,_43f);
}
return _440;
},showHover:function(_446){
try{
lconn.core.bizCard.bizCardUtils.showHover(_446,lconn.profiles.bizCard.bizCard.showMenu);
}
catch(e){
console.log("Error in lconn.profiles.bizCard.bizCard.showHover");
console.log(e);
}
},showMenu:function(_447){
SemTagMenu.waitCursor();
lconn.profiles.bizCard.bizCard.getTagFromServer(_447);
},keystrokeHandler:function(_448){
if(_448.ctrlKey&&(_448.keyCode==13)){
if(_448.preventDefault){
_448.preventDefault();
}
lconn.profiles.bizCard.bizCard.showMenu(_448);
}
},getSearchType:function(_449){
indexOf.lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
},getTagFromServer:function(_44a){
var _44b=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_44a);
var _44c=lconn.core.bizCard.bizCardUtils.getLangParam();
var _44d={"LANG":lconn.core.bizCard.bizCardUtils.getLangParam()};
var url=null;
var _44f=null;
var _450=null;
var _451=this.getElementUserId(_44b);
if(_451){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sending request for user id: "+_451);
}
_44d["USERID"]=_451;
_44f=_451;
url=this.servletUrlByUserId2;
_450="lconn.profiles.bizCard.bizCard.dispatchByUserId";
}else{
var _452=this.getElementEmail(_44b);
if(_452){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sending request for email: "+_452);
}
_44d["EMAIL"]=_452;
_44f=_452;
url=this.servletUrlByEmail2;
_450="lconn.profiles.bizCard.bizCard.dispatchByEmail";
}
}
if(_44f!=null){
lconn.core.bizCard.bizCardUtils.getBizCardData(url,_44d,_450,this.requestor,this.requestReturn,_44a,_44f);
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.getTagFromServer sent");
}
}else{
this.noInformationProvided(_44b,_44a);
}
},noInformationProvided:function(_453,_454){
lconn.profiles.bizCard.bizCard.update(null,_453,_454);
},requestReturn:function(_455,_456,_457){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.requestReturn: success="+_455);
}
var _458=lconn.core.bizCard.bizCardUtils.getLiveElementFromEvent(_457);
var _456=_455?lconn.profiles.bizCard.bizCard.convMethod.call(null,_456):{};
lconn.profiles.bizCard.bizCard.fillPersonJsonMoreFromDom(_456,_458);
lconn.profiles.bizCard.bizCard.update(_456,_458,_457);
},fillPersonJsonMoreFromDom:function(_459,_45a){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.fillPersonJsonMoreFromDom");
}
if(!_459.photo){
_459.photo=lconn.core.bizCard.bizCardUtils.baseUrl+"/images/profileNoPhoto.gif";
}
if(!_459.fn){
var _45b=lconn.core.bizCard.bizCardUtils.findNameElementInHcard(_45a);
if(_45b){
_459.fn=lconn.core.bizCard.bizCardUtils.getTextValue(_45b);
}
}
if(!_459.email||!_459.email.internet){
var _45c=this.getElementEmail(_45a);
_459.email={"internet":_45c};
}
if(!_459.tel||!_459.tel.voice){
var _45d=lconn.core.bizCard.bizCardUtils.findElementByNameInHcard(_45a,"tel");
if(_45d){
var tels=lconn.core.bizCard.bizCardUtils.getTypedValue(_45d,"voice");
_459.tel={"voice":tels["voice"]};
}
}
var _45f=lconn.core.bizCard.bizCardUtils.findElementByNameInHcard(_45a,"adr");
var _460={};
if(_45f){
_460=SemTagAddr.getAddressJson(_45f);
_459.adr=_460;
}
},update:function(_461,_462,_463){
if(lconn.core.bizCard.bizCardUtils.isDebug){
console.log("Person.update");
}
this.currentPerson=_461;
var _464=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",_462);
if(this.isInline(_464)){
var out=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getInlineMarkup(_461,"ltr",out);
var span=document.createElement("span");
span.innerHTML=out.buffer;
_464.appendChild(span);
var _467=(dojo.cookie("card.inline.expanded")?false:true);
}else{
var _468=new Array();
var _469="personMenuActions";
var _46a=new lconn.core.bizCard.bizCardUtils.out();
var _46b=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getMenuData(_461,"ltr",_468,_469,_46a,_46b);
lconn.core.bizCard.bizCardUtils.setMenuData(_463,_468,_469,lconn.core.bizCard.bizCardUtils.getMenuHeaderJson(_46a.buffer,-100));
}
if(_461!=null){
if(_461.X_bizCardSTAwareness||_461.X_bizCardSecureSTAwareness){
this.invokeSametimeAwareness(_461);
}
}
},invokeSametimeAwareness:function(_46c){
if(lconn.profiles.sametime.sametimeAwareness.isInited!=true){
lconn.profiles.sametime.sametimeAwareness.initBizCardIMService(_46c);
}
lconn.core.utilities.processUntilAvailable(this.invokeSametimeAwarenessForPerson,"window.Status != null",_46c,false);
},invokeSametimeAwarenessForPerson:function(_46d){
var _46e="";
if(lconn.profiles.sametime.sametimeAwareness.inputType=="uid"){
_46e=_46d.uid;
}else{
_46e=_46d.email.internet;
}
var url=lconn.profiles.sametime.sametimeAwareness.sametimeServiceRootURL+"getstatus/";
url+=_46e+"?jsonp=lconn.profiles.sametime.sametimeAwareness.loadBizCardStatus&time="+new Date().getTime();
lconn.core.bizCard.bizCardUtils.loadScript(url);
lconn.profiles.sametime.sametimeAwareness.pollSametimeStatus(url,"window.lconn.profiles.sametime.sametimeAwareness.bizCardSametimeAwarenessSet == true");
},sametimeStart:function(_470,_471){
sametime_invoke(_470,_471);
},getElementEmail:function(elem){
var _473;
var _474=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
if(_474){
_473=this.getHcardAttributeValue("email",_474);
_473=_473.internet;
}else{
if(elem.nodeName.toLowerCase()=="a"&&elem.href.match(/^mailto:/)){
_473=elem.href.replace(/^mailto:/,"");
}
}
return _473;
},getElementUserId:function(elem){
var _476="";
var _477=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
if(_477){
_476=this.getHcardAttributeValue("x-lconn-userid",_477);
}
return _476;
},getNameElement:function(elem){
if(elem.className!="vcard"){
elem=lconn.core.bizCard.bizCardUtils.getParentByClassName("vcard",elem);
}
var _479=lconn.core.bizCard.bizCardUtils.getElementsByClassName("fn",elem,1)[0];
if(!_479){
_479=lconn.core.bizCard.bizCardUtils.getElementsByClassName("n",elem,1)[0];
}
return _479;
},requestReturnMiniBizCard:function(_47a,_47b,_47c,_47d){
var _47b=_47a?lconn.profiles.bizCard.bizCard.convMethod.call(null,_47b):{};
var _47e=new lconn.core.bizCard.bizCardUtils.out();
lconn.profiles.bizCard.bizCardUI.getMenuData(_47b,null,null,null,_47e,null,true,(_47d?true:false));
if(_47c.target!=null){
_47c.target.innerHTML=_47e.buffer;
}else{
if(_47c.callbackfn!=null){
_47c.callbackfn(_47e.buffer);
}
}
},renderMiniBizCard:function(_47f,_480,_481){
this.init();
var _482={"target":_481,"callbackfn":_480};
var src=this.servletUrlByUserId.replace(/@@@USERID@@@/,_47f);
this.requestor.request(src,10000,this.requestReturnMiniBizCard,_482,_47f);
}};
}
if(!dojo._hasResource["lconn.profiles.bizCard.bizCardUI"]){
dojo._hasResource["lconn.profiles.bizCard.bizCardUI"]=true;
dojo.provide("lconn.profiles.bizCard.bizCardUI");
lconn.profiles.bizCard.bizCardUI={isDebug:false,isSlim:false,isExpandable:true,isEmailEnabled:true,getMenuData:function(_484,bidi,_486,_487,_488,_489,_48a,_48b){
var _48c=dojo.cookie("card.popup.slim");
if(typeof (_48a)!="undefined"&&_48a!=null){
this.isSlim=_48a;
}else{
if(_48c!=null){
this.isSlim=(_48c==1);
}
}
if(typeof (_48b)!="undefined"){
this.isExpandable=_48b;
}
if(_484!=null){
this.isEmailEnabled=(_484.email!=null&&_484.email.internet!=null);
}else{
this.isEmailEnabled=false;
}
if(this.isDebug){
SemTagSvc.debug("slim? "+this.isSlim);
SemTagSvc.debug("expandable? "+this.isExpandable);
SemTagSvc.debug("email? "+this.isEmailEnabled);
}
var _48d=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
_488.write("<div class=\"lotusui\">");
_488.write("<div id=\"cardDiv\" class=\"lotusVCard\" style=\"margin: 10px; position: static; opacity: 1;\">");
_488.write("<a id=\"A11Yblank\" href=\"javascript:void(0);\" ><img src=\""+_48d+"/nav/common/styles/images/blank.gif\" alt=\"\" /></a>");
_488.write("<table id=\"cardTable\" class=\"lotusContainer\" cellspacing=\"0\">");
_488.write("<tbody>");
_488.write("<tr id=\"cardHeader\" "+((this.isSlim)?"style=\"display:none\"":"")+">"+"<td>"+"<table cellspacing=\"0\" width=\"100%\">");
if(_484!=null&&_484.X_inDirectory!=null&&_484.X_inDirectory=="true"){
this.writeHeaderUIContent(_488,_484,false);
}
_488.write("</table>"+"</td></tr>");
_488.write("<tr id=\"cardBody\">");
_488.write("<td class=\"lotusDetails\" colspan=\"6\">");
this.writeBodyUIContent(_484,bidi,_486,_487,_488,_489,_48d);
_488.write("</td>");
_488.write("</tr>");
if(_484!=null&&_484.X_inDirectory!=null&&_484.X_inDirectory=="true"){
this.writeFooterUIContent(_484,bidi,_486,_487,_488,_489,_48d);
}
_488.write("</tbody></table></div></div>");
},writeHeaderUIContent:function(_48e,_48f,_490){
this.writeLinks(_48e,_48f,_490);
},writeBodyUIContent:function(_491,bidi,_493,_494,_495,_496,_497){
this.getSubUIContent(_491,bidi,_493,_494,_495,_496,_497);
},writeFooterUIContent:function(_498,bidi,_49a,_49b,_49c,_49d,_49e){
_49c.write("<tr id=\"cardFooter\""+((this.isSlim)?"style=\"display:none\"":"")+">");
_49c.write("<td colspan=\"6\">");
if(_498.X_inDirectory){
_49c.write("<div class=\"lotusPersonActions\">");
_49c.write("<ul class=\"lotusInlinelist\">");
var _49f=(typeof (SemTagSvcConfig)!="undefined"&&SemTagSvcConfig.isBidiRTL);
if(_498.X_bizCardActions.length>0){
_49c.write("<li class=\"lotusFirst\">"+this.getActionLink(_498,0,true)+"</li>");
if(_49f){
_49c.write("<li class=\"lotusFirst\"></li>");
}
}
var _4a0=_498.email.internet;
if(_498.X_bizCardSTInputType=="uid"){
_4a0=_498.uid;
}
if(_498.X_bizCardSTAwareness||_498.X_bizCardSecureSTAwareness){
if(_498.X_STChatAction){
_49c.write("<li id=\""+_4a0+"ChatAction\" "+(_49f?"class=\"lotusFirst\"":"")+" style=\"display:none;\">"+"<a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('chat', '"+_4a0+"');\">"+"<img src=\""+_49e+"/nav/common/styles/images/iconChat.gif\" alt=\"\" /> "+generalrs.personCardChat+"</a>"+"</li>");
}
if(typeof (SemTagSvcConfig)!="undefined"&&SemTagSvcConfig.isBidiRTL){
_49c.write("<li class=\"lotusFirst\"></li>");
}
}
if(_498.X_bizCardActions.length>1){
_49c.write("<li "+(_4a0==""||_49f?"class=\"lotusFirst\"":"")+">"+"<a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCardUI.displayMore('"+_498.key+"MoreActionMenu',this.parentNode.parentNode);event.cancelBubble=true\">"+generalrs.personCardMoreActions+"<img src=\""+_49e+"/nav/common/styles/images/btnDropDown.gif\" alt=\""+generalrs.personCardMoreActionsAltText+"\" title=\""+generalrs.personCardMoreActionsAltText+"\">"+"</a>"+"</li>");
}
_49c.write("</ul>"+"</div>");
if(_498.X_bizCardActions.length>1||(_4a0!=""&&(_498.X_bizCardSTAwareness||_498.X_bizCardSecureSTAwareness))){
this.writeMoreActionsMenu(_49c,_498,_49e,false);
}
}
_49c.write("</td></tr>");
},getActionLink:function(_4a1,_4a2,_4a3){
var _4a4=_4a1.X_bizCardActions[_4a2];
var icon="";
if(_4a3&&typeof (_4a4.icon)!="undefined"){
icon="<img src=\""+_4a4.icon.href+"\" alt=\""+_4a4.icon.alt+"\" /> ";
}
return "<a class=\"email\" href=\""+_4a4.urlPattern+"\">"+icon+_4a4.label+"</a>";
},getSubUIContent:function(_4a6,bidi,_4a8,_4a9,_4aa,_4ab,_4ac){
if(_4a6!=null&&typeof (_4a6.X_bizCardMainHtml)!="undefined"){
if(this.isExpandable&&_4a6.X_inDirectory=="true"){
this.writeExpandoUIContent(_4aa,_4ac);
}
if(_4a6.X_bizCardShowPhoto){
if(_4a6.X_inDirectory=="true"){
_4aa.write("<div class=\"lotusPhoto photo\"><img src=\""+_4a6.photo+"\" alt=\""+_4a6.fn+"\" title=\""+_4a6.fn+"\" height=\"59\" width=\"59\"></div>");
}else{
_4aa.write("<div class=\"lotusPhoto photo\"><img src=\""+_4ac+"/nav/common/styles/images/profileNoPhoto.gif\" alt=\""+_4a6.fn+"\" title=\""+_4a6.fn+"\" height=\"59\" width=\"59\"></div>");
}
}
_4aa.write("<div class=\"lotusPersonInfo\">");
if(_4a6.X_inDirectory!=null&&_4a6.X_inDirectory=="true"){
_4aa.write(_4a6.X_bizCardMainHtml);
}else{
if(_4a6.X_bizCardMainHtml!=""){
_4aa.write(_4a6.X_bizCardMainHtml);
}else{
var _4ad=dojo.i18n.getLocalization("generalrs")["label.personcard.noprofilemsg"];
_4aa.write("<h3 id='noProfileMsg'>"+_4ad+"</h3>");
}
}
_4aa.write("</div><!--end lotusInfo-->");
var _4ae=_4a6.email.internet;
if(_4a6.X_bizCardSTInputType=="uid"){
_4ae=_4a6.uid;
}
_4aa.write("<div id=\""+_4ae+"vcardCommentElem\" class=\"lotusComment\" style=\"display: none;\">");
_4aa.write("<div class=\"lotusCommentHeader\">&nbsp;</div><!--end comment header-->");
_4aa.write("<div class=\"lotusCommentBody\">\t");
if(_4ae!=""&&_4a6.X_bizCardSTStatusMsg){
_4aa.write("<p>Sametime: <span id=\""+_4ae+"vcardStStatusElem\"></span></p>");
}
_4aa.write("</div><!--end commentBody-->");
_4aa.write("</div><!--end comment-->");
}else{
var _4ad=dojo.i18n.getLocalization("generalrs")["label.personcard.noprofilemsg"];
_4aa.write("<h3 id='noProfileMsg'>"+_4ad+"</h3>");
}
},writeExpandoUIContent:function(_4af,_4b0){
_4af.write("<div class=\"lotusRight\">");
_4af.write("<a onclick=\"lconn.profiles.bizCard.bizCardUI.toggleSlimCard(this,'"+_4b0+"');"+"event.cancelBubble=true;\""+"href=\"javascript:void(0);\">");
_4af.write(" <img id=\"slimTwisty\" src=\""+_4b0+"/nav/common/styles/images/"+(this.isSlim?"iconShow.gif":"iconHide.gif")+"\" alt=\"\" title=\"\"/>");
_4af.write("</a>");
_4af.write("</div>");
},getInlineMarkup:function(_4b1,bidi,_4b3){
var _4b4=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
var _4b5=_4b3;
if(_4b1!=null){
var _4b6=_4b1.email.internet;
if(_4b1.X_bizCardSTInputType=="uid"){
_4b6=_4b1.uid;
}
_4b5.write("<div class=\"lotusui\">");
_4b5.write("<div id=\""+_4b1.key+"\" class=\"vcard lotusVCard lotusInlineVCard\" style=\"position:static;margin:10px\">");
_4b5.write("  <div class=\"lotusContainer\">");
_4b5.write("    <div id=\""+_4b1.key+"_Pivot\" class=\"lotusPivotNav\">");
_4b5.write("      <div class=\"lotusPivotNavToggle\">");
_4b5.write("        <a href=\"javascript:void(0);\" title=\"\" onclick=\"lconn.core.bizCard.bizCardUtils.toggleInlineCard('"+_4b1.key+"')\">"+"&nbsp;"+"</a>");
_4b5.write("      </div>");
if(_4b1.X_bizCardShowPhoto){
_4b5.write("      <div class=\"lotusPhoto photo\">");
_4b5.write("        <img id=\"photo\" src=\""+_4b1.photo+"\" alt=\""+_4b1.fn+"\" title=\""+_4b1.fn+"\" height=\"35\" width=\"35\" />");
_4b5.write("      </div>");
}
_4b5.write("      <div class=\"lotusPersonInfo\">");
_4b5.write("        <h2 class=\"fn\" id=\""+_4b6+"vcardNameElem\" class=\"fn\">"+_4b1.fn+"</h2>");
_4b5.write("      </div>");
_4b5.write("    </div>");
_4b5.write("    <div id=\""+_4b1.key+"_Details\" class=\"lotusInlineVCardDetails\">");
if(_4b1.X_bizCardActions.length>0){
_4b5.write("<div class=\"lotusEmail\">");
_4b5.write(this.getActionLink(_4b1,0,true));
_4b5.write("</div>");
}
this.writeLinks(_4b5,_4b1,true);
if(_4b1.X_bizCardActions.length>1){
_4b5.write("<div class=\"lotusPersonActions\">");
_4b5.write("  <ul class=\"lotusInlinelist\">");
_4b5.write("    <li class=\"lotusFirst\">");
_4b5.write("      <a href=\"javascript:;\"");
_4b5.write("        onclick=\"lconn.profiles.bizCard.bizCardUI.displayMore('"+_4b1.key+"InlineMoreActionMenu',this.parentNode.parentNode);event.cancelBubble=true\">");
_4b5.write(generalrs.personCardMoreActions);
_4b5.write("        <img src=\""+_4b4+"/nav/common/styles/images/btnDropDown.gif\" alt=\""+generalrs.personCardMoreActionsAltText+"\"");
_4b5.write("          title=\""+generalrs.personCardMoreActionsAltText+"\" />");
_4b5.write("      </a>");
_4b5.write("    </li>");
_4b5.write("  </ul>");
_4b5.write("</div>");
this.writeMoreActionsMenu(_4b5,_4b1,_4b4,true);
}
_4b5.write("    </div>");
_4b5.write("  </div>");
_4b5.write("</div>");
_4b5.write("</div>");
}else{
_4b5.write("<div class=\"lotusui\">");
_4b5.write("<div class=\"vcard lotusVCard lotusInlineVCard\" style=\"position:static;margin:10px\">");
_4b5.write("  <div class=\"lotusContainer\">");
_4b5.write("    </div>");
_4b5.write("    </div>");
_4b5.write("    </div>");
}
},writeLinks:function(_4b7,_4b8,_4b9){
try{
var _4ba=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
if(!_4b8.X_bizCardServiceLinks){
_4b8.X_bizCardServiceLinks=[];
}
if(!_4b8.X_concatSemPersonSvc&&SemTagPerson.services&&SemTagPerson.services.length>0){
_4b8.X_bizCardServiceLinks=_4b8.X_bizCardServiceLinks.concat(SemTagPerson.services);
_4b8.X_concatSemPersonSvc=true;
}
if(_4b8.X_bizCardServiceLinks&&_4b8.X_bizCardServiceLinks.length>0){
var _4bb=4;
if(_4b9){
_4b7.write("<ul id=\"appLinks1\" class=\"lotusAppLinks\">");
}
var _4bc=new Array();
for(var i=0;i<_4bb;i++){
_4bc[i]=_4b8.X_bizCardServiceLinks[i];
}
var _4be=new Array();
for(var i=_4bb;i<_4b8.X_bizCardServiceLinks.length;i++){
var j=i-_4bb;
_4be[j]=_4b8.X_bizCardServiceLinks[i];
}
this.writeSubLinksMenu(_4b7,_4bc,_4b9,true,_4bb,_4b8);
if(!_4b9){
_4b7.write("<tr id=\"appLinksNext\"><td colspan=\"5\"><table cellspacing=\"0\" width=\"100%\">");
}
this.writeSubLinksMenu(_4b7,_4be,_4b9,false,_4bb,_4b8);
if(!_4b9){
_4b7.write("</table></td></tr>");
}
if(_4b9){
_4b7.write("</ul>");
}
}
}
catch(exception2){
alert(exception2.message);
}
},writeSubLinksMenu:function(_4c0,_4c1,_4c2,_4c3,_4c4,_4c5){
var _4c6=true;
var _4c7=0;
for(var k=0;k<_4c1.length;k++){
var _4c9=_4c1[k];
if(_4c9==null||_4c9.name==null||_4c9.name==""){
continue;
}
var _4ca="";
var _4cb=false;
if(typeof (_4c9.href)!="undefined"&&_4c9.href!=null){
_4ca=_4c9.href;
}else{
if(typeof (_4c9.url_pattern)!="undefined"&&_4c9.url_pattern!=null&&_4c9.url_pattern!=""){
_4ca=_4c9.url_pattern;
if(_4ca.indexOf("{email}")!=-1&&(_4c5.email!=null&&_4c5.email.internet!=null)){
_4ca=_4ca.replace(/{email}/g,_4c5.email.internet);
}
if(_4ca.indexOf("{uid}")!=-1&&(_4c5.uid!=null)){
_4ca=_4ca.replace(/{uid}/g,_4c5.uid);
}
if(_4ca.indexOf("{key}")!=-1&&(_4c5.key!=null)){
_4ca=_4ca.replace(/{key}/g,_4c5.key);
}
if(_4ca.indexOf("{fn}")!=-1&&(_4c5.fn!=null)){
_4ca=_4ca.replace(/{fn}/g,_4c5.fn);
}
if(_4ca.indexOf("{displayName}")!=-1&&(_4c5.fn!=null)){
_4ca=_4ca.replace(/{displayName}/g,_4c5.fn);
}
if(_4ca.indexOf("{workPhoneNumber}")!=-1&&(_4c5.adr!=null&&_4c5.adr.work!=null)){
_4ca=_4ca.replace(/{workPhoneNumber}/g,_4c5.adr.work);
}
if(_4ca.indexOf("{userid}")!=-1&&(_4c5.X_lconn_userid!=null)){
_4ca=_4ca.replace(/{userid}/g,_4c5.X_lconn_userid);
}
if(typeof (_4c9.location)!="undefined"&&_4c9.location!=null){
_4ca=_4c9.location+_4ca;
}
}else{
continue;
}
}
if(!_4c2&&_4c6==true){
_4c0.write("<tr class=\"lotusAppLinks\">");
}
_4c0.write((_4c2)?"<li ":"<td ");
_4c7++;
if(!_4c2&&_4c6==true){
_4c0.write("class=\"lotusFirst\"");
}
_4c6=false;
var _4cc="";
if(typeof (_4c9.js_eval)!="undefined"&&_4c9.js_eval!=null&&_4c9.js_eval.indexOf("generalrs.")==0){
var key=_4c9.js_eval.substr("generalrs.".length);
if(typeof (generalrs[key])=="undefined"){
key=key.replace(/\_/g,".");
}
_4cc=generalrs[key];
}else{
if(_4c9.js_eval){
try{
if(_4c5.X_allowEvalLabel){
_4cc=dojo.eval(_4c9.js_eval);
}else{
_4cc=new String(_4c9.js_eval);
}
}
catch(exception2){
_4cc="!error.eval!";
}
}else{
if(_4c9.label){
_4cc=new String(_4c9.label);
}else{
_4cc="???";
}
}
}
if(_4c9.name=="blogs"&&_4c5.X_blogUrl!=null&&_4c5.X_blogUrl!=""){
_4c0.write("><a class=\"url\" href=\""+_4c5.X_blogUrl+"\">"+_4cc+"</a>");
}else{
_4c0.write("><a class=\"url\" href=\""+_4ca+"\">"+_4cc+"</a>");
}
_4c0.write((_4c2)?"</li>":"</td>");
if(!_4c2&&_4c3&&(k==(_4c1.length-1))){
_4c0.write("<td>"+"<a onclick=\"lconn.profiles.bizCard.bizCardUI.toggleMoreApps('appLinksNext',this); event.cancelBubble=true;\""+" href=\"javascript:void(0);\" "+" class=\"lotusMore lotusMoreExpanded\">&nbsp;"+"<span class=\"lotusAltText\">+</span>"+"</a>"+"</td>");
_4c0.write("</tr>");
_4c6=true;
_4c7=0;
}else{
if(!_4c2&&(((k+1)%_4c4)==0)){
_4c0.write("</tr>");
_4c6=true;
_4c7=0;
}else{
if(!_4c2&&((k+1)==_4c1.length)){
_4c0.write("<td colspan=\""+(_4c4-_4c7)+"\">&nbsp;</td>");
_4c0.write("</tr>");
_4c6=true;
_4c7=0;
}
}
}
}
},writeMoreActionsMenu:function(_4ce,_4cf,_4d0,_4d1){
try{
_4ce.write("<ul class=\"lotusActionMenu\" id=\""+_4cf.key);
if(_4d1){
_4ce.write("Inline");
}
_4ce.write("MoreActionMenu\">");
if(_4cf.X_bizCardActions.length>0&&!_4d1){
_4ce.write("<li class=\""+_4cf.X_bizCardActions[0].liClass+"\">"+this.getActionLink(_4cf,0,false)+"</li>");
}
var _4d2=_4cf.email.internet;
if(_4cf.X_bizCardSTInputType=="uid"){
_4d2=_4cf.uid;
}
if((_4cf.X_bizCardSTAwareness||_4cf.X_bizCardSecureSTAwareness)&&_4d2!=""){
if(_4cf.X_STChatAction){
_4ce.write("<li id=\""+_4d2+"ChatActionMore\" style=\"display:none;\"><a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('chat', '"+_4d2+"');\"> "+generalrs.personCardChat+" </a></li>");
}
if(_4cf.X_STCallAction){
_4ce.write("<li id=\""+_4d2+"CallActionMore\" style=\"display:none;\"><a href=\"javascript:void(0);\" onclick=\"lconn.profiles.bizCard.bizCard.sametimeStart('call', '"+_4d2+"');\"> "+generalrs.personCardCall+" </a></li>");
}
}
if(_4cf.X_bizCardActions.length>1){
for(var i=1;i<_4cf.X_bizCardActions.length;i++){
_4ce.write("<li class=\""+_4cf.X_bizCardActions[i].liClass+"\">"+this.getActionLink(_4cf,i,false)+"</li>");
}
}
_4ce.write("</ul>");
}
catch(exception2){
alert(exception2.message);
}
},displayMore:function(_4d4,_4d5){
_4d5.style.display="none";
document.getElementById(_4d4).style.display="block";
},convertQuickrEmail:function(_4d6){
_4d6=_4d6.replace(/@/g,"_at_");
_4d6=_4d6.replace(/\./g,"_");
return _4d6;
},toggleMoreApps:function(pDiv,_4d8){
var _4d9=document.getElementById(pDiv);
if(_4d8.className.indexOf("lotusMoreExpanded")!=-1){
_4d8.className="lotusMore";
_4d9.style.display="none";
}else{
_4d8.className+=" lotusMoreExpanded";
_4d9.style.display="";
}
},toggleSlimCard:function(_4da,_4db){
var _4dc=document.getElementById("slimTwisty");
if(_4dc.src.indexOf("iconHide.gif")!=-1){
this.slimCard(_4db);
dojo.cookie("card.popup.slim",1);
}else{
this.expandCard(_4db);
dojo.cookie("card.popup.slim",0);
}
},slimCard:function(_4dd){
var _4de=document.getElementById("slimTwisty");
var _4df=document.getElementById("cardHeader");
var _4e0=document.getElementById("cardFooter");
if(_4de){
_4de.src=_4dd+"/nav/common/styles/images/iconShow.gif";
}
_4df.style.display="none";
_4e0.style.display="none";
},expandCard:function(_4e1){
var _4e2=document.getElementById("slimTwisty");
var _4e3=document.getElementById("cardHeader");
var _4e4=document.getElementById("cardFooter");
if(_4e2){
_4e2.src=_4e1+"/nav/common/styles/images/iconHide.gif";
}
_4e3.style.display="";
_4e4.style.display="";
},resizeObj:function(obj,_4e6,_4e7){
if(typeof (obj.style.height)=="undefined"||obj.style.height<=0){
obj.style.height=obj.height;
}
if(typeof (obj.style.width)=="undefined"||obj.style.width<=0){
obj.style.width=obj.width;
}
obj.style.height=(_4e6)?obj.style.height=_4e7+"%":obj.style.height;
obj.style.width=(_4e6)?obj.style.width=_4e7+"%":obj.style.width;
},openVCardDialog:function(key,_4e9){
this._createVCardDialog(key,_4e9);
},_createVCardDialog:function(key,_4eb){
window.open(this._getVCardDownloadUrl(key,_4eb),"vcarddl","status=0,toolbar=0,scrollbars=0,resizable=0,height=350,width=550");
},_getVCardDownloadUrl:function(key,_4ed){
var base=lconn.core.bizCard.bizCardUtils.getBaseURL("hcard");
var lang=lconn.core.bizCard.bizCardUtils.getLangParam();
return base+"/html/exportVCardDialog.do?key="+key+"&lastMod="+_4ed+"&lang="+lang;
}};
}
if(!dojo._hasResource["lconn.core.TextBox"]){
dojo._hasResource["lconn.core.TextBox"]=true;
dojo.provide("lconn.core.TextBox");
dojo.declare("lconn.core.TextBox",[dijit._Widget,dijit._Templated],{shadowText:"",shadowTextOn:true,name:"",textBoxClass:"",templateString:"<span><input type=\"text\" class=\"${textBoxClass}\" dojoAttachPoint=\"textbox\" /><input type=\"hidden\" value=\"\" dojoAttachPoint=\"hiddenbox\" /></span>",postCreate:function(){
this.textbox.onfocus=dojo.hitch(this,"textBoxFocus");
this.textbox.onblur=dojo.hitch(this,"textBoxBlur");
this.textbox.name=this.id+"_textbox";
if(this.value){
this.textbox.value=this.value;
this.hiddenbox.value=this.value;
this.shadowTextOn=false;
}else{
dojo.addClass(this.textbox,"lotusInactive");
this.textbox.value=this.shadowText;
}
if(this.name){
this.hiddenbox.name=this.name;
}
if(this.title){
this.textbox.title=this.title;
}
},textBoxBlur:function(){
if(this.textbox.value.length==0){
dojo.addClass(this.textbox,"lotusInactive");
this.shadowTextOn=true;
this.textbox.value=this.shadowText;
this.hiddenbox.value="";
}else{
this.hiddenbox.value=this.textbox.value;
this.shadowTextOn=false;
}
},textBoxFocus:function(){
if(this.shadowTextOn){
this.shadowTextOn=false;
this.textbox.value="";
this.hiddenbox.value="";
dojo.removeClass(this.textbox,"lotusInactive");
this.textbox.focus();
}
},setHiddenValue:function(){
if(this.shadowTextOn){
this.hiddenbox.value="";
}else{
this.hiddenbox.value=this.textbox.value;
}
},focus:function(){
this.textbox.focus();
},getValue:function(){
return this.hiddenbox.value;
}});
}
if(!dojo._hasResource["lconn.core.SearchBar"]){
dojo._hasResource["lconn.core.SearchBar"]=true;
dojo.provide("lconn.core.SearchBar");
dojo.declare("lconn.core.SearchBar",[dijit._Widget,dijit._Templated],{templateString:["<div class=\"lotusSearch\"><form dojoAttachPoint=\"formNode\" method=\"POST\" dojoAttachEvent=\"onsubmit:formSubmitted\">","<input name=\"scope\" value=\"\" dojoAttachPoint=\"scopeInputNode\" type=\"hidden\" />","<input name=\"component\" value=\"\" dojoAttachPoint=\"featureInputNode\" type=\"hidden\" />","<table class=\"lotusLayout\" role=\"presentation\" summary=\"\"><tbody><tr>","<td><span id=\"${id}searchLbl\" class=\"lotusHidden\">${lblSelectScope}</span>","<a href=\"javascript:;\" title=\"${lblSelectScope}\" aria-labelledby=\"${id}searchLbl\" aria-describedby=\"${id}searchOpt\" wairole=\"menu\" role=\"menu\" class=\"lotusScope\" dojoAttachPoint=\"scopeNode\" dojoAttachEvent=\"onclick:openMenu\">","<img class=\"lotusIcon\" alt=\"\" src=\"${_blankGif}\" dojoAttachPoint=\"currScopeIconNode\" role=\"presentation\"/>","<span id=\"${id}searchOpt\" dojoAttachPoint=\"currScopeLabelNode\"> </span>","<span class=\"lotusAltText\" role=\"presentation\">&#9660;</span>","</a></td>","<td>","<label class=\"lotusHidden\" for=\"${id}searchInput\">${lblSearch}</label>","<input id=\"${id}searchInput\" dojoAttachPoint=\"textNode\" class=\"lotusText lotusInactive\" type=\"text\" name=\"query\" title=\"${lblSearch}\"/>","</td>","<td>","<span class=\"lotusBtnImg\">","<input dojoAttachPoint=\"onclick:submitForm\" class=\"lotusSearchButton\" type=\"image\" src=\"${_blankGif}\" alt=\"${lblSearch}\"/>","<a href=\"javascript:;\" alt=\"${lblSearch}\" dojoAttachEvent=\"onclick:submitForm\" class=\"lotusAltText\">${lblSearch}</a>","</span>","</td>","</tr></tbody></table>","</form></div>"].join(""),localOptions:[],globalOptions:[],localAction:"",searchContextPath:"",lblSearch:"",lblSelectScope:"",lblAllConnections:"",lblAdvanced:"",menuItems:[],featureIcons:{allareas:"lconnSprite lconnSprite-iconConnections16",activities:"lconnSprite lconnSprite-iconActivities16",blogs:"lconnSprite lconnSprite-iconBlogs16",communities:"lconnSprite lconnSprite-iconCommunities16",dogear:"lconnSprite lconnSprite-iconDogear16",files:"lconnSprite lconnSprite-iconFiles16",profiles:"lconnSprite lconnSprite-iconProfiles16",wikis:"lconnSprite lconnSprite-iconWikis16"},selectedOption:null,textBox:null,globalAction:"",advancedSearchUrl:"",SEARCH_ADVANCED:"searchAdvancedIdentifier",SEARCH_POST_PATH:"/web/search",SEARCH_ADVANCED_PATH:"/web/jsp/advancedSearch.jsp",postCreate:function(){
if(this.searchContextPath){
this.globalAction=this.searchContextPath+this.SEARCH_POST_PATH;
this.advancedSearchUrl=this.searchContextPath+this.SEARCH_ADVANCED_PATH;
}
this.showDefaultOption();
this.textBox=new lconn.core.TextBox({shadowText:this.lblSearch,textBoxClass:"lotusText",name:"query",title:this.lblSearch},this.textNode);
if(this.globalOptions&&this.globalOptions.length>0){
this.globalOptions.splice(0,0,{label:this.lblAllConnections,feature:"allareas",iconClass:"lconnSprite lconnSprite-iconConnections16"});
}
},changeLocalOptions:function(_4f0){
this.localOptions=_4f0;
if(this.scopeMenu){
this.scopeMenu.destroyRecursive();
this.scopeMenu=null;
this.menuItems=[];
}
this.showDefaultOption();
},showDefaultOption:function(){
for(var i in this.localOptions){
if(this.localOptions[i].defaultOption){
this.selectOption(this.localOptions[i],false);
return;
}
}
if(this.globalOptions&&this.globalOptions.length>0){
this.selectOption(this.globalOptions[0],false);
}
},getScopeMenu:function(){
if(!this.scopeMenu){
this.scopeMenu=new dijit.Menu({onItemClick:dojo.hitch(this,"selectOption")});
this.connect(this.scopeMenu,"_onBlur","closeMenu");
this.menuItems=[];
var _4f2=this.localOptions;
for(var i in _4f2){
_4f2[i].parentMenu=this.scopeMenu;
this.menuItems.push(new dijit.MenuItem(_4f2[i]));
}
if(this.globalOptions.length>0){
this.menuItems.push(new dijit.MenuSeparator({parentMenu:this.scopeMenu}));
}
_4f2=this.globalOptions;
for(var i in _4f2){
if(_4f2[i].feature&&this.featureIcons[_4f2[i].feature]){
_4f2[i].parentMenu=this.scopeMenu;
_4f2[i].iconClass=this.featureIcons[_4f2[i].feature];
this.menuItems.push(new dijit.MenuItem(_4f2[i]));
}
}
if(this.globalOptions.length>0){
this.menuItems.push(new dijit.MenuSeparator({parentMenu:this.scopeMenu}));
this.menuItems.push(new dijit.MenuItem({label:this.lblAdvanced,feature:this.SEARCH_ADVANCED}));
}
for(var i in this.menuItems){
this.scopeMenu.addChild(this.menuItems[i]);
}
}
return this.scopeMenu;
},openMenu:function(evt){
var menu=this.getScopeMenu();
dijit.popup.open({popup:menu,around:this.scopeNode,orient:(dojo._isBodyLtr()?{"BL":"TL","BR":"TR","TL":"BL","TR":"BR"}:{"BR":"TR","BL":"TL","TR":"BR","TL":"BL"}),onExecute:function(){
},onCancel:dojo.hitch(this,function(){
dijit.popup.close(menu);
dijit.focus(this.scopeNode);
}),onClose:function(){
}});
menu.focus();
dojo.stopEvent(evt);
},closeMenu:function(){
if(this.scopeMenu){
dijit.popup.close(this.scopeMenu);
}
},onSelectOption:function(item,evt){
this.selectOption(item,true);
},selectOption:function(item,_4f9){
this.closeMenu();
this.selectedOption=item;
if(item.feature&&item.feature==this.SEARCH_ADVANCED){
location.href=this.advancedSearchUrl;
return;
}
this.currScopeLabelNode.innerHTML=item.label;
this.currScopeIconNode.className="lotusIcon";
if(item.iconClass){
dojo.addClass(this.currScopeIconNode,item.iconClass);
}
if(item.scope){
this.scopeInputNode.value=item.scope;
this.featureInputNode.value="";
}else{
if(item.feature){
if(item.feature=="allareas"){
this.featureInputNode.value="";
}else{
this.featureInputNode.value=item.feature;
}
this.scopeInputNode.value="";
}
}
if(item.action){
this.formNode.action=item.action;
}else{
if(item.feature){
this.formNode.action=this.globalAction;
}else{
this.formNode.action=this.localAction;
}
}
if(_4f9){
this.textBox.focus();
}
},submitForm:function(evt){
this.textBox.setHiddenValue();
if(this.onSubmit()){
this.formNode.submit();
}
if(evt){
dojo.stopEvent(evt);
}
return false;
},getValue:function(){
return this.textBox.getValue();
},formSubmitted:function(evt){
this.submitForm();
dojo.stopEvent(evt);
},onSubmit:function(){
}});
}
dojo.i18n._preloadLocalizations("dojo.nls.blogs",["da","es","hu","de","pt-br","pl","pt","ca","sv","ar","pt-pt","fi","zh","ru","xx","fr","zh-tw","it","th","cs","he","nl","el","no","ko","tr","en","ROOT","ja"]);
