Lync js
1 <script type="text/javascript">
2 var NameObj;
3 function InitializeObject() {
4 function onStatusChange(name, status, id) {
5 tip = "../Images/lync/imnhdr" + status + ".gif";
6 document.getElementById(id).src = tip;
7 }
8 NameObj = new ActiveXObject('Name.NameCtrl.1');
9 NameObj.OnStatusChange = onStatusChange;
10 }
11 InitializeObject();
12
13 function ShowOOUI(id) {
14 NameObj.ShowOOUI(id.alt, 0, document.body.clientWidth / 2, document.body.clientHeight / 2);
15 }
16 function HideOOUI() {
17 NameObj.HideOOUI();
18 }
19
20 function GetState() {
21 var list = $(".imstate");
22 for (var i = 0; i <= list.length - 1; i++) {
23 list[i].id="imstate"+i;
24 NameObj.GetStatus(list[i].alt, list[i].id);
25 }
26 }
27 GetState();
28 </script>
2 var NameObj;
3 function InitializeObject() {
4 function onStatusChange(name, status, id) {
5 tip = "../Images/lync/imnhdr" + status + ".gif";
6 document.getElementById(id).src = tip;
7 }
8 NameObj = new ActiveXObject('Name.NameCtrl.1');
9 NameObj.OnStatusChange = onStatusChange;
10 }
11 InitializeObject();
12
13 function ShowOOUI(id) {
14 NameObj.ShowOOUI(id.alt, 0, document.body.clientWidth / 2, document.body.clientHeight / 2);
15 }
16 function HideOOUI() {
17 NameObj.HideOOUI();
18 }
19
20 function GetState() {
21 var list = $(".imstate");
22 for (var i = 0; i <= list.length - 1; i++) {
23 list[i].id="imstate"+i;
24 NameObj.GetStatus(list[i].alt, list[i].id);
25 }
26 }
27 GetState();
28 </script>