
try{/* (C) Copyright IBM Corp. 2007  All Rights Reserved.                */
/**
 * This is the JS file for the common semantic tagging service
 */
 
var STSPG = {
	lang: "sv",
	bidi: "ltr",
	service: "",
    contextUrl: "/wps/semanticTag",
	wpsBaseURL: "/wps",
	externalServiceEntries:'',
	isDynamicLoading : false,
	isC2AHandlerRequired : true,
	isPersonCardHandlerRequired : true,
	isActionHandlerRequired : true,
	isParsingRequired : true,
	newSametimeCommunityServer:true
};
STSPG.service={"entries":[{"id":"com.ibm.portal.action","test":"(globalTestNode.className.match(STSP.actionRE))","js":"","classnames":[".com\\.ibm\\.portal\\.action"]},{"id":"hcard","test":"(globalTestNode.className.match(STSP.hcardRE))","js":"/javascript/semanticTagPerson.js","classnames":[".vcard"]},{"id":"sametime","test":"id:hcard","js":"/javascript/semanticTagAwareness.js","classnames":[]},{"id":"c2a","test":"(globalTestNode.className.match(/(^|\\s)c2a:(source|target)(\\s|$)/)) ","js":"/javascript/semanticTagC2A.js","classnames":[".c2a\\:source",".c2a\\:target"]}]};
var externalEntries;
try{
if(STSPG.externalServiceEntries!=null&&STSPG.externalServiceEntries.length>0){
externalEntries=eval(" ("+STSPG.externalServiceEntries+")");
STSPG.service.entries=STSPG.service.entries.concat(externalEntries);
}else{
}
}
catch(e){
}

var STSP={version:"1.0",lang:STSPG.lang,bidi:STSPG.bidi,tagScope:["*"],service:STSPG.service,scripts:new Array(),actionRegistry:null,refcntAttr:"semtag_refcnt",hoverIdPrefix:"semtag_hover_",hoverIdx:0,liveElemPrefix:"semtag_live_",reMap:new Array(),actionRE:new RegExp("(^|\\s)com.ibm.portal.action(\\s|$)"),hcardRE:new RegExp("(^|\\s)vcard(\\s|$)"),specialMenuProviders:new Array(),parseElem:null,isEnablerObjectAvailable:(typeof com!=="undefined")&&(typeof com.ibm!=="undefined")&&(typeof com.ibm.mashups!=="undefined"),svcEntryPersonCard:null,isSizzleAvailable:((typeof i$!=="undefined")&&(typeof i$.query==="function")),DELAY:10,isMobile:navigator.userAgent.match(/(Android|BlackBerry|iPad|iPhone|iPod|IEMobile|Opera Mini)/ig)?true:false,init:function(_1){
var _2=STSP.DELAY;
if(STSPG.isParsingRequired===false){
STSP.svcEntryPersonCard=STSP.service.entries[1];
if(!STSP.svcEntryPersonCard.nodes){
STSP.svcEntryPersonCard.nodes=[];
}
}
var _3=STSP.isEnablerObjectAvailable;
STSP.isSizzleAvailable=((typeof i$!=="undefined")&&(typeof i$.query==="function"));
if(_3===false){
STSP.parseElem=STSP.getElementFromEvent(_1);
window.setTimeout(STSP.parseDom,STSP.DELAY);
}else{
var _4=STSP.service.entries;
var _5=_4?_4.length:0;
if(STSPG.isDynamicLoading){
for(var k=0;k<_4.length;k++){
var _6=_4[k];
if(_6.id==="hcard"){
STSP.loadScript("/javascript/attributes.js");
STSP.loadScript("/javascript/semanticTagMenu.js");
}
STSP.loadScript(_6.js);
}
}
}
if(STSPG.isActionHandlerRequired){
STSP.setCallback("com.ibm.portal.action",STSP.processActions);
}
if(!STSPG.isDynamicLoading&&STSPG.isPersonCardHandlerRequired&&(typeof SemTagMenu==="object")){
window.setTimeout(SemTagMenu.init,_2);
}
},loadConnScript:function(){
var _7=document.createElement("script");
var _8=STSP.connUrl;
var _9=_8;
_9=_8+"/profiles/portalJS/portalBizCard.js";
_9+=(_9.indexOf("?")==-1)?"?":"&";
_9+="lang="+STSP.lang;
_7.src=_9;
try{
document.body.insertBefore(_7,document.body.firstChild);
}
catch(e){
alert("Svc.loadConnScript caught: "+e);
}
},watchEvent:function(_a,_b,_c,_d){
try{
if(_a.addEventListener){
_a.addEventListener(_b,_c,_d);
}else{
if(_a.attachEvent){
_a.attachEvent("on"+_b,_c);
}
}
}
catch(e){
}
},clearEventWatch:function(_e,_f,_10,_11){
try{
if(_e.removeEventListener){
_e.removeEventListener(_f,_10,_11);
}else{
if(_e.detachEvent){
_e.detachEvent("on"+_f,_10);
}
}
}
catch(e){
}
},parseDomUsingMashupHandler:function(_12,_13){
if(STSP.isSizzleAvailable===true){
}
if(STSPG.isParsingRequired===false){
return false;
}
var _14=STSP.getService(_13);
if(_13==="com.ibm.portal.action"){
STSP.setCallback(_13,STSP.processActions);
}
if(!_14.nodes){
_14.nodes=[];
}
for(var len=0;len<_12.length;len++){
_14.nodes.push(_12[len]);
}
if(_14.callback){
_14.callback.call(this);
}
STSP.loadScript(_14.js);
try{
var _15=STSP.service.entries;
for(var k=0;k<_15.length;k++){
var _16=_15[k];
var _17=false;
if(_16.id===_14.id){
continue;
}
if(_16.test&&_16.test.match(/^id:/)){
var _18=_16.test.substr(3);
if(_18!=_14.id){
continue;
}
var _12=STSP.getNodes(_18);
if(_12&&0<_12.length){
_17=true;
}
}
if(_17&&STSPG.isDynamicLoading){
STSP.loadScript(_16.js);
}
if(_16.callback){
_16.callback.call(this);
}
}
}
catch(e){
}
},parseDom:function(_19,_1a){
if(STSPG.isParsingRequired===false){
return false;
}
if(!_1a&&_19){
_1a=STSP.getElementFromEvent(_19);
}
if(!_1a&&STSP.parseElem){
_1a=STSP.parseElem;
}else{
if(!_1a){
_1a=document;
}else{
if(typeof _1a=="string"){
_1a=document.getElementById(_1a);
}
}
}
var _1b=STSP.service.entries;
for(var j=0;j<_1b.length;j++){
var _1c=_1b[j];
if(!_1c.nodes){
_1c.nodes=[];
}else{
if(_1a==document){
while(0<_1c.nodes.length){
_1c.nodes.pop();
}
}
}
}
var _1d=new Date().getTime();
if(STSP.isSizzleAvailable===false){
STSP.traverseNodes(_1a);
var _1e=new Date().getTime();
}else{
_1d=new Date().getTime();
for(var k=0;k<_1b.length;k++){
var _1c=_1b[k];
if(_1c.classnames==null||_1c.classnames==="undefined"||_1c.classnames.length<1){
continue;
}
var _1f=typeof _1c.classnames;
if(typeof _1c.classnames==="string"){
continue;
}
var _20=_1c.classnames.join(",");
var _21;
_21=i$.query(_1c.classnames.join(","),_1a,_1c.nodes);
if(_1c.nodes.length!=_21.length){
}
}
_1e=new Date().getTime();
var _22=_1e-_1d;
}
for(var k=0;k<_1b.length;k++){
var _1c=_1b[k];
var _23=false;
if(0<_1c.nodes.length){
_23=true;
}else{
if(_1c.test&&_1c.test.match(/^id:/)){
var _24=_1c.test.substr(3);
var _25=STSP.getNodes(_24);
if(_25&&0<_25.length){
_23=true;
}
}
}
if(_23){
if(STSPG.isDynamicLoading){
if(_1c.id=="hcard"){
STSP.loadScript("/javascript/attributes.js");
STSP.loadScript("/javascript/semanticTagMenu.js");
}
var _26=typeof _1c.js;
if(typeof _1c.js==="string"){
STSP.loadScript(_1c.js);
}
}
}
if(_1c.callback){
_1c.callback.call(_1c.nodes);
}
}
STSP.parseElem=null;
},traverseNodes:function(_27){
STSP.traverse_children(_27);
},traverse_tagscope:function(_28){
var _29=STSP.service.entries;
var _2a=_28.getElementsByTagName(STSP.tagScope);
for(var i=0;i<_2a.length;i++){
var _28=_2a[i];
for(var j=0;j<_29.length;j++){
var _2b=_29[j];
if(!_2b.nodes){
_2b.nodes=new Array();
}
if(eval(_2b.test)){
_2b.nodes.push(_28);
}
}
}
},traverse_children:function(_2c){
STSP.testNode(_2c);
var _2d=(_2c&&_2c.childNodes)?_2c.childNodes:null;
if(STSPG.isPersonCardHandlerRequired&&_2c&&_2c.tagName&&_2c.tagName=="IFRAME"){
try{
if(typeof ActiveXObject!="undefined"){
var _2e=document.frames[_2c.id].document;
if(_2e){
_2d=_2e.childNodes;
}
}else{
if(_2c.contentDocument&&_2c.contentDocument.childNodes){
_2d=_2c.contentDocument.childNodes;
}
}
}
catch(e){
_2d=null;
}
var _2f=_2d?_2d.length:"is null";
if(_2d&&0<_2d.length){
var _30=SemTagMenu.includeCSS(_2d[0].parentNode);
if(_30){
STSP.watchEvent(_2c,"load",STSP.parseDom,false);
SemTagMenu.registerMenuEventHandlers(_2d[0].parentNode);
}
}
}
if(_2d==null||_2d=="undefined"){
return;
}
for(var i=0;i<_2d.length;i++){
STSP.traverse_children(_2d[i]);
}
},testNode:function(_31){
globalTestNode=_31;
if(_31==null||_31.className==null||_31.className=="undefined"||_31.tagName==null||_31.tagName=="undefined"){
return;
}
if(typeof _31.className!=="string"){
return;
}
var _32=STSP.service.entries;
for(var j=0;j<_32.length;j++){
var _33=_32[j];
if(_33.test&&!_33.test.match(/^id:/)&&eval(_33.test)){
if(!_31.alreadyadded){
_31.alreadyadded=true;
_33.nodes.push(_31);
}
}
}
},getService:function(_34){
var _35=STSP.service.entries;
for(var i=0;i<_35.length;i++){
var _36=_35[i];
if(_36.id==_34){
return _36;
}
}
},setSemanticTagValue:function(_37,_38,_39){
if(!_38.semTagValues){
_38.semTagValues={};
}
_38.semTagValues[_37]=_39;
},getSemanticTagValues:function(_3a){
return _3a.semTagValues;
},getNodes:function(_3b){
var _3c=STSP.getService(_3b);
if(_3c&&_3c.test&&_3c.test.match(/^id:/)){
_3c=STSP.getService(_3c.test.substr(3));
}
if(_3c){
}
var _3d=_3c?(_3c.nodes?_3c.nodes:[]):null;
return _3d;
},setCallback:function(_3e,_3f){
var _40=STSP.getService(_3e);
if(_40){
_40.callback=_3f;
}else{
}
},loadScript:function(_41,_42){
if(!_41||_41==""){
return;
}
if(_42=="undefined"||_42==null){
_42=false;
}
if(!STSP.scripts[_41]){
STSP.scripts[_41]=true;
var _43=document.createElement("script");
var url=_41.match(/^http/)?_41:STSPG.contextUrl+_41;
url+=(url.indexOf("?")==-1)?"?":"&";
url+="language="+STSP.lang;
_43.src=url;
if(STSPG.isDynamicLoading||_42){
document.body.insertBefore(_43,document.body.firstChild);
}
}
},setSpecialMenuProvider:function(_44){
STSP.specialMenuProviders.push(_44);
},getElementsByClassName:function(_45,_46,_47,_48){
if(!_46){
_46=document.body;
}
if(!_47){
limit=0;
}
if(!_48){
_48=["*"];
}
var _49=STSP.getRegExp(_45);
if(_46&&_46.className&&_46.className.match(_49)){
var _4a=new Array(_46);
return _4a;
}
var _4b=new Array();
for(var t=0;t<_48.length;t++){
var _4c=_46.getElementsByTagName(_48[t]);
for(var i=0;i<_4c.length;i++){
var _4d=_4c[i];
if(_4d.className&&_4d.className.match(_49)){
_4b.push(_4d);
}
if(0<_47&&_47==_4b.length){
break;
}
}
}
return _4b;
},getParentByClassName:function(_4e,_4f){
if(!_4f){
return null;
}
var _50=STSP.getRegExp(_4e);
if(_4f.className&&_4f.className.match(_50)){
return _4f;
}
while(_4f.parentNode){
_4f=_4f.parentNode;
if(_4f.className&&_4f.className.match(_50)){
return _4f;
}
}
return null;
},addHover:function(_51,_52,_53,_54){
while(typeof SemTagMenu==undefined){
alert("waiting...");
}
var _55=_51.getAttribute(STSP.refcntAttr);
var _56=(_52!==null);
if(_55){
_51.setAttribute(STSP.refcntAttr,parseInt(Number(_55)+1));
if(SemTagMenu.staticHover){
var img=SemTagMenu.findHoverFromLiveElement(_51);
if(img){
STSP.watchEvent(img,"click",_53,false);
img.setAttribute("href","javascript:SemTagMenu.a11y()");
}else{
}
}else{
STSP.watchEvent(_51,"mouseover",_52,false);
}
}else{
_51.setAttribute(STSP.refcntAttr,"1");
STSP.hoverIdx++;
_51.setAttribute(STSP.liveElemPrefix+"id",STSP.hoverIdx);
if(SemTagMenu.staticHover){
var img=STSP.createHoverImage(_54);
STSP.watchEvent(img,"click",_53,false);
STSP.watchEvent(img,"keydown",SemTagMenu.a11y,false);
img.setAttribute("href","javascript:void()");
var _57=_51.nextSibling;
if(_57){
_57.parentNode.insertBefore(img,_57);
}else{
_51.parentNode.appendChild(img);
}
_51.setAttribute(STSP.hoverIdPrefix+"idx",parseInt(STSP.hoverIdx));
_51.id=STSP.liveElemPrefix+STSP.hoverIdx;
}else{
var _58=SemTagUtil.getNodeClassValue(_51);
if(_58&&0<_58.length){
_58+=" hasHover";
}else{
_58="hasHover";
}
SemTagUtil.setNodeClassValue(_51,_58);
STSP.watchEvent(_51,"mouseover",_52,false);
_51.setAttribute("tabIndex","0");
STSP.watchEvent(_51,"focus",_52,false);
STSP.watchEvent(_51,"blur",SemTagMenu.mouseout,false);
}
}
},removeHover:function(_59,_5a,_5b){
var _5c=_59.getAttribute(STSP.refcntAttr);
if(_5c){
var _5d=Number(_5c)-1;
if(_5d<0){
}
if(SemTagMenu.staticHover){
var _5e=STSP.getHoverElement(_59);
STSP.clearEventWatch(_5e,"click",_5b,false);
if(_5d==0){
_5e.parentNode.removeChild(_5e);
}
}else{
STSP.clearEventWatch(_59,"mouseover",_5a,false);
STSP.clearEventWatch(_59,"focus",_5a,false);
_59.setAttribute(STSP.refcntAttr,_5d);
if(_5d==0){
var _5f=SemTagUtil.getNodeClassValue(_59);
var _60=_5f.replace(/hasHover/,"");
SemTagUtil.setNodeClassValue(_59,_60);
_59.removeAttribute(STSP.refcntAttr);
_59.removeAttribute("tabIndex");
}
}
}
},createHoverImage:function(_61){
var img=document.createElement("img");
img.id=STSP.hoverIdPrefix+STSP.hoverIdx;
img.className=SemTagMenu.iconName;
img.setAttribute("src",STSPG.contextUrl+"/ui/menu_selected.gif");
img.setAttribute("border","0");
img.setAttribute("alt",_61);
var _62=document.createElement("a");
STSP.watchEvent(_62,"mouseover",SemTagMenu.activateHover,false);
STSP.watchEvent(_62,"mouseout",SemTagMenu.deactivateHover,false);
_62.appendChild(img);
return _62;
},getHoverElement:function(_63){
if(!_63){
return null;
}
if(SemTagMenu.staticHover){
var idx=_63.getAttribute(STSP.hoverIdPrefix+"idx");
var img=document.getElementById(STSP.hoverIdPrefix+idx);
if(img){
var _64=img.parentNode;
return _64;
}
}else{
var _65=SemTagUtil.getNodeClassValue(_63);
if(_65.match(/hasHover/)){
return _63;
}
}
return null;
},showHover:function(_66,_67,_68){
SemTagMenu.showHover(_66,_67,_68);
},setMenuData:function(_69,_6a,_6b,_6c,_6d){
SemTagMenu.setMenuData(_69,_6a,_6b,_6c,_6d);
},getMenuItemJson:function(_6e,_6f,_70,_71){
var o=_70?_70:0;
var i=_71?_71:"";
var _72={"label":_6e,"href":_6f,"order":o,"icon":i};
return _72;
},getMenuHeaderJson:function(_73,_74,_75){
if(_74!="text/html"){
return null;
}
if(_73&&0<_73.length){
var _76={"markup":_73,"order":_75};
return _76;
}else{
null;
}
},getMenuFooterJson:function(_77,_78,_79){
if(_78!="text/html"){
return null;
}
if(_77&&0<_77.length){
var _7a={"markup":_77,"order":_79};
return _7a;
}else{
null;
}
},getElementFromEvent:function(_7b){
var _7c=_7b.target?_7b.target:_7b.srcElement;
if(_7c==window){
_7c=_7c.document;
}
return _7c;
},getLiveElementFromEvent:function(_7d){
var _7e=SemTagMenu.findLiveElementFromEventSource(STSP.getElementFromEvent(_7d));
return _7e;
},getEventAbsoluteX:function(e){
var x=0;
if(e.pageX){
x=e.pageX;
}else{
if(e.clientX){
if(document.body.scrollLeft>document.documentElement.scrollLeft){
x=e.clientX+document.body.scrollLeft;
}else{
x=e.clientX+document.documentElement.scrollLeft;
}
}
}
return x;
},getEventAbsoluteY:function(e){
var y=0;
if(e.pageY){
y=e.pageY;
}else{
if(e.clientY){
if(document.body.scrollTop>document.documentElement.scrollTop){
y=e.clientY+document.body.scrollTop;
}else{
y=e.clientY+document.documentElement.scrollTop;
}
}
}
return y;
},findPosition:function(obj,_7f){
var _80=0,_81=0,_82=0;
var _83=obj.offsetWidth;
var _84;
if(obj.offsetParent){
if(_7f){
_81+=(STSP.bidi=="rtl")?0:_83;
}
_82+=obj.offsetHeight;
while(obj!=null){
_81+=obj.offsetLeft;
_82+=obj.offsetTop;
obj=obj.offsetParent;
_80++;
}
_84=[_81+(STSP.bidi=="rtl"?_83:0),_82];
return _84;
}else{
_84=[obj.x+(STSP.bidi=="rtl"?_83:0),obj.y];
return _84;
}
},createGroupJson:function(ctx,_85){
var _86={"context":ctx,"extenders":_85};
return _86;
},createActionJson:function(id,js,ctx,_87,_88,_89,url,_8a){
var i=(id&&0<id.length)?id[0].innerHTML:null;
var j=(js&&0<js.length)?js[0].innerHTML:null;
var c=(ctx&&0<ctx.length)?ctx[0].innerHTML:null;
var l=(_87&&0<_87.length)?_87[0].innerHTML:null;
var d=(_88&&0<_88.length)?_88[0].innerHTML:null;
var s=(_89&&0<_89.length)?_89[0].innerHTML:null;
var u=(url&&0<url.length)?url[0].innerHTML:null;
var o=(_8a&&0<_8a.length)?parseInt(_8a[0].innerHTML):0;
var _8b={"id":i,"impl":j,"context":c,"label":l,"description":d,"showif":s,"url":u,"order":o};
return _8b;
},parseOrder:function(_8c){
var _8d;
if(_8c==null||_8c.length==0){
_8d=0;
return _8d;
}
if(_8c.charAt(0)=="-"){
_8d=parseInt(_8c.substr(1))*-1;
return _8d;
}else{
_8d=parseInt(_8c);
return _8d;
}
},getActions:function(_8e){
var _8f;
if(!STSP.actionRegistry){
STSP.processActions();
}
for(var i=0;i<STSP.actionRegistry.length;i++){
if(STSP.actionRegistry[i].context==_8e){
_8f=STSP.actionRegistry[i].extenders;
return _8f;
}
}
_8f=STSP.actionRegistry[0].extenders;
return _8f;
},processActions:function(){
if(!STSP.actionRegistry){
STSP.actionRegistry=new Array();
STSP.actionRegistry[0]=STSP.createGroupJson("dummy",new Array());
}
var i;
var _90=STSP.getNodes("com.ibm.portal.action");
while(_90&&0<_90.length){
var _91=_90.pop();
var id=STSP.getElementsByClassName("action-id",_91);
var _92=STSP.getElementsByClassName("action-impl",_91);
var ctx=STSP.getElementsByClassName("action-context",_91);
var _93=STSP.getElementsByClassName("action-label",_91);
var _94=STSP.getElementsByClassName("action-description",_91);
var _95=STSP.getElementsByClassName("action-showif",_91);
var url=STSP.getElementsByClassName("action-url",_91);
var _96=STSP.getElementsByClassName("action-order",_91);
var _97=STSP.createActionJson(id,_92,ctx,_93,_94,_95,url,_96);
for(i=1;i<STSP.actionRegistry.length;i++){
if(STSP.actionRegistry[i].context==_97.context){
var cnt=STSP.actionRegistry[i].extenders.length;
for(var j=0;j<cnt;j++){
if(_97.id==STSP.actionRegistry[i].extenders[j].id){
break;
}
}
if(j==cnt){
STSP.actionRegistry[i].extenders.push(_97);
}
break;
}
}
if(i==STSP.actionRegistry.length){
STSP.actionRegistry[i]=STSP.createGroupJson(ctx[0].innerHTML,new Array());
STSP.actionRegistry[i].extenders.push(_97);
}
if(_97.impl){
STSP.loadScript(_97.impl,true);
}
}
for(i=0;i<STSP.actionRegistry.length;i++){
STSP.actionRegistry[i].extenders.sort(STSP.sortByOrder);
}
},sortByOrder:function(a,b){
if(a.order>b.order){
return 1;
}else{
if(a.order<b.order){
return -1;
}else{
return 0;
}
}
},getTextValue:function(_98){
if(!_98){
return "";
}
return _98.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
},getTypedValue:function(_99,_9a){
if(!_9a){
_9a="def";
}
var _9b=new Array();
var _9c=STSP.getElementsByClassName("type",_99);
var _9d=STSP.getElementsByClassName("value",_99);
var _9e="";
if(_9d.length<1){
_9e=STSP.getTextValue(_99);
}
for(var i=0;i<_9d.length;i++){
_9e+=STSP.getTextValue(_9d[i]);
}
if(_9c.length<1){
_9b[_9a]=_9e;
}else{
for(var j=0;j<_9c.length;j++){
var _9f=_9c[j];
var _a0=_9f.tagName.match(/^abbr$/i)?_9f.getAttribute("title"):STSP.getTextValue(_9f);
_9b[_a0.toLowerCase()]=_9e;
}
}
return _9b;
},findNameElementInHcard:function(_a1){
if(_a1.className!="vcard"){
_a1=STSP.getParentByClassName("vcard",_a1);
}
var _a2=STSP.getElementsByClassName("fn",_a1)[0];
if(!_a2){
_a2=STSP.getElementsByClassName("n",_a1)[0];
}
return _a2;
},getEmailFromHcard:function(_a3){
var _a4;
if(!_a3){
_a4="";
return _a4;
}
if(_a3.className!="vcard"){
_a3=STSP.getParentByClassName("vcard",_a3);
}
var _a5="";
if(_a3){
var _a6=STSP.getElementsByClassName("email",_a3)[0];
var _a7=STSP.getTypedValue(_a6,"internet");
_a5=_a7.internet;
}
_a4=_a5;
return _a4;
},findElementByNameInHcard:function(_a8,_a9){
if(_a8.className!="vcard"){
_a8=STSP.getParentByClassName("vcard",_a8);
}
var _aa=STSP.getElementsByClassName(_a9,_a8)[0];
return _aa;
},getRegExp:function(str){
var _ab=STSP.reMap[str];
if(!_ab){
_ab=new RegExp("(^|\\s)"+str+"(\\s|$)");
STSP.reMap[str]=_ab;
}
return _ab;
},addElementToHandler:function(_ac,_ad,_ae){
if(STSPG.isParsingRequired===true){
return false;
}
if(_ac==null||_ac==="undefined"){
return false;
}
var _af=STSP.service.entries;
var _b0=null;
for(var k=0;k<_af.length;k++){
var _b1=_af[k];
if(_b1.id===_ae){
_b0=_b1;
break;
}
}
if(_b0==null){
return false;
}
var _b2;
if(_ac.nodeName==="A"||_ae==="c2a"){
_b2=_ac.parentNode;
}else{
_b2=_ac;
}
if(_b2.getAttribute("alreadyAdded")==null){
if(_b0.nodes==null||_b0.nodes==="undefined"||typeof _b0.nodes!=="array"){
_b0.nodes=[];
}
_b0.nodes.push(_b2);
_b2.setAttribute("alreadyAdded",true);
if(_ae==="c2a"){
var _b3=document.getElementsByClassName("c2a:target");
for(var i=0;i<_b3.length;i++){
_b0.nodes.push(_b3.item(i));
}
}
}
_b0.callback.call(_b0.nodes);
if(_ae==="hcard"){
var _b4=typeof SemTagPerson;
if(STSPG.ifConnUrlExists==="false"&&(typeof SemTagPerson==="object")){
SemTagPerson.showHover(_ad);
}
STSP.stNI=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined"));
var _b5=typeof SemTagAwrns;
if(STSPG.isParsingRequired===false&&STSP.stNI===false&&(typeof SemTagAwrns)){
SemTagAwrns.processHcards([_b2]);
}
}
if(_ae==="c2a"&&SemTagC2A){
SemTagC2A.showHover(_ad);
}
_b0.nodes=[];
return true;
},addElementToPersonCardHandler:function(_b6,_b7){
if(STSPG.isParsingRequired===true){
return false;
}
if(_b6==null||_b6==="undefined"){
return false;
}
var _b8;
if(_b6.nodeName==="A"){
_b8=_b6.parentNode;
}else{
_b8=_b6;
}
if(_b8.getAttribute("alreadyAdded")==null){
STSP.svcEntryPersonCard.nodes.push(_b8);
_b8.setAttribute("alreadyAdded",true);
}
STSP.svcEntryPersonCard.callback.call(STSP.svcEntryPersonCard.nodes);
var _b9=typeof SemTagPerson;
if(STSPG.ifConnUrlExists==="false"&&(typeof SemTagPerson)){
SemTagPerson.showHover(_b7);
}
STSP.stNI=((typeof (stproxy)==="undefined")&&(typeof (prepareSametimeLink)==="undefined"));
var _ba=typeof SemTagAwrns;
if(STSPG.isParsingRequired===false&&STSP.stNI===false&&(typeof SemTagAwrns)){
SemTagAwrns.processHcards([_b8]);
}
STSP.svcEntryPersonCard.nodes.pop();
return true;
},registerService:function(_bb){
var _bc=STSP.service.entries;
_bc[_bc.length]=_bb;
if(STSP.isEnablerObjectAvailable&&typeof dojo!=="undefined"){
try{
dojo.addOnLoad(function(){
var _bd=new com.ibm.mashups.livetext.ConfigEntry(_bb.classnames.join(),false,"portallof",STSPG.contextUrl+"/javascript","portallof.vcard",false,_bb.id);
dojo.publish("/com/ibm/mashups/livetext/configentryadded",[_bd]);
SemTagSvc.parseDom(null,null);
});
}
catch(e){
console.error("Error occurred in registerService for service "+_bb.id+"is :"+e);
}
}
}};
var SemTagSvcConfig=null;
if((STSP.ifConnUrlExists=="true")&&(STSP.isconnServerNew===true)){
SemTagSvcConfig={isPortal:true,baseUrl:STSP.connUrl+"/profiles",loadCssFiles:true,isBidiRTL:false};
}
STSP.watchEvent(window,"load",STSP.init,false);
var SemTagSvc=STSP;
var SemTagSvcPortal=STSP;

var SemTagUtil={isGecko:(document.all?false:true),getNodeClassValue:function(_1){
var rv;
var _2;
if(SemTagUtil.isGecko){
rv=(typeof (_1.getAttribute)!="undefined")?_1.getAttribute("class"):"";
}else{
rv=_1.className;
}
_2=(typeof (rv)!="undefined"&&rv!=null)?rv:"";
return _2;
},setNodeClassValue:function(_3,_4){
if(SemTagUtil.isGecko){
_3.setAttribute("class",_4);
}else{
_3.className=_4;
}
},fireEvent:function(_5,_6){
try{
if(_5.fireEvent){
_5.fireEvent(_6);
}else{
if(_5.dispatchEvent){
_5.dispatchEvent(_6);
}
}
}
catch(e){
}
},getOwnerDocument:function(_7){
if(!_7){
return null;
}
var _8;
if(SemTagUtil.isGecko){
_8=_7.ownerDocument;
return _8;
}else{
var _9=_7;
while(_9.parentNode){
_9=_9.parentNode;
}
_8=_9;
return _8;
}
},getFrameElement:function(_a){
var _b;
if(SemTagUtil.isGecko){
var oD=_a.ownerDocument;
_b=oD.defaultView.frameElement;
return _b;
}else{
var _c=_a;
while(_c.parentNode){
_c=_c.parentNode;
}
_b=_c;
return _b;
}
},getHcardAttributeValue:function(_d,_e){
switch(_d){
case ("email"):
return SemTagUtil.getHcardTypedAttribute(_e,_d,"internet");
case ("tel"):
return SemTagUtil.getHcardTypedAttribute(_e,_d,"voice");
case ("adr"):
return SemTagUtil.getHcardTypedAttribute(_e,_d,"intl");
}
var _f=STSP.getParentByClassName("vcard",_e);
var _10=STSP.getElementsByClassName(_d,_f,1);
if(_10.length>0&&_10[0].tagName.match(/^abbr$/i)){
var _11=_10[0].getAttribute("title");
return _11;
}
switch(_d){
case ("X-person-display-inline"):
if(_10.length>0){
return true;
}else{
return false;
}
case ("fn"):
var fn=SemTagUtil.getSinglePropertyValue(_10[0]);
if(fn){
return fn;
}else{
var _11=SemTagUtil.getHcardAttributeValue("n",_e);
return _11;
}
break;
case ("X-person-header-only"):
case ("X-person-inside-inline"):
var _11=(_10&&0<_10.length);
return _11;
case ("X-sametime-resolve"):
var _12=_10[0];
var _13=(typeof (_12)!="undefined"&&_12!=null);
return _13;
case ("n"):
if(_10.length>0){
var _14=_10[0];
var _15="";
var _16=["honorific-prefix","given-name","additional-name","family-name","honorific-suffix"];
for(var i=0;i<5;i++){
var n=SemTagUtil.getSinglePropertyValue(STSP.getElementsByClassName(_16[i],_14,1)[0]);
if(n){
_15+=n+" ";
}
}
return _15;
}
var _17="";
return _17;
break;
case ("photo"):
var _18=_10[0];
if(_18){
var _13=_18.getAttribute("src");
return _13;
}else{
return;
}
break;
case ("X-sametime-status"):
var _19=_10[0];
var _13;
if(!_19){
_13="";
return _13;
}
var _1a=_19.getAttribute("value");
if(_1a){
_13=_1a;
return _13;
}else{
_13=SemTagUtil.getSinglePropertyValue(_19);
return _13;
}
break;
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:
var _13=SemTagUtil.getSinglePropertyValue(_10[0]);
return _13;
break;
}
},getHcardTypedAttribute:function(_1b,_1c,_1d){
var _1e=new Object();
var _1f=STSP.getParentByClassName("vcard",_1b);
var _20=STSP.getElementsByClassName(_1c,_1f);
for(var i=0;i<_20.length;i++){
var _21=_20[i];
if(_1c=="email"&&_21.nodeName.toLowerCase()=="a"&&_21.href.match(/^mailto:/)){
var _22=_21.href.indexOf("?");
if(_22>-1){
_1e[_1d]=_21.href.slice(7,_22);
}else{
_1e[_1d]=_21.href.slice(7);
}
continue;
}
_1e=STSP.getTypedValue(_21,_1d);
}
return _1e;
},getSinglePropertyValue:function(_23){
if(!_23){
return false;
}
var _24=_23.innerHTML.replace(/<[a-zA-Z\/][^>]*>/gi,"");
return _24;
},crossDomainRequest:function(){
var _25=new Array();
var _26=new Array();
var _27=this;
createTimeoutFunction=function(_28){
return function(){
_27.cancelRequest(_28);
};
};
this.getScriptId=function(id){
return "_JVLN_"+id;
};
this.getScriptObject=function(id){
var _29=SemTagUtil.isGecko?this.getScriptId(id):this.$_getScriptId(id);
return document.getElementById(_29);
};
this.request=function(url,_2a,_2b,_2c,_2d){
var _2e=this.getScriptId(_2d);
if(_2b){
_25[_2d]=_2b;
}
if(_2c){
_26[_2d]=_2c;
}
var _2f=document.createElement("script");
_2f.id=_2e;
try{
_2f.src=url;
}
catch(e){
return false;
}
document.body.insertBefore(_2f,document.body.firstChild);
if(_2a){
var _30=this;
window.setTimeout(createTimeoutFunction(_2d),_2a);
}
};
this.cancelRequest=function(id){
var _31=_25[id];
_25[id]=null;
var _32=_26[id];
_26[id]=null;
if(_31){
try{
if(_31){
var evt={"target":_32};
_31.call(this,false,null,evt);
}
var _33=this.getScriptObject(id);
if(_33){
document.body.removeChild(_33);
}
}
catch(e){
}
}
};
this.dispatch=function(id,_34){
if(!id){
return;
}
try{
var _35=_25[id];
if(!_35){
}
if(_35){
var evt={"target":_26[id]};
_35.call(this,true,_34,evt);
_25[id]=null;
_26[id]=null;
var _36=this.getScriptObject(id);
if(_36){
document.body.removeChild(_36);
}
}
}
catch(e){
}
};
}};

if(typeof (ibm)=="undefined"){
ibm={};
}
if(typeof (ibm.portal)=="undefined"){
ibm.portal={};
}
if(typeof (ibm.portal.xml)=="undefined"){
ibm.portal.xml={};
}
if(typeof (ibm.portal.xml)=="undefined"){
ibm.portal.xml={};
}
ibm.portal.util={};
ibm.portal.util.cloneObject=function(_1){
var _2={};
for(i in _1){
_2[i]=_1[i];
}
return _2;
};
ibm.portal.resource={};
ibm.portal.resource.str={};
ibm.portal.resource.getString=function(_3,_4){
s=_3[_4];
s=(s==null)?_4:s;
if(arguments.length>=2){
i=1;
do{
s=s.replace("%"+i,arguments[i]);
i=i+1;
}while(i<arguments.length);
}
return s;
};
if(typeof (ibm.portal.xml)=="undefined"){
ibm.portal.xml={};
}
ibm.portal.xml.ie={};
ibm.portal.xml.gecko={};
ibm.portal.xml.getXmlHttpRequest=function(){
var _5=null;
if(typeof ActiveXObject!="undefined"){
_5=new ActiveXObject("Microsoft.XMLHTTP");
}else{
_5=new XMLHttpRequest();
}
return _5;
};
ibm.portal.xml.loadXml=function(_6){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.loadXml(_6);
}else{
return ibm.portal.xml.gecko.loadXml(_6);
}
};
ibm.portal.xml.loadXmlString=function(_7){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.loadXmlString(_7);
}else{
return ibm.portal.xml.gecko.loadXmlString(_7);
}
};
ibm.portal.xml.loadXsl=function(_8){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.loadXsl(_8);
}else{
return ibm.portal.xml.gecko.loadXsl(_8);
}
};
ibm.portal.xml.transform=function(_9,_a,_b,_c,_d){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
return ibm.portal.xml.ie.transform(_9,_a,_b,_c,_d);
}else{
return ibm.portal.xml.gecko.transform(_9,_a,_b,_c,_d);
}
};
ibm.portal.xml.update=function(_e,_f,xsl,_10,_11){
if(typeof ActiveXObject!="undefined"||window.ActiveXObject!==undefined){
var _12=ibm.portal.xml.ie.transform(_f,xsl,_10,_11,true);
ibm.portal.debug.text("XSLT result: "+_12);
_e.innerHTML+=_12;
}else{
_12=ibm.portal.xml.gecko.transform(_f,xsl,_10,_11,false);
_e.appendChild(_12.documentElement);
}
};
ibm.portal.xml.ie.XSLT_PROG_IDS=["Msxml2.XSLTemplate.6.0","Msxml2.XSLTemplate.4.0","MSXML2.XSLTemplate.3.0","MSXML2.XSLTemplate"];
ibm.portal.xml.ie.DOM_PROG_IDS=["MSXML2.FreeThreadedDOMDocument.6.0","Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];
ibm.portal.xml.ie.FTDOM_PROG_IDS=["Msxml2.FreeThreadedDOMDocument.6.0","Msxml2.FreeThreadedDOMDocument.4.0","MSXML2.FreeThreadedDOMDocument","MSXML.FreeThreadedDOMDocument","Microsoft.FreeThreadedXMLDOM"];
ibm.portal.xml.ie._getMSXMLImpl=function(_13){
while(_13.length>0){
try{
var _14=new ActiveXObject(_13[0]);
if(_14){
return _14;
}
}
catch(err){
}
_13.splice(0,1);
}
throw new Error("No MSXML implementation exists");
};
ibm.portal.xml.ie.loadXml=function(_15){
var _16=this._getMSXMLImpl(this.DOM_PROG_IDS);
_16.async=0;
_16.resolveExternals=0;
if(!_16.load(_15)){
throw new Error("Error loading xml file "+_15);
}
return _16;
};
ibm.portal.xml.ie.loadXmlString=function(_17){
var _18=this._getMSXMLImpl(this.DOM_PROG_IDS);
_18.async=0;
_18.resolveExternals=0;
if(_17){
if(!_18.loadXML(_17)){
throw new Error("Error loading xml string "+_17);
}
}
return _18;
};
ibm.portal.xml.ie.loadXsl=function(_19){
var _1a=this._getMSXMLImpl(this.FTDOM_PROG_IDS);
_1a.async=0;
_1a.resolveExternals=0;
if(!_1a.load(_19)){
throw new Error("Error loading xsl file "+_19);
}
return _1a;
};
ibm.portal.xml.ie.transform=function(_1b,xsl,_1c,_1d,_1e){
var _1f=_1b;
var _20=xsl;
try{
if(!_20.documentElement){
_20=this.loadXsl(xsl);
}
}
catch(e){
var _21=e.message;
throw new Error(""+_21,""+_21);
}
var _22=this._getMSXMLImpl(this.XSLT_PROG_IDS);
_22.stylesheet=_20;
var _23=_22.createProcessor();
_23.input=_1f;
if(_1d){
for(var p in _1d){
_23.addParameter(p,_1d[p]);
}
}
if(_1c){
_23.addParameter("mode",_1c);
}
if(_1e){
if(!_23.transform()){
throw new Error("Error transforming xml doc "+_1f);
}
return _23.output;
}else{
var _24=this._getMSXMLImpl(this.DOM_PROG_IDS);
_24.async=false;
_24.validateOnParse=false;
_1f.transformNodeToObject(_20,_24);
return _24;
}
};
ibm.portal.xml.gecko.loadXml=function(_25){
var _26=document.implementation.createDocument("","",null);
var xhr=new XMLHttpRequest();
xhr.open("GET",_25,false);
xhr.send(null);
if(xhr.status==200){
_26=xhr.responseXML;
}else{
throw new Error("Error loading "+_25+":"+xhr.status+":"+xhr.statusText);
}
return _26;
};
ibm.portal.xml.gecko.loadXmlString=function(_27){
var _28=new DOMParser();
try{
oXmlDoc=_28.parseFromString(_27,"text/xml");
}
catch(exc){
throw new Error("Error loading xml string "+_27);
}
return oXmlDoc;
};
ibm.portal.xml.gecko.loadXsl=function(_29){
var _2a=document.implementation.createDocument("","",null);
var xhr=new XMLHttpRequest();
xhr.open("GET",_29,false);
xhr.send(null);
if(xhr.status==200){
_2a=xhr.responseXML;
}
return _2a;
};
ibm.portal.xml.gecko.transform=function(_2b,xsl,_2c,_2d,_2e){
try{
var _2f=xsl;
if(!_2f.documentElement){
alert("xslDoc is not a Document, loading it...");
_2f=this.loadXsl(xsl);
}
var _30=new XSLTProcessor();
_30.importStylesheet(_2f);
if(_2d){
for(var p in _2d){
_30.setParameter(null,p,_2d[p]);
}
}
if(_2c){
_30.setParameter(null,"mode",_2c);
}
var _31=_30.transformToDocument(_2b);
if(!_2e){
return _31;
}
resultStr=_31.documentElement.textContent;
}
catch(exc){
throw new Error("Error transforming xml doc "+exc);
}
return resultStr;
};
ibm.portal.xml.setLayerContentByXml=function(_32,xml,xsl,_33,_34){
var _35=ibm.portal.xml.transform(xml,xsl,null,_33,_34);
if(_32.innerHTML){
_32.innerHTML=_35;
}else{
var obj=document.getElementById(_32);
obj.innerHTML=_35;
}
};
ibm.portal.io={};
ibm.portal.io.sAcceptLanguage="";
ibm.portal.io.getResponseHeader=function(_36,_37){
var _38;
try{
_38=_36.getResponseHeader(_37);
}
catch(exc){
_38=null;
}
return _38;
};
ibm.portal.io.checkForError=function(_39){
var _3a=null;
var _3b=ibm.portal.io.getResponseHeader(_39,"X-IBM-REST-Error");
if(_3b){
var _3a="",_3c=ibm.portal.io.getResponseHeader(_39,"X-IBM-REST-MsgArg1");
if(_3c){
_3a=ibm.portal.resource.getString(_3b,window.decodeURIComponent(_3c));
}else{
_3a=ibm.portal.resource.getString(_3b);
}
}
return _3a;
};
ibm.portal.io.asyncRequest=function(_3d,_3e,_3f,_40){
try{
ibm.portal.io.setAsync(_3d,_3e,_3f,_40,true);
}
catch(e){
ibm.portal.io.setAsync(_3d,_3e,_3f,_40,false);
}
};
ibm.portal.io.setAsync=function(_41,_42,_43,_44,_45){
var _46=ibm.portal.xml.getXmlHttpRequest();
_46.open(_41,_42,true);
if(!_45){
_46.setRequestHeader("Accept-language","*");
}
try{
_46.onreadystatechange=function(){
if(_46.readyState==4){
_44.startUpdate();
sError=ibm.portal.io.checkForError(_46);
if(sError){
_44.handleError(""+ibm.portal.resource.getString(sError));
}else{
var _47=_46.responseText;
_44.handleData(_47);
}
}
};
_46.send(_43);
}
catch(e){
throw new Error("","");
}
};
try{
}
catch(e){
console.error(e);
}


}catch(e){console.log("Module 'wp_liveobject_framework_core': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved.  **/
(function(_1){
var _2="copy",_3="move",_4="link",_5="copyMove",_6="copyLink",_7="linkMove",_8="all",_9="none",_a=i$.hasClass,_b=i$.addClass,_c=i$.removeClass,_d=i$.forEach,_e=i$.toQuery,_f=i$.addQueryString,_10="ibmDndColumn",_11="ibmDndRow",_12="portal-drop-target",_13="component-container",_14="dojoDndHandle",_15="portlet-window-ref",_16="isDropTarget",_17="isDragSource",_18="ibmDndDropZoneOver",_19="ibmDndDropZonesActive",_1a="ibmDndDropZoneIllegal",_1b=ibmCfg.portalConfig,_1c=wpModules.dnd.target,_1d=wpModules.dnd.util,_1e=null,_1f=function(e){
return e||window.event;
},_20=function(e,n,v){
e.setAttribute(n,v);
},_21=function(_22){
var _23=_22.className.split(" "),id=null,i,cls,l;
for(i=0,l=_23.length;i<l;++i){
cls=_23[i];
if(cls.indexOf("id-")===0){
id=cls.substring(3);
break;
}
}
return id;
},_24=function(_25){
var n=_25;
while(n&&!_a(n,_13)){
n=n.parentElement;
}
return n;
},_26=function(_27){
var n=_27;
while(n&&!_a(n,_10)&&!_a(n,_11)){
n=n.parentElement;
}
return n;
},_28=function(_29){
var i,_2a,_2b;
for(i=0;i<_29.childNodes.length;i++){
if(_29.childNodes[i].className===_15){
_2a=_29.childNodes[i].href;
_2b=_2a.substring(_2a.lastIndexOf("#")+1);
return _2b;
}
}
},_2c=function(e){
return e.dataTransfer;
},_2d=function(e){
var _2e=wpModules.dnd.target,dt=_2c(e),_2f=dt?dt.dropEffect:null;
if(_2f===_9){
_2f=_2e.getEffectAllowed(e);
if((_2f===_3)||(_2f===_5)||(_2f===_7)||(_2f===_8)){
_2f=_3;
}else{
if((_2f===_2)||(_2f===_6)){
_2f=_2;
}else{
_2f=_4;
}
}
}
return _2f;
},_30=function(e){
return e.srcElement;
},_31=function(e){
return e.target;
},_32=function(_33){
var _34=_33.dataTransfer;
return _34;
},_35=function(_36){
var _37,_38=wpModules.dnd.target;
_37=_38.getEffectAllowed(_36);
return _37;
},_39=function(e,_3a){
var _3b=_a(_3a,_13),_3c=_3b?_3a:_24(_3a),_3d=_21(_3c),_3e={};
_3e.target=_3d;
_3e.action=_2d(e);
return _3e;
},_3f=function(_40,_41,_42){
var _43=_39(_42,_41);
return _f(ibmCfg.portalConfig.contentHandlerURI,{"uri":"dnd:lm:oid:"+_43.target+"@oid:"+_1b.currentPageOID,"source":_40.uri,"action":_43.action,"mime-type":"text/plain"});
},_44=function(_45,_46){
var _47=function(_48,_49){
var _4a=_3f(_48,_45,_49);
return _4a;
},_1c=wpModules.dnd.target,_4b,_4c=_1c.getDropTarget(_1c.getRESTValidator(_47)),_4d=function(_4e){
var _4f=_1f(_4e),_50;
_4c.drop(_4e);
_50=_1c.getDropEffect(_4f),form=_1.getElementById("dnd-drop-form");
if(form){
var _51=[],add=function(o){
_51.push(o);
},_52=ibmCfg.portalConfig.currentPageOID,_53=i$.hasClass(_45,"component-container"),_54=_53?_45:_24(_45),_55=_21(_54),_56=_28(_45);
form.action="?uri=dnd:lm:oid:"+_55+"@oid:"+_52;
add({name:"successURI",value:"nm:oid:"+_52});
add({name:"action",value:_50});
!_53&&_56&&add({name:"position",value:"lm:oid:"+_56+"@oid:"+_52});
i$.forEach(_51,function(i){
var e=_1.createElement("input");
_20(e,"value",i.value);
_20(e,"name",i.name);
_20(e,"type","hidden");
form.appendChild(e);
});
_1c.addPayload(form,_4f);
form.submit();
_4f.preventDefault();
if(_4f){
if(_4f.stopPropagation){
_4f.stopPropagation();
}else{
_4f.cancelBubble=true;
}
}
}
},_57=function(_58){
var _59=_1f(_58);
_4c.dragenter(_59);
_4b=_31(_59)||_30(_59);
_b(_45,_46);
},_5a=function(_5b){
var _5c=_1f(_5b),_5d;
_4c.dragover(_5c);
_5d=_1c.getDropEffect(_5c);
if(_5d===_9){
_b(_45,_1a);
}
},_5e=function(_5f){
var _60=_1f(_5f),t;
_4c.dragleave(_60);
t=_31(_60)||_30(_60);
if(t===_4b){
_c(_45,_46);
_c(_45,_1a);
}
},_61=function(_62){
i$.bindDomEvt(_62,"dragenter",_57);
i$.bindDomEvt(_62,"dragover",_5a);
i$.bindDomEvt(_62,"dragleave",_5e);
i$.bindDomEvt(_62,"drop",_4d);
};
return {"dragenter":_57,"dragover":_5a,"dragleave":_5e,"drop":_4d,"addEventListeners":_61};
},_63=function(){
if(_a(_1.body,"edit-mode")){
if(_1e){
_d(_1e.getNodes("dnd-target"),function(n){
if(!_a(n,_16)){
_44(n,_18).addEventListeners(n);
_b(n,_16);
var _64=_26(n);
if(_64&&!_a(_64,_16)){
_44(_64,_19).addEventListeners(_64);
_b(_64,_16);
}
}
});
}else{
console.error("Cannot handle drop targets with attribute '"+_12+"' because SemTagSvcPortal is not defined.");
}
}
},_65=function(){
if(_a(_1.body,"edit-mode")){
if(_1e){
_d(_1e.getNodes("dnd-source"),function(n){
if(!_a(n,_17)){
var _66=_1.createElement("img");
_66.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
_66.setAttribute("class","dragHandle");
_66.setAttribute("draggable","true");
n.appendChild(_66);
_1d.getDragSource(_66,_66,0,0).addEventListeners(_66);
_b(n,_17);
}
});
}
}
};
if(typeof SemTagSvcPortal!=="undefined"){
_1e=SemTagSvcPortal;
_1e.registerService({id:"dnd-target",callback:_63,classnames:["."+_12],test:""});
_1e.registerService({id:"dnd-source",callback:_65,classnames:["."+_14],test:""});
}else{
console.log("SemTagSvcPortal is undefined");
}
})(document);


}catch(e){console.log("Module 'wp_dnd_main': ",e);}
try{(function(){
    i$.merge({
	"create_element_here":"skapa element här"
},i$.fromPath("wpModules.dnd.nls",true));
})();
}catch(e){console.log("Module 'wp_dnd_main': ",e);}
try{/** Licensed Materials - Property of IBM, 5724-E76 and 5724-E77, (C) Copyright IBM Corp. 2012 - All Rights reserved.  **/
(function(_1,_2,_3){
var _4=_2,_5=_1,_6=_2.console,_7="component-container",_8="component-control",_9="portlet-window",_a="portlet-window-ref",_b=function(nl){
var i,ll,l=[];
for(i=0,ll=nl.length;i!==ll;l.push(nl[i++])){
}
return l;
},_c=function(_d){
var _e=new Object(),_f,_10=0,_11=0;
_e.width=_d.offsetWidth;
_e.height=_d.offsetHeight;
while(_d){
_10+=_d.offsetTop;
_11+=_d.offsetLeft;
_d=_d.offsetParent;
}
_e.left=_11;
_e.top=_10;
_f={"w":_e.width,"h":_e.height,"x":_e.left,"y":_e.top};
return _f;
},_12=function(_13,_14){
var _15;
if(_13.currentStyle){
_15=_13.currentStyle[_14];
}else{
if(_2.getComputedStyle){
_15=_1.defaultView.getComputedStyle(_13,null).getPropertyValue(_14);
}
}
return _15;
},_16=function(_17,_18,_19){
var _1a=_12(_17,_18),_1b=_1a.toLowerCase()===_19;
return _1b;
},_1c={_sortByDelta:function(p1,p2){
var _1d=p1.delta-p2.delta;
return _1d;
},_isContainedIn:function(p1,p2){
var _1e=(p1.x>=p2.x&&(p1.x+p1.w<=p2.x+p2.w))&&(p1.y>=p2.y&&(p1.y+p1.h<=p2.y+p2.h));
return _1e;
},_contains:function(p1,p2){
var _1f=(p1.x<=p2.x&&(p1.x+p1.w>=p2.x+p2.w))&&(p1.y<=p2.y&&(p1.y+p1.h>=p2.y+p2.h));
return _1f;
},_afterDelta:function(p1,p2,_20){
var l=_20==="x"?"w":"h",_21=p1[_20]-(p2[_20]+p2[l]);
return _21;
},_beforeDelta:function(p1,p2,_22){
var _23=_1c._afterDelta.call(this,p2,p1,_22);
return _23;
},_isBefore:function(p1,p2,_24){
var _25=_1c._beforeDelta.call(this,p1,p2,_24)>=0;
return _25;
},_isAfter:function(p1,p2,_26){
var _27=_1c._afterDelta.call(this,p1,p2,_26)>=0;
return _27;
}},_28=function(_29,_2a,dir){
var p=_c(_29),_2b="_beforeDelta",_2c,_2d=[],ret=[],_2e,i,k;
switch(dir){
case _3.DIRECTION_LEFT:
_2c="x";
break;
case _3.DIRECTION_RIGHT:
_2b="_afterDelta";
_2c="x";
break;
case _3.DIRECTION_UP:
_2c="y";
break;
case _3.DIRECTION_DOWN:
_2b="_afterDelta";
_2c="y";
break;
default:
_2b="_afterDelta";
_2c="y";
}
for(i=0;i<_2a.length;i++){
_2e=_2a[i];
if(!_16(_2e,"display","none")){
_2d.push({delta:_1c[_2b](_c(_2e),p,_2c),node:_2e});
}
}
_2d=_2d.sort(_1c["_sortByDelta"]);
for(k=_2d.length-1;k>=0;k--){
if(_2d[k].delta<0){
_2d.splice(0,k+1);
break;
}
ret.unshift(_2d[k].node);
}
return ret;
},_2f=function(id){
var _30=i$.query("."+id+":not(.portlet-window)")[0];
return _30;
},_31=function(_32){
var _33=_32.className,_34=_33.substring(_33.indexOf("id-")+3).split(" ")[0];
return _34;
},_35=function(_36){
var _37=_36.className,_38=_37.indexOf(_7)>=0;
return _38;
},_39=function(_3a){
var _3b=i$.query("."+_7,_3a),_3c=_3b&&_3b.length>=1?true:false;
return _3c;
},_3d=function(_3e){
var n=_3e;
while(n&&!i$.hasClass(n,_7)){
n=n.parentElement;
}
return n;
},_3f=function(_40){
var n=_40;
while(n&&!i$.hasClass(n,_8)){
n=n.parentElement;
}
return n;
},_41=function(_42){
var _43=i$.query(".component-control",_42);
return _43;
},_44=function(){
var _45=i$.query(".component-container:not(.hiddenWidgetsContainer)");
return _45;
},_46=function(_47,_48){
var _49=_3d(_47),_4a=_41(_49).filter(function(c){
return c!==_47;
}),_4b=_28(_47,_4a,_48),_4c=_4b[0];
return _4c;
},_4d=function(_4e,_4f){
var _50=_3d(_4e),_51=_44().filter(function(c){
if(c!==_50){
if(c.classList.contains("g-container")){
var _52=_1.querySelectorAll(".wpGridLayoutEditor");
var _53=0;
while(_53<_52.length){
if(_52[_53].contains(c)){
return false;
}
_53++;
}
}
return true;
}else{
return false;
}
}),_54=_28(_4e,_51,_4f),_55,i,_56=true;
moveInfo=_3.newMoveInfo;
for(i=0;i<_54.length;i++){
if(!_39(_54[i])){
if(_54[i].classList.contains("g-container")){
if(_4f===_3.DIRECTION_UP||_4f===_3.DIRECTION_DOWN){
moveInfo.dir=_3.DIRECTION_LEFT;
if(_3.isMovable(_4e.firstChild.id,moveInfo)){
_55=_54[i+1];
}else{
_55=_54[i];
}
break;
}
if(_4f===_3.DIRECTION_RIGHT){
moveInfo.dir=_3.DIRECTION_UP;
if(_3.isMovable(_4e.firstChild.id,moveInfo)){
_55=_54[i+1];
}else{
_55=_54[i];
}
break;
}else{
_55=_54[i+1];
break;
}
}else{
_55=_54[i];
break;
}
}
}
return _55;
},_57=function(_58){
var _59=_3d(_58),_5a=_41(_59),i,_5b;
for(i=0;i<_5a.length;i++){
if(_5a[i]===_58){
_5b=_5a[i+1];
break;
}
}
return _5b;
},_5c=function(_5d){
var _5e=_35(_5d.parentNode)?_5d.parentNode:_3d(_5d),_5f=_b(_41(_5e)),_60=_5f.indexOf(_5d);
return _60;
},_61=function(_62,_63){
var idx=_5c(_62),_64=_5c(_63),_65=idx<_64;
return _65;
},_66=function(id,dir){
var _67=_2f(id),_68,_69,_6a,ret;
if(_67){
_68=_46(_67,dir);
_69=null;
if(!_68){
_69=_4d(_67,dir);
}
if(_68||_69){
_6a=_3d(_67);
ret={source:_67,parent:_68?_6a:_69,sibling:_68,dir:dir};
return ret;
}
}
},_6b=function(id,_6c){
var _6d,_6e,_6f,_70,_71,_72,pos="last",_73,_74,me=this,_75,_76;
_6d=_66(id,_6c.dir);
_6e=_6d.source;
_6f=_6d.sibling;
_70=_6f?_3d(_6f):null;
_72=_6d.parent;
if(_6d){
if(_6f&&_70&&_70===_72){
_71=_6f;
if(_61(_6e,_6f)){
_6f=_57(_6f);
}
pos="before";
_75=_6f;
if(_75===null){
_75=_71;
pos="after";
}
}else{
_75=_72;
}
}
if(_6c.target){
_76={"node":_6e,"pos":"last","refNode":_2f("id-"+_6c.target)};
}else{
_76={"node":_6e,"pos":pos,"refNode":_75};
}
return _76;
},_77=function(_78){
var i,_79,_7a,_7b=false;
for(i=0;i<_78.childNodes.length;i++){
if(_78.childNodes[i].className&&_78.childNodes[i].className.indexOf(_a)>=0){
_79=_78.childNodes[i].href;
_7a=_79.substring(_79.lastIndexOf("#")+1);
_7b=true;
}
}
if(_7b!==true){
_7a=(_78.className&&_78.className.indexOf(_8)>=0)?_31(_78):"";
}
return _7a;
},_7c=function(e,n,v){
e.setAttribute(n,v);
},_7d=function(_7e){
var _7f=i$.byId("dnd-drop-form"),_80=ibmCfg.portalConfig.currentPageOID,_81=["lm:oid:"+_31(_7e.node)+"@oid:"+_80],_82=[],add=function(o){
_82.push(o);
},_83,_84,_85,_86,_87,_88,_89,_8a,e;
if(_7f){
_83=i$.hasClass(_7e.refNode,_7);
_84=_7e.refNode.className.indexOf(_9)>=0&&_7e.refNode.className.indexOf("id-")<0;
_85=_83?_7e.refNode:_3d(_7e.refNode);
_86=_31(_85);
_87=_31(_7e.refNode);
_88=_86;
_89=!_84?_77(_7e.refNode):"";
_8a=!_84?_89:_86;
_7f.action=i$.addQueryString(ibmCfg.portalConfig.contentHandlerURI,{"uri":"dnd:lm:oid:"+_86+"@oid:"+_80});
add({name:"stateURL",value:location.href});
add({name:"successURI",value:"nm:oid:"+_80});
add({name:"action",value:"move"});
!_83&&!_84&&_8a&&_8a.length>0&&add({name:"position",value:"lm:oid:"+_8a+"@oid:"+_80});
i$.forEach(_81,function(uri){
add({name:"source",value:uri});
});
i$.forEach(_82,function(i){
e=_1.createElement("input");
_7c(e,"value",i.value);
_7c(e,"name",i.name);
_7c(e,"type","hidden");
_7f.appendChild(e);
});
return _7f;
}
},_8b=function(_8c){
var _8d;
if(_8c){
switch(_8c.pos){
case "last":
_8d.appendChild(_8c.node);
break;
case "before":
_8d.insertBefore(_8c.node,_8c.refNode);
break;
}
}
},_8e=function(_8f){
var _90=_7d(_8f);
_90.submit();
},_91=function(id,_92){
var _93=_66("id-"+id,_92.dir),_94;
_94=(_93&&(_93.sibling||_93.parent))?true:false;
return _94;
},_95=function(id,_96){
var _97=_2f("id-"+id),_98=_2f("id-"+_96),_99;
_99={"node":_97,"pos":"last","refNode":_98};
_8e(_99);
},_9a=function(id,_9b){
var _9c,_9d,_9e,_9f;
if(_9b.dir){
_9c=_6b("id-"+id,_9b);
}else{
if(_9b.target){
_9e=_2f("id-"+id);
_9f=_2f("id-"+_9b.target);
_9c={"node":_9e,"pos":"last","refNode":_9f};
}
}
_9d=_9c.refNode;
_8e(_9c);
},_a0=function(dir,_a1){
var _a2={"dir":dir,"target":_a1};
return _a2;
};
_3.isMovable=_91;
_3.move=_9a;
_3.newMoveInfo=_a0;
_3.DIRECTION_UP="UP";
_3.DIRECTION_DOWN="DOWN";
_3.DIRECTION_LEFT="LEFT";
_3.DIRECTION_RIGHT="RIGHT";
_3.DIRECTIONS=[_3.DIRECTION_UP,_3.DIRECTION_DOWN,_3.DIRECTION_LEFT,_3.DIRECTION_RIGHT];
})(document,window,i$.fromPath("wpModules.theme.MoveControls",true));
var DEBUG=false;


}catch(e){console.log("Module 'wp_movecontrols': ",e);}
try{(function(){
    i$.merge({
	"create_element_here":"create element here"
},i$.fromPath("wpModules.movecontrols.nls",true));
})();
}catch(e){console.log("Module 'wp_movecontrols': ",e);}
try{(function(_1){
var _1=_1,_2=_1.document,_3=wpModules.toolbar,_4=wpModules.toolbar.menuActions,_5=wpModules.theme.MoveControls,_6=i$.Promise,_7=i$.byId,_8=i$.forEach,_9={"then":function(){
}},_a=_5.newMoveInfo,_b=_a(_5.DIRECTION_UP),_c=_a(_5.DIRECTION_DOWN),_d=_a(_5.DIRECTION_LEFT),_e=_a(_5.DIRECTION_RIGHT),_f="layoutContainers",_10=function(_11){
var id=_12(_11),_13=_14(id),_15=msg("delete_control_dialog_title")||"Delete Portlet",_16=msg("confirm_delete_control_anonymous"),p=_17();
if(_13){
_16=msg("confirm_delete_control").replace("{0}",_13);
}
_18("confirm_delete_control",_15,_16).then(function(ret){
if(ret.button=="YES"){
p.resolve(_11.actionUrl);
}
});
return p;
},_19=function(_1a){
var r=_1b(_1a)&&_1c();
return r;
},_1d=function(_1e){
var _1f=msg("edit_wiring_dialog_title_anonymous"),url=_1e.actionUrl+"&returnURI=dialog:CloseModalDialog",p=_17(),_20={"url":url,"title":_1f,"modal":true,"window":_1.parent||_1,"autoResize":true,"padding":0,"callbackFn":function(_21){
if(_21&&_21.status!="CANCEL"){
p.resolve(_22().location.href);
}
}};
_23(_20);
return p;
},_24=function(_25){
var r=_1b(_25)&&_1c();
return r;
},_26=function(_27,_28){
var r=_5.isMovable(_27,_28);
return r;
},_29=function(_2a){
var id=_12(_2a),_2b=_2c(_2a);
var r=_1b(_2a)&&_1c()&&_26(id,_2b);
return r;
},_2d=function(_2e,_2f){
var r=_9;
if(_26(_2e,_2f)){
_5.move(_2e,_2f);
}
return r;
},_30=function(_31){
var id=_12(_31),_32=_2c(_31);
var r=_2d(id,_32);
return r;
},_33=function(_34){
var _35=_12(_34),_36=_37(_22()),_38=_39(_36),r=_9;
if(_38){
var _3a=_a(null,_38);
_5.move(_35,_3a);
}
return r;
},_37=function(win){
var _3b=win.document.getElementById(_f);
if(_3b&&_3b.getElementsByClassName){
var _3c=_3b.getElementsByClassName("hiddenWidgetsContainer");
if(_3c&&_3c.length>0){
var r=_3c[0];
return r;
}
}
return null;
},_39=function(_3d){
var _3e=_3d.className.split(" ");
for(var i=0,l=_3e.length;i<l;++i){
var cls=_3e[i];
if(cls.indexOf("id-")===0){
var r=cls.substring(3);
return r;
}
}
return null;
},_3f=function(_40){
var r=_1b(_40)&&_1c();
if(r){
var _41=_37(_22());
if(_41&&_41.getElementsByClassName){
var _42=_12(_40),_43=_41.getElementsByClassName("id-"+_42);
r=!_43||_43.length<=0;
}
}
return r;
},_1c=function(){
var r=_3.isEditModeActive();
return r;
},_1b=function(_44){
var r=_44.visibility!==false;
return r;
},_23=function(_45){
var _46=new wpModules.dialog.Dialog(_45);
_46.open();
},_14=function(_47){
var _48=_7("wpRegionId"+_47);
var r=_48?_49(_48):null;
return r;
},_49=function(n){
if(n.nodeType==3){
var r=n.nodeValue;
return r;
}
var c=n.childNodes;
for(var i=0,l=c.length;i<l;++i){
var r=_49(c[i]);
return r;
}
},_12=function(_4a){
var r=_4b(_4a,"wid");
return r;
},_2c=function(_4c){
var dir=_4b(_4c,"direction"),r=null;
if("up"==dir){
r=_b;
}else{
if("down"==dir){
r=_c;
}else{
if("left"==dir){
r=_d;
}else{
if("right"==dir){
r=_e;
}
}
}
}
return r;
},_4b=function(_4d,key){
var r=_4d.metadata[key];
return r;
},_22=function(){
var r=_3.getViewAreaWindow();
return r;
},_18=function(id,_4e,_4f){
var dlg=wpModules.dialog,r=dlg.confirm({"id":id,"title":_4e,"markup":"<span style=\"font-size: 1.1em;\">"+_4f+"</span>","icon":dlg.confirm.ICON.EXCLAMATION,"buttons":dlg.confirm.BUTTONS.YESNO,"window":_1.parent||_1});
return r;
},_17=function(_50){
var p=new _6();
if(_50){
p.resolve(_50);
}
return p;
},msg=function(key){
var r=_4.nls[key];
return r;
},get=function(obj,key){
var o=obj[key];
if(o){
var v=o.value;
if(v&&v.length>0){
var r=v[0];
return r;
}
}
return null;
};
_4.confirmDeleteControl=_10;
_4.isDeleteControlVisible=_19;
_4.openEditWiringDialog=_1d;
_4.isEditWiringVisible=_24;
_4.isControlMovable=_29;
_4.moveControl=_30;
_4.hideControl=_33;
_4.isHideControlVisible=_3f;
})(window);


}catch(e){console.log("Module 'gbg_wp_toolbar_controlactions': ",e);}
try{!function(){var o,n;window,o=wpModules.toolbar.menuActions,n=function(){return gbgCfg.currentRole.manager||gbgCfg.currentRole.editor},o.showHideControl=function(n){return o.isHideControlVisible(n)&&gbgCfg.currentRole.admin},o.showDeleteControl=function(e){return o.isDeleteControlVisible(e)&&n()},o.isControlVisible=function(e){return o.isControlMovable(e)&&n()}}();
}catch(e){console.log("Module 'gbg_wp_toolbar_controlactions': ",e);}