var visibleMenu_=null;
var padding_=10;
var transImg_="transparent.gif";
var arrowNorm_="contextArrowDefault.gif";
var arrowSel_="contextArrowSelected.gif";
var arrowDis_="contextArrowDisabled.gif";
var launchNorm_="contextLauncherDefault.gif";
var launchSel_="contextLauncherSelected.gif";
var arrowNormRTL_="contextArrowDefault.gif";
var arrowSelRTL_="contextArrowSelected.gif";
var arrowDisRTL_="contextArrowDisabled.gif";
var launchNormRTL_="contextLauncherDefault.gif";
var launchSelRTL_="contextLauncherSelected.gif";
var arrowWidth_="12";
var arrowHeight_="12";
var submenuAltText_="+";
var noActionsText_="(0)";
var hideCurrentMenuTimer_=null;
function clearMenuTimer(){
if(null!=hideCurrentMenuTimer_){
clearTimeout(hideCurrentMenuTimer_);
hideCurrentMenuTimer_=null;
}
};
function setMenuTimer(){
clearMenuTimer();
hideCurrentMenuTimer_=setTimeout("hideCurrentContextMenu( )",2000);
};
function debug(_1){
};
function UilContextMenu(_2,_3,_4){
this.name=_2;
this.items=new Array();
this.isVisible=false;
this.isDismissable=true;
this.selectedItem=null;
this.isDynamic=false;
this.isCacheable=false;
this.isEmpty=true;
this.isLTR=_3;
this.hiddenItems=new Array();
this.isHyperlinkChild=true;
this.launcher=null;
this.menuTag=null;
this.add=UilContextMenuAdd;
this.addSeparator=UilContextMenuAddSeparator;
this.show=UilContextMenuShow;
this.hide=UilContextMenuHide;
this.create=UilContextMenuCreate;
this.getMenuItem=UilContextMenuGetMenuItem;
this.getSelectedItem=UilContextMenuGetSelectedItem;
if(this.name==null){
this.name="UilContextMenu_"+allMenus_.length;
}
};
function UilContextMenuAdd(_5){
this.items[this.items.length]=_5;
this.isEmpty=false;
};
function UilContextMenuAddSeparator(){
var _6=new UilMenuItem();
_6.isSeparator=true;
this.add(_6);
};
function UilContextMenuShow(_7,_8){
if(this.items.length==0){
debug("menu is empty!");
this.add(new UilMenuItem(noActionsText_,false,"javascript:void(0);"));
this.isEmpty=true;
}
if(this.menuTag==null){
this.create();
}
if(this.menuTag!=null){
this.launcher=_7;
if(this.launcher.tagName=="IMG"){
this.isHyperlinkChild=false;
this.launcher=this.launcher.parentNode;
}
var _9=window.pageXOffset+window.innerWidth;
var _a=window.pageYOffset+window.innerHeight;
debug("max: "+_9+", "+_a);
var _b=getWidth(this.menuTag);
var _c=getHeight(this.menuTag);
var _d=0;
var _e=0;
if(_8!=null){
var _f=_8.itemTag;
var _10=getWidth(_f);
var _11=_8.parentMenu.menuTag;
var _12=getLeft(_11);
var _13=getTop(_11);
_d=_12+getLeft(_f)+_10;
_e=_13+getTop(_f);
if(!this.isLTR){
_d-=_10;
_d-=_b;
}
if(this.isLTR){
if(_d+_b>_9){
var _14=_12-_b;
var _15=_9-_b;
if(0<=_14){
_d=_14;
}else{
_d=Math.max(0,_15);
}
}
}else{
if(_d<0){
var _14=_12+_10;
if(_14+_b<_9){
_d=_14;
}else{
_d=Math.min(0,_9-_b);
}
}
}
if(_e+_c>_a){
var _16=_a-_c;
_e=Math.max(0,_16);
}
}else{
var _17=getLeft(this.launcher,true);
_d=_17+this.launcher.offsetWidth;
_e=getTop(this.launcher,true);
if(!this.isLTR){
_d-=this.launcher.offsetWidth;
_d-=_b;
}
if(this.isLTR){
if(_d+_b>_9){
var _14=_17-_b;
if(_14>0){
_d=_14;
}else{
_d=Math.max(0,_9-_b);
}
}
}else{
if(_d<0){
var _14=_17+this.launcher.offsetWidth;
if(_14+_b<_9){
_d=_14;
}else{
_d=Math.min(0,_9-_b);
}
}
}
if(_e+_c>_a){
_e=Math.max(0,_a-_c);
}
}
debug("show "+this.name+": "+_d+", "+_e);
this.menuTag.style.left=_d+"px";
this.menuTag.style.top=_e+"px";
this.menuTag.style.visibility="visible";
this.isVisible=true;
this.items[0].setSelected(true);
this.items[0].anchorTag.focus();
var _18=document.getElementsByTagName("SELECT");
if(_18!=null){
for(i=0;i<_18.length;i++){
if(intersect(this.menuTag,_18[i])==true){
if(_18[i].style.visibility!="collapse"){
_18[i].style.visibility="collapse";
this.hiddenItems.push(_18[i]);
}
}
}
}
_18=document.getElementsByTagName("IFRAME");
if(_18!=null){
for(i=0;i<_18.length;i++){
if(intersect(this.menuTag,_18[i])==true){
if(_18[i].style.visibility!="hidden"){
_18[i].style.visibility="hidden";
this.hiddenItems.push(_18[i]);
}
}
}
}
}
};
function intersect(_19,_1a){
var _1b=parseInt(document.defaultView.getComputedStyle(_19,"").getPropertyValue("left"));
var _1c=_1b+parseInt(document.defaultView.getComputedStyle(_19,"").getPropertyValue("width"));
var _1d=parseInt(document.defaultView.getComputedStyle(_19,"").getPropertyValue("top"));
var _1e=_1d+parseInt(document.defaultView.getComputedStyle(_19,"").getPropertyValue("height"));
var _1f=parseInt(document.defaultView.getComputedStyle(_1a,"").getPropertyValue("left"));
var _20=_1f+parseInt(document.defaultView.getComputedStyle(_1a,"").getPropertyValue("width"));
var _21=parseInt(document.defaultView.getComputedStyle(_1a,"").getPropertyValue("top"));
var _22=_21+parseInt(document.defaultView.getComputedStyle(_1a,"").getPropertyValue("height"));
if(lineIntersect(_1b,_1c,_1f,_20)==true&&lineIntersect(_1d,_1e,_21,_22)==true){
return true;
}
return false;
};
function lineIntersect(a,b,c,d){
if((a<=c&&c<=b)||(a<=d&&d<=b)||(c<=a&&d>=b)){
return true;
}else{
return false;
}
};
function UilContextMenuHide(){
if(this.menuTag!=null){
debug("hide "+this.name);
for(var i=0;i<this.items.length;i++){
if(this.items[i].submenu!=null&&this.items[i].submenu.isVisible){
this.items[i].submenu.hide();
}
}
if(this.selectedItem!=null){
this.selectedItem.setSelected(false);
}
this.menuTag.style.visibility="hidden";
this.isVisible=false;
this.isDismissable=true;
var _23=this.hiddenItems.length;
for(i=0;i<_23;i++){
var _24=this.hiddenItems.pop();
_24.style.visibility="visible";
}
this.launcher=null;
}
};
function UilContextMenuCreate(_25){
if(this.menuTag==null){
this.menuTag=document.createElement("DIV");
this.menuTag.style.position="absolute";
this.menuTag.style.cursor="default";
this.menuTag.style.visibility="hidden";
this.menuTag.style.width="0px";
this.menuTag.onmouseover=contextMenuDismissDisable;
this.menuTag.onmouseout=contextMenuDismissEnable;
this.menuTag.oncontextmenu=contextMenuOnContextMenu;
var _26=this.items.length;
var _27=false;
var _28=false;
for(var i=0;i<_26;i++){
if(!this.items[i].isSeparator){
if(!_28&&this.items[i].submenu!=null){
_28=true;
}
if(!_27&&this.items[i].icon!=null){
_27=true;
}
if(_28&&_27){
break;
}
}
}
for(var i=0;i<_26;i++){
this.items[i].isFirst=(i==0);
this.items[i].isLast=(i+1==_26);
this.items[i].parentMenu=this;
this.items[i].create(_27,_28);
}
var _29=document.createElement("TABLE");
if(!this.isLTR){
_29.dir="RTL";
}
_29.rules="none";
_29.cellPadding=0;
_29.cellSpacing=0;
_29.border=0;
var _2a=document.createElement("TBODY");
var _2b=document.createElement("TR");
var _2c=document.createElement("TD");
var _2d=document.createElement("DIV");
_2d.className="lwpShadowBorder";
_2c.appendChild(_2d);
_2b.appendChild(_2c);
_2a.appendChild(_2b);
_29.appendChild(_2a);
var _2e=document.createElement("TABLE");
if(!this.isLTR){
_2e.dir="RTL";
}
_2e.rules="none";
_2e.cellPadding=0;
_2e.cellSpacing=0;
_2e.width="100%";
_2e.border=0;
var _2f=document.createElement("TBODY");
_2e.appendChild(_2f);
var _30=document.createElement("TABLE");
if(!this.isLTR){
_30.dir="RTL";
}
_30.rules="none";
_30.cellPadding=0;
_30.cellSpacing=0;
_30.width="100%";
_30.border=0;
var _31=document.createElement("TR");
var _32=document.createElement("TD");
var _33=document.createElement("DIV");
_33.className="lwpBorderAll";
var _34=document.createElement("TBODY");
_2f.appendChild(_31);
_31.appendChild(_32);
_32.appendChild(_33);
_33.appendChild(_30);
_30.appendChild(_34);
for(var i=0;i<_26;i++){
if(this.items[i].isSeparator){
this.items[i].createSeparator(_34,_28);
}else{
_34.appendChild(this.items[i].itemTag);
}
}
_2d.appendChild(_2e);
this.menuTag.appendChild(_29);
document.body.appendChild(this.menuTag);
}
if(_25){
for(var i=0;i<this.items.length;i++){
if(this.items[i].submenu!=null){
this.items[i].submenu.create(_25);
}
}
}
};
function UilContextMenuGetMenuItem(_35){
if(_35!=null){
if(_35.nodeType==3){
_35=_35.parentNode;
}
var _36=_35.tagName;
var _37=null;
if(_36=="IMG"||_36=="A"){
_37=_35.parentNode.parentNode;
}else{
if(_36=="TD"){
_37=_35.parentNode;
}
}
for(var i=0;i<this.items.length;i++){
if(this.items[i].itemTag!=null&&this.items[i].itemTag==_37){
return this.items[i];
}else{
if(this.items[i].submenu!=null&&this.items[i].submenu.isVisible){
var _38=this.items[i].submenu.getMenuItem(_35);
if(_38!=null){
return _38;
}
}
}
}
}
return null;
};
function UilContextMenuGetSelectedItem(){
var _39=this.selectedItem;
if(_39!=null&&_39.submenu!=null&&_39.submenu.isVisible){
return _39.submenu.getSelectedItem();
}
return _39;
};
function contextMenuDismissEnable(){
if(visibleMenu_!=null){
visibleMenu_.isDismissable=true;
if(visibleMenu_.isHyperlinkChild){
setMenuTimer();
}
}
};
function contextMenuDismissDisable(){
if(visibleMenu_!=null){
visibleMenu_.isDismissable=false;
clearMenuTimer();
}
};
function contextMenuOnContextMenu(){
return false;
};
function UilMenuItem(_3a,_3b,_3c,_3d,_3e,_3f,_40,_41,_42){
this.text=_3a;
this.icon=_3f;
this.action=_3c;
this.clientAction=_3d;
this.submenu=_3e;
this.isSeparator=false;
this.isSelected=false;
this.isEnabled=(_3b!=null)?_3b:true;
this.isDefault=(_40!=null)?_40:false;
this.isFirst=false;
this.isLast=false;
this.parentMenu=null;
this.menuStyle=(_41!=null)?_41:"lwpMenuItem";
this.selectedMenuStyle=(_42!=null)?_42:"lwpSelectedMenuItem";
this.itemTag=null;
this.anchorTag=null;
this.arrowTag=null;
this.create=UilMenuItemCreate;
this.createSeparator=UilMenuItemCreateSeparator;
this.setSelected=UilMenuItemSetSelected;
this.updateStyle=UilMenuItemUpdateStyle;
this.getNextItem=UilMenuItemGetNextItem;
this.getPrevItem=UilMenuItemGetPrevItem;
if(this.submenu!=null){
this.action=null;
}
};
function UilMenuItemCreate(_43,_44){
if(!this.isSeparator){
this.anchorTag=document.createElement("A");
if(this.action!=null){
this.anchorTag.href="javascript:menuItemLaunchAction();";
if(this.clientAction!=null){
this.anchorTag.onclick=this.clientAction;
}
}else{
if(this.submenu!=null){
this.anchorTag.href="javascript:void(0);";
this.anchorTag.onclick=menuItemShowSubmenu;
}else{
if(this.clientAction!=null){
this.anchorTag.href="javascript:menuItemLaunchAction();";
this.anchorTag.onclick=this.clientAction;
}
}
}
this.anchorTag.onfocus=menuItemFocus;
this.anchorTag.onblur=menuItemBlur;
this.anchorTag.onkeydown=menuItemKeyDown;
this.anchorTag.innerHTML=this.text;
this.anchorTag.className=this.menuStyle;
if(this.isDefault){
this.anchorTag.style.fontWeight="bold";
}
var td=document.createElement("TD");
td.noWrap=true;
td.style.padding="3px";
td.appendChild(this.anchorTag);
var _45=document.createElement("TD");
_45.noWrap=true;
_45.innerHTML="&nbsp;";
_45.style.padding="3px";
if(this.icon!=null){
var _46=document.createElement("IMG");
_46.src=this.icon;
if(this.text!=null){
_46.alt=this.text;
_46.title=this.text;
}
_45.appendChild(_46);
}else{
_45.width=padding_;
}
var _47=document.createElement("TD");
_47.noWrap=true;
_47.width=padding_;
_47.innerHTML="&nbsp;";
_47.style.padding="3px";
this.itemTag=document.createElement("TR");
this.itemTag.onmousemove=menuItemMouseMove;
this.itemTag.onmousedown=menuItemMouseDown;
this.itemTag.className=this.menuStyle;
this.itemTag.appendChild(_45);
this.itemTag.appendChild(td);
this.itemTag.appendChild(_47);
if(_44){
var _48=document.createElement("TD");
_48.noWrap=true;
_48.style.padding="3px";
if(this.submenu!=null){
var _49=document.createElement("IMG");
_49.alt=submenuAltText_;
_49.title=submenuAltText_;
_49.width=arrowWidth_;
_49.height=arrowHeight_;
if(this.parentMenu.isLTR){
_49.src=arrowNorm_;
}else{
_49.src=arrowNormRTL_;
}
_48.appendChild(_49);
this.arrowTag=_49;
}else{
_48.innerHTML="&nbsp;";
}
this.itemTag.appendChild(_48);
}
this.updateStyle(this.itemTag);
}
};
function UilMenuItemCreateSeparator(_4a,_4b){
var _4c=(_4b)?4:3;
for(var i=0;i<4;i++){
var tr=document.createElement("TR");
if(i==1){
tr.className="portlet-separator";
}else{
if(i==2){
tr.className="lwpMenuBackground";
}else{
tr.className="lwpMenuItem";
}
}
var td=document.createElement("TD");
td.noWrap=true;
td.width="100%";
td.height="1px";
td.colSpan=_4c;
var img=document.createElement("IMG");
img.src=transImg_;
img.width=1;
img.height=1;
img.style.display="block";
td.appendChild(img);
tr.appendChild(td);
_4a.appendChild(tr);
}
};
function UilMenuItemSetSelected(_4d){
if(_4d&&!this.isSelected){
debug("selected: "+this.text);
if(this.parentMenu!=null&&this.parentMenu.isVisible&&this.parentMenu.selectedItem!=null&&this.parentMenu.selectedItem!=this){
if(this.parentMenu.selectedItem.submenu!=null){
this.parentMenu.selectedItem.submenu.hide();
}
this.parentMenu.selectedItem.setSelected(false);
}
this.isSelected=true;
if(this.parentMenu!=null&&this.parentMenu.isVisible){
this.parentMenu.selectedItem=this;
}
this.updateStyle(this.itemTag);
}else{
if(!_4d&&this.isSelected){
debug("deselected: "+this.text);
if(this.submenu==null||(this.submenu!=null&&!this.submenu.isVisible)){
this.isSelected=false;
if(this.parentmenu!=null){
this.parentmenu.selectedItem=null;
}
this.updateStyle(this.itemTag);
}
}
}
};
function UilMenuItemUpdateStyle(tag,_4e){
if(tag!=null){
if(_4e==null){
_4e=this.menuStyle;
if(!this.isEnabled){
_4e=this.menuStyle;
}else{
if(this.isSelected){
_4e=this.selectedMenuStyle;
}
}
if(this.arrowTag!=null){
if(this.isEnabled&&this.isSelected){
if(this.parentMenu.isLTR){
this.arrowTag.src=arrowSel_;
}else{
this.arrowTag.src=arrowSelRTL_;
}
}else{
if(!this.isEnabled){
if(this.parentMenu.isLTR){
this.arrowTag.src=arrowDis_;
}else{
this.arrowTag.src=arrowDisRTL_;
}
}else{
if(this.parentMenu.isLTR){
this.arrowTag.src=arrowNorm_;
}else{
this.arrowTag.src=arrowNormRTL_;
}
}
}
}
}
tag.className=_4e;
if(tag.childNodes!=null){
for(var i=0;i<tag.childNodes.length;i++){
this.updateStyle(tag.childNodes[i],_4e);
}
}
}
};
function UilMenuItemGetNextItem(){
var _4f=this.parentMenu;
if(_4f!=null){
for(var i=0;i<_4f.items.length;i++){
if(_4f.items[i]==this){
for(var j=i+1;j<_4f.items.length;j++){
if(!_4f.items[j].isSeparator&&_4f.items[j].isEnabled){
return _4f.items[j];
}
}
return null;
}
}
}
return null;
};
function UilMenuItemGetPrevItem(){
var _50=this.parentMenu;
if(_50!=null){
for(var i=_50.items.length-1;i>=0;i--){
if(_50.items[i]==this){
for(var j=i-1;j>=0;j--){
if(!_50.items[j].isSeparator&&_50.items[j].isEnabled){
return _50.items[j];
}
}
return null;
}
}
}
return null;
};
function menuItemLaunchAction(){
if(visibleMenu_!=null){
var _51=visibleMenu_.getSelectedItem();
if(_51!=null&&_51.isEnabled){
hideCurrentContextMenu(true);
if(_51.clientAction!=null){
eval(_51.clientAction);
}
if(_51.action!=null){
if(_51.action.indexOf("javascript:")==0){
eval(_51.action);
}else{
}
}
}
}
};
function menuItemShowSubmenu(evt){
if(visibleMenu_!=null){
var _52=visibleMenu_.getMenuItem(evt.target);
if(_52!=null&&_52.isEnabled){
var _53=_52.submenu;
if(_53!=null){
_53.show(_52.anchorTag,_52);
}
}
}
};
function menuItemFocus(evt){
if(visibleMenu_!=null){
var _54=visibleMenu_.getMenuItem(evt.target);
if(_54!=null){
_54.setSelected(true);
}
}
};
function menuItemBlur(evt){
if(visibleMenu_!=null){
var _55=visibleMenu_.getMenuItem(evt.target);
if(_55!=null){
}
}
};
function menuItemKeyDown(evt){
var _56=null;
if(visibleMenu_!=null){
_56=visibleMenu_.getMenuItem(evt.target);
}
if(_56!=null){
var _57=null;
switch(evt.keyCode){
case 38:
_57=_56.getPrevItem();
if(_57!=null){
_57.anchorTag.focus();
}else{
if(_56.parentMenu!=visibleMenu_){
_56.parentMenu.launcher.focus();
_56.parentMenu.hide();
}else{
visibleMenu_.launcher.focus();
hideCurrentContextMenu(true);
}
}
break;
case 40:
_57=_56.getNextItem();
if(_57!=null){
_57.anchorTag.focus();
}else{
if(_56.parentMenu!=visibleMenu_){
_56.parentMenu.launcher.focus();
_56.parentMenu.hide();
}else{
visibleMenu_.launcher.focus();
hideCurrentContextMenu(true);
}
}
break;
case 39:
if(visibleMenu_.isLTR){
if(_56.submenu!=null){
menuItemShowSubmenu(evt);
_56.submenu.items[0].anchorTag.focus();
}
}else{
if(_56.parentMenu!=visibleMenu_){
_56.parentMenu.launcher.focus();
_56.parentMenu.hide();
}
}
break;
case 37:
if(visibleMenu_.isLTR){
if(_56.parentMenu!=visibleMenu_){
_56.parentMenu.launcher.focus();
_56.parentMenu.hide();
}
}else{
if(_56.submenu!=null){
menuItemShowSubmenu(evt);
_56.submenu.items[0].anchorTag.focus();
}
}
break;
case 9:
visibleMenu_.launcher.focus();
hideCurrentContextMenu(true);
break;
case 27:
visibleMenu_.launcher.focus();
hideCurrentContextMenu(true);
break;
case 13:
break;
default:
break;
}
}
};
function menuItemMouseMove(evt){
if(visibleMenu_!=null){
var _58=visibleMenu_.getMenuItem(evt.target);
if(_58!=null){
if(!_58.isSelected){
_58.anchorTag.focus();
}
if(_58.submenu!=null&&!_58.submenu.isVisible&&_58.isEnabled){
_58.submenu.show(_58.anchorTag,_58);
}
}
}
};
function menuItemMouseDown(evt){
menuItemLaunchAction();
};
document.onmousedown=hideCurrentContextMenu;
var allMenus_=new Array();
function createContextMenu(_59,_5a,_5b){
var _5c=new UilContextMenu(_59,_5a,_5b);
allMenus_[allMenus_.length]=_5c;
return _5c;
};
function getContextMenu(_5d){
for(var i=0;i<allMenus_.length;i++){
if(allMenus_[i].name==_5d){
return allMenus_[i];
}
}
return null;
};
function showContextMenu(_5e,_5f,_60){
contextMenuShow(_5e,_5f,_60,event.target,true);
};
function showContextMenu(_61,_62){
contextMenuShow(_61,false,false,_62,true);
};
function contextMenuShow(_63,_64,_65,_66,_67){
debug("***** showContextMenu: "+_63);
var _68=_66;
while((null!=_66)&&(null==_66.tagName)){
_66=_66.parentNode;
}
if(null==_66){
_66=_68;
}
if(eval(_64)){
debug("showContextMenu: dynamic=true, load="+eval(_67)+", cache="+eval(_65));
if(eval(_67)){
loadDynamicMenu(_63);
}
menu=getDynamicMenu(_63,eval(_65));
if(menu==null&&top.isContextMenuManager_!=null){
debug("showContextMenu: "+_63+" added to queue");
top.contextMenuManagerRequest(_63,window,_66,_65);
}
}else{
debug("showContextMenu: static context menu");
menu=getContextMenu(_63);
if(menu==null){
menu=createContextMenu(_63,150);
}
}
if(menu!=null){
hideCurrentContextMenu(true);
menu.show(_66);
visibleMenu_=menu;
}else{
debug("showContextMenu: "+_63+" unavailable");
}
clearMenuTimer();
};
function hideCurrentContextMenu(_69){
if(visibleMenu_!=null&&(_69==true||visibleMenu_.isDismissable)){
contextMenuDismissEnable();
if(visibleMenu_.isVisible){
visibleMenu_.hide();
}
if(visibleMenu_.isDynamic&&!visibleMenu_.isCacheable){
uncacheContextMenu(visibleMenu_);
}
visibleMenu_=null;
}
};
function uncacheContextMenu(_6a){
debug("uncache menu: "+_6a.name);
for(var i=0;i<_6a.items.length;i++){
if(_6a.items[i].submenu!=null){
uncacheContextMenu(_6a.items[i].submenu);
}
}
for(var i=0;i<allMenus_.length;i++){
if(allMenus_[i]==_6a){
var _6b=new Array();
var _6c=0;
for(var j=0;j<allMenus_.length;j++){
if(j!=i){
_6b[_6c]=allMenus_[j];
_6c++;
}
}
allMenus_=_6b;
break;
}
}
};
function contextMenuSetIcons(_6d,_6e,_6f,_70,_71,_72,_73,_74,_75,_76,_77){
transImg_=_6d;
arrowNorm_=_6e;
arrowSel_=_6f;
arrowDis_=_70;
launchNorm_=_71;
launchSel_=_72;
arrowNormRTL_=_73;
arrowSelRTL_=_74;
arrowDisRTL_=_75;
launchNormRTL_=_76;
launchSelRTL_=_77;
contextMenuPreloadImage(transImg_);
contextMenuPreloadImage(arrowNorm_);
contextMenuPreloadImage(arrowSel_);
contextMenuPreloadImage(arrowDis_);
contextMenuPreloadImage(launchNorm_);
contextMenuPreloadImage(launchSel_);
contextMenuPreloadImage(arrowNormRTL_);
contextMenuPreloadImage(arrowSelRTL_);
contextMenuPreloadImage(arrowDisRTL_);
contextMenuPreloadImage(launchNormRTL_);
contextMenuPreloadImage(launchSelRTL_);
};
function contextMenuSetArrowIconDimensions(_78,_79){
arrowWidth_=_78;
arrowHeight_=_79;
};
function contextMenuPreloadImage(_7a){
var _7b=new Image();
_7b.src=_7a;
};
function toggleLauncherIcon(_7c,_7d,_7e){
if(_7d){
if(_7e){
document.images[_7c].src=launchSel_;
}else{
document.images[_7c].src=launchSelRTL_;
}
}else{
if(_7e){
document.images[_7c].src=launchNorm_;
}else{
document.images[_7c].src=launchNormRTL_;
}
}
return true;
};
function contextMenuSetNoActionsText(_7f,_80){
noActionsText_=_7f;
submenuAltText_=_80;
};
function contextMenuGetNoActionsText(){
return noActionsText_;
};
function getWidth(tag){
return tag.offsetWidth;
};
function getHeight(tag){
return tag.offsetHeight;
};
function getLeft(tag,_81){
var _82=0;
if(tag!=null){
if(_81&&tag.offsetParent!=null){
_82+=getLeft(tag.offsetParent,_81);
}
if(tag!=null){
_82+=tag.offsetLeft;
}
}
return _82;
};
function getTop(tag,_83){
var _84=0;
if(tag!=null){
if(_83&&tag.offsetParent!=null){
_84+=getTop(tag.offsetParent,_83);
}
if(tag!=null){
_84+=tag.offsetTop;
}
}
return _84;
};
function loadDynamicMenu(_85){
debug("* loadDynamicMenu: "+_85);
var _86=getContextMenu(_85);
if(_86!=null){
if(_86.isVisible){
_86.hide();
}
if(!_86.isCacheable){
uncacheContextMenu(_86);
}
}
if(getContextMenu(_85)==null){
if(top.isContextMenuManager_!=null){
debug("loadDynamicMenu: loading");
top.contextMenuManagerLoadDynamicMenu(_85);
}
}
};
function getDynamicMenu(_87,_88){
debug("* getDynamicMenu: "+_87);
var _89=getContextMenu(_87);
if(_89==null){
if(top.isContextMenuManager_!=null){
if(top.contextMenuManagerIsDynamicMenuLoaded()){
var _8a=top.contextMenuManagerGetDynamicMenu();
debug("getDynamicMenu: fetched menu from other frame");
_89=cloneMenu(_8a,_87,_88);
if(_89.items.length==0){
contextMenuSetNoActionsText(top.contextMenuManagerGetNoActionsText());
}
}else{
debug("getDynamicMenu: menu not loaded");
}
}else{
debug("getDynamicMenu: menu manager not present");
}
}else{
debug("getDynamicMenu: menu previously loaded");
}
return _89;
};
function cloneMenu(_8b,_8c,_8d){
var _8e=getContextMenu(_8c);
if(_8e==null){
if(_8b!=null){
_8e=createContextMenu(_8c,_8b.width);
}else{
_8e=createContextMenu(_8c,150);
}
_8e.isDynamic=true;
_8e.isCacheable=_8d;
if(_8b!=null){
for(var i=0;i<_8b.items.length;i++){
_8e.add(cloneMenuItem(_8b.items[i],_8c+"_sub"+i,_8d));
}
}
}
return _8e;
};
function cloneMenuItem(_8f,_90,_91){
var _92=null;
if(_8f.submenu!=null){
_92=cloneMenu(_8f.submenu,_90,_91);
}
var _93=new UilMenuItem(_8f.text,_8f.isEnabled,_8f.action,_8f.clientAction,_92,_8f.icon,null,"lwpMenuItem","lwpSelectedMenuItem");
_93.isEnabled=_8f.isEnabled;
_93.isSelected=_8f.isSelected;
_93.isSeparator=_8f.isSeparator;
return _93;
};
if(typeof wps_loggedInFuncs=="undefined"){
wps_loggedInFuncs=new Object();
}
if(typeof wps_loggedOutFuncs=="undefined"){
wps_loggedOutFuncs=new Object();
}
if(typeof wps_userStatusFuncs=="undefined"){
wps_userStatusFuncs=new Object();
}
if(typeof wps_userEnteredFuncs=="undefined"){
wps_userEnteredFuncs=new Object();
}
if(typeof wps_userLeftFuncs=="undefined"){
wps_userLeftFuncs=new Object();
}
var pa_addtostlist_window_opener=null;
var stLinksAddToContactListFailedErrorMsg=null;
var linkId=null;
var defaultDynamicPersonTagURL=null;
var registeredInstantMessagingEvents=false;
var personjsSTLinksWatchNames_true="";
var personjsSTLinksWatchNames_false="";
var persontag_isLoggedIn=false;
var persontag_awarenessversion="";
var persontag_resolveNames=null;
function setDefaultDynamicPersonTagUrl(url){
defaultDynamicPersonTagURL=url;
};
var MS_XMLHTTP_TYPES=new Array("MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP");
function getDataFromServerIFrame(url,_94,_95){
var _96=document.getElementById(_94);
if(_96!=null){
var _97=document.location.protocol+"//"+document.location.host+url;
_96.src=_97;
if(isGecko()){
_96.onload=function(){
var _98=_96.contentWindow.document.body.childNodes[0].nodeValue;
_98=_98.replace(/'/g,"'");
_98=_98.replace(/"/g,"\"");
eval(_95+"(data);");
};
}else{
waitForIFrameCallback(_94,_95);
}
}
};
function waitForIFrameCallback(_99,_9a){
var _9b=document.frames[_99];
if(!isGecko()&&_9b.document.readyState!="complete"){
setTimeout("waitForIFrameCallback('"+_99+"','"+_9a+"');",500);
}else{
var _9c=_9b.document.body.innerHTML;
_9c=_9c.replace(/'/g,"\\'");
_9c=_9c.replace(/"/g,"\\\"");
eval(_9a+"('"+_9c+"');");
}
};
function getDataFromServer(url){
var _9d="";
var _9e=document.location.protocol+"//"+document.location.host+url;
var _9f=null;
if(window.XMLHttpRequest!=null){
_9f=new XMLHttpRequest();
}else{
if(window.ActiveXObject!=null){
var _a0=false;
for(var i=0;i<MS_XMLHTTP_TYPES.length&&!_a0;i++){
try{
_9f=new ActiveXObject(MS_XMLHTTP_TYPES[i]);
_a0=true;
}
catch(ex){
}
}
if(!_a0){
throw "Error in dynamic person tag.  Unable to create an XMLHTTP object.";
}
}
}
var _a1=_9e.split("?");
_9f.open("POST",_a1[0],false);
_9f.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
_9f.send(_a1[1]);
if(_9f.status==200){
_9d=_9f.responseText;
}else{
if(_9f.status==304){
}else{
throw "HTTP request for \""+_a1[0]+"\" failed with status \""+_9f.status+" "+_9f.statusText+"\"";
}
}
return _9d;
};
function invokePersonTagMenu(_a2,_a3,_a4){
var _a5=awarenessController.getMenuDataTagObject(_a2);
var _a6=_a5.getMenuData();
var _a7=_a5.getDisplayName();
if(_a6==null){
var _a8=_a5.getUserId();
var _a9=_a5.getUserIdType();
var _aa=_a5.getContextArray();
var _ab="";
var _ac;
var url=defaultDynamicPersonTagURL;
if(typeof _a8=="undefined"||_a8==null||_a8==""){
return;
}
if(typeof _a9=="undefined"||_a9==null||_a9==""){
_ac=_a8.indexOf("@");
if(_ac>=0){
_a9="EMAIL";
}else{
_a9="LDAPDN";
}
}
var _ad="value="+URLEncoder(_a8)+"&valueType="+_a9+"&displayName="+URLEncoder(_a7);
_ad+="&getMenuData=TRUE";
if(typeof _aa!="undefined"&&_aa!=null&&_aa!=""){
var _ae="";
for(var _af in _aa){
if(_aa[_af]!="undefined"&&_aa[_af]!=null&&_aa[_af]!=""){
_ae+=URLEncoder(_af)+URLEncoder(",")+URLEncoder(_aa[_af])+URLEncoder(";");
}
}
_ad+="&contextArray="+_ae;
}
_ac=url.lastIndexOf("#");
if(_ac>=0){
url=url.substr(0,_ac);
}
if(url.indexOf("markerstart")>=0){
url=url.replace(/markerstart=markerend/g,_ad);
}else{
url+="?"+_ad;
}
var _b0=getDataFromServer(url);
_ac=_b0.indexOf("<dynamicpersontagdata>");
var _b1=_ac+"<dynamicpersontagdata>".length;
_b0=_b0.substr(_b1,_b0.indexOf("</dynamicpersontagdata>")-_b1);
_a6=_b0;
_a5.setMenuData(_a6);
}
eval(_a6);
var _b2=_a5.getIMLogin();
var _b3=new BusinessCard();
_b3.setVariables(_a7,cardData);
var _b4=buildMenu(_b2,menuList,_b3,_a3,_a4);
return _b4;
};
function invokeDynamicPersonTag(_b5,_b6,_b7,_b8,_b9){
if(typeof _b5=="undefined"||_b5==null||_b5==""){
return;
}
if(typeof _b6=="undefined"||_b6==null||_b6==""){
_ba=_b5.indexOf("@");
if(_ba>=0){
_b6="EMAIL";
}else{
_b6="LDAPDN";
}
}
var _bb="";
var _ba;
var url=defaultDynamicPersonTagURL;
var _bc="value="+URLEncoder(_b5)+"&valueType="+_b6+"&displayName="+URLEncoder(_b7);
if(typeof _b9!="undefined"&&_b9!=null&&_b9!=""){
var _bd="";
for(var _be in _b9){
if(_b9[_be]!="undefined"&&_b9[_be]!=null&&_b9[_be]!=""){
_bd+=URLEncoder(_be)+URLEncoder(",")+URLEncoder(_b9[_be])+URLEncoder(";");
}
}
_bc+="&contextArray="+_bd;
}
_ba=url.lastIndexOf("#");
if(_ba>=0){
url=url.substr(0,_ba);
}
if(url.indexOf("markerstart")>=0){
url=url.replace(/markerstart=markerend/g,_bc);
}else{
url+="?"+_bc;
}
var _bf=getDataFromServer(url);
_ba=_bf.indexOf("<dynamicpersontagdata>");
var _c0=_ba+"<dynamicpersontagdata>".length;
_bf=_bf.substr(_c0,_bf.indexOf("</dynamicpersontagdata>")-_c0);
return _bf;
};
function invokeArrayOfDynamicPersonTags(_c1,_c2,_c3,_c4,_c5){
if(typeof _c1!="object"||_c1==null||_c1==""){
return;
}
var _c6=new Array();
for(var x=0;x<_c1.length;x++){
_c6[x]=invokeDynamicPersonTag(_c1[x],_c2[x],_c3[x],_c4[x],_c5);
}
return (_c6);
};
function addPeopleMenuMoreMenuItems(_c7){
if(typeof peoplemenu_more!="undefined"){
var _c8=peoplemenu_more.items;
var _c9=peoplemenu_more.actions;
for(i=0;i<_c8.length;i++){
if(_c9[i].toLowerCase().indexOf("javascript:")==-1){
_c7.add(new UilMenuItem(_c8[i],true,"","javascript:"+_c9[i],null,null,false,"lwpMenuItem","lwpSelectedMenuItem"));
}else{
_c7.add(new UilMenuItem(_c8[i],true,"",_c9[i],null,null,false,"lwpMenuItem","lwpSelectedMenuItem"));
}
}
}
};
function registerInstantMessagingEvents(){
if(persontag_awarenessversion=="classic"){
if(typeof STLinksAddListener=="function"){
STLinksAddListener("STLinksLoggedIn","STLinksLoggedIn_PersonJS");
STLinksAddListener("STLinksLoggedOut","STLinksLoggedOut_PersonJS");
STLinksAddListener("STLinksUserStatusChanged","STLinksUserStatusChanged_PersonJS");
}else{
wps_loggedInFuncs["STLinksLoggedIn_PersonJS"]=0;
wps_loggedOutFuncs["STLinksLoggedOut_PersonJS"]=0;
wps_userStatusFuncs["STLinksUserStatusChanged_PersonJS"]=0;
}
}else{
if(typeof PeopleLinksAddListener=="function"){
PeopleLinksAddListener("PeopleLinksLoggedIn","PeopleLinksLoggedIn_PersonJS");
PeopleLinksAddListener("PeopleLinksLoggedOut","PeopleLinksLoggedOut_PersonJS");
PeopleLinksAddListener("PeopleLinksUserStatusChanged","PeopleLinksUserStatusChanged_PersonJS");
PeopleLinksAddListener("PeopleLinksUsersStatusChanged","PeopleLinksUsersStatusChanged_PersonJS");
}
}
registeredInstantMessagingEvents=true;
};
function STLinksLoggedIn(_ca,_cb){
for(var _cc in wps_loggedInFuncs){
eval(_cc+"(\""+_ca+"\",\""+_cb+"\")");
}
};
function STLinksLoggedOut(_cd){
for(var _ce in wps_loggedOutFuncs){
eval(_ce+"(\""+_cd+"\")");
}
};
function STLinksUserStatusChanged(_cf,_d0,_d1,_d2,_d3){
for(var _d4 in wps_userStatusFuncs){
if(_d4=="STLinksUserStatusChanged_PersonJS"){
eval(_d4+"(\""+_cf+"\",\""+_d0+"\","+_d1+",\""+_d2+"\",\""+_d3+"\")");
}else{
eval(_d4+"(\""+escapeForJavaScript(_cf)+"\",\""+_d0+"\","+_d1+",\""+_d2+"\",\""+_d3+"\")");
}
}
};
function STLinksUserEnteredPlace(id,_d5,_d6){
for(var _d7 in wps_userEnteredFuncs){
eval(_d7+"(\""+id+"\",\""+_d5+"\",\""+_d6+"\")");
}
};
function STLinksUserLeftPlace(id,_d8,_d9){
for(var _da in wps_userLeftFuncs){
eval(_da+"(\""+id+"\",\""+_d8+"\",\""+_d9+"\")");
}
};
function PeopleLinksUsersStatusChanged_PersonJS(_db,_dc){
if(typeof (_db)=="object"){
if(typeof (_dc)=="undefined"){
_dc="";
}
for(var i=0;i<_db.length;i++){
PeopleLinksUserStatusChanged_PersonJS(_db[i].usermail,_db[i].usermail,_db[i].userstatustype,_db[i].userstatusdescr,_dc);
}
}
};
function PeopleLinksUserStatusChanged_PersonJS(_dd,_de,_df,_e0,_e1){
_df=_df+"";
awarenessController.updatePersonStatus(_dd,_df,_e0);
};
function STLinksUserStatusChanged_PersonJS(_e2,_e3,_e4,_e5,_e6){
_e4=_e4+"";
awarenessController.updatePersonStatus(_e2,_e4,_e5);
};
function STLinksLoggedOut_PersonJS(_e7){
persontag_isLoggedIn=false;
if(typeof awarenessController!="undefined"&&awarenessController!=null){
awarenessController.loggedOut();
}
};
function PeopleLinksLoggedOut_PersonJS(_e8,_e9){
persontag_isLoggedIn=false;
if(typeof awarenessController!="undefined"&&awarenessController!=null){
awarenessController.loggedOut();
}
};
function STLinksLoggedIn_PersonJS(_ea,_eb){
if(persontag_isLoggedIn==true){
return;
}
persontag_isLoggedIn=true;
sendNamesToInstantMessaging(personjsSTLinksWatchNames_true,true,true);
sendNamesToInstantMessaging(personjsSTLinksWatchNames_false,true,false);
};
function PeopleLinksLoggedIn_PersonJS(_ec){
if(persontag_isLoggedIn==true){
return;
}
persontag_isLoggedIn=true;
sendNamesToInstantMessaging(personjsSTLinksWatchNames_true,true,true);
sendNamesToInstantMessaging(personjsSTLinksWatchNames_false,true,false);
};
function sendNamesToInstantMessaging(_ed,_ee,_ef){
if(_ed==null||_ed.length<1){
return;
}
if(persontag_awarenessversion=="classic"){
if(_ee||(typeof ll_loggedIn!="undefined"&&ll_loggedIn==true)){
if(typeof STLinksWatchUsers!="undefined"){
STLinksWatchUsers(_ed,_ef);
}
}
}else{
if(_ee||(typeof g_fIsLoggedIn!="undefined"&&g_fIsLoggedIn==true)){
if(typeof PeopleLinksWatchUsers!="undefined"){
PeopleLinksWatchUsers(_ed);
}
}
}
};
function hexString(num,wid){
var str="";
var _f0=0;
var _f1="0123456789ABCDEF";
while(num>0){
_f0=num%16;
str=_f1.charAt(_f0)+str;
num>>=4;
}
while(str.length<wid){
str="0"+str;
}
return str;
};
function convToUtf8(_f2){
var _f3="";
if(_f2<=127){
if(_f2==32){
_f3="+";
}else{
if((_f2>=48&&_f2<=57)||(_f2>=65&&_f2<=90)||(_f2>=97&&_f2<=122)||(_f2==42)||(_f2==45)||(_f2==46)||(_f2==95)||(_f2==58)||(_f2==47)){
_f3=String.fromCharCode(_f2);
}else{
_f3="%"+hexString(_f2,2);
}
}
}else{
if(_f2<=2047){
_f3="%"+hexString(192+(_f2>>6),2);
_f3+="%"+hexString(128+(_f2&63),2);
}else{
if(_f2<=65535){
_f3="%"+hexString(224+(_f2>>12),2);
_f3+="%"+hexString(128+((_f2>>6)&63),2);
_f3+="%"+hexString(128+(_f2&63),2);
}else{
if(_f2<=1114111){
_f3="%"+hexString(240+(_f2>>18),2);
_f3+="%"+hexString(128+((_f2>>12)&63),2);
_f3+="%"+hexString(128+((_f2>>6)&63),2);
_f3+="%"+hexString(128+(_f2&63),2);
}
}
}
}
return _f3;
};
function URLEncoder(_f4){
var _f5="";
var _f6=0;
for(var ix=0;ix<_f4.length;ix++){
_f6=_f4.charCodeAt(ix);
_f5+=convToUtf8(_f6);
}
return _f5;
};
function handleChatPersonMenuItem(_f7){
if(typeof STLinksCreateIM=="function"){
STLinksCreateIM(escapeSlashComma(_f7));
}
};
function portalShowProfile(_f8){
window.open(_f8);
};
function portalFindDocs(_f9){
window.open(_f9);
};
function portalShowAddToContactsUI(_fa){
pa_addtostlist_window_opener=window;
window.open(_fa,"pa_addtostlist","resizable=yes,width=400,height=500,toolbar=no,status=no,menubar=no",true);
};
function setSTLinksAddToContactListFailedErrorMsg(_fb){
stLinksAddToContactListFailedErrorMsg=_fb;
};
function STLinksAddToContactListFailed(_fc){
if(pa_addtostlist_window_opener!=null&&stLinksAddToContactListFailedErrorMsg!=null){
alert(stLinksAddToContactListFailedErrorMsg+": "+_fc);
}
};
var awarenessController=new AwarenessController();
function BusinessCard(){
var _fd="";
var _fe="";
function _ff(_100,_101){
this.displayName=_100;
this.cardData=_101;
};
function _102(){
return this.displayName;
};
function _103(){
return this.cardData;
};
function _104(){
if(this.cardData==""){
return false;
}else{
return true;
}
};
this.setVariables=_ff;
this.getDisplayName=_102;
this.getCardData=_103;
this.hasCardData=_104;
};
function MenuItem(){
var _105="";
var uri="";
var _106=false;
function _107(_108,uri,_109){
this.displayName=_108;
this.uri=uri;
this.awareness=_109;
};
function _10a(){
return this.displayName;
};
function _10b(){
return this.uri;
};
function _10c(){
return this.awareness;
};
this.setVariables=_107;
this.getDisplayName=_10a;
this.getURI=_10b;
this.isAwarenessSensitive=_10c;
};
function buildMenu(_10d,_10e,_10f,_110,_111){
var _112=awarenessController.getOnlineStatusForUser(_10d);
var _113=_10d+awarenessController.getRandomSeed();
var _114=awarenessController.getLTR();
var menu=createContextMenu(_113,_114);
var _115=false;
menu.add(new UilMenuItem(_10f.getDisplayName(),false,true,null,null,null,true,"lwpMenuHeader","lwpSelectedMenuItem"));
var _116=new UilMenuItem("",false,null,null,null,null,false,"lwpMenuHeader","lwpSelectedMenuItem");
menu.add(_116);
if(_10f.hasCardData()){
var _117=_10f.getCardData();
var _118=_117.length;
for(var i=0;i<_118;i++){
if(_117[i]!=""){
_115=true;
menu.add(new UilMenuItem(_117[i],false,null,null,null,null,false,"lwpMenuHeader","lwpSelectedMenuItem"));
}
}
}
var _119=awarenessController.getStatusMessageForUser(_10d);
if(_115&&_119.length>0){
menu.add(new UilMenuItem("",false,null,null,null,null,false,"lwpMenuHeader","lwpSelectedMenuItem"));
}
if(_119.length>0){
menu.add(new UilMenuItem(_119,false,null,null,null,null,false,"lwpMenuHeader","lwpSelectedMenuItem"));
}
menu.addSeparator();
for(var i=0;i<_10e.length;i++){
if(_10e[i].isAwarenessSensitive()){
if(_112){
menu.add(new UilMenuItem(_10e[i].getDisplayName(),true,"",_10e[i].getURI(),null,null,false,"lwpMenuItem","lwpSelectedMenuItem"));
}
}else{
menu.add(new UilMenuItem(_10e[i].getDisplayName(),true,"",_10e[i].getURI(),null,null,false,"lwpMenuItem","lwpSelectedMenuItem"));
}
}
if(typeof addPeopleMenuMoreMenuItems!="undefined"){
addPeopleMenuMoreMenuItems(menu);
}
if(_111){
menu.show(_110);
}else{
showContextMenu(_113,_110);
}
return menu;
};
function swapDownImg(id){
var _11a=awarenessController.getIconDirectory();
_11a+="MenuDropdown.gif";
var elem=document.getElementById(id);
if(elem!=null){
elem.src=_11a;
}
};
function swapClearImg(id){
var _11b=awarenessController.getIconDirectory();
_11b+="ClearPixel.gif";
var elem=document.getElementById(id);
if(elem!=null){
elem.src=_11b;
}
};
function AwarenessController(){
var _11c=1;
var _11d=1;
var _11e="/wps/images/icons/";
var _11f=true;
var _120="";
var _121="";
var _122="";
var _123="";
var _124="";
var _125="";
var _126=new Object();
var _127=new Object();
function _128(_129,_12a){
if(_126[_12a]==null){
_12b(_12a);
var _12c=new PersonObject();
_12c.setStatusMessage(this.unAvailableMsg);
var _12d=new BusinessCard();
_12d.setVariables(_129,null);
_12c.setBusinessCard(_12d);
_126[_12a]=_12c;
}
};
function _12e(_12f,_130,_131,_132,_133,_134,_135,_136){
if(!registeredInstantMessagingEvents){
registerInstantMessagingEvents();
}
var _137="menu-link-"+_133;
var _138="status-img-"+_133;
if(_132==""){
_132=_131;
}
var _139=new MenuDataTagObject();
_139.setIMLogin(_132);
_139.setUserId(_12f);
_139.setUserIdType(_130);
_139.setDisplayName(_131);
_139.setContextArray(_135);
_127[_133]=_139;
if(_126[_132]==null){
_12b(_132,_136);
var _13a=new PersonObject();
_13a.setStatusMessage(this.unAvailableMsg);
_13a.setLinkID(_137);
if(_134==true){
_13a.setLeftAlignedImageID(_138);
}else{
_13a.setStatusImageID(_138);
}
var _13b=new BusinessCard();
_13b.setVariables(_131,null);
_13a.setBusinessCard(_13b);
_126[_132]=_13a;
}else{
_126[_132].setLinkID(_137);
if(_134==true){
_126[_132].setLeftAlignedImageID(_138);
}else{
_126[_132].setStatusImageID(_138);
}
}
};
function _13c(_13d,_13e,_13f){
var key;
_13d=_13d.toLowerCase();
for(key in _126){
if(key.toLowerCase()==_13d){
_13d=key;
}
}
var _140=_126[_13d];
if(typeof _140=="undefined"||_140==null){
return;
}
if(_13f==null||_13f.length<1){
switch(_13e){
case "0":
var len=this.offlineMsg.indexOf("%");
var _141=this.offlineMsg.charAt(len+1);
var str3=""+"%"+_141;
_13f=this.offlineMsg.replace(str3,this.getDisplayNameForUser(_13d));
break;
case "32":
_13f=this.activeMsg;
break;
case "64":
_13f=this.awayMsg;
break;
case "96":
_13f=this.awayMsg;
break;
case "128":
_13f=this.dndMsg;
break;
case "544":
_13f=this.activeMsg;
break;
case "608":
_13f=this.awayMsg;
break;
default:
var len=this.offlineMsg.indexOf("%");
var _141=this.offlineMsg.charAt(len+1);
var str3=""+"%"+_141;
_13f=this.offlineMsg.replace(str3,this.getDisplayNameForUser(_13d));
}
}
_140.setStatus(_13e);
_140.setStatusMessage(_13f);
_140.update();
};
function _142(_143){
var key;
_143=_143.toLowerCase();
for(key in _126){
if(key.toLowerCase()==_143){
_143=key;
}
}
var _144=_126[_143];
if(typeof _144=="undefined"||_144==null){
return;
}
_144.update();
};
function _145(){
var key;
for(key in _126){
_13c(key,"",this.unAvailableMsg);
}
};
function _146(_147,_148,_149,_14a,_14b,_14c){
this.activeMsg=_147;
this.awayMsg=_148;
this.dndMsg=_149;
this.unAvailableMsg=_14a;
this.offlineMsg=_14b;
this.clickForOptions=_14c;
};
function _14d(LTR){
_11f=LTR;
};
function _14e(_14f){
this.iconDirectory=_14f;
};
function _150(name){
};
function _12b(_151,_152){
if(_151==null||_151.length<1){
return;
}
_151=escapeSlashComma(_151);
if(typeof _152!="undefined"&&_152!=null){
if(_152==false){
personjsSTLinksWatchNames_false+=(personjsSTLinksWatchNames_false.length>0?";":"")+_151;
sendNamesToInstantMessaging(_151,false,false);
return;
}
}else{
if(persontag_resolveNames!=null){
if(persontag_resolveNames==false){
personjsSTLinksWatchNames_false+=(personjsSTLinksWatchNames_false.length>0?";":"")+_151;
sendNamesToInstantMessaging(_151,false,false);
return;
}
}
}
personjsSTLinksWatchNames_true+=(personjsSTLinksWatchNames_true.length>0?";":"")+_151;
sendNamesToInstantMessaging(_151,false,true);
};
function _153(_154){
return _126[_154];
};
function _155(_156){
return _127[_156];
};
function _157(){
return this.clickForOptions;
};
function _158(){
return _11d++;
};
function _159(){
return this.iconDirectory;
};
function _15a(){
return (_11f);
};
function _15b(){
return _11c++;
};
function _15c(_15d){
var _15e=this.unAvailableMsg;
if(_126[_15d]!=null){
_15e=_126[_15d].getStatusMessage();
}
return _15e;
};
function _15f(_160){
switch(_126[_160].getStatus()){
case "32":
case "96":
case "544":
case "608":
return true;
case "0":
case "64":
case "128":
return false;
}
return false;
};
function _161(_162){
var _163=_126[_162].getBusinessCard();
return _163.getDisplayName();
};
function _164(_165){
var _166=_126[_165].getBusinessCard();
return _166;
};
function _167(_168,_169,_16a){
var _16b=awarenessController.getIconDirectory();
var _16c=awarenessController.getPersonObject(_168);
if(_16c!=null){
_16b+=_16c.getStatusIcon();
}else{
_16b+="ClearPixel.gif";
}
var size="16";
if(_16a){
size="0";
}
var _16d=this.getStatusMessageForUser(_168);
var _16e="<img id='status-img-"+_169+"' title=\""+_16d+"\""+" alt=\""+_16d+"\" src='";
_16e+=_16b+"' width='"+size+"' height='"+size+"' border='0' align='absmiddle'>";
return _16e;
};
function _16f(_170){
var _171=awarenessController.getIconDirectory();
_171+="ClearPixel.gif";
var _172="<img id='down-img-"+_170+"' title=\""+this.clickForOptions+"\""+" alt=\""+this.clickForOptions+"\" src='";
_172+=_171+"' width='16' height='16' border='0' align='absmiddle'>";
return _172;
};
function _173(_174,_175,_176,_177,_178){
var _179=this.getStatusMessageForUser(_174);
if(_179.length>0){
_179+=" ";
}
var _17a="<a id='menu-link-"+_178+"' title='"+_179+this.getClickForOptions()+"'";
_17a+=" href='#' class='wpsPersonName'";
_17a+=" onMouseOver=\"swapDownImg('down-img-"+_178+"');\"";
_17a+=" onMouseOut=\"swapClearImg('down-img-"+_178+"');\"";
_17a+="onclick=\"invokePersonTagMenu('"+_178+"',event.target);  return false;\">";
return _17a;
};
function _17b(_17c,_17d,_17e,_17f,_180,_181,_182){
var _183=this.getCounter();
this.registerPerson(_17c,_17d,_17e,_17f,_183,_180,_181,_182);
var _184=this.createStatusImage(_17f,_183,_180);
var _185="";
var _186="";
var _187="";
if(defaultDynamicPersonTagURL!=null&&defaultDynamicPersonTagURL.length>0){
_185=this.createDownImage(_183);
_186=this.createMenuLink(_17c,_17d,_17e,_17f,_183);
_187="</a>";
}
var _188=_186+_184+_17e+_185+_187;
return _188;
};
function _189(junk){
};
function _18a(_18b){
persontag_awarenessversion=_18b;
};
function _18c(_18d){
persontag_resolveNames=_18d;
};
this.setIconDirectory=_14e;
this.setLTR=_14d;
this.setMessages=_146;
this.setDynamicPTagServletName=_150;
this.getPersonObject=_153;
this.getStatusMessageForUser=_15c;
this.getLTR=_15a;
this.getRandomSeed=_15b;
this.getCounter=_158;
this.getIconDirectory=_159;
this.getClickForOptions=_157;
this.getOnlineStatusForUser=_15f;
this.getDisplayNameForUser=_161;
this.getBusinessCardForUser=_164;
this.getMenuDataTagObject=_155;
this.registerPersonNoLinks=_128;
this.registerPerson=_12e;
this.updatePersonStatus=_13c;
this.updatePersonLink=_142;
this.writeOutLink=_17b;
this.createStatusImage=_167;
this.createDownImage=_16f;
this.createMenuLink=_173;
this.setDynamicPTagServletBaseURL=_189;
this.loggedOut=_145;
this.setAwarenessVersion=_18a;
this.setResolveNames=_18c;
};
function PersonObject(){
var _18e="";
var _18f="";
var _190=new Array();
var _191=new Array();
var _192;
var _193=new Array();
function _194(card){
this.businessCard=card;
};
function _195(id){
_190[_190.length]=id;
};
function _196(id){
_193[_193.length]=id;
};
function _197(id){
_191[_191.length]=id;
};
function _198(_199){
this.status=_199;
};
function _19a(_19b){
this.statusMessage=_19b;
};
function _19c(){
return this.businessCard;
};
function _19d(){
return this.statusMessage;
};
function _19e(){
return this.status;
};
function _19f(){
for(var i=0;i<_191.length;i++){
var elem=document.getElementById(_191[i]);
if(elem!=null){
var _1a0=this.statusMessage;
if(_1a0.length>0){
_1a0+=" ";
}
elem.title=_1a0+awarenessController.getClickForOptions();
}
}
for(var i=0;i<_190.length;i++){
var _1a1=awarenessController.getIconDirectory();
_1a1+=this.getStatusIcon();
var elem=document.getElementById(_190[i]);
if(elem!=null){
elem.alt=this.statusMessage;
elem.title=this.statusMessage;
elem.src=_1a1;
}
}
for(var i=0;i<_193.length;i++){
var _1a1=awarenessController.getIconDirectory();
_1a1+=this.getStatusIcon();
var elem=document.getElementById(_193[i]);
if(elem!=null){
if(this.status==null||this.status=="0"){
elem.width="0";
elem.height="0";
}else{
elem.width="16";
elem.height="16";
}
elem.alt=this.statusMessage;
elem.title=this.statusMessage;
elem.src=_1a1;
}
}
};
function _1a2(){
switch(this.status){
case "0":
return "ClearPixel.gif";
break;
case "32":
return "StatusActive.gif";
break;
case "64":
return "StatusAway.gif";
break;
case "96":
return "StatusAway.gif";
break;
case "128":
return "StatusDoNotDisturb.gif";
break;
case "544":
return "StatusMobile.gif";
break;
case "608":
return "StatusAway.gif";
break;
}
return "ClearPixel.gif";
};
this.setBusinessCard=_194;
this.setStatusImageID=_195;
this.setLeftAlignedImageID=_196;
this.setLinkID=_197;
this.setStatus=_198;
this.setStatusMessage=_19a;
this.getBusinessCard=_19c;
this.getStatus=_19e;
this.getStatusMessage=_19d;
this.getStatusIcon=_1a2;
this.update=_19f;
};
function MenuDataTagObject(){
var _1a3;
var _1a4;
var _1a5;
var _1a6;
var _1a7=null;
var _1a8=null;
function _1a9(_1aa){
this.IMLogin=_1aa;
};
function _1ab(_1ac){
this.userId=_1ac;
};
function _1ad(_1ae){
this.userIdType=_1ae;
};
function _1af(_1b0){
this.displayName=_1b0;
};
function _1b1(_1b2){
this.menuData=_1b2;
};
function _1b3(_1b4){
this.contextArray=_1b4;
};
function _1b5(){
return (this.IMLogin);
};
function _1b6(){
return (this.userId);
};
function _1b7(){
return (this.userIdType);
};
function _1b8(){
return (this.displayName);
};
function _1b9(){
return (this.menuData);
};
function _1ba(){
return (this.contextArray);
};
this.setIMLogin=_1a9;
this.setUserId=_1ab;
this.setUserIdType=_1ad;
this.setDisplayName=_1af;
this.setMenuData=_1b1;
this.setContextArray=_1b3;
this.getIMLogin=_1b5;
this.getUserId=_1b6;
this.getUserIdType=_1b7;
this.getDisplayName=_1b8;
this.getMenuData=_1b9;
this.getContextArray=_1ba;
};
function invokeAction(_1bb,_1bc){
var _1bd=new Array(1);
_1bd[0]=_1bc;
c2a_invokeMenuAction(_1bb,_1bd);
};
function escapeForJavaScript(str){
var _1be=str;
var loc=0;
while((loc=_1be.indexOf("\\",loc))>0){
_1be=_1be.substring(0,loc)+"\\"+_1be.substring(loc);
loc+=2;
}
return _1be;
};
function escapeSlashComma(str){
var _1bf=str.indexOf("=");
var _1c0=str.substring(_1bf+1,str.length);
var _1c1=_1c0.substring(0,_1c0.indexOf("="));
var _1c2=str.indexOf(",");
var _1c3=str;
if(_1c1.indexOf(",")!=_1c1.lastIndexOf(",")){
if(str.charAt(_1c2-1)!="\\"&&str.charAt(_1c2-2)!="\\"){
_1c3=str.substring(0,_1c2)+"\\"+str.substring(_1c2);
}
}
return _1c3;
};
function STLinkClicked(_1c4,_1c5,_1c6,_1c7){
linkId=_1c4;
if(typeof STLinksCreateIM=="function"){
STLinksCreateIM(escapeSlashComma(linkId));
}
};
var InputHandler_pabData=null;
var InputHandler_handlerArray=new Array();
function InputHandler_getServerPabData(){
var _1c8=null;
if(document.getElementById("typeAheadIFrame")!=null){
getDataFromServerIFrame(typeAheadServletUrl,"typeAheadIFrame","InputHandler_getServerPabData_callback");
}else{
_1c8=getDataFromServer(typeAheadServletUrl);
InputHandler_getServerPabData_callback(_1c8);
}
};
function InputHandler_getServerPabData_callback(_1c9){
if(_1c9!=null){
if(InputHandler_pabData==null){
InputHandler_pabData=new Array();
}
while(_1c9.length>0){
var _1ca=_1c9.substring(0,3)-0;
var _1cb=_1c9.substring(3,_1ca+3);
_1c9=_1c9.substring(_1ca+3);
var _1cc=_1c9.substring(0,3)-0;
var _1cd=_1c9.substring(3,_1cc+3);
_1c9=_1c9.substring(_1cc+3);
var _1ce=_1c9.substring(0,3)-0;
var _1cf=_1c9.substring(3,_1ce+3);
_1c9=_1c9.substring(_1ce+3);
var _1d0=_1c9.substring(0,3)-0;
var _1d1=_1c9.substring(3,_1d0+3);
_1c9=_1c9.substring(_1d0+3);
var _1d2=false;
for(var i=0;i<InputHandler_pabData.length;i++){
if(InputHandler_pabData[i].getEmail()==_1cd){
_1d2=true;
break;
}
}
if(_1d2){
break;
}
var _1d3=new PabEntry();
_1d3.setName(_1cb);
_1d3.setEmail(_1cd);
_1d3.setLocation(_1cf);
_1d3.setIMLogin(_1d1);
InputHandler_pabData[InputHandler_pabData.length]=_1d3;
}
}
InputHandler_callPollInput();
};
function InputHandler_callPollInput(){
for(var i=0;i<InputHandler_handlerArray.length;i++){
InputHandler_handlerArray[i].pollInput();
}
setTimeout("InputHandler_callPollInput();",1000);
};
function InputHandler_registerInputHandler(_1d4){
if(InputHandler_handlerArray.length==0){
var _1d5=window.onload;
window.onload=function(){
if(_1d5){
eval(_1d5);
}
InputHandler_getServerPabData();
};
}
_1d4.index=InputHandler_handlerArray.length;
InputHandler_handlerArray[InputHandler_handlerArray.length]=_1d4;
};
var InputHandler_menuItemArray=new Array();
function InputHandler_createTypeAheadMenuItem(data,_1d6){
var _1d7=null;
if((typeof InputHandler_menuItemArray[data.getEmail()]!="undefined")&&(InputHandler_menuItemArray[data.getEmail()]!=null)){
_1d7=InputHandler_menuItemArray[data.getEmail()];
}else{
_1d7=new UilMenuItem("",true,"","",null,null,false,"lwpMenuItem","lwpSelectedMenuItem");
_1d7.superclass_create=_1d7.create;
_1d7.data=data;
if(_1d6.showAwareness&&data.getIMLogin()!=null&&data.getIMLogin()!=""){
awarenessController.registerPersonNoLinks(data.getName(),data.getIMLogin());
}
InputHandler_menuItemArray[data.getEmail()]=_1d7;
}
_1d7.create=function(_1d8,_1d9){
this.superclass_create(_1d8,false);
this.showPeopleMenu=_1d6.showPeopleMenu&&data.getIMLogin()!=null&&data.getIMLogin()!="";
if(this.showPeopleMenu){
var _1da=document.createElement("TD");
_1da.noWrap=true;
var _1db=document.createElement("IMG");
_1db.alt=submenuAltText_;
_1db.title=submenuAltText_;
if(this.parentMenu.isLTR){
_1db.src=arrowNorm_;
}else{
_1db.src=arrowNormRTL_;
}
_1da.appendChild(_1db);
this.arrowTag=_1db;
this.itemTag.appendChild(_1da);
_1db.width=arrowWidth_;
_1db.height=arrowHeight_;
}else{
if(_1d6.showPeopleMenu){
var _1da=document.createElement("TD");
this.itemTag.appendChild(_1da);
}
}
this.anchorTag.onkeydown=null;
this.itemTag.onmousedown=function(_1dc){
InputHandler_typeAheadMenuItemLaunchAction(_1d6,_1dc);
};
this.itemTag.onmousemove=function(_1dd){
if(visibleMenu_!=null){
var item=visibleMenu_.getMenuItem(getEventTarget(_1dd));
if(item!=null){
if(!item.isSelected){
item.anchorTag.focus();
}
}
}
};
};
if(_1d6.showAwareness&&data.getIMLogin()!=null&&data.getIMLogin()!=""){
var icon=awarenessController.getIconDirectory()+awarenessController.getPersonObject(data.getIMLogin()).getStatusIcon();
_1d7.icon=icon;
}
var _1de=_1d6.parseLastName().toLowerCase();
var _1df=("\""+data.getName()+"\" <"+data.getEmail()+">").toLowerCase();
if(_1df.indexOf(_1de)==0){
var pre=_1df.substring(0,_1de.length).replace(/&/g,"&amp;").replace(/</g,"&lt;");
var post=_1df.substring(_1de.length).replace(/&/g,"&amp;").replace(/</g,"&lt;");
_1df="<b>"+pre+"</b>"+post;
}else{
var _1e0=_1df.indexOf(" "+_1de);
if(_1e0==-1){
_1e0=_1df.indexOf("\""+_1de);
if(_1e0==-1){
_1e0=_1df.indexOf("<"+_1de);
}
}
if(_1e0!=-1){
var pre=_1df.substring(0,_1e0+1);
var mid=_1df.substring(_1e0+1,_1e0+1+_1de.length);
var post=_1df.substring(_1e0+1+_1de.length);
pre=pre.replace(/&/g,"&amp;").replace(/</g,"&lt;");
mid=mid.replace(/&/g,"&amp;").replace(/</g,"&lt;");
post=post.replace(/&/g,"&amp;").replace(/</g,"&lt;");
_1df=pre+"<b>"+mid+"</b>"+post;
}
}
_1d7.text=_1df;
_1d7.clientAction="InputHandler_handlerArray["+_1d6.index+"].returnValue('"+data.getName()+"','"+data.getEmail()+"');";
return _1d7;
};
var pickerResultsFunctionIndex=0;
function pickerResultsFunction(data){
var _1e1=new Array();
if(data){
var str="";
for(var i=0;i<data.length;i++){
for(var j=0;j<data[i].length;j++){
var _1e2=data[i][j].email;
var name=data[i][j].name;
_1e1[_1e1.length]=new Object();
_1e1[_1e1.length-1].name=name;
_1e1[_1e1.length-1].email=_1e2;
}
}
InputHandler_handlerArray[pickerResultsFunctionIndex].returnArrayValues(_1e1);
}
};
function openTypeAheadPeoplePicker(){
var _1e3=InputHandler_handlerArray[pickerResultsFunctionIndex];
_1e3.peoplePickerArgs.prepop=_1e3.parseLastName();
openModalDialogWithArgs(_1e3.peoplePickerArgs.url,_1e3.peoplePickerArgs,pickerResultsFunction);
};
var blockSub=null;
function blockkeypress(_1e4){
if(isGecko()){
document.getElementById("typeaheadfocusdump").onfocus=function(){
setTimeout("document.getElementById('"+_1e4+"').focus()",100);
};
document.getElementById("typeaheadfocusdump").focus();
}else{
document.getElementById("typeaheadfocusdump").onkeyup=function(){
document.getElementById("typeaheadfocusdump").form.onsubmit=blockSub;
document.getElementById(_1e4).focus();
};
blockSub=document.getElementById(_1e4).form.onsubmit;
document.getElementById("typeaheadfocusdump").form.onsubmit=function(){
document.getElementById(_1e4).focus();
document.getElementById("typeaheadfocusdump").form.onsubmit=blockSub;
return false;
};
document.getElementById("typeaheadfocusdump").focus();
}
};
function InputHandler(_1e5,_1e6,_1e7,_1e8,_1e9){
this.index=0;
this.getInput=true;
this.inputId=_1e5;
this.menu=null;
this.lastPolled="";
this.changedIndex=0;
this.showAwareness=_1e7;
this.showPeopleMenu=_1e8;
this.peoplePickerArgs=new Object();
this.peoplePickerArgs.url=_1e6;
this.peoplePickerArgs.window=window;
this.maxRows=_1e9;
this.captureKeys=function(_1ea){
if(this.menu!=null&&this.menu.isVisible&&!this.menu.isEmpty&&!_1ea.shiftKey){
if(_1ea.keyCode==40){
var _1eb=this.menu;
if(this.menu.selectedItem.submenu!=null&&this.menu.selectedItem.submenu.isVisible){
_1eb=this.menu.selectedItem.submenu;
}
if(_1eb.selectedItem==null){
_1eb.items[0].setSelected(true);
}else{
if(_1eb.selectedItem.getNextItem()!=null){
_1eb.selectedItem.getNextItem().setSelected(true);
}
}
return blockkeypress(this.inputId);
}else{
if(_1ea.keyCode==38){
var _1eb=this.menu;
if(this.menu.selectedItem.submenu!=null&&this.menu.selectedItem.submenu.isVisible){
_1eb=this.menu.selectedItem.submenu;
}
if(_1eb.selectedItem==null){
_1eb.items[_1eb.items.length-1].setSelected(true);
}else{
if(_1eb.selectedItem.getPrevItem()!=null){
_1eb.selectedItem.getPrevItem().setSelected(true);
}
}
return blockkeypress(this.inputId);
}else{
if(_1ea.keyCode==39){
var item=this.menu.selectedItem;
if(item.showPeopleMenu){
if(item.submenu!=null){
if(!item.submenu.isVisible){
item.submenu.show(item.anchorTag,item);
item.submenu.items[0].anchorTag.focus();
return blockkeypress(this.inputId);
}
}else{
var _1ec=awarenessController.getCounter();
awarenessController.registerPerson(item.data.getEmail(),"EMAIL",item.data.getName(),item.data.getIMLogin(),_1ec,false,null,null);
var menu=invokePersonTagMenu(_1ec,item.arrowTag,true);
item.submenu=menu;
item.submenu.items[0].anchorTag.focus();
return blockkeypress(this.inputId);
}
}
}else{
if(_1ea.keyCode==37){
var item=this.menu.selectedItem;
if(item.submenu!=null&&item.submenu.isVisible){
item.submenu.hide(item.anchorTag,item);
return blockkeypress(this.inputId);
}
}else{
if(_1ea.keyCode==13){
var _1eb=this.menu;
if(this.menu.selectedItem.submenu!=null&&this.menu.selectedItem.submenu.isVisible){
_1eb=this.menu.selectedItem.submenu;
}
if(_1eb.selectedItem!=null){
eval(_1eb.selectedItem.clientAction);
if(_1eb.selectedItem.action!=null){
if(_1eb.selectedItem.action.indexOf("javascript:")==0){
eval(_1eb.selectedItem.action);
}
}
}
_1eb.hide();
return blockkeypress(this.inputId);
}
}
}
}
}
}
var _1ed=document.getElementById(this.inputId);
var size=40;
if(_1ed.size!=null){
size=_1ed.size;
}
if(this.maxRows>1&&_1ed.value.length>(size*0.8)){
var _1ee=document.createElement("textarea");
_1ee.className="wpsEditField";
_1ee.rows=this.maxRows;
if(_1ed.size!=null&&_1ed.size>0){
_1ee.cols=_1ed.size;
}
_1ee.value=_1ed.value;
_1ee.onkeydown=_1ed.onkeydown;
_1ee.id=_1ed.id;
_1ee.name=_1ed.name;
_1ee.autocomplete="OFF";
_1ee.style=_1ed.style;
this.maxRows=-1;
_1ed.parentNode.replaceChild(_1ee,_1ed);
if(isGecko()){
_1ee.focus();
}else{
setTimeout("document.getElementById('"+_1ed.id+"').focus();"+"document.getElementById('"+_1ed.id+"').value=document.getElementById('"+_1ed.id+"').value",100);
}
}
};
this.parseLastName=function(){
var _1ef=document.getElementById(this.inputId).value;
var _1f0=_1ef.substring(0,this.changedIndex+1).lastIndexOf(",")+1;
var _1f1=_1ef.substring(this.changedIndex+1).indexOf(",");
if(_1f1==-1){
_1f1=_1ef.length;
}else{
_1f1=_1f1+this.changedIndex+1;
}
_1ef=_1ef.substring(_1f0,_1f1);
_1f0=0;
while(_1f0<_1ef.length&&(_1ef.charAt(_1f0)==" "||_1ef.charAt(_1f0)=="\r"||_1ef.charAt(_1f0)=="\n")){
_1f0=_1f0+1;
}
_1f1=_1ef.length-1;
while(_1f1<_1ef.length&&(_1ef.charAt(_1f1)==" "||_1ef.charAt(_1f1)=="\r"||_1ef.charAt(_1f1)=="\n")){
_1f1=_1f1-1;
}
var _1f2="";
if(_1f0<(_1f1+1)){
_1f2=_1ef.substring(_1f0,_1f1+1);
}
return _1f2;
};
this.pollInput=function(){
var _1f3=document.getElementById(this.inputId).value;
if(_1f3!=this.lastPolled){
for(var i=1;i<=_1f3.length;i++){
if(i>=this.lastPolled.length||this.lastPolled.charAt(this.lastPolled.length-i)!=_1f3.charAt(_1f3.length-i)){
this.changedIndex=_1f3.length-i;
break;
}
}
this.lastPolled=_1f3;
_1f3=this.parseLastName().toLowerCase();
if(_1f3==""){
if(this.menu!=null){
this.menu.hide();
}
return;
}
var _1f4=null;
if(_1f3!=null&&_1f3.length>0){
_1f4=new Array();
for(x=0;x<InputHandler_pabData.length;x++){
var _1f5=InputHandler_pabData[x];
var _1f6=("\""+_1f5.getName()+"\" <"+_1f5.getEmail()+">").toLowerCase();
if(_1f6.indexOf(_1f3)==0||_1f6.indexOf(" "+_1f3)!=-1||_1f6.indexOf("\""+_1f3)!=-1||_1f6.indexOf("<"+_1f3)!=-1){
_1f4[_1f4.length]=_1f5;
}
}
}
this.createMenu(_1f4);
document.getElementById(this.inputId).focus();
}
};
this.createMenu=function(data){
if(data!=null){
var _1f7="jave"+awarenessController.getRandomSeed();
var _1f8=awarenessController.getLTR();
this.menu=InputHandler_createTypeAheadContextMenu(_1f7,_1f8);
for(var i=0;i<data.length;i++){
var _1f9=InputHandler_createTypeAheadMenuItem(data[i],this);
this.menu.add(_1f9);
}
if((this.peoplePickerArgs.url!=null)&&(typeof openModalDialog!="undefined")){
var _1fa="pickerResultsFunctionIndex="+this.index+";openTypeAheadPeoplePicker();";
var _1fb=new UilMenuItem("Do full search on: <b>"+this.parseLastName().replace(/&/g,"&amp;").replace(/</g,"&lt;")+"</b>",true,"",_1fa,null,null,false,"lwpMenuItem","lwpSelectedMenuItem");
_1fb.superclass_create=_1fb.create;
_1fb.create=function(_1fc,_1fd){
this.superclass_create(_1fc,false);
if(_1e8){
var _1fe=document.createElement("TD");
this.itemTag.appendChild(_1fe);
}
};
var icon=awarenessController.getIconDirectory()+"Search_Task.gif";
_1fb.icon=icon;
this.menu.add(_1fb);
}
var _1ff=awarenessController.getIconDirectory();
var _200=_1ff+"ClearPixel.gif";
var _201=_1ff+"MenuDropdown.gif";
var _202=_1ff+"MenuDropdown.gif";
contextMenuSetArrowIconDimensions(16,16);
contextMenuSetIcons(_200,_200,_201,_201,_201,_201,_201,_201,_201,_201,_201);
contextMenuShow(_1f7,false,false,document.getElementById(this.inputId),true);
}
};
this.returnArrayValues=function(_203){
for(var i=0;i<_203.length;i++){
this.returnValue(_203[i].name,_203[i].email);
}
};
this.returnValue=function(name,_204){
var _205="\""+name+"\" <"+_204+">";
var _206=document.getElementById(this.inputId).value;
var _207=_206.substring(0,this.changedIndex+1).lastIndexOf(",")+1;
var _208=_206.substring(0,_207);
if(_208.length>0){
_208=_208+" ";
}
var _209=_206.substring(this.changedIndex+1).indexOf(",");
if(_209==-1){
_209=_206.length;
}else{
_209=_209+this.changedIndex+2;
}
var _20a=_206.substring(_209);
if(_20a.charAt(0)==" "){
_20a=_20a.substring(1);
}
var _20b=_208+_205+", "+_20a;
document.getElementById(this.inputId).value=_20b;
this.changedIndex=_20b.length;
this.lastPolled=_20b;
this.menu.hide();
};
InputHandler_registerInputHandler(this);
};
function PabEntry(){
this.setName=function(_20c){
this.name=_20c;
};
this.setEmail=function(_20d){
this.email=_20d;
};
this.setLocation=function(_20e){
this.location=_20e;
};
this.setIMLogin=function(_20f){
this.IMLogin=_20f;
};
this.getName=function(){
return (this.name);
};
this.getEmail=function(){
return (this.email);
};
this.getLocation=function(){
return (this.location);
};
this.getIMLogin=function(){
return (this.IMLogin);
};
};
function InputHandler_createTypeAheadContextMenu(name,_210,_211){
var menu=new UilContextMenu(name,_210,_211);
menu.superclass_show=menu.show;
menu.show=function(_212,_213){
this.superclass_show(_212,_213);
document.onmousedown=InputHandler_documentOnMouseDown;
if(this.isEmpty){
this.hide();
}else{
if(this.launcher.tagName=="INPUT"||this.launcher.tagName=="TEXTAREA"){
var _214=getLeft(this.launcher,true);
var _215=getHeight(this.menuTag);
var maxY=document.documentElement.scrollTop+document.documentElement.clientHeight;
var _216=document.body.scrollTop+document.body.clientHeight;
if(_216>maxY){
maxY=_216;
}
posX=_214;
if(!this.isLTR){
posX+=getWidth(this.launcher)-getWidth(this.menuTag);
}
posY=getTop(this.launcher,true);
if(posY+_215>maxY){
posY-=_215;
}else{
posY+=getHeight(this.launcher);
}
this.menuTag.style.left=posX+"px";
this.menuTag.style.top=posY+"px";
var _217=this.hiddenItems.length;
for(i=0;i<_217;i++){
var item=this.hiddenItems.pop();
item.style.visibility="visible";
}
var coll=document.getElementsByTagName("SELECT");
if(coll!=null){
for(i=0;i<coll.length;i++){
if(intersect(this.menuTag,coll[i])&&coll[i].style.visibility!="hidden"){
coll[i].style.visibility="hidden";
this.hiddenItems.push(coll[i]);
}
}
}
}
this.launcher.focus();
}
};
menu.superclass_create=menu.create;
menu.create=function(_218){
this.superclass_create(_218);
if(this.menuTag!=null){
this.menuTag.onmouseover=null;
this.menuTag.onmouseout=null;
}
};
allMenus_[allMenus_.length]=menu;
return menu;
};
function InputHandler_typeAheadMenuItemLaunchAction(_219,_21a){
if(visibleMenu_!=null){
var item=visibleMenu_.selectedItem;
if(_219.showPeopleMenu&&getEventTarget(_21a)==item.arrowTag){
if(item.submenu!=null){
if(item.submenu.isVisible){
item.submenu.hide(item.anchorTag,item);
}else{
item.submenu.show(item.anchorTag,item);
}
}else{
var _21b=awarenessController.getCounter();
awarenessController.registerPerson(item.data.getEmail(),"EMAIL",item.data.getName(),item.data.getIMLogin(),_21b,false,null,null);
var menu=invokePersonTagMenu(_21b,item.arrowTag,true);
item.submenu=menu;
}
document.onmousedown=InputHandler_documentOnMouseDown;
}else{
hideCurrentContextMenu(true);
if(item.clientAction!=null){
eval(item.clientAction);
}
if(item.action!=null){
if(item.action.indexOf("javascript:")==0){
eval(item.action);
}
}
}
}
};
function InputHandler_documentOnMouseDown(_21c){
if(!getEventTarget(_21c).src){
hideCurrentContextMenu(true);
}
};
function getEventTarget(_21d){
if(isGecko()){
return _21d.target;
}else{
return window.event.srcElement;
}
};

