/****************************** * Create appendEvent function * ******************************/ function appendEvent(el, evname, func) { try {el.addEventListener(evname, func, false); return;} catch(e){} try {el.attachEvent("on" + evname, func); return;} catch(e){} try {el["on" + evname] = func; return;} catch(e){} } /*************************************************** * Goes through elements and attaches call me popup * ***************************************************/ function attachCallMe() { var elements = ["CallMeLink"]; var d = new Array(); for (i = 0; i < elements.length; i++) { try { d[i] = document.getElementById(elements[i]); d[i].setAttribute("href", "javascript:;"); d[i].onclick = function() { window.open("https://sine.ni.com/apps/utf8/nicc.call_me?p_form_id=CALLME&p_action=call", "CallMe"+new Date().getTime(), "width=650,height=650"); } } catch(e) {} } } /*********************************************** * Attach the call me popup when the page loads * ***********************************************/ appendEvent(window, "load", attachCallMe);